work-gone's 'absent from the open-issue digest' clearance trusts a single unpaginated 100-issue page, and the tech-debt band now rides on it
Id: TD-PPagop-26082924 · Status: open · Filed: 2026-08-29
Noticed while approving PR #923 (agent-ops#875): scripts/gather-source-state.sh builds its open-issue digest from one repos/<slug>/issues?state=open&per_page=100 read with no --paginate, and work_gone_clearances (lib/work-gone.sh, requirement 34i) clears any numerically-shaped blocked item as “issue #N is closed” when N is absent from that digest — truncation does not set the digest’s ok: false, so past 100 open issues the oldest ones vanish from it and a still-open blocked issue older than the newest 100 is falsely declared gone and unblocked.
This is pre-existing for issues-shaped refs, but #923 widened the exposure: a tech_debt ref is now a bare issue number, so tech-debt blocks — previously cleared only by the register-status read, which had no cap — are cleared through this same digest test. It is also close to live: agent-ops has 30 open issues today and agent-ops#880 migrates ~77 open register items into pw::type:tech-debt issues, which crosses 100 on its own. TD-PPagop-26082908 covers the sibling cap in the two gatherers (scripts/gather-issues.sh, scripts/gather-tech-debt.sh) but does not name this digest read or the work-gone clearance that trusts it.
Suggested fix: paginate the digest’s issue read (the same careful slurp TD-PPagop-26082908 prescribes for the gatherers — gh api --paginate emits one array per page, so the sort_by(.n) and array guard must move with it), or, failing that, make the digest record that its issue list is bounded and have work_gone_clearances treat a bounded digest as deciding nothing for numbers outside it — “unknown is never gone” is the direction every other clearance here already fails in. Cover it with a stubbed two-page test asserting a blocked issue on the second page is not cleared. Best done together with TD-PPagop-26082908 since the fix machinery is shared.
Noticed while the Approver was judging https://github.com/Poetic-Poems/agent-ops/pull/923.
Migrated to https://github.com/Poetic-Poems/agent-ops/issues/1036.