Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
d0e1c65
fix: say a declined tool call declines only that call while work is owed
REPPL Dec 2, 2026
9a8a431
fix: say when scripts/abcd.sh builds a tree far behind origin
REPPL Dec 2, 2026
f91f18b
Merge branch 'labtrace-1202' into cutfix-a-1202
REPPL Dec 2, 2026
e7bc6bb
docs: carry the stale-tree note in the loader, not in AGENTS.md
REPPL Dec 2, 2026
22b772e
fix: bind the stale-checkout gap's git reads to a deadline
REPPL Dec 2, 2026
d3d1408
fix: refuse an agent's cancel of a workflow run
REPPL Dec 2, 2026
718224e
fix: refuse a run cancel a field sends, and trim what it teaches
REPPL Dec 2, 2026
17d9a42
fix: say a declined tool call stays declined while other work goes on
REPPL Dec 2, 2026
84447c1
fix: read a run's path as one whatever its owner and repository are n…
REPPL Dec 2, 2026
4a5d121
docs: say the run-cancel rule reads gh, not every HTTP client
REPPL Dec 2, 2026
ab29679
fix: read origin's branch as ahoy does, and verify no signature, befo…
REPPL Dec 2, 2026
4e36c0d
test: hold ahoy's checkout line for a stale main checkout
REPPL Dec 2, 2026
62faf43
fix: pass the script's upstream to git log only when it is a ref name
REPPL Dec 3, 2026
06772dc
fix: read a run cancel's method and partly fixed path as gh sends them
REPPL Dec 3, 2026
47413ab
docs: give flagWritten and isShortFlag each its own doc comment
REPPL Dec 3, 2026
eb0bdc4
chore: record the run-cancel rules' known limits and the work bar's rise
REPPL Dec 3, 2026
94af48c
fix: step the field rule's method check through the unknown-word rule
REPPL Dec 3, 2026
3b1fd2c
docs: name gh's input option in the guard chapter as its prose does
REPPL Dec 3, 2026
ad9fdd4
fix: keep the field rule in force past a word whose value is not known
REPPL Dec 3, 2026
ca7c36d
chore: record a whole-substitution word as a fourth run-cancel limit
REPPL Dec 3, 2026
69fd0f4
test: list the stale-checkout clock among the install key's seams
REPPL Dec 3, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .abcd/development/brief/04-surfaces/01-ahoy.md
Original file line number Diff line number Diff line change
Expand Up @@ -1227,6 +1227,22 @@ file, which setup reads but never edits once it exists. A missing or unloadable
config raises nothing here, and an entry that is not a plain path inside the
repository is not looked up: the check's own refusal names both.

**A stale main checkout of abcd's own source is a report-only gap**
(iss-2612022220481334). `scripts/abcd.sh` builds the tree it lives in, so a
main checkout left behind runs every verb through an abcd that old. Where the
repository's main working tree holds `cmd/abcd/main.go`, and its `HEAD` lacks
changes that landed on origin's default branch, as last fetched, the oldest of
them more than a day ago (a change is a commit on the branch's first-parent
line, so its age is when the branch moved past the checkout), the passes a
person starts raise one non-required, non-resolvable `user-state` gap,
`source.main_checkout_behind`, from the checkout or any of its worktrees. Its
detail names the checkout, how many days and changes it is behind, and its fix
hint the way on, an up-to-date worktree cut from the worktree store; abcd never
moves the checkout, where peers may stand. Its git reads run under a deadline
of their own. The hooks' pass never reads it, and nothing fetches. The
script itself says the same of the tree it builds, in one line on stderr,
whichever checkout that is.

**The README question pair** (itd-2610031348087517, spc-2610031704338417).
Setup asks whether abcd keeps parts of the project's `README.md` current and,
on a yes, which. The first question, keyed `readme`, stands alone with `yes`,
Expand Down
23 changes: 23 additions & 0 deletions .abcd/development/brief/04-surfaces/17-guard.md
Original file line number Diff line number Diff line change
Expand Up @@ -903,6 +903,29 @@ does. A `git-<sub>` program in command position, at any path, is also read as
for: `remote.<name>.push`, `remote.<name>.mirror`, and on a gc `gc.pruneExpire`
and the reflog expiries.

A workflow run is not cancelled (iss-2612022221042267). A cancelled job reruns
from its start, so a release cut loses a cancelled long job's whole round, and
an agent judged a release's loop shard stuck at 94 minutes on a stale estimate
when the same shard had taken 88, 115, 124 and 124 minutes in the nightly runs
of 26 to 29 Nov. The guard reads no network and no line says whose run an id is
or how long its jobs have run, so four bundled blockers refuse every cancel
made through `gh` (one sent by another HTTP client or through a `gh` alias is
not read):
`gh run cancel` (`gh-run-cancel`); a `gh api` call whose endpoint is
`actions/runs/<id>/cancel` or `…/force-cancel`, whatever its method, or a path
partly unfixed whose last segment is one of those and whose fixed segments
before its first variable and after its last can still begin and end that
route, a route word between two variables ruling nothing out
(`gh-api-run-cancel`, the `forge-run-cancel-path` shape); and a call to a path
whose last segment the line does not fix (`forge-run-cancel-open-path`) that is
a `POST`, by a `POST` or unfixed method (`gh-api-run-cancel-unread`) or, with no
method written, by a field other than a GraphQL `query` or a body from the file
gh's input option names, which gh sends as one (`gh-api-run-cancel-unread-field`). The successor says how to measure the job
(elapsed, the same job's median and maximum over recent successful runs, its
`timeout-minutes`) and leaves the cancel to the person; the refusal names no
measured numbers, as abcd keeps none, and is not allowable once
(dcn-2612022305576019, which also says how to reverse it).

The hazard entries are bundled in the binary and merged with a repo's
`.abcd/guard.json`. That file is dedicated rather than a rules-loader domain, so
a rules kill switch can never silently disable a safety guard, and it must
Expand Down
2 changes: 1 addition & 1 deletion .abcd/rules.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
"version"
],
"rules": [
"In a source checkout of abcd itself, every abcd invocation is `scripts/abcd.sh <verb>` from the repo root (by the script's path from anywhere else; the verb runs where you stand) \u2014 never the plugin-root binary and never an `abcd` on PATH. Both are the last PUBLISHED version, stale by construction here and further behind with every commit, and the failure is often silent rather than a refusal: an empty `changelog --json` cut, a record written through a schema the gates no longer accept. `scripts/abcd.sh` builds this tree to `.abcd/.work.local/bin/abcd`, relinking only when an input changed, and runs it, so exit 2 and exit 3 reach you as themselves; `go run ./cmd/abcd` turns every nonzero exit into 1. The documented resolution ladder reaches the plugin-root binary first and it answers, so its `go run` fallback is never reached by following it; go straight to `scripts/abcd.sh` (AGENTS.md, Build, test, and checks).",
"In a source checkout of abcd itself, every abcd invocation is `scripts/abcd.sh <verb>` from the repo root (by the script's path from anywhere else; the verb runs where you stand) \u2014 never the plugin-root binary and never an `abcd` on PATH. Both are the last PUBLISHED version, stale by construction here and further behind with every commit, and the failure is often silent rather than a refusal: an empty `changelog --json` cut, a record written through a schema the gates no longer accept. `scripts/abcd.sh` builds this tree to `.abcd/.work.local/bin/abcd`, relinking only when an input changed, and runs it, so exit 2 and exit 3 reach you as themselves; `go run ./cmd/abcd` turns every nonzero exit into 1. The documented resolution ladder reaches the plugin-root binary first and it answers, so its `go run` fallback is never reached by following it; go straight to `scripts/abcd.sh` (AGENTS.md, Build, test, and checks). That build is only as current as the tree: more than a day behind origin's default branch or its own upstream, as last fetched, the script says how far in one stderr line before the verb runs (it never fetches or refuses), so run it from an up-to-date worktree (`scripts/abcd.sh ahoy worktree add <name>`); `scripts/abcd.sh ahoy` names a main checkout that far behind as the `source.main_checkout_behind` gap (iss-2612022220481334).",
"In a checkout the person has listed in ~/.abcd.noindex/dogfood-roots, each line naming the checkout, a tab, the https:// or ssh URL of the remote its reviewed branch lives on, and optionally a tab and the branch (main when left out), the plugin's hooks run a build of that branch's tip as the declared remote reports it. A background builder reads the tip with git ls-remote and records it in ~/.abcd.noindex/dogfood/<root-sha>/, and only that record chooses the build: HEAD, refs/remotes/origin/*, origin/HEAD and the checkout's remote config choose nothing, and a moved remote-tracking ref only prompts one more check of the declared remote. The remote must be one no agent can move, such as a protected branch on a forge: a filesystem path, file://, git:// or http:// remote is refused, because this account can write the first two and anyone on the network path can answer for the last two. An ssh or https remote whose host is this machine by name (localhost or a name under it, the machine's own host name, a loopback or unspecified address, or an IPv4 shorthand such as 127.1) is refused as well, and so is a bracketed scp-like host ([host]:path), which must be named with ssh:// instead. An ssh alias that resolves here is one the agent can move too, but abcd cannot tell it from a forge, so the person must not declare one. Anything running as the account can still edit the list or replace a file in the store, and the builder and the hooks inherit the account's whole environment (the go toolchain, its module cache and GOENV, PATH, git's own variables and certificate settings, proxies, ~/.ssh, among the rest). Until the build is ready, or when the check or build fails, or when the line names no remote or a refused one, the hooks run the installed release and say so on stderr, as they do when the dogfood build answers an event with any exit but 0 (the guard: any but 0 or 2), except that a dogfood guard killed by a signal holds the command (exit 2) and only its other failures fall back to the installed release; a tip the checkout has not fetched yet asks for `git fetch`. The list is the person's own opt-in: never create or edit it, and never write into ~/.abcd.noindex/dogfood/. `scripts/abcd.sh` stays the rule for every abcd invocation you make (AGENTS.md, Build, test, and checks).",
"In a source checkout of abcd, a narrow test spells -trimpath: `scripts/abcd.sh implement load --wait --narrow --timeout 6h -- go test -trimpath -count=1 -timeout 40m ./internal/foo`. `scripts/abcd.sh`, every Go step a Makefile target makes and CI's check job build under it (the commit hooks do not, while a running drive pins their bytes: dcn-2611071820445224), which keeps the checkout's directory out of go's compile key, so worktrees share one build cache and preflight tests the form CI tests; a test run without it compiles its own copy of every package it reaches, in every worktree."
]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
id: dcn-2612022254546338
slug: scripts-abcd-sh-s-stale-tree-line-names
date: 2026-12-02
---
2026-12-02 — scripts/abcd.sh's stale-tree line names the command that makes an up-to-date worktree (scripts/abcd.sh ahoy worktree add <name>), not an existing up-to-date worktree as iss-2612022220481334's remedy proposed. Grounds: naming one would take a worktree listing and a log per worktree on every call, past the one or two git calls the check may spend, and a listed worktree can be a peer's lane; a new worktree is cut from origin's default branch as last fetched, so the command is always a right answer. The age is that of the oldest first-parent change on the branch that the tree lacks, so a merged branch's old commits do not read as staleness. The ahoy gap reads only the main checkout, and only on the passes a person starts, never a hook's. To reverse: list the worktrees in the line (git worktree list --porcelain, then one log each) and name the freshest.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
id: dcn-2612022305576019
slug: the-guard-refuses-every-cancel-of-a
date: 2026-12-02
---
2026-12-02 — The guard refuses every cancel of a workflow run, not only a release run's job inside its measured maximum as iss-2612022221042267's remedy proposed: 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), 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). Grounds: the guard reads no network, and no command line or local record says whose run an id is, which job is running or how long it has run, so a judge of elapsed time against a maximum could only refuse when it cannot tell, which is every time; three registry blockers cost nothing beyond the matcher's existing pass and fail closed. The refusal therefore names no measured numbers: it says how to measure the job (gh run view <id> --json jobs, the same job's median and maximum over the workflow's recent successful runs, its timeout-minutes) and leaves the cancel to the person, and it is not allowable once. To reverse: keep per-job timings from the runs abcd's status refresh already reads and hand them to the guard as the merge mode is handed in, so the refusal names the median, maximum and timeout; allowing a cancel past the maximum would still need the run's elapsed time, which only the forge holds.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
id: dcn-2612022356262040
slug: scripts-abcd-sh-s-two-stale-tree-git
date: 2026-12-02
---
2026-12-02 — scripts/abcd.sh's two stale-tree git reads (one for-each-ref listing and one first-parent log) run with no deadline. Grounds: there is no portable bound in plain shell, since macOS ships no timeout and a watchdog of its own (a background sleep that kills the read by its pid) would start two more processes and a kill path on every verb, costing more than the reads; both reads are local, start no network and no hook, the log no longer verifies signatures (--no-show-signature), and the log is bounded by the first-parent changes HEAD lacks. To reverse: wrap both in timeout, or gtimeout where only that is installed, when command -v finds one, and leave them bare where neither is.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
id: dcn-2612030017439523
slug: the-run-cancel-guard-s-field-entry
date: 2026-12-03
---
2026-12-03 — The run-cancel guard's field entry (gh-api-run-cancel-unread-field) applies only where the line writes no -X or --method, through a new absent_flags pattern field, and reads a field keyed query as a GraphQL query, leaving it to the merge entries; --input and every other field, an unfixed key included, still count. Grounds: gh sends a field as a POST only where no method is written, and the merge rules hold that in auto mode gh api "$EP" -f query=... and -F query=@q.graphql are not blocked, which a refusal of every field broke while naming the run-cancel entry where the merge one is owed. Known gap: a query-keyed field sent to an unfixed path that is a cancel route would cancel a run; a written POST to such a path is still refused (gh-api-run-cancel-unread). Reverse: replace the entry's rest-body-field flag_values with flags [-f|--field|-F|--raw-field|--input] and change the merge test's auto-mode expectation for those two lines. The guard's per-byte work bar rose from 76 to 80 to fit the four run-cancel entries, measured once at 76.0.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
id: dcn-2612030127089869
slug: the-run-cancel-guard-rules-guard-against
date: 2026-12-03
---
2026-12-03 — The run-cancel guard rules guard against an agent cancelling a healthy run by mistake, and four known limits are left as they are. (a) A lone GraphQL query field with no method, sent to a path whose end the line does not fix, is not read as a cancel; it could later be narrowed to paths that can still be the GraphQL endpoint. (b) A -X... word that is really the value of a value flag inside a short-flag cluster stands the field rule down; only a deliberate spelling does this. (c) A POST to repos/$REPO/<route>/$VAR (a commit status, say) is refused; it passes with the owner and repository written out or as {owner}/{repo}. (d) A word that is nothing but a substitution is never read as a flag, so where it is really a value flag, a typed -X... word after it reads as a written method and stands the field rule down. Grounds: (a), (b) and (d) need a deliberate spelling, and the guard judges an honest agent's mistakes; (c) refuses rather than lets through, and nothing in the repository issues such a call. Reverse: narrow (a) to GraphQL-capable paths, parse cluster values for (b), exempt fixed routes other than actions for (c), and for (d) read a whole-substitution word as possibly a value flag and stop the method walk there.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ origin: researcher-authored
production_mode: hand-written
found_at: "scripts/abcd.sh"
remedy: "scripts/abcd.sh prints one line on stderr when the tree it builds is behind its upstream or origin's default branch by more than a day, naming how far and the up-to-date worktree to run from, and ahoy lists a stale main checkout as a gap; the build itself stays the tree's own"
resolution: "scripts/abcd.sh now says on stderr, in one line before the verb runs, when the tree it builds is more than a day behind origin's default branch or its upstream as last fetched: how many days and changes, and to run from an up-to-date worktree; it spends no git where there is no origin and two local reads where there is, never fetches, never refuses and keeps every exit code. ahoy's person-started passes list a source checkout's stale main checkout as the report-only source.main_checkout_behind gap (dcn-2612022254546338)"
impact: internal
---

scripts/abcd.sh builds the tree it lives in, and the main checkout sits 1297 commits behind origin's default branch (still on 26 Nov), so every verb run through it from there is a six-day-old abcd with nothing saying so. A sweep run that way kept 1098 of 1107 rows on a recent-write rule the default branch fixed in c0147f43e (abcd's own reservation state counted as a session's write), and records and landings went through the old build too.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ origin: researcher-authored
production_mode: hand-written
found_at: "internal/core/guard"
remedy: "the guard judges gh run cancel and the matching API call on a release run: it refuses while the running job's elapsed time is under the recorded maximum for that job, naming the measured median and maximum and when the job's own timeout ends it; abcd keeps those timings from the nightly and release runs it already reads for the macOS verdict"
resolution: "The guard now refuses every cancel of a workflow run: 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), and a POST or unfixed method to a path whose end the line does not fix (gh-api-run-cancel-unread). It reads no network and nothing on a line says whose run an id is or how long its jobs have run, so it cannot judge elapsed time against a measured maximum; the refusal says how to measure the job (elapsed, the same job's median and maximum over recent successful runs, its timeout-minutes) and leaves the cancel to the person, naming no numbers since abcd keeps none (dcn-2612022305576019)"
impact: fix
---

Nothing stops an agent cancelling a release run's job while it is within its measured duration. On 2 Dec an agent cancelled the v0.18.0 release's loop shard at 94 minutes, trusting a workflow comment's 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.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ origin: researcher-authored
production_mode: hand-written
found_at: "internal/surface/cli/hook_stop.go"
remedy: "the stop hook's owed-work note says that a declined tool call declines that call only, that work owed goes on, and names the next owed item; the AWAY rules carry the same line"
resolution: "the stop check's owed-work note now says a declined tool call declines only that call and the owed work goes on, beside the next item it names, and the away block carries the same line (autonomy.DeclinedCallLine); the person's line on a stop the cap let go leaves it out"
impact: fix
---

A declined tool call reads to an agent as a stop on all work: on 2 Dec an agent held every lane for 16 minutes after one call was declined, replying that it was holding while the stop hook said work was owed, and left the release's lost shards and finished fixes untouched until the person asked why. The stop hook's owed-work note does not say what a declined call means.
8 changes: 7 additions & 1 deletion commands/ahoy.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,13 @@ Then summarise the JSON for the user:
often a `CLAUDE.md` retired after it was listed: the documentation check
refuses to run while it is there, so none of its rules, the banned names
included, checks anything. Its `fix_hint` names the entry to take out of
that file (or the file to create). Never tell the user `/abcd:ahoy install` closes
that file (or the file to create). A `source.main_checkout_behind` gap,
listed only in a source checkout of abcd and only by bare `ahoy`, `install`
and `doctor`, never by a hook, names the repository's main checkout when it
is more than a day behind origin's default branch as last fetched: how far,
and that `scripts/abcd.sh` run there builds an abcd that old. Its `fix_hint`
names the way on, an up-to-date worktree; abcd never brings the checkout up
to date itself. Never tell the user `/abcd:ahoy install` closes
a report-only gap.

If there are actionable gaps, tell the user to run `/abcd:ahoy install` to apply
Expand Down
Loading
Loading