gap: the frontier can never ask to be refilled again — the refill key is always frontier-refill-0 #239
Labels
No labels
agent
agent:ci
agent:done
agent:failed
agent:needs-input
agent:refined
agent:refining
agent:running
agent:shipped
agent:skip
autonomous
autopilot
driven
local
plan
proposal
qa
qa-gap
research
retro
ship
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
jeroen/cartopolis#239
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
#201refilled the frontier because the candidates table was empty. Walking theloop that consumes it, the same ask can never be made a second time: once the four
rows
#201added are used up, the lane goes quiet and files nothing, with no ticketand no alert.
What I did. Read
generate()intools/autopilot.ts, then replayed the exactquery
alreadyFiled()runs (/issues?state=all&type=issues&limit=100) against thelive board and searched the returned bodies for the refill markers.
What happened.
The refill ticket is keyed
frontier-refill-${rows.length}(tools/autopilot.ts:660).The refill branch is only reached when every row in the table has been filed, and a
row leaves the table when its ticket completes — so the count at the moment it fires
trends to 0, and
0is now permanently burned by#201itself.state=all(
tools/autopilot.ts:533) means closing#201does not release it.So when the last of
Rijkswaterstaat Weggegevens,Kadaster BRT geografische namen,RDW national parking registerandOpenSky Network live aircraftis done and itsrow is moved out of the table,
frontier()returns[]andgenerate()takes thelast line —
log("nothing left on the frontier, and the refill ticket is already open")(tools/autopilot.ts:710) — on every tick from then on.The comment above the key says the intent: "Keyed on how many rows the table has, so
the same ask can be made again after the table grows, and cannot be made twice against
the same one." The first half does not hold, because the count is not a property of
the table at rest — it is the count of rows that are all already filed, which is
0in the state the ticket exists to fix.
What a user would expect. The queue empties, so the lane asks for a refill — the
thing it did once, as
#201. At four rows and roughly a ticket a day this is a fewdays out, and the failure is silent: an unattended lane that stops proposing work looks
exactly like an unattended lane with nothing to do.
Where the seam is.
tools/autopilot.ts:660(the key),tools/autopilot.ts:710(the dead end). A key that does not collapse to a constant would fix it — the date, or
a running counter in the state file.
One related fragility, same function. The refill key is never pushed to
state.keys(contrasttools/autopilot.ts:608and:649for ordinary rows), so itsonly guard is
alreadyFiled, which reads the newest 100 issues. The board answersthat query with 50 issues today, so
#201is inside the window — but once it scrollsout, the guard flips from "never again" to "no memory at all". Both directions come
from the same missing piece of state.
Filed by the QA lane against #238.
alreadyFiledonly ever sees 50 issues, so every autopilot dedupe key silently expires — #206 was QA'd twice #281