Repository navigation
Description
The defect
write-pace.mjs's stopSignalFrom is deliberately status-independent. Its own header says why, and the sentence is the whole point of this card:
⛔ Status-independent on purpose:
x-ratelimit-remaining: 0arrives on the 200 that spends the last unit of quota, which is the one answer that lets a seat stop BEFORE the first refusal rather than after it.
That capability is never reached from a read. In all six write transports under scripts/pm/, noteResponse sits behind an if (paced) guard, and paced is isWriteMethod(method). So the throttle observes the quota only on the requests that spend budget, and never on the requests that are twenty times more numerous.
| transport | noteResponse calls |
all guarded by paced |
|---|---|---|
label-write.mjs · close-cards.mjs · post-stamped.mjs · sweep-closed-cards.mjs · sweep-stale-finding.mjs · issue-create.mjs |
1–2 each | yes, every one |
The design intent and the wiring contradict each other, and the contradiction is invisible: every ordinary run stays green, because the gate simply never learns what the reads saw.
What it costs, concretely
Reads and writes draw on ONE core bucket per installation. Measured on the fleet's own token, 2026-09-22:
| bucket | limit | window |
|---|---|---|
| core (reads and writes together) | 15000 | hour |
| graphql | 10000 | hour |
| search | 30 | minute |
The triage seat is by far the heaviest reader: its patrol walks per_page=100 listings to exhaustion across several label and state combinations, and its card-finding goes through the search bucket, which is 30 per minute and independent of core. So the sequence that this defect makes possible is: triage reads the core bucket down to nothing, the gate learns nothing from any of those responses, and the next seat's WRITE is the request that discovers the exhaustion, as a 403.
It also means a read that answers 403 or 429 with a Retry-After writes no stop marker, so the back-off the platform asked for binds nobody.
Why this is sharper now
The maintainer has decided NOT to split the triage seat onto its own App for the time being, so every seat keeps drawing on this one installation's core bucket. Splitting would have given triage's reads their own bucket as a side effect; without it, the read path's silence is the only thing standing between a heavy sweep and somebody else's refused write.
The fix
Reads must stay ungated: no lease, no gap sleep, no hourly budget. That is correct and must not change. What changes is that a read observes: call noteResponse on read responses too, so the headers it saw reach the throttle. The read's own behaviour is untouched.
The one hazard to get right. noteResponse currently ends by calling releaseWriteLease(file). That call is already a no-op for a process holding no lease, so a read cannot release someone else's turn — but a read issued by a process that IS mid-write (a read-back between a write and its release, for instance) must not end that process's turn early. Either split the observation from the release, or prove by test that no read can reach it while a write of the same process holds the lease. ⛔ Do not wire reads in without settling this; a lease released one request early is a second writer in flight, which is the property rule ④ exists for.
Acceptance
- Every transport calls
noteResponseon reads as well as writes; the write-only guard remains onpaceWritealone. - A read that sees
x-ratelimit-remaining: 0, a 403 naming the secondary limit, a 429, or aRetry-Afterwrites the stop marker, and the next WRITE by that identity is refused against it. - A read still takes no lease, sleeps no gap and spends no hourly budget: pinned, not assumed.
- The lease hazard above is pinned in
write-pace.mjs --self-test. - The header's read-observation contract is stated where
isWriteMethodis explained, so the next reader does not restore the symmetry by "tidying up".
⛔ Out of scope: pacing reads, a new CI gate, and the triage App split (declined for now).
Activity
objectstack-fleet commentedon Sep 22, 2026
Triage: closed
not_plannedat first touch by the triage seat (session_01Tw7jnJinGHvoGSi8aFkhPJ), 2026-09-22T19:59Z.Path: none | 缺项 | none | 首触即关The central measurement is true and reproduces: six transports each compute
const paced = isWriteMethod(method)and everynoteResponse(call sits behind it, so the throttle observes quota headers on writes only.⛔ But the contradiction it names is between the file's own header and its wiring, and a 门禁头注 is explicitly not a declared contract ⇒ no (b); no product path ⇒ no (a); no metadata ⇒ no (c).
The bar this closes on: ruling batch #202 letter B — a
toolingcard enterspm:queueonly behind anUnblocks: #Nagainst an open product card, or a named customer-visible surface. This card carries neither. Measured today: 4 open product P0 and 28 open product P1. Reopen is free on either reading, stated by whoever reopens.Generated by Claude Code