feat(legacy-meter): scale retirement quiet period to call volume
A clean review window only proves an interface was silent for that window. For a heavily used interface that is weak evidence -- an infrequent caller can fall outside the window entirely, so the interface reads as retirable while still having consumers. _retirement_state now also requires silence since last_seen_at, scaled by all-time volume (RETIREMENT_QUIET_LADDER): 7d under 100 calls, 30d under 10k, 60d above. Existing guards (retired / manual hold / replacement ref / replacement verified / in-window traffic) still take precedence. On the 2026-08-20 capture this makes 15 of 19 legacy interfaces retirable and holds 4: the three six-figure /workstreams/ read paths, and GET /tasks/?workstream_id which still has live traffic. Unblocks the bulk of Wave E2 in the cutover slice plan. 7 new tests. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
be7f2632c3
commit
93e95f93e7
4 changed files with 229 additions and 19 deletions
|
|
@ -141,11 +141,19 @@ 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.
|
||||
**Candidate rule tightened (2026-08-20):** `_retirement_state` now requires a
|
||||
quiet period scaled to all-time call volume (`RETIREMENT_QUIET_LADDER`: 7d under
|
||||
100 calls, 30d under 10 000, 60d above). On the 2026-08-20 capture this makes 15
|
||||
of 19 legacy interfaces retirable — all `workstream` MCP tools, the `state://`
|
||||
resource, and the low-volume REST aliases — while holding the three six-figure
|
||||
read paths (`GET /workstreams/`, `GET /workstreams/{id}`,
|
||||
`GET /workstreams/{id}/dependencies/`) and `GET /tasks/?workstream_id`, which
|
||||
still has live traffic. Covered by 7 new tests in `tests/test_legacy_meter.py`.
|
||||
|
||||
**Remaining work for this task:** execute the retirement of the 15 evidenced
|
||||
interfaces, then re-review the 4 held ones as their quiet counters run. The
|
||||
ladder is evaluated at review time, so re-capture before deciding. See
|
||||
`docs/retirement-cutover-slice-plan.md` § E2.
|
||||
|
||||
## Stabilization window and archive prep
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue