state-hub/api/schemas
tegwick 88ba666c95
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 2s
Build and Publish Multi-Context Image / build-and-push (push) Successful in 1m23s
CUST-WP-0061-T01: intake work-record entity (stage 3)
Fresh hub entity per the founder-reviewed decision (not a suggestions
rename-bridge): kind: intake per canon/standards/work-record-types_v0.1.md,
lifecycle open -> vetted -> routed -> closed(promoted|declined|absorbed).

- api/models/base.py::new_uuid7 -- dependency-free RFC 9562 UUIDv7
  generator (48-bit ms timestamp, version/variant bits, random remainder);
  existing tables keep new_uuid (UUIDv4) unchanged, this is opt-in for new
  work-record entities per the identity-layering canon
- api/models/intake.py: Intake + IntakeNote ORM models, mirroring
  Decision's shape (topic/workplan/repo scope, lane, status, outcome,
  promoted_to back-link); CHECK constraints enforce scope-required,
  closed-requires-outcome, promoted-requires-promoted_to at the DB level
- migrations/a7c3e9f1b4d2: intakes + intake_notes tables, 3 enum types
- api/routers/intake.py: list/create/get/patch + /route + /close + /notes
  actions, mirroring decisions.py's pattern (409 on invalid transitions,
  progress event on close)
- api/schemas/intake.py: Pydantic create/update/route/close/note schemas
- mcp_server/server.py: create_intake, list_intakes, route_intake,
  close_intake tool wrappers
- tests/test_intake.py: 12 tests against the real Postgres test DB
  (create/list/scope-validation, full lifecycle incl. 409s and the
  promoted-requires-promoted_to constraint, notes, UUIDv7 verification)

Verified live against the running dev API + DB (not just pytest): applied
the migration, restarted the MCP server, and ran a full create -> route ->
close cycle over the real REST endpoints. No regressions: full existing
suite (test_routers_core, test_suggestions, test_mcp_smoke,
test_mcp_write_tools, test_mcp_registration, test_consistency_check,
test_consistency_sweep) all green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 00:27:45 +02:00
..
__init__.py feat(classification-spine): implement STATE-WP-0065 repo-anchored model 2026-06-22 13:52:13 +02:00
agent_message.py feat: import core schemas from hub-core 2026-06-07 01:20:57 +02:00
capability_request.py feat(classification-spine): implement STATE-WP-0065 repo-anchored model 2026-06-22 13:52:13 +02:00
compat.py STATE-WP-0069 T04/T06: body metering and workplan-first state internals 2026-07-08 23:13:28 +02:00
consistency_sweep.py finish(STATE-WP-0064): cut over scheduler and split sweep errors from failures 2026-06-22 01:20:59 +02:00
contribution.py feat(classification-spine): implement STATE-WP-0065 repo-anchored model 2026-06-22 13:52:13 +02:00
decision.py STATE-WP-0069 T04/T06: body metering and workplan-first state internals 2026-07-08 23:13:28 +02:00
doi.py feat: import core schemas from hub-core 2026-06-07 01:20:57 +02:00
domain.py feat: reexport domain schemas from hub-core 2026-06-07 10:52:49 +02:00
domain_goal.py feat(goals): add domain/repo goal tracking and update_workstream MCP tool 2026-03-09 00:15:29 +01:00
execution.py feat(classification-spine): implement STATE-WP-0065 repo-anchored model 2026-06-22 13:52:13 +02:00
extension_point.py feat(classification-spine): implement STATE-WP-0065 repo-anchored model 2026-06-22 13:52:13 +02:00
fabric_graph.py Implement financial Fabric vNext read model 2026-05-24 02:52:59 +02:00
intake.py CUST-WP-0061-T01: intake work-record entity (stage 3) 2026-07-21 00:27:45 +02:00
interface_change.py feat(state-hub): Interface Change Registry (CUST-WP-0033 T01-T06) 2026-04-26 15:29:08 +02:00
legacy_meter.py feat: add workplan aliases and legacy meter 2026-06-04 08:25:31 +02:00
managed_repo.py feat(classification-spine): implement STATE-WP-0065 repo-anchored model 2026-06-22 13:52:13 +02:00
progress_event.py STATE-WP-0069 T04/T06: body metering and workplan-first state internals 2026-07-08 23:13:28 +02:00
recently_on_scope.py Add hourly RecentlyOnScope batch endpoint 2026-05-22 16:14:08 +02:00
reconciliation.py Harden reconciliation conflict handling 2026-05-23 18:18:44 +02:00
repo_goal.py feat(goals): add domain/repo goal tracking and update_workstream MCP tool 2026-03-09 00:15:29 +01:00
sbom.py feat(gems): three-pass schema migration aligning state-hub with GEMS 2026-03-02 23:39:17 +01:00
service.py STATE-WP-0062 T2: /services catalog API over the two-dimension model 2026-06-19 20:56:19 +02:00
state.py STATE-WP-0070 T04 (partial): drop open_workstreams from /state/summary 2026-07-13 10:04:38 +02:00
suggestion.py Finish CUST-WP-0011 and implement STATE-WP-0061 suggestion backlog. 2026-07-06 10:52:49 +02:00
task.py feat(classification-spine): implement STATE-WP-0065 repo-anchored model 2026-06-22 13:52:13 +02:00
technical_debt.py feat(classification-spine): implement STATE-WP-0065 repo-anchored model 2026-06-22 13:52:13 +02:00
token_event.py feat(classification-spine): implement STATE-WP-0065 repo-anchored model 2026-06-22 13:52:13 +02:00
topic.py feat(state-hub): implement v0.5 — dynamic domains & multi-repo 2026-02-28 15:20:15 +01:00
tpsc.py feat: reexport TPSC schemas from hub-core 2026-06-07 10:43:21 +02:00
workplan.py Workplan consistency optimization 2026-07-04 00:42:56 +02:00
workplan_dependency.py feat(classification-spine): implement STATE-WP-0065 repo-anchored model 2026-06-22 13:52:13 +02:00
workstream.py feat(classification-spine): implement STATE-WP-0065 repo-anchored model 2026-06-22 13:52:13 +02:00
workstream_dependency.py feat(classification-spine): implement STATE-WP-0065 repo-anchored model 2026-06-22 13:52:13 +02:00