Skip to content

fix: refuse a run cancel, keep a declined call declined, and name a stale tree - #1980

Merged
REPPL merged 21 commits into
mainfrom
cutfix-a-1202
Dec 3, 2026
Merged

REPPL merged 21 commits into
mainfrom
cutfix-a-1202

Conversation

@REPPL

@REPPL REPPL commented Dec 3, 2026

Copy link
Copy Markdown
Collaborator

What

Three fixes for how an agent behaved during the v0.18.0 release cut. Each resolves the issue that records it.

  • A workflow run's cancel is refused (iss-2612022221042267).
    • The guard refuses every cancel of a workflow run made through gh:
      • gh run cancel in every form;
      • a gh api call to a run's cancel or force-cancel path, whatever its method, or with no method when a field or --input makes it a POST;
      • such a call whose path end is left to a variable.
    • Reads, reruns and listings pass, and so does an explicit GET.
    • The refusal says how to measure the job and leaves the cancel to the person. Nothing on a command line says how long a run's jobs have taken, so the guard cannot judge elapsed time against a job's history. dcn-2612022305576019 records that choice.
    • When the guard cannot tell where a word on the line ends, the field rule stays in force. The rules guard against an agent cancelling a healthy run by mistake, and four limits that need a deliberate spelling are left as they are, each with how to reverse it (dcn-2612030127089869). The guard's per-byte work bar in its test rises from 76 to 80 to fit the new entries (dcn-2612030017439523).
  • A declined tool call stays declined (iss-2612022221066637). The stop hook's note now says that a declined call declines only that act, which stays declined until the person says otherwise, while other owed work goes on. It no longer names the declined item as the next one.
  • A stale scripts/abcd.sh tree says so (iss-2612022220481334).
    • The script prints one line on stderr when the tree it builds lacks changes that landed on origin's default branch (or its own upstream) more than a day ago. The line says how far behind the tree is and names the command that makes an up-to-date worktree.
    • It finds origin's default branch the way ahoy does, and its git reads verify no signatures.
    • ahoy reports the same gap for a stale main checkout. Its git reads are bound to a deadline.
    • The note for agents is carried by the loader's DOGFOODING domain, since AGENTS.md is at its size cap.

Checks

  • make preflight passed on this head.
  • A security review and a correctness review of the whole change, and a second pass over the follow-up commits.
  • Every new behaviour has a test that was watched fail before its fix.

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

REPPL added 21 commits December 2, 2026 22:46
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
@REPPL
REPPL enabled auto-merge December 3, 2026 11:23
@REPPL
REPPL added this pull request to the merge queue Dec 3, 2026
Merged via the queue into main with commit cfaf3e0 Dec 3, 2026
15 checks passed
@REPPL
REPPL deleted the cutfix-a-1202 branch December 3, 2026 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant