feat(server): Phase 3: control store backend#174
Draft
lan17 wants to merge 5 commits intofeature/control-phase-1from
Draft
feat(server): Phase 3: control store backend#174lan17 wants to merge 5 commits intofeature/control-phase-1from
lan17 wants to merge 5 commits intofeature/control-phase-1from
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR implements the server side of Phase 3 from the control store and versioning plan.
It adds the control store schema, seeds the default store in the migration, and wires the backend flows for publish, unpublish, browse, and clone on top of
ControlService. It also enforces the policy we agreed on: published controls are catalog-only artifacts and cannot be attached directly to agents or policies.Design and implementation plan:
This PR is intentionally server-first. SDK and UI follow-up work is still separate.
What changed
control_stores,control_stores_controls, andcontrols.cloned_control_iddefaultstore in the migration rather than app startupControlServiceto own publish, unpublish, clone, published browse, and store cleanup behaviorPOST/DELETE /api/v1/control-stores/default/controls/{control_id}GET /api/v1/control-stores/default/controlswith cursor pagination and the constrained v1 filter surfacePOST /api/v1/controls/{control_id}/cloneValidation
uv run pytest server/tests/test_control_store.py server/tests/test_control_phase3_alembic_migration.py -quv run pytest server/tests/test_controls.py server/tests/test_controls_additional.py server/tests/test_policies.py server/tests/test_policy_integration.py server/tests/test_agents_additional.py server/tests/test_control_versions.py server/tests/test_services_controls.py -qmake server-testNotes
This PR is stacked on top of Phase 1/2: