Repository navigation
fix: refuse a run cancel, keep a declined call declined, and name a stale tree - #1980
Merged
Merged
Conversation
On 2 Dec an agent held every lane for sixteen minutes after one tool call was declined, replying that it was holding while the stop hook said work was owed. Nothing it was told said what a declined call means, so it read the refusal as a stop on all work. The stop check's owed-work note now ends its sentences on the next item with one line: a declined tool call declines only that call, and the owed work goes on with the next owed item. The away block carries the same line (autonomy.DeclinedCallLine), so both say it in one form. The person's line on a stop the cap let go keeps the owed reason and leaves the agent's line out. The mode page says what a declined call means while work is owed. Resolves: iss-2612022221066637 Assisted-by: Claude:claude-opus-5-5
scripts/abcd.sh builds the tree it lives in, and nothing said when that tree was far behind. The main checkout sat 1297 commits behind origin's default branch, so every verb run through its script was a six-day-old abcd: a sweep kept 1098 of 1107 rows on a rule the default branch had already fixed. The script now prints one line on stderr before the verb runs when the tree lacks changes that landed on origin's default branch or on its own upstream, as last fetched, the oldest of them more than a day ago. The line says how many days and changes, and to run from an up-to-date worktree. A change is a commit on the branch's first-parent line, so a merged branch's old commits do not read as staleness. Where the repository's config names no origin the check spends no git at all. Where it does, it makes two local reads: the upstream's name, then one first-parent log. It never fetches, never refuses and leaves every exit code as the binary gave it. ahoy's person-started passes (bare ahoy, install, doctor) list a source checkout's main checkout that far behind as the report-only source.main_checkout_behind gap, from the checkout or any of its worktrees. The hooks' pass never reads it. dcn-2612022254546338 records why the line names the command that makes an up-to-date worktree rather than an existing one. Resolves: iss-2612022220481334 Assisted-by: Claude:claude-opus-5-5
The note on scripts/abcd.sh's stale-tree line took AGENTS.md 423 bytes past the 32768 a host may read, which TestAgentsMDFitsTheSmallestReadersCap refuses. AGENTS.md returns to its earlier text, and the note joins the DOGFOODING domain's first rule in .abcd/rules.json, which the loader injects on any prompt that names abcd or one of its verbs. Assisted-by: Claude:claude-opus-5-5
TestHookGitCallsMatchBaseline found four deadline-free git calls in detectMainCheckoutBehind that a hook reaches by the call graph: the gap is read only on a person's pass, but detect is shared with the hooks', so the audit counts it. The four reads now run under one five-second context through the gitutil Context variants, and a read past it raises no gap. TestSurfaceChapterProseStatesNoShape found the ahoy brief's new paragraph naming sub-verbs above the generated appendix; it now says the passes a person starts and the worktree store instead. Assisted-by: Claude:claude-opus-5-5
On 2 Dec an agent cancelled a release run's loop shard at 94 minutes on a stale 36-minute estimate, when the same shard had taken 88, 115, 124 and 124 minutes in the nightly runs of 26 to 29 Nov, and the cut lost that shard's whole round. Nothing stopped it. The guard now refuses every cancel of a workflow run, as three bundled blockers: gh run cancel in every form (gh-run-cancel); a gh api call to actions/runs/<id>/cancel or force-cancel, whatever its method (gh-api-run-cancel, the new forge-run-cancel-path shape); and a POST, or a method the line does not fix, to a path whose end the line does not fix (gh-api-run-cancel-unread, the forge-run-cancel-open-path shape). Reads, reruns and listings pass. The issue asked for a refusal only while a release job's elapsed time is under its recorded maximum, naming the median, maximum and timeout. The guard reads no network, and nothing on a line or in a local record says whose run an id is or how long its jobs have run, so that judge could only ever refuse; three registry blockers cost nothing beyond the matcher's existing pass and fail closed. The refusal therefore names no numbers: it says how to measure the job and leaves the cancel to the person. dcn-2612022305576019 records the choice and how to reverse it. Resolves: iss-2612022221042267 Assisted-by: Claude:claude-opus-5-5
Precheck found two faults in the run-cancel blockers. TestEverySubstitutionPositionKeepsTheVerdict: gh api with a field or --input sends a POST, so `gh api $(echo .../cancel) -f reason=stuck` cancels a run, yet the entry for a path whose end the line does not fix asked only for -X POST. A fourth blocker, gh-api-run-cancel-unread-field, refuses such a path when the call carries a field or --input. TestValidateBoundsWhatAnEntryTeaches: each why and successor must leave three times headroom below the 1024-byte bound. They are cut to at most 331 bytes, and the gh-run-cancel why drops the incident's figures, of which the median could not be verified; the brief gives the shard's nightly times from the issue record instead. Assisted-by: Claude:claude-opus-5-5
The owed-work note named the next item and then said a declined call declines only that call, the work going on with the next owed item. Where the next item was the one whose act was declined, the two read together as leave to reach that act another way. The line now says a declined call stays declined until the person says otherwise, is not to be reached another way, and that the session takes other owed work, passing over any item that needs it. The judge does not know which item a declined call served, so the line no longer sends the session to the item it names. The away block, the mode page and the stop hook's help say the same. Assisted-by: Claude:claude-opus-5-5
…amed A cancel path whose owner or repository the line writes with a variable passed both API rules when the other of the two was named like a route (pages, issues, releases and the rest): the route words ruled the path out before its own runs segments were read. A path whose fixed text holds actions/runs/ is now read as a repository's runs whatever comes before it, as a ref path's git/refs already is. Assisted-by: Claude:claude-opus-5-5
The guard page and the brief said the guard refuses every cancel of a workflow run. It reads gh's command lines only: a cancel another HTTP client sends, or one made through a gh alias, is not read. Both now say so. Assisted-by: Claude:claude-opus-5-5
…re a verb scripts/abcd.sh judged the tree only against refs/remotes/origin/HEAD and the branch's upstream. In a clone whose remote HEAD was never set, a branch with no upstream (as `ahoy worktree add` cuts) never got the stale-tree line, though ahoy's gap reads origin's main, master, trunk or develop there. The script now reads origin's default branch the same way, from one for-each-ref listing that also names the branch's upstream, so it still spends two git calls. Its first-parent log honoured log.showSignature, which starts a verifier for each signed commit before every verb. The log now passes --no-show-signature. Neither read has a deadline: macOS has no timeout, and a watchdog of the script's own would cost more than the reads. dcn-2612022356262040 records why and how to add one. Assisted-by: Claude:claude-opus-5-5
The text board's checkout: line is where a person meets the report-only source.main_checkout_behind gap. A test now runs bare ahoy in a source checkout three days behind origin's default branch and checks the line says how far behind it is and what to do, once. Assisted-by: Claude:claude-opus-5-5
A local upstream is the branch config's merge text as written, so a value such as --output=<file> reached git log ahead of -- as an option and wrote that file. scripts/abcd.sh now takes the upstream only when it begins with refs/ and treats anything else as no upstream, saying what origin's default branch alone shows. origin's default branch is found with a read loop rather than a case pattern over the listing, which the guard's false-positive sweep read as an unrecognised launcher. Assisted-by: Claude:claude-opus-5-5
gh api sends a field as a POST only where the line writes no -X or --method, so the field entry now applies only there, through a new absent_flags pattern field: a written GET or PATCH with a field passes, a written POST is the -unread entry's, and a method a substitution may write stands nothing down. A field keyed query is read as a GraphQL query and left to the merge entries (dcn-2612030017439523); --input and every other field, an unfixed key included, still count. An absent_flags alternative that is not a flag is refused, as a plain word would stand the entry down. A path the line fixes only in part is read by where its fixed segments stand, since a variable can write any number of them: those before the first variable must be able to begin repos/<owner>/<repo>/actions/runs (or repositories/<id>/actions/runs, behind api/v3 or not), and those after the last must be able to end runs/<id>/cancel. A route word between two variables no longer rules a path out, so repos/acme/pages/$P/cancel and repos/$REPO/pulls/$N/cancel are refused, while repos/owner/repo/pulls/$N/cancel and repos/$R/pulls/1/cancel pass. The three gh api entries read -p and --preview as the value flags they are, so a method word given to one is not a method the line writes. The per-byte work bar moves from 76 to 80, as it has for each group of entries: with the four run-cancel entries a line of substitutions at the walk's bound measures 76.0 units per byte, the same before and after this reading. Assisted-by: Claude:claude-opus-5-5
isShortFlag's doc comment sat above flagWritten, so each function read under the wrong one. The comment moves back above isShortFlag; no code changes. Assisted-by: Claude:claude-opus-5-5
dcn-2612030127089869 records three limits the run-cancel rules keep: a lone GraphQL query field with no method to a path whose end is not fixed, a -X word that is a clustered value flag's value, and a POST to repos/$REPO/<route>/$VAR, which is refused. dcn-2612030017439523 now says the per-byte work bar rose from 76 to 80 for the four run-cancel entries. Assisted-by: Claude:claude-opus-5-5
The run-cancel field rule's check for a written method stepped words by its own reading, so a typed -X after a word a substitution writes, which can be a value flag taking it as its value, stood the rule down. The check now steps words with readWord, as the not_flags stand-down does, and flagWritten is listed among the word readers with why it is exempt. Lines whose method a substitution may write are tested on their own, as an entry about another method may lead the verdict on them. Assisted-by: Claude:claude-opus-5-5
The run-cancel paragraph spelled a gh flag above the generated appendix, where the chapter states no shape. It now says a body from the file gh's input option names, as the chapter's other paragraphs do. Assisted-by: Claude:claude-opus-5-5
The field rule's method check stepped over the next word whenever the current one could take a value, so a value flag glued to a substitution that takes nothing shifted the walk, and a later value spelled like -X read as a written method. The walk now ends, standing nothing down, at the first word a substitution helps to write that can take a value: past it no word can be placed as a flag or a value. A value flag the line fixes still takes the next word, so an explicit method before or after a fixed path, or after a path a variable writes, still passes. Assisted-by: Claude:claude-opus-5-5
dcn-2612030127089869 now names a fourth limit the run-cancel rules keep: a word that is nothing but a substitution is never read as a flag, so where it is a value flag, a typed -X word after it reads as a written method. It needs a deliberate spelling, and the decision says how to reverse it. Assisted-by: Claude:claude-opus-5-5
TestEverySwappedSeamIsListedOrExempt failed in preflight: behindClock is swapped by its test and was in neither list. Assisted-by: Claude:claude-opus-5-5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Three fixes for how an agent behaved during the v0.18.0 release cut. Each resolves the issue that records it.
gh:gh run cancelin every form;gh apicall to a run'scancelorforce-cancelpath, whatever its method, or with no method when a field or--inputmakes it a POST;GET.scripts/abcd.shtree says so (iss-2612022220481334).ahoydoes, and its git reads verify no signatures.ahoyreports the same gap for a stale main checkout. Its git reads are bound to a deadline.Checks
make preflightpassed on this head.Resolves: iss-2612022221042267
Resolves: iss-2612022221066637
Resolves: iss-2612022220481334
Refs: dcn-2612022305576019, dcn-2612022254546338, dcn-2612030127089869, dcn-2612030017439523
Assisted-by: Claude:claude-opus-5-5