docs: record repo router import seam

This commit is contained in:
2026-06-07 22:27:43 +02:00
parent 063705756e
commit bf90efee28
2 changed files with 25 additions and 6 deletions

View File

@@ -120,6 +120,11 @@ Current implementation status:
mounts the hub-core request list/detail router factory with State Hub's own mounts the hub-core request list/detail router factory with State Hub's own
domain and request models injected, while keeping request creation, status domain and request models injected, while keeping request creation, status
transitions, acceptance, patching, dispute, and reroute workflow routes local. transitions, acceptance, patching, dispute, and reroute workflow routes local.
- 2026-06-07: CUST-WP-0048 T04 repos router boundary resolved. State Hub now
mounts the hub-core repo registry factory for collection, lookup, detail,
update, and host-path routes with State Hub's own models and schemas injected,
while keeping onboarding, DoI, scope-health, dispatch, archive, and
consistency-sync routes local.
## Extract Now ## Extract Now
@@ -189,7 +194,7 @@ implementation is coupled to dev-hub concepts:
| Surface | Coupling to resolve | | Surface | Coupling to resolve |
| --- | --- | | --- | --- |
| `Domain` and `domains.py` detail views | Detail counts now use a dev-hub callback behind the hub-core router factory. Domain relationships still need a later model split if State Hub stops carrying topics/goals on the core table. | | `Domain` and `domains.py` detail views | Detail counts now use a dev-hub callback behind the hub-core router factory. Domain relationships still need a later model split if State Hub stops carrying topics/goals on the core table. |
| `ManagedRepo` | State Hub create/read schemas now extend hub-core contracts, with `topic_id`, SBOM fields, and state-sync timestamps kept as dev-hub extensions. The repos router still carries onboarding, DoI, dispatch, and sync behavior locally. | | `ManagedRepo` | State Hub create/read schemas now extend hub-core contracts, with `topic_id`, SBOM fields, and state-sync timestamps kept as dev-hub extensions. Generic repo registry collection, lookup, detail, update, and host-path routes now mount from the hub-core factory; State Hub keeps onboarding, DoI, scope-health, dispatch, archive, and consistency-sync behavior locally. |
| `CapabilityRequest` | Catalog schemas, catalog CRUD routes, and read-only request list/detail routes now import from hub-core. Adapter seam is implemented with generic `request_context` and `fulfillment_context`; State Hub still needs a later refactor to map workstream/task references into those fields or a dev-hub extension table before request workflow routes can move. | | `CapabilityRequest` | Catalog schemas, catalog CRUD routes, and read-only request list/detail routes now import from hub-core. Adapter seam is implemented with generic `request_context` and `fulfillment_context`; State Hub still needs a later refactor to map workstream/task references into those fields or a dev-hub extension table before request workflow routes can move. |
| `ProgressEvent` | Adapter seam implemented with generic `subject_refs`; State Hub still needs a later refactor to map topic/workstream/task/decision foreign keys into that field or a dev-hub extension table. | | `ProgressEvent` | Adapter seam implemented with generic `subject_refs`; State Hub still needs a later refactor to map topic/workstream/task/decision foreign keys into that field or a dev-hub extension table. |
| MCP tools in `mcp_server/server.py` | Generic tools are still mixed into the State Hub server module. T08 should begin replacing those registrations with `HubCoreMCPServer` inheritance or composition while dev-hub keeps its own tools. | | MCP tools in `mcp_server/server.py` | Generic tools are still mixed into the State Hub server module. T08 should begin replacing those registrations with `HubCoreMCPServer` inheritance or composition while dev-hub keeps its own tools. |
@@ -227,7 +232,6 @@ to import it:
## Next Step ## Next Step
Continue T08 by applying host-model injection or callback seams to the next Continue CUST-WP-0048 by resolving the capability request write workflow and
lowest-risk generic routers. Repos and the capability request write workflow then the generic MCP registration split. Do not rename State Hub to dev-hub
each need a small dependency-injection review before replacement. Do not rename until T05-T08 prove the shared package boundary.
State Hub to dev-hub until T05-T08 prove the shared package boundary.

View File

@@ -87,6 +87,14 @@ The migration should proceed by narrow seams:
passed, hub-core pytest passed with 22 tests, the post-format import slice passed, hub-core pytest passed with 22 tests, the post-format import slice
passed with 14 tests, State Hub compile checks passed, and State Hub focused passed with 14 tests, State Hub compile checks passed, and State Hub focused
tests passed with 95 tests. tests passed with 95 tests.
- 2026-06-07: Added configurable host-model/schema injection and route grouping
to `hub_core.routers.repos.create_repos_router`, then replaced State Hub's
generic repo registry routes with the hub-core factory. State Hub keeps
onboarding, DoI, scope-health, dispatch, archive, and consistency-sync routes
local. Verification: hub-core compile checks passed, hub-core import tests
passed with 16 tests, full hub-core pytest passed with 24 tests, State Hub
compile checks passed, and State Hub repo/import/MCP focused tests passed with
81 tests.
## T01 - Establish Editable Dependency And Schema Re-Exports ## T01 - Establish Editable Dependency And Schema Re-Exports
@@ -133,7 +141,7 @@ explicit adapter seam.
```task ```task
id: CUST-WP-0048-T04 id: CUST-WP-0048-T04
status: todo status: done
priority: high priority: high
state_hub_task_id: "321434ee-152b-436c-becd-4e56a44de716" state_hub_task_id: "321434ee-152b-436c-becd-4e56a44de716"
``` ```
@@ -143,6 +151,13 @@ from dev-hub-specific onboarding, dispatch, DoI, scope-health, SBOM, and state
sync behavior. Either replace the reusable subset with a hub-core factory or sync behavior. Either replace the reusable subset with a hub-core factory or
document the adapter seam needed before replacement. document the adapter seam needed before replacement.
Completed (2026-06-07): hub-core now owns the reusable repo registry route
factory for collection, lookup, detail, update, and host-path registration.
State Hub mounts those routes in ordered groups so `/repos/scope-health` and
other fixed local routes cannot be swallowed by `/{slug}`. State Hub keeps the
dev-hub-specific repo surfaces local: onboarding, DoI, scope-health, dispatch,
archive, and consistency sync.
## T05 - Resolve Capability Request Write Workflow Boundary ## T05 - Resolve Capability Request Write Workflow Boundary
```task ```task