docs: record messages router import seam

This commit is contained in:
2026-06-07 11:30:50 +02:00
parent fb6d01b318
commit 72478e820e
2 changed files with 16 additions and 5 deletions

View File

@@ -91,6 +91,9 @@ Current implementation status:
- 2026-06-07: T08 domain schema imports started. State Hub now imports base
domain schemas from `hub_core.schemas.domain` while keeping dev-hub-specific
domain detail and summary schemas local.
- 2026-06-07: T08 router imports started. State Hub now mounts the hub-core
messages router factory with State Hub's own `AgentMessage` model injected,
proving the router seam can avoid cross-metadata SQLAlchemy model imports.
## Extract Now
@@ -198,8 +201,8 @@ to import it:
## Next Step
Continue T08 by replacing the next lowest-risk generic schema imports. Router
imports should wait until the model metadata/migration strategy is explicit,
or use host-model injection rather than importing hub-core SQLAlchemy models
directly into State Hub. Do not rename State Hub to dev-hub until T05-T08 prove
the shared package boundary.
Continue T08 by applying the host-model injection pattern to the next
lowest-risk generic routers. Repos, domains, TPSC, progress, and capability
requests each need a small dependency-injection review before replacement. Do
not rename State Hub to dev-hub until T05-T08 prove the shared package
boundary.

View File

@@ -278,6 +278,14 @@ from `hub_core.schemas.domain` while keeping dev-hub-specific `DomainDetail`
and `DomainSummary` local. Verification: State Hub import/core-router focused
tests passed with 58 tests.
Implementation slice 4 (2026-06-07): added host-model injection to
`hub_core.routers.messages.create_messages_router`, then replaced State Hub's
local `api.routers.messages` implementation with the hub-core factory while
injecting State Hub's own `AgentMessage` model. This is the first router import
that avoids importing hub-core SQLAlchemy metadata into State Hub. Verification:
hub-core `pytest` passed with 16 tests; State Hub import/core-router/MCP smoke
focused tests passed with 70 tests.
### T09 — Rename MCP server state-hub to dev-hub
```task