state-hub/api/routers
tegwick 6c4fc64ef3
All checks were successful
CI Smoke / host-smoke (push) Successful in 1s
CI Smoke / container-smoke (push) Successful in 19s
Build and Publish Multi-Context Image / build-and-push (push) Successful in 1m4s
CUST-WP-0061-T06: retire suggestions to read-only legacy
Founder-reviewed decision (WorkOrchestrationArchitectureDraft.md v0.2
section 8 item 6): the fresh intake work-record entity replaces
suggestions, not a rename-bridge. All 5 mutation endpoints (create, vet,
decline, promote, bump-relevance) now 410 with a pointer to POST
/intakes/ and the migration doc; GET/list stay live for the historical
record (10 rows migrated to file-backed intake records in the-custodian,
see that repo's intake-legacy-suggestions-migration.md and CUST-IN-0001
through CUST-IN-0010).

Removed dead code the retirement makes unreachable: Task/TaskPriority/
TaskStatus/normalize_task_status imports (only used by the deleted
promote body), the suggestion_relevance.bump_relevance import, and the
_ALLOWED_*_FROM stage-guard sets + _reject_stage helper (only used by
the deleted vet/decline/promote bodies). WSJF ranking (compute_wsjf,
cost_of_delay, suggestion_sort_key) stays -- still exercised by the
surviving GET /suggestions/?rank=wsjf read path.

MCP tool docstrings (create_suggestion, vet_suggestion,
decline_suggestion, promote_suggestion_to_task,
bump_suggestion_relevance) updated to point at the replacement
(create_intake/route_intake/close_intake) rather than silently 410ing
with no guidance.

tests/test_suggestions.py rewritten: verifies all 5 mutations 410,
GET/list still work for historical rows (seeded directly via the DB
session since creation is retired -- there's no other way to get
historical data into the table anymore), 404 still behaves normally on
unknown ids. Live-verified against the running dev API: POST 410s,
GET with include_terminal=true still returns all 10 migrated-and-declined
historical rows. No regressions: full repo suite green (563 tests).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 01:51:59 +02:00
..
__init__.py Add state-hub v0.1 — local-first state service for the Custodian 2026-02-24 17:47:49 +01:00
capability_requests.py Finish CUST-WP-0011 and implement STATE-WP-0061 suggestion backlog. 2026-07-06 10:52:49 +02:00
consistency_sweep.py feat(STATE-WP-0064): start parallel week with source-tagged sweep runners 2026-06-21 21:46:43 +02:00
contributions.py feat(classification-spine): implement STATE-WP-0065 repo-anchored model 2026-06-22 13:52:13 +02:00
decisions.py STATE-WP-0069 T04/T06: body metering and workplan-first state internals 2026-07-08 23:13:28 +02:00
domain_goals.py feat(state-hub): CUST-WP-0040 — NATS lifecycle event publishing for activity-core 2026-05-17 05:49:29 +02:00
domains.py feat(classification-spine): implement STATE-WP-0065 repo-anchored model 2026-06-22 13:52:13 +02:00
execution.py feat(api): retire phase-1/2 /workstreams REST aliases with 410 stranglers 2026-07-10 13:31:57 +02:00
extension_points.py feat(gems): three-pass schema migration aligning state-hub with GEMS 2026-03-02 23:39:17 +01:00
fabric.py Implement financial Fabric vNext read model 2026-05-24 02:52:59 +02:00
flows.py STATE-WP-0069 T06: add workplan flow entity and prefer open_workplans 2026-07-08 21:26:29 +02:00
intake.py CUST-WP-0061-T01: intake work-record entity (stage 3) 2026-07-21 00:27:45 +02:00
interface_changes.py feat(state-hub): Interface Change Registry (CUST-WP-0033 T01-T06) 2026-04-26 15:29:08 +02:00
legacy_meter.py Add 8-hour default window for legacy-meter deploy monitoring 2026-07-09 01:36:02 +02:00
messages.py feat: use hub-core messages router 2026-06-07 11:22:13 +02:00
policy.py feat: use hub-core policy router 2026-06-07 13:14:08 +02:00
progress.py STATE-WP-0069 T04: Sunset headers and POST /progress body metering 2026-07-08 23:06:45 +02:00
recently_on_scope.py Add hourly RecentlyOnScope batch endpoint 2026-05-22 16:14:08 +02:00
reconciliation.py feat(classification-spine): implement STATE-WP-0065 repo-anchored model 2026-06-22 13:52:13 +02:00
repo_goals.py feat(goals): add domain/repo goal tracking and update_workstream MCP tool 2026-03-09 00:15:29 +01:00
repos.py Add GET /repos/todo-md-staleness for daily TODO.md review 2026-07-08 13:19:06 +02:00
sbom.py fix(api): normalize trailing slashes — no slash on param routes 2026-04-26 15:13:01 +02:00
services.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
suggestions.py CUST-WP-0061-T06: retire suggestions to read-only legacy 2026-07-21 01:51:59 +02:00
tasks.py STATE-WP-0069 T04/T06: body metering and workplan-first state internals 2026-07-08 23:13:28 +02:00
technical_debt.py fix(api): normalize trailing slashes — no slash on param routes 2026-04-26 15:13:01 +02:00
token_events.py STATE-WP-0069 T04: meter workstream_id query-param aliases 2026-07-08 21:32:14 +02:00
topics.py feat(classification-spine): implement STATE-WP-0065 repo-anchored model 2026-06-22 13:52:13 +02:00
tpsc.py feat: use hub-core TPSC router 2026-06-07 14:08:55 +02:00
workstream_dependencies.py feat(api): retire phase-1/2 /workstreams REST aliases with 410 stranglers 2026-07-10 13:31:57 +02:00
workstreams.py feat(api): retire phase-1/2 /workstreams REST aliases with 410 stranglers 2026-07-10 13:31:57 +02:00