feat(sdk): add out of the box controls - part 1 - #246
feat(sdk): add out of the box controls - part 1#246namrataghadi-galileo wants to merge 3 commits into
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
| template: OutOfBoxControlTemplate, | ||
| ) -> str: | ||
| control_service = ControlService(session) | ||
| if await control_service.active_control_name_exists(template.name, namespace_key=namespace_key): |
There was a problem hiding this comment.
Using an active, mutable name as the seed identity resurrects deleted controls and duplicates renamed ones on the next standalone startup. Could we persist an immutable seed/source ID plus an explicit opt-out tombstone, and cover delete/rename followed by reseeding?
There was a problem hiding this comment.
Implemented. Out-of-box controls now persist an immutable, namespace-scoped source_id, and deleting a seeded control records an explicit opt-out tombstone. Reseeding resolves by source ID, so renamed controls are preserved and deleted controls are not resurrected. Added regression coverage for both rename → reseed and delete → reseed scenarios.
| logger.info(f"Evaluator discovery complete. Available evaluators: {available}") | ||
|
|
||
| try: | ||
| seed_result = await seed_out_of_box_controls( |
There was a problem hiding this comment.
The try/except is fail-open only after this await returns. A database lock wait can hold startup before lifespan yields, especially because statement timeouts may be disabled. Please bound the whole bootstrap, or set a local lock timeout and retry later.
There was a problem hiding this comment.
Addressed. The full OOTB bootstrap await is now bounded by a configurable timeout (10 seconds by default). If it blocks, the operation is cancelled and startup continues fail-open with a warning. Added lifespan coverage using a seed coroutine that never returns.
Summary
Scope
agent_control_server.bootstrapmodule, startup seeding hook, and bootstrap tests.Risk and Rollout
seed_out_of_box_controlsand/or revert the bootstrap module and related tests.Testing
make check(not run becauseuvdependency resolution hit private index 401s).venvChecklist
.mdfile