feat(STATE-WP-0079): retire the suggestion-backlog surface (slice E1)
History is archived fleet-side, so the read surface has no remaining job. - api/routers/suggestions.py: whole prefix 410s with a pointer to intake and to the archive; the router drops from 176 lines to a stub - mcp_server: the 6 suggestion tools removed outright rather than stubbed -- a retired tool that still appears in the tool list costs every agent session context on every call, which is the opposite of retiring it - write_idempotency: 5 /suggestions rules dropped - dashboard: suggestions.md deleted, nav entry removed, reference.md and wsjf-triage.md updated; docs/suggestions.md rewritten as archive pointer - tests: two tests pinned the old read-live behaviour and now pin the retirement contract instead Tables stay: they are retire/archive in SHR-INV-0001 and are captured by the final dump at T06. Untouched, and worth knowing during cutover: ui-feedback.md / todo.md 'suggestions' are Shift+click dashboard feedback backed by technical_debt, a different entity that shares the word. E3 (dashboard-meta) is that page; its owner is state-hub-until-cutover so it retires at the T06 window, not now. Full suite 612 passed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
98af485cd5
commit
fb363b37d3
13 changed files with 148 additions and 447 deletions
|
|
@ -83,7 +83,11 @@ class TestSuggestionsRetired:
|
|||
r = await client.post(f"/suggestions/{sid}/bump-relevance", json={})
|
||||
assert r.status_code == 410
|
||||
|
||||
async def test_get_and_list_still_work_for_historical_rows(self, client, test_engine):
|
||||
async def test_reads_are_retired_too(self, client, test_engine):
|
||||
"""Slice E1 (STATE-WP-0079-T05, 2026-08-20): reads were kept live only
|
||||
to keep the historical backlog reachable. That history is archived at
|
||||
the-custodian/docs/archived-suggestion-backlog.md, so the read surface
|
||||
is retired as well."""
|
||||
await _create_domain(client, "custodian", "Custodian")
|
||||
sid = await _seed_suggestion(
|
||||
test_engine, domain_slug="custodian",
|
||||
|
|
@ -91,16 +95,17 @@ class TestSuggestionsRetired:
|
|||
origin="WARDEN-WP-0012", origin_ref="example",
|
||||
)
|
||||
|
||||
r = await client.get(f"/suggestions/{sid}")
|
||||
assert r.status_code == 200
|
||||
assert r.json()["title"] == "Historical gated-need signal"
|
||||
for path in (f"/suggestions/{sid}", "/suggestions/", f"/suggestions/{sid}/notes"):
|
||||
r = await client.get(path)
|
||||
assert r.status_code == 410, path
|
||||
|
||||
r2 = await client.get("/suggestions/")
|
||||
assert r2.status_code == 200
|
||||
assert any(s["id"] == sid for s in r2.json())
|
||||
|
||||
async def test_unknown_id_still_404s_not_410(self, client):
|
||||
"""Read paths keep their normal semantics; only mutations are
|
||||
blanket-retired."""
|
||||
async def test_unknown_id_also_410s(self, client):
|
||||
"""The whole prefix is retired, so there is nothing left to 404 on."""
|
||||
r = await client.get(f"/suggestions/{uuid.uuid4()}")
|
||||
assert r.status_code == 404
|
||||
assert r.status_code == 410
|
||||
|
||||
async def test_retirement_detail_points_at_intake_and_archive(self, client):
|
||||
r = await client.get("/suggestions/")
|
||||
detail = r.json()["detail"]
|
||||
assert "POST /intakes/" in detail
|
||||
assert "archived-suggestion-backlog.md" in detail
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue