diff --git a/docs/evidence/legacy-meter-weekly-review-20260820.json b/docs/evidence/legacy-meter-weekly-review-20260820.json new file mode 100644 index 0000000..307b108 --- /dev/null +++ b/docs/evidence/legacy-meter-weekly-review-20260820.json @@ -0,0 +1,1716 @@ +{ + "captured_at": "2026-08-19T23:12:05.714391+00:00", + "api_base": "http://127.0.0.1:8000", + "workplan": "STATE-WP-0070", + "retired_interfaces": [], + "weekly_review": { + "generated_at": "2026-08-19T23:12:05.708668Z", + "window_start": "2026-08-12T23:12:05.303562Z", + "window_end": "2026-08-19T23:12:05.303562Z", + "cadence": "weekly", + "activity_core_handoff": { + "activity_id": "statehub-legacy-interface-review", + "cadence": "weekly", + "source_endpoint": "/legacy-meter/weekly-review", + "state_owner": "state-hub", + "scheduler_owner": "activity-core" + }, + "interfaces": [ + { + "interface": { + "id": "8051fb40-66c9-4dc4-a413-13e8573e04a3", + "interface_key": "event_subject:org.statehub.workstream.completed", + "interface_kind": "event_subject", + "legacy_since": "2026-06-04T06:09:42.198193Z", + "replacement_ref": "org.statehub.workplan.completed", + "owner_component": "state-hub.events", + "status": "retired", + "replacement_verified": true, + "manual_hold": false, + "hold_reason": null, + "notes": "Retired by STATE-WP-0069 closeout", + "retired_at": "2026-07-08T21:38:52.773601Z", + "created_at": "2026-06-04T06:09:42.198193Z", + "updated_at": "2026-07-08T21:38:52.761243Z" + }, + "all_time": { + "calls": 255, + "tenant_count": 1, + "user_count": 1, + "component_count": 1, + "tenants": { + "unknown": 255 + }, + "users": { + "unknown": 255 + }, + "components": { + "state-hub.events": 255 + } + }, + "window": { + "calls": 0, + "tenant_count": 0, + "user_count": 0, + "component_count": 0, + "tenants": {}, + "users": {}, + "components": {} + }, + "last_seen_at": "2026-07-08T20:49:12.839383Z", + "retirement_candidate": false, + "retirement_reason": "already retired" + }, + { + "interface": { + "id": "63ed90e3-42b4-431a-94db-e1254a52f9e2", + "interface_key": "mcp:create_workstream", + "interface_kind": "mcp_tool", + "legacy_since": "2026-07-10T13:19:44.205900Z", + "replacement_ref": "create_workplan", + "owner_component": "state-hub.mcp", + "status": "legacy", + "replacement_verified": true, + "manual_hold": false, + "hold_reason": null, + "notes": "Registered by STATE-WP-0070 T03 \u2014 zero-window streak starts at registration", + "retired_at": null, + "created_at": "2026-07-10T13:19:44.205900Z", + "updated_at": "2026-07-10T13:19:44.205900Z" + }, + "all_time": { + "calls": 2, + "tenant_count": 1, + "user_count": 1, + "component_count": 1, + "tenants": { + "unknown": 2 + }, + "users": { + "unknown": 2 + }, + "components": { + "state-hub.mcp": 2 + } + }, + "window": { + "calls": 0, + "tenant_count": 0, + "user_count": 0, + "component_count": 0, + "tenants": {}, + "users": {}, + "components": {} + }, + "last_seen_at": "2026-07-10T13:20:43.378546Z", + "retirement_candidate": true, + "retirement_reason": "no measured usage in review window" + }, + { + "interface": { + "id": "b6a5fe44-fb85-4ef7-a273-78d09da777af", + "interface_key": "mcp:list_workstreams", + "interface_kind": "mcp_tool", + "legacy_since": "2026-07-10T13:19:26.075491Z", + "replacement_ref": "list_workplans", + "owner_component": "state-hub.mcp", + "status": "legacy", + "replacement_verified": true, + "manual_hold": false, + "hold_reason": null, + "notes": null, + "retired_at": null, + "created_at": "2026-07-10T13:19:26.075491Z", + "updated_at": "2026-07-10T13:19:26.075491Z" + }, + "all_time": { + "calls": 2, + "tenant_count": 1, + "user_count": 1, + "component_count": 1, + "tenants": { + "unknown": 2 + }, + "users": { + "unknown": 2 + }, + "components": { + "state-hub.mcp": 2 + } + }, + "window": { + "calls": 0, + "tenant_count": 0, + "user_count": 0, + "component_count": 0, + "tenants": {}, + "users": {}, + "components": {} + }, + "last_seen_at": "2026-07-10T13:20:42.374940Z", + "retirement_candidate": true, + "retirement_reason": "no measured usage in review window" + }, + { + "interface": { + "id": "53c3372b-307d-4d6a-8ea4-bc36cacdcaf2", + "interface_key": "mcp:update_workstream", + "interface_kind": "mcp_tool", + "legacy_since": "2026-07-10T13:19:44.255216Z", + "replacement_ref": "update_workplan", + "owner_component": "state-hub.mcp", + "status": "legacy", + "replacement_verified": true, + "manual_hold": false, + "hold_reason": null, + "notes": "Registered by STATE-WP-0070 T03 \u2014 zero-window streak starts at registration", + "retired_at": null, + "created_at": "2026-07-10T13:19:44.255216Z", + "updated_at": "2026-07-10T13:19:44.255216Z" + }, + "all_time": { + "calls": 0, + "tenant_count": 0, + "user_count": 0, + "component_count": 0, + "tenants": {}, + "users": {}, + "components": {} + }, + "window": { + "calls": 0, + "tenant_count": 0, + "user_count": 0, + "component_count": 0, + "tenants": {}, + "users": {}, + "components": {} + }, + "last_seen_at": null, + "retirement_candidate": true, + "retirement_reason": "no measured usage in review window" + }, + { + "interface": { + "id": "bed4d08a-3471-48f5-9f0e-f9d550383a26", + "interface_key": "mcp:update_workstream_status", + "interface_kind": "mcp_tool", + "legacy_since": "2026-07-10T13:19:44.303612Z", + "replacement_ref": "update_workplan_status", + "owner_component": "state-hub.mcp", + "status": "legacy", + "replacement_verified": true, + "manual_hold": false, + "hold_reason": null, + "notes": "Registered by STATE-WP-0070 T03 \u2014 zero-window streak starts at registration", + "retired_at": null, + "created_at": "2026-07-10T13:19:44.303612Z", + "updated_at": "2026-07-10T13:19:44.303612Z" + }, + "all_time": { + "calls": 0, + "tenant_count": 0, + "user_count": 0, + "component_count": 0, + "tenants": {}, + "users": {}, + "components": {} + }, + "window": { + "calls": 0, + "tenant_count": 0, + "user_count": 0, + "component_count": 0, + "tenants": {}, + "users": {}, + "components": {} + }, + "last_seen_at": null, + "retirement_candidate": true, + "retirement_reason": "no measured usage in review window" + }, + { + "interface": { + "id": "46900dc2-0893-405b-ba59-80f31fb6ebb1", + "interface_key": "state://workstreams/{topic_slug}", + "interface_kind": "mcp_tool", + "legacy_since": "2026-07-10T13:19:44.344493Z", + "replacement_ref": "state://workplans/{topic_slug}", + "owner_component": "state-hub.mcp", + "status": "legacy", + "replacement_verified": true, + "manual_hold": false, + "hold_reason": null, + "notes": "Registered by STATE-WP-0070 T03 \u2014 zero-window streak starts at registration", + "retired_at": null, + "created_at": "2026-07-10T13:19:44.344493Z", + "updated_at": "2026-07-10T13:19:44.344493Z" + }, + "all_time": { + "calls": 1, + "tenant_count": 1, + "user_count": 1, + "component_count": 1, + "tenants": { + "unknown": 1 + }, + "users": { + "unknown": 1 + }, + "components": { + "state-hub.mcp": 1 + } + }, + "window": { + "calls": 0, + "tenant_count": 0, + "user_count": 0, + "component_count": 0, + "tenants": {}, + "users": {}, + "components": {} + }, + "last_seen_at": "2026-07-10T13:20:34.491811Z", + "retirement_candidate": true, + "retirement_reason": "no measured usage in review window" + }, + { + "interface": { + "id": "cd9342fd-27e7-4a46-a1be-d41499e106a3", + "interface_key": "rest_api:DELETE /workstreams/{workstream_id}", + "interface_kind": "rest_api", + "legacy_since": "2026-06-06T17:28:13.052813Z", + "replacement_ref": "/workplans/{workplan_id}", + "owner_component": "state-hub.api", + "status": "legacy", + "replacement_verified": true, + "manual_hold": false, + "hold_reason": null, + "notes": null, + "retired_at": null, + "created_at": "2026-06-06T17:28:13.052813Z", + "updated_at": "2026-06-06T17:28:13.052813Z" + }, + "all_time": { + "calls": 1, + "tenant_count": 1, + "user_count": 1, + "component_count": 1, + "tenants": { + "unknown": 1 + }, + "users": { + "unknown": 1 + }, + "components": { + "unknown": 1 + } + }, + "window": { + "calls": 0, + "tenant_count": 0, + "user_count": 0, + "component_count": 0, + "tenants": {}, + "users": {}, + "components": {} + }, + "last_seen_at": "2026-06-06T17:28:13.047529Z", + "retirement_candidate": true, + "retirement_reason": "no measured usage in review window" + }, + { + "interface": { + "id": "a4e0948c-cd4a-461e-8ae2-7fd7b51d04a7", + "interface_key": "rest_api:GET /decisions/?workstream_id", + "interface_kind": "rest_api", + "legacy_since": "2026-07-09T23:07:53.093223Z", + "replacement_ref": "/decisions/?workplan_id=", + "owner_component": "state-hub.api", + "status": "legacy", + "replacement_verified": true, + "manual_hold": false, + "hold_reason": null, + "notes": null, + "retired_at": null, + "created_at": "2026-07-09T23:07:53.093223Z", + "updated_at": "2026-07-09T23:07:53.093223Z" + }, + "all_time": { + "calls": 1, + "tenant_count": 1, + "user_count": 1, + "component_count": 1, + "tenants": { + "unknown": 1 + }, + "users": { + "unknown": 1 + }, + "components": { + "unknown": 1 + } + }, + "window": { + "calls": 0, + "tenant_count": 0, + "user_count": 0, + "component_count": 0, + "tenants": {}, + "users": {}, + "components": {} + }, + "last_seen_at": "2026-07-09T23:07:53.083299Z", + "retirement_candidate": true, + "retirement_reason": "no measured usage in review window" + }, + { + "interface": { + "id": "70a9346e-e0ee-42ac-874f-f160580b54dd", + "interface_key": "rest_api:GET /progress/?workstream_id", + "interface_kind": "rest_api", + "legacy_since": "2026-07-13T22:04:03.911449Z", + "replacement_ref": "/progress/?workplan_id=", + "owner_component": "state-hub.api", + "status": "legacy", + "replacement_verified": true, + "manual_hold": false, + "hold_reason": null, + "notes": null, + "retired_at": null, + "created_at": "2026-07-13T22:04:03.911449Z", + "updated_at": "2026-07-13T22:04:03.911449Z" + }, + "all_time": { + "calls": 2, + "tenant_count": 1, + "user_count": 1, + "component_count": 1, + "tenants": { + "unknown": 2 + }, + "users": { + "unknown": 2 + }, + "components": { + "unknown": 2 + } + }, + "window": { + "calls": 0, + "tenant_count": 0, + "user_count": 0, + "component_count": 0, + "tenants": {}, + "users": {}, + "components": {} + }, + "last_seen_at": "2026-08-12T08:55:33.912995Z", + "retirement_candidate": true, + "retirement_reason": "no measured usage in review window" + }, + { + "interface": { + "id": "be3cdcf8-250b-4bf0-801f-02ffd5f57e00", + "interface_key": "rest_api:GET /tasks/?workstream_id", + "interface_kind": "rest_api", + "legacy_since": "2026-07-08T19:32:21.628513Z", + "replacement_ref": "/tasks/?workplan_id=", + "owner_component": "state-hub.api", + "status": "legacy", + "replacement_verified": true, + "manual_hold": false, + "hold_reason": null, + "notes": null, + "retired_at": null, + "created_at": "2026-07-08T19:32:21.628513Z", + "updated_at": "2026-07-08T19:32:21.628513Z" + }, + "all_time": { + "calls": 595, + "tenant_count": 1, + "user_count": 1, + "component_count": 1, + "tenants": { + "unknown": 595 + }, + "users": { + "unknown": 595 + }, + "components": { + "unknown": 595 + } + }, + "window": { + "calls": 5, + "tenant_count": 1, + "user_count": 1, + "component_count": 1, + "tenants": { + "unknown": 5 + }, + "users": { + "unknown": 5 + }, + "components": { + "unknown": 5 + } + }, + "last_seen_at": "2026-08-19T21:18:17.899446Z", + "retirement_candidate": false, + "retirement_reason": "5 call(s) in review window" + }, + { + "interface": { + "id": "3e4a3d0b-08fa-45c3-91e2-4f514a914b97", + "interface_key": "rest_api:GET /workstreams/", + "interface_kind": "rest_api", + "legacy_since": "2026-06-04T00:26:14.533764Z", + "replacement_ref": "/workplans/", + "owner_component": "state-hub.api", + "status": "legacy", + "replacement_verified": true, + "manual_hold": false, + "hold_reason": null, + "notes": null, + "retired_at": null, + "created_at": "2026-06-04T00:26:14.533764Z", + "updated_at": "2026-06-04T00:26:14.533764Z" + }, + "all_time": { + "calls": 144086, + "tenant_count": 1, + "user_count": 1, + "component_count": 1, + "tenants": { + "unknown": 144086 + }, + "users": { + "unknown": 144086 + }, + "components": { + "unknown": 144086 + } + }, + "window": { + "calls": 0, + "tenant_count": 0, + "user_count": 0, + "component_count": 0, + "tenants": {}, + "users": {}, + "components": {} + }, + "last_seen_at": "2026-08-10T18:06:05.032338Z", + "retirement_candidate": true, + "retirement_reason": "no measured usage in review window" + }, + { + "interface": { + "id": "e4c140ec-7479-46f9-b185-4b533f19d639", + "interface_key": "rest_api:GET /workstreams/workplan-index", + "interface_kind": "rest_api", + "legacy_since": "2026-06-04T05:20:58.321869Z", + "replacement_ref": "/workplans/index", + "owner_component": "state-hub.api", + "status": "legacy", + "replacement_verified": true, + "manual_hold": false, + "hold_reason": null, + "notes": null, + "retired_at": null, + "created_at": "2026-06-04T05:20:58.321869Z", + "updated_at": "2026-06-04T05:20:58.321869Z" + }, + "all_time": { + "calls": 30, + "tenant_count": 1, + "user_count": 1, + "component_count": 1, + "tenants": { + "unknown": 30 + }, + "users": { + "unknown": 30 + }, + "components": { + "unknown": 30 + } + }, + "window": { + "calls": 0, + "tenant_count": 0, + "user_count": 0, + "component_count": 0, + "tenants": {}, + "users": {}, + "components": {} + }, + "last_seen_at": "2026-07-03T05:20:34.534439Z", + "retirement_candidate": true, + "retirement_reason": "no measured usage in review window" + }, + { + "interface": { + "id": "3a00b19e-e7db-4403-98aa-a77c9ab61ecc", + "interface_key": "rest_api:GET /workstreams/{workstream_id}", + "interface_kind": "rest_api", + "legacy_since": "2026-06-04T00:25:59.014966Z", + "replacement_ref": "/workplans/{workplan_id}", + "owner_component": "state-hub.api", + "status": "legacy", + "replacement_verified": true, + "manual_hold": false, + "hold_reason": null, + "notes": null, + "retired_at": null, + "created_at": "2026-06-04T00:25:59.014966Z", + "updated_at": "2026-06-04T00:25:59.014966Z" + }, + "all_time": { + "calls": 511406, + "tenant_count": 1, + "user_count": 1, + "component_count": 1, + "tenants": { + "unknown": 511406 + }, + "users": { + "unknown": 511406 + }, + "components": { + "unknown": 511406 + } + }, + "window": { + "calls": 0, + "tenant_count": 0, + "user_count": 0, + "component_count": 0, + "tenants": {}, + "users": {}, + "components": {} + }, + "last_seen_at": "2026-07-31T16:25:32.004042Z", + "retirement_candidate": true, + "retirement_reason": "no measured usage in review window" + }, + { + "interface": { + "id": "69e1a255-a8b9-4101-8a68-b1bed23abfda", + "interface_key": "rest_api:GET /workstreams/{workstream_id}/dependencies/", + "interface_kind": "rest_api", + "legacy_since": "2026-06-04T00:25:59.291135Z", + "replacement_ref": "/workplans/{workplan_id}/dependencies/", + "owner_component": "state-hub.api", + "status": "legacy", + "replacement_verified": true, + "manual_hold": false, + "hold_reason": null, + "notes": null, + "retired_at": null, + "created_at": "2026-06-04T00:25:59.291135Z", + "updated_at": "2026-06-04T00:25:59.291135Z" + }, + "all_time": { + "calls": 255865, + "tenant_count": 1, + "user_count": 1, + "component_count": 1, + "tenants": { + "unknown": 255865 + }, + "users": { + "unknown": 255865 + }, + "components": { + "unknown": 255865 + } + }, + "window": { + "calls": 0, + "tenant_count": 0, + "user_count": 0, + "component_count": 0, + "tenants": {}, + "users": {}, + "components": {} + }, + "last_seen_at": "2026-07-08T21:14:12.747005Z", + "retirement_candidate": true, + "retirement_reason": "no measured usage in review window" + }, + { + "interface": { + "id": "b1aae931-b51f-4a85-a723-865dd65f6132", + "interface_key": "rest_api:PATCH /workstreams/{workstream_id}", + "interface_kind": "rest_api", + "legacy_since": "2026-06-04T06:09:41.901035Z", + "replacement_ref": "/workplans/{workplan_id}", + "owner_component": "state-hub.api", + "status": "legacy", + "replacement_verified": true, + "manual_hold": false, + "hold_reason": null, + "notes": null, + "retired_at": null, + "created_at": "2026-06-04T06:09:41.901035Z", + "updated_at": "2026-06-04T06:09:41.901035Z" + }, + "all_time": { + "calls": 571, + "tenant_count": 1, + "user_count": 1, + "component_count": 1, + "tenants": { + "unknown": 571 + }, + "users": { + "unknown": 571 + }, + "components": { + "unknown": 571 + } + }, + "window": { + "calls": 0, + "tenant_count": 0, + "user_count": 0, + "component_count": 0, + "tenants": {}, + "users": {}, + "components": {} + }, + "last_seen_at": "2026-07-08T20:49:12.335710Z", + "retirement_candidate": true, + "retirement_reason": "no measured usage in review window" + }, + { + "interface": { + "id": "4aea9591-970b-4918-ac4a-4da95a0a1a8c", + "interface_key": "rest_api:POST /decisions/ workstream_id", + "interface_kind": "rest_api", + "legacy_since": "2026-07-09T22:56:35.473130Z", + "replacement_ref": "POST /decisions/ with workplan_id", + "owner_component": "state-hub.api", + "status": "legacy", + "replacement_verified": true, + "manual_hold": false, + "hold_reason": null, + "notes": null, + "retired_at": null, + "created_at": "2026-07-09T22:56:35.473130Z", + "updated_at": "2026-07-09T22:56:35.473130Z" + }, + "all_time": { + "calls": 3, + "tenant_count": 1, + "user_count": 1, + "component_count": 1, + "tenants": { + "unknown": 3 + }, + "users": { + "unknown": 3 + }, + "components": { + "unknown": 3 + } + }, + "window": { + "calls": 0, + "tenant_count": 0, + "user_count": 0, + "component_count": 0, + "tenants": {}, + "users": {}, + "components": {} + }, + "last_seen_at": "2026-07-09T22:57:05.912456Z", + "retirement_candidate": true, + "retirement_reason": "no measured usage in review window" + }, + { + "interface": { + "id": "4a70583c-1e41-4ec1-99a9-728856a7d79c", + "interface_key": "rest_api:POST /progress/ workstream_id", + "interface_kind": "rest_api", + "legacy_since": "2026-07-08T23:35:09.148333Z", + "replacement_ref": "POST /progress/ with workplan_id", + "owner_component": "state-hub.api", + "status": "legacy", + "replacement_verified": true, + "manual_hold": false, + "hold_reason": null, + "notes": null, + "retired_at": null, + "created_at": "2026-07-08T23:35:09.148333Z", + "updated_at": "2026-07-08T23:35:09.148333Z" + }, + "all_time": { + "calls": 14, + "tenant_count": 1, + "user_count": 1, + "component_count": 1, + "tenants": { + "unknown": 14 + }, + "users": { + "unknown": 14 + }, + "components": { + "unknown": 14 + } + }, + "window": { + "calls": 0, + "tenant_count": 0, + "user_count": 0, + "component_count": 0, + "tenants": {}, + "users": {}, + "components": {} + }, + "last_seen_at": "2026-07-10T08:34:42.959724Z", + "retirement_candidate": true, + "retirement_reason": "no measured usage in review window" + }, + { + "interface": { + "id": "6df4e443-7bf1-461a-923b-a6eb52fe7b07", + "interface_key": "rest_api:POST /tasks/ workstream_id", + "interface_kind": "rest_api", + "legacy_since": "2026-07-08T22:38:29.405720Z", + "replacement_ref": "POST /tasks/ with workplan_id", + "owner_component": "state-hub.api", + "status": "legacy", + "replacement_verified": true, + "manual_hold": false, + "hold_reason": null, + "notes": null, + "retired_at": null, + "created_at": "2026-07-08T22:38:29.405720Z", + "updated_at": "2026-07-08T22:38:29.405720Z" + }, + "all_time": { + "calls": 5, + "tenant_count": 1, + "user_count": 1, + "component_count": 1, + "tenants": { + "unknown": 5 + }, + "users": { + "unknown": 5 + }, + "components": { + "state-hub.fix-consistency": 5 + } + }, + "window": { + "calls": 0, + "tenant_count": 0, + "user_count": 0, + "component_count": 0, + "tenants": {}, + "users": {}, + "components": {} + }, + "last_seen_at": "2026-07-08T22:38:29.976918Z", + "retirement_candidate": true, + "retirement_reason": "no measured usage in review window" + }, + { + "interface": { + "id": "ed6451c9-d2cc-4486-9afe-d3852782cabc", + "interface_key": "rest_api:POST /workstreams/", + "interface_kind": "rest_api", + "legacy_since": "2026-06-04T07:40:24.168535Z", + "replacement_ref": "/workplans/", + "owner_component": "state-hub.api", + "status": "legacy", + "replacement_verified": true, + "manual_hold": false, + "hold_reason": null, + "notes": null, + "retired_at": null, + "created_at": "2026-06-04T07:40:24.168535Z", + "updated_at": "2026-06-04T07:40:24.168535Z" + }, + "all_time": { + "calls": 824, + "tenant_count": 1, + "user_count": 1, + "component_count": 1, + "tenants": { + "unknown": 824 + }, + "users": { + "unknown": 824 + }, + "components": { + "unknown": 824 + } + }, + "window": { + "calls": 0, + "tenant_count": 0, + "user_count": 0, + "component_count": 0, + "tenants": {}, + "users": {}, + "components": {} + }, + "last_seen_at": "2026-07-08T20:38:05.903144Z", + "retirement_candidate": true, + "retirement_reason": "no measured usage in review window" + }, + { + "interface": { + "id": "281fd706-b192-4194-8055-2d8733c115f9", + "interface_key": "rest_api:POST /workstreams/{workstream_id}/dependencies/", + "interface_kind": "rest_api", + "legacy_since": "2026-06-04T22:57:37.149207Z", + "replacement_ref": "/workplans/{workplan_id}/dependencies/", + "owner_component": "state-hub.api", + "status": "legacy", + "replacement_verified": true, + "manual_hold": false, + "hold_reason": null, + "notes": null, + "retired_at": null, + "created_at": "2026-06-04T22:57:37.149207Z", + "updated_at": "2026-06-04T22:57:37.149207Z" + }, + "all_time": { + "calls": 4971, + "tenant_count": 1, + "user_count": 1, + "component_count": 1, + "tenants": { + "unknown": 4971 + }, + "users": { + "unknown": 4971 + }, + "components": { + "unknown": 4971 + } + }, + "window": { + "calls": 0, + "tenant_count": 0, + "user_count": 0, + "component_count": 0, + "tenants": {}, + "users": {}, + "components": {} + }, + "last_seen_at": "2026-07-01T22:09:24.229011Z", + "retirement_candidate": true, + "retirement_reason": "no measured usage in review window" + } + ], + "retirement_candidates": [ + { + "interface": { + "id": "63ed90e3-42b4-431a-94db-e1254a52f9e2", + "interface_key": "mcp:create_workstream", + "interface_kind": "mcp_tool", + "legacy_since": "2026-07-10T13:19:44.205900Z", + "replacement_ref": "create_workplan", + "owner_component": "state-hub.mcp", + "status": "legacy", + "replacement_verified": true, + "manual_hold": false, + "hold_reason": null, + "notes": "Registered by STATE-WP-0070 T03 \u2014 zero-window streak starts at registration", + "retired_at": null, + "created_at": "2026-07-10T13:19:44.205900Z", + "updated_at": "2026-07-10T13:19:44.205900Z" + }, + "all_time": { + "calls": 2, + "tenant_count": 1, + "user_count": 1, + "component_count": 1, + "tenants": { + "unknown": 2 + }, + "users": { + "unknown": 2 + }, + "components": { + "state-hub.mcp": 2 + } + }, + "window": { + "calls": 0, + "tenant_count": 0, + "user_count": 0, + "component_count": 0, + "tenants": {}, + "users": {}, + "components": {} + }, + "last_seen_at": "2026-07-10T13:20:43.378546Z", + "retirement_candidate": true, + "retirement_reason": "no measured usage in review window" + }, + { + "interface": { + "id": "b6a5fe44-fb85-4ef7-a273-78d09da777af", + "interface_key": "mcp:list_workstreams", + "interface_kind": "mcp_tool", + "legacy_since": "2026-07-10T13:19:26.075491Z", + "replacement_ref": "list_workplans", + "owner_component": "state-hub.mcp", + "status": "legacy", + "replacement_verified": true, + "manual_hold": false, + "hold_reason": null, + "notes": null, + "retired_at": null, + "created_at": "2026-07-10T13:19:26.075491Z", + "updated_at": "2026-07-10T13:19:26.075491Z" + }, + "all_time": { + "calls": 2, + "tenant_count": 1, + "user_count": 1, + "component_count": 1, + "tenants": { + "unknown": 2 + }, + "users": { + "unknown": 2 + }, + "components": { + "state-hub.mcp": 2 + } + }, + "window": { + "calls": 0, + "tenant_count": 0, + "user_count": 0, + "component_count": 0, + "tenants": {}, + "users": {}, + "components": {} + }, + "last_seen_at": "2026-07-10T13:20:42.374940Z", + "retirement_candidate": true, + "retirement_reason": "no measured usage in review window" + }, + { + "interface": { + "id": "53c3372b-307d-4d6a-8ea4-bc36cacdcaf2", + "interface_key": "mcp:update_workstream", + "interface_kind": "mcp_tool", + "legacy_since": "2026-07-10T13:19:44.255216Z", + "replacement_ref": "update_workplan", + "owner_component": "state-hub.mcp", + "status": "legacy", + "replacement_verified": true, + "manual_hold": false, + "hold_reason": null, + "notes": "Registered by STATE-WP-0070 T03 \u2014 zero-window streak starts at registration", + "retired_at": null, + "created_at": "2026-07-10T13:19:44.255216Z", + "updated_at": "2026-07-10T13:19:44.255216Z" + }, + "all_time": { + "calls": 0, + "tenant_count": 0, + "user_count": 0, + "component_count": 0, + "tenants": {}, + "users": {}, + "components": {} + }, + "window": { + "calls": 0, + "tenant_count": 0, + "user_count": 0, + "component_count": 0, + "tenants": {}, + "users": {}, + "components": {} + }, + "last_seen_at": null, + "retirement_candidate": true, + "retirement_reason": "no measured usage in review window" + }, + { + "interface": { + "id": "bed4d08a-3471-48f5-9f0e-f9d550383a26", + "interface_key": "mcp:update_workstream_status", + "interface_kind": "mcp_tool", + "legacy_since": "2026-07-10T13:19:44.303612Z", + "replacement_ref": "update_workplan_status", + "owner_component": "state-hub.mcp", + "status": "legacy", + "replacement_verified": true, + "manual_hold": false, + "hold_reason": null, + "notes": "Registered by STATE-WP-0070 T03 \u2014 zero-window streak starts at registration", + "retired_at": null, + "created_at": "2026-07-10T13:19:44.303612Z", + "updated_at": "2026-07-10T13:19:44.303612Z" + }, + "all_time": { + "calls": 0, + "tenant_count": 0, + "user_count": 0, + "component_count": 0, + "tenants": {}, + "users": {}, + "components": {} + }, + "window": { + "calls": 0, + "tenant_count": 0, + "user_count": 0, + "component_count": 0, + "tenants": {}, + "users": {}, + "components": {} + }, + "last_seen_at": null, + "retirement_candidate": true, + "retirement_reason": "no measured usage in review window" + }, + { + "interface": { + "id": "46900dc2-0893-405b-ba59-80f31fb6ebb1", + "interface_key": "state://workstreams/{topic_slug}", + "interface_kind": "mcp_tool", + "legacy_since": "2026-07-10T13:19:44.344493Z", + "replacement_ref": "state://workplans/{topic_slug}", + "owner_component": "state-hub.mcp", + "status": "legacy", + "replacement_verified": true, + "manual_hold": false, + "hold_reason": null, + "notes": "Registered by STATE-WP-0070 T03 \u2014 zero-window streak starts at registration", + "retired_at": null, + "created_at": "2026-07-10T13:19:44.344493Z", + "updated_at": "2026-07-10T13:19:44.344493Z" + }, + "all_time": { + "calls": 1, + "tenant_count": 1, + "user_count": 1, + "component_count": 1, + "tenants": { + "unknown": 1 + }, + "users": { + "unknown": 1 + }, + "components": { + "state-hub.mcp": 1 + } + }, + "window": { + "calls": 0, + "tenant_count": 0, + "user_count": 0, + "component_count": 0, + "tenants": {}, + "users": {}, + "components": {} + }, + "last_seen_at": "2026-07-10T13:20:34.491811Z", + "retirement_candidate": true, + "retirement_reason": "no measured usage in review window" + }, + { + "interface": { + "id": "cd9342fd-27e7-4a46-a1be-d41499e106a3", + "interface_key": "rest_api:DELETE /workstreams/{workstream_id}", + "interface_kind": "rest_api", + "legacy_since": "2026-06-06T17:28:13.052813Z", + "replacement_ref": "/workplans/{workplan_id}", + "owner_component": "state-hub.api", + "status": "legacy", + "replacement_verified": true, + "manual_hold": false, + "hold_reason": null, + "notes": null, + "retired_at": null, + "created_at": "2026-06-06T17:28:13.052813Z", + "updated_at": "2026-06-06T17:28:13.052813Z" + }, + "all_time": { + "calls": 1, + "tenant_count": 1, + "user_count": 1, + "component_count": 1, + "tenants": { + "unknown": 1 + }, + "users": { + "unknown": 1 + }, + "components": { + "unknown": 1 + } + }, + "window": { + "calls": 0, + "tenant_count": 0, + "user_count": 0, + "component_count": 0, + "tenants": {}, + "users": {}, + "components": {} + }, + "last_seen_at": "2026-06-06T17:28:13.047529Z", + "retirement_candidate": true, + "retirement_reason": "no measured usage in review window" + }, + { + "interface": { + "id": "a4e0948c-cd4a-461e-8ae2-7fd7b51d04a7", + "interface_key": "rest_api:GET /decisions/?workstream_id", + "interface_kind": "rest_api", + "legacy_since": "2026-07-09T23:07:53.093223Z", + "replacement_ref": "/decisions/?workplan_id=", + "owner_component": "state-hub.api", + "status": "legacy", + "replacement_verified": true, + "manual_hold": false, + "hold_reason": null, + "notes": null, + "retired_at": null, + "created_at": "2026-07-09T23:07:53.093223Z", + "updated_at": "2026-07-09T23:07:53.093223Z" + }, + "all_time": { + "calls": 1, + "tenant_count": 1, + "user_count": 1, + "component_count": 1, + "tenants": { + "unknown": 1 + }, + "users": { + "unknown": 1 + }, + "components": { + "unknown": 1 + } + }, + "window": { + "calls": 0, + "tenant_count": 0, + "user_count": 0, + "component_count": 0, + "tenants": {}, + "users": {}, + "components": {} + }, + "last_seen_at": "2026-07-09T23:07:53.083299Z", + "retirement_candidate": true, + "retirement_reason": "no measured usage in review window" + }, + { + "interface": { + "id": "70a9346e-e0ee-42ac-874f-f160580b54dd", + "interface_key": "rest_api:GET /progress/?workstream_id", + "interface_kind": "rest_api", + "legacy_since": "2026-07-13T22:04:03.911449Z", + "replacement_ref": "/progress/?workplan_id=", + "owner_component": "state-hub.api", + "status": "legacy", + "replacement_verified": true, + "manual_hold": false, + "hold_reason": null, + "notes": null, + "retired_at": null, + "created_at": "2026-07-13T22:04:03.911449Z", + "updated_at": "2026-07-13T22:04:03.911449Z" + }, + "all_time": { + "calls": 2, + "tenant_count": 1, + "user_count": 1, + "component_count": 1, + "tenants": { + "unknown": 2 + }, + "users": { + "unknown": 2 + }, + "components": { + "unknown": 2 + } + }, + "window": { + "calls": 0, + "tenant_count": 0, + "user_count": 0, + "component_count": 0, + "tenants": {}, + "users": {}, + "components": {} + }, + "last_seen_at": "2026-08-12T08:55:33.912995Z", + "retirement_candidate": true, + "retirement_reason": "no measured usage in review window" + }, + { + "interface": { + "id": "3e4a3d0b-08fa-45c3-91e2-4f514a914b97", + "interface_key": "rest_api:GET /workstreams/", + "interface_kind": "rest_api", + "legacy_since": "2026-06-04T00:26:14.533764Z", + "replacement_ref": "/workplans/", + "owner_component": "state-hub.api", + "status": "legacy", + "replacement_verified": true, + "manual_hold": false, + "hold_reason": null, + "notes": null, + "retired_at": null, + "created_at": "2026-06-04T00:26:14.533764Z", + "updated_at": "2026-06-04T00:26:14.533764Z" + }, + "all_time": { + "calls": 144086, + "tenant_count": 1, + "user_count": 1, + "component_count": 1, + "tenants": { + "unknown": 144086 + }, + "users": { + "unknown": 144086 + }, + "components": { + "unknown": 144086 + } + }, + "window": { + "calls": 0, + "tenant_count": 0, + "user_count": 0, + "component_count": 0, + "tenants": {}, + "users": {}, + "components": {} + }, + "last_seen_at": "2026-08-10T18:06:05.032338Z", + "retirement_candidate": true, + "retirement_reason": "no measured usage in review window" + }, + { + "interface": { + "id": "e4c140ec-7479-46f9-b185-4b533f19d639", + "interface_key": "rest_api:GET /workstreams/workplan-index", + "interface_kind": "rest_api", + "legacy_since": "2026-06-04T05:20:58.321869Z", + "replacement_ref": "/workplans/index", + "owner_component": "state-hub.api", + "status": "legacy", + "replacement_verified": true, + "manual_hold": false, + "hold_reason": null, + "notes": null, + "retired_at": null, + "created_at": "2026-06-04T05:20:58.321869Z", + "updated_at": "2026-06-04T05:20:58.321869Z" + }, + "all_time": { + "calls": 30, + "tenant_count": 1, + "user_count": 1, + "component_count": 1, + "tenants": { + "unknown": 30 + }, + "users": { + "unknown": 30 + }, + "components": { + "unknown": 30 + } + }, + "window": { + "calls": 0, + "tenant_count": 0, + "user_count": 0, + "component_count": 0, + "tenants": {}, + "users": {}, + "components": {} + }, + "last_seen_at": "2026-07-03T05:20:34.534439Z", + "retirement_candidate": true, + "retirement_reason": "no measured usage in review window" + }, + { + "interface": { + "id": "3a00b19e-e7db-4403-98aa-a77c9ab61ecc", + "interface_key": "rest_api:GET /workstreams/{workstream_id}", + "interface_kind": "rest_api", + "legacy_since": "2026-06-04T00:25:59.014966Z", + "replacement_ref": "/workplans/{workplan_id}", + "owner_component": "state-hub.api", + "status": "legacy", + "replacement_verified": true, + "manual_hold": false, + "hold_reason": null, + "notes": null, + "retired_at": null, + "created_at": "2026-06-04T00:25:59.014966Z", + "updated_at": "2026-06-04T00:25:59.014966Z" + }, + "all_time": { + "calls": 511406, + "tenant_count": 1, + "user_count": 1, + "component_count": 1, + "tenants": { + "unknown": 511406 + }, + "users": { + "unknown": 511406 + }, + "components": { + "unknown": 511406 + } + }, + "window": { + "calls": 0, + "tenant_count": 0, + "user_count": 0, + "component_count": 0, + "tenants": {}, + "users": {}, + "components": {} + }, + "last_seen_at": "2026-07-31T16:25:32.004042Z", + "retirement_candidate": true, + "retirement_reason": "no measured usage in review window" + }, + { + "interface": { + "id": "69e1a255-a8b9-4101-8a68-b1bed23abfda", + "interface_key": "rest_api:GET /workstreams/{workstream_id}/dependencies/", + "interface_kind": "rest_api", + "legacy_since": "2026-06-04T00:25:59.291135Z", + "replacement_ref": "/workplans/{workplan_id}/dependencies/", + "owner_component": "state-hub.api", + "status": "legacy", + "replacement_verified": true, + "manual_hold": false, + "hold_reason": null, + "notes": null, + "retired_at": null, + "created_at": "2026-06-04T00:25:59.291135Z", + "updated_at": "2026-06-04T00:25:59.291135Z" + }, + "all_time": { + "calls": 255865, + "tenant_count": 1, + "user_count": 1, + "component_count": 1, + "tenants": { + "unknown": 255865 + }, + "users": { + "unknown": 255865 + }, + "components": { + "unknown": 255865 + } + }, + "window": { + "calls": 0, + "tenant_count": 0, + "user_count": 0, + "component_count": 0, + "tenants": {}, + "users": {}, + "components": {} + }, + "last_seen_at": "2026-07-08T21:14:12.747005Z", + "retirement_candidate": true, + "retirement_reason": "no measured usage in review window" + }, + { + "interface": { + "id": "b1aae931-b51f-4a85-a723-865dd65f6132", + "interface_key": "rest_api:PATCH /workstreams/{workstream_id}", + "interface_kind": "rest_api", + "legacy_since": "2026-06-04T06:09:41.901035Z", + "replacement_ref": "/workplans/{workplan_id}", + "owner_component": "state-hub.api", + "status": "legacy", + "replacement_verified": true, + "manual_hold": false, + "hold_reason": null, + "notes": null, + "retired_at": null, + "created_at": "2026-06-04T06:09:41.901035Z", + "updated_at": "2026-06-04T06:09:41.901035Z" + }, + "all_time": { + "calls": 571, + "tenant_count": 1, + "user_count": 1, + "component_count": 1, + "tenants": { + "unknown": 571 + }, + "users": { + "unknown": 571 + }, + "components": { + "unknown": 571 + } + }, + "window": { + "calls": 0, + "tenant_count": 0, + "user_count": 0, + "component_count": 0, + "tenants": {}, + "users": {}, + "components": {} + }, + "last_seen_at": "2026-07-08T20:49:12.335710Z", + "retirement_candidate": true, + "retirement_reason": "no measured usage in review window" + }, + { + "interface": { + "id": "4aea9591-970b-4918-ac4a-4da95a0a1a8c", + "interface_key": "rest_api:POST /decisions/ workstream_id", + "interface_kind": "rest_api", + "legacy_since": "2026-07-09T22:56:35.473130Z", + "replacement_ref": "POST /decisions/ with workplan_id", + "owner_component": "state-hub.api", + "status": "legacy", + "replacement_verified": true, + "manual_hold": false, + "hold_reason": null, + "notes": null, + "retired_at": null, + "created_at": "2026-07-09T22:56:35.473130Z", + "updated_at": "2026-07-09T22:56:35.473130Z" + }, + "all_time": { + "calls": 3, + "tenant_count": 1, + "user_count": 1, + "component_count": 1, + "tenants": { + "unknown": 3 + }, + "users": { + "unknown": 3 + }, + "components": { + "unknown": 3 + } + }, + "window": { + "calls": 0, + "tenant_count": 0, + "user_count": 0, + "component_count": 0, + "tenants": {}, + "users": {}, + "components": {} + }, + "last_seen_at": "2026-07-09T22:57:05.912456Z", + "retirement_candidate": true, + "retirement_reason": "no measured usage in review window" + }, + { + "interface": { + "id": "4a70583c-1e41-4ec1-99a9-728856a7d79c", + "interface_key": "rest_api:POST /progress/ workstream_id", + "interface_kind": "rest_api", + "legacy_since": "2026-07-08T23:35:09.148333Z", + "replacement_ref": "POST /progress/ with workplan_id", + "owner_component": "state-hub.api", + "status": "legacy", + "replacement_verified": true, + "manual_hold": false, + "hold_reason": null, + "notes": null, + "retired_at": null, + "created_at": "2026-07-08T23:35:09.148333Z", + "updated_at": "2026-07-08T23:35:09.148333Z" + }, + "all_time": { + "calls": 14, + "tenant_count": 1, + "user_count": 1, + "component_count": 1, + "tenants": { + "unknown": 14 + }, + "users": { + "unknown": 14 + }, + "components": { + "unknown": 14 + } + }, + "window": { + "calls": 0, + "tenant_count": 0, + "user_count": 0, + "component_count": 0, + "tenants": {}, + "users": {}, + "components": {} + }, + "last_seen_at": "2026-07-10T08:34:42.959724Z", + "retirement_candidate": true, + "retirement_reason": "no measured usage in review window" + }, + { + "interface": { + "id": "6df4e443-7bf1-461a-923b-a6eb52fe7b07", + "interface_key": "rest_api:POST /tasks/ workstream_id", + "interface_kind": "rest_api", + "legacy_since": "2026-07-08T22:38:29.405720Z", + "replacement_ref": "POST /tasks/ with workplan_id", + "owner_component": "state-hub.api", + "status": "legacy", + "replacement_verified": true, + "manual_hold": false, + "hold_reason": null, + "notes": null, + "retired_at": null, + "created_at": "2026-07-08T22:38:29.405720Z", + "updated_at": "2026-07-08T22:38:29.405720Z" + }, + "all_time": { + "calls": 5, + "tenant_count": 1, + "user_count": 1, + "component_count": 1, + "tenants": { + "unknown": 5 + }, + "users": { + "unknown": 5 + }, + "components": { + "state-hub.fix-consistency": 5 + } + }, + "window": { + "calls": 0, + "tenant_count": 0, + "user_count": 0, + "component_count": 0, + "tenants": {}, + "users": {}, + "components": {} + }, + "last_seen_at": "2026-07-08T22:38:29.976918Z", + "retirement_candidate": true, + "retirement_reason": "no measured usage in review window" + }, + { + "interface": { + "id": "ed6451c9-d2cc-4486-9afe-d3852782cabc", + "interface_key": "rest_api:POST /workstreams/", + "interface_kind": "rest_api", + "legacy_since": "2026-06-04T07:40:24.168535Z", + "replacement_ref": "/workplans/", + "owner_component": "state-hub.api", + "status": "legacy", + "replacement_verified": true, + "manual_hold": false, + "hold_reason": null, + "notes": null, + "retired_at": null, + "created_at": "2026-06-04T07:40:24.168535Z", + "updated_at": "2026-06-04T07:40:24.168535Z" + }, + "all_time": { + "calls": 824, + "tenant_count": 1, + "user_count": 1, + "component_count": 1, + "tenants": { + "unknown": 824 + }, + "users": { + "unknown": 824 + }, + "components": { + "unknown": 824 + } + }, + "window": { + "calls": 0, + "tenant_count": 0, + "user_count": 0, + "component_count": 0, + "tenants": {}, + "users": {}, + "components": {} + }, + "last_seen_at": "2026-07-08T20:38:05.903144Z", + "retirement_candidate": true, + "retirement_reason": "no measured usage in review window" + }, + { + "interface": { + "id": "281fd706-b192-4194-8055-2d8733c115f9", + "interface_key": "rest_api:POST /workstreams/{workstream_id}/dependencies/", + "interface_kind": "rest_api", + "legacy_since": "2026-06-04T22:57:37.149207Z", + "replacement_ref": "/workplans/{workplan_id}/dependencies/", + "owner_component": "state-hub.api", + "status": "legacy", + "replacement_verified": true, + "manual_hold": false, + "hold_reason": null, + "notes": null, + "retired_at": null, + "created_at": "2026-06-04T22:57:37.149207Z", + "updated_at": "2026-06-04T22:57:37.149207Z" + }, + "all_time": { + "calls": 4971, + "tenant_count": 1, + "user_count": 1, + "component_count": 1, + "tenants": { + "unknown": 4971 + }, + "users": { + "unknown": 4971 + }, + "components": { + "unknown": 4971 + } + }, + "window": { + "calls": 0, + "tenant_count": 0, + "user_count": 0, + "component_count": 0, + "tenants": {}, + "users": {}, + "components": {} + }, + "last_seen_at": "2026-07-01T22:09:24.229011Z", + "retirement_candidate": true, + "retirement_reason": "no measured usage in review window" + } + ] + }, + "days": 7 +} diff --git a/docs/retirement-cutover-slice-plan.md b/docs/retirement-cutover-slice-plan.md index 3b4f5c9..dd7234f 100644 --- a/docs/retirement-cutover-slice-plan.md +++ b/docs/retirement-cutover-slice-plan.md @@ -179,27 +179,55 @@ D3 is two MCP tools with no dependants; take it opportunistically. | Slice | Capability | Items | Gate | | --- | --- | --- | --- | | E1 | `suggestion-backlog` → archive | 17 | caller check; no successor runtime | -| E2 | `work-records-workplan-legacy` → archive | 13 | legacy-meter — see caveat below | +| E2 | `work-records-workplan-legacy` → archive | 13 | legacy-meter — candidate rule, see below | | E3 | `dashboard-meta` | 1 | none | | E4 | `legacy-meter` itself | 9 | **last** — it is the instrument for E2 | E4 retires only after every other legacy surface is closed; retiring the meter first destroys the evidence for the retirements it gates. -### Caveat on E2's evidence +### E2 evidence — defect found and partly fixed (2026-08-20) -The 2026-08-19 review (`docs/evidence/legacy-meter-weekly-review-20260819.json`) -reports 19 retirement candidates, all `replacement_verified: true` with zero -calls in window. But the window is `06:00Z → 14:00Z` — **8 hours, not the 7 days -`cadence: weekly` implies**. Several candidates have very large all-time counts -(`GET /workstreams/{id}` 511 406, `GET /workstreams/` 144 086, -`POST /workstreams/{id}/dependencies/` 255 865). +The window discrepancy flagged on 2026-08-19 was a real defect in +`scripts/capture_legacy_meter_evidence.py`, not a labelling nit. -An 8-hour quiet window is not sufficient evidence to retire an interface at that -call volume. Either the window computation is a defect or the cadence label is -wrong; either way **E2 should not proceed on the current evidence**. Resolving -this is a prerequisite, and it is worth checking before Wave A rather than after, -since the same meter gates T05. +`_review_query` fell back to `hours=8` whenever `--days` was omitted, and +`--hours` defaulted to `8`. Every unattended capture therefore sampled an +8-hour band (06:00Z–14:00Z) while writing a file named `weekly-review` with +`cadence: weekly` in the payload. **39 of 40 captures ran this way** — only the +first, 2026-07-08, used a true 7-day window. + +Calls in the other 16 hours of each day were never sampled, so quiet-in-band +interfaces were reported as retirement candidates while still having live +callers. On the 2026-08-19 capture three candidates had recent traffic: + +| Interface | All-time calls | Last seen | +| --- | --- | --- | +| `GET /tasks/?workstream_id` | 594 | 2026-08-18 | +| `GET /progress/?workstream_id` | 2 | 2026-08-12 | +| `GET /workstreams/` | 144 086 | 2026-08-10 | + +**Fixed:** the script now defaults to `days=7`, matching the endpoint name and +the cadence label. `--hours` is retained for spot checks and documented as not +retirement evidence. Corrected capture: +`docs/evidence/legacy-meter-weekly-review-20260820.json` — 18 candidates of 20 +interfaces, `GET /tasks/?workstream_id` correctly excluded. + +**Still open — E2 remains gated.** A 7-day window is not sufficient for +high-volume interfaces, and two false positives survive it: + +- `GET /progress/?workstream_id` — last seen 2026-08-12T08:55Z, roughly 14 hours + before the window opened +- `GET /workstreams/` — last seen 2026-08-10, 9 days quiet, 144 086 all-time calls + +`last_seen_at` is unbounded by the window and is the stronger signal; the +candidate rule currently ignores it. Before E2 proceeds, the rule should require +a minimum quiet period scaled to call volume — an interface with six figures of +traffic needs materially more than seven silent days. That is a service-side +change in `api/services/legacy_meter.py` and belongs to T05, not here. + +Everything else on the list was last seen 2026-07-31 or earlier, most in early +July, so the bulk of E2 is well-evidenced once the rule is tightened. ## Keep — 43 items diff --git a/scripts/capture_legacy_meter_evidence.py b/scripts/capture_legacy_meter_evidence.py index e587a9b..79b0b58 100644 --- a/scripts/capture_legacy_meter_evidence.py +++ b/scripts/capture_legacy_meter_evidence.py @@ -71,10 +71,20 @@ def _retire_interfaces(base: str, keys: list[str]) -> list[dict]: return retired +DEFAULT_REVIEW_DAYS = 7 + + def _review_query(*, days: int | None, hours: int | None) -> str: - if days is not None: - return f"days={days}" - return f"hours={hours or 8}" + """Build the review-window query. + + Defaults to a 7-day window to match the ``weekly-review`` endpoint and the + ``cadence: weekly`` label in the payload. An hours-scoped window only + samples part of each day, so an interface called outside that band reads as + unused and is falsely reported as a retirement candidate. + """ + if hours is not None: + return f"hours={hours}" + return f"days={days or DEFAULT_REVIEW_DAYS}" def capture( @@ -101,10 +111,10 @@ def capture( "retired_interfaces": retired, "weekly_review": review, } - if days is not None: - payload["days"] = days + if hours is not None: + payload["hours"] = hours else: - payload["hours"] = hours or 8 + payload["days"] = days or DEFAULT_REVIEW_DAYS if dry_run: print(json.dumps(payload, indent=2)) @@ -124,14 +134,15 @@ def main() -> None: parser.add_argument( "--hours", type=int, - default=8, - help="Review window in hours (default: 8; used when --days is omitted)", + default=None, + help="Review window in hours; only samples part of each day — use for " + "spot checks, never as retirement evidence", ) parser.add_argument( "--days", type=int, default=None, - help="Review window in days (weekly cadence; overrides --hours)", + help=f"Review window in days (default: {DEFAULT_REVIEW_DAYS}, weekly cadence)", ) parser.add_argument( "--api-base", diff --git a/workplans/STATE-WP-0079-retirement-strangler.md b/workplans/STATE-WP-0079-retirement-strangler.md index 1e328c4..b654f4f 100644 --- a/workplans/STATE-WP-0079-retirement-strangler.md +++ b/workplans/STATE-WP-0079-retirement-strangler.md @@ -131,6 +131,22 @@ state_hub_task_id: "02e508ed-3cde-4487-907e-d324a8a877d6" Complete retirement of suggestions, workstream aliases, and other `retire` inventory items once meters/callers allow. Keep historical rows archive-readable. +**Blocker identified (2026-08-20):** the legacy-meter evidence this task gates +on was being captured over an 8-hour band, not a week — +`capture_legacy_meter_evidence.py` fell back to `hours=8` whenever `--days` was +omitted, so 39 of 40 captures sampled only 06:00Z–14:00Z. Interfaces called +outside that band read as unused. Three candidates on the 2026-08-19 capture had +live callers, including `GET /tasks/?workstream_id` (seen 2026-08-18). + +Script default corrected to `days=7`; corrected capture +`docs/evidence/legacy-meter-weekly-review-20260820.json`. + +**Remaining work for this task:** the candidate rule in +`api/services/legacy_meter.py` keys only on in-window calls and ignores +`last_seen_at`, so `GET /workstreams/` (144 086 all-time calls, quiet 9 days) +still reports as a candidate. Require a minimum quiet period scaled to call +volume before retiring. See `docs/retirement-cutover-slice-plan.md` § E2. + ## Stabilization window and archive prep ```task