From 660b6cb877811c09411083b1e58b29e155f90621 Mon Sep 17 00:00:00 2001 From: Lily Shen <115414357+lilyshen0722@users.noreply.github.com> Date: Tue, 18 Aug 2026 05:34:48 -0700 Subject: [PATCH 1/2] docs(ax-audit): anchor entry 28's citations to strings, not offsets #997 landed with `cli/src/commands/agent.js:1078-1081`, which replaced an earlier wrong number (`:1133`, read off a branch carrying #981's offsets). The number is now correct and still decays: #981 is open, touches that file from :44 down, and its author measured the shift at "+69 by EOF". On merge, :1078-1081 is wrong in the same way :1133 was, and entry 28 needs correcting a third time by whoever next notices. An append-only audit is read months later by someone who was not here, so a citation that only holds against one tree is a citation that will be wrong when it is used. Replaced with the template literal itself plus its enclosing function -- distinctive, greppable, and it fails loudly rather than quietly pointing at unrelated lines. Also dropped the bare `:1109` beside the ack. The sentence carrying it is already durable on its own terms -- "the file contains exactly one POST to /api/agents/runtime/events/" is a count a reader re-verifies with one grep -- and the offset added nothing except a second thing to go stale. Verified against the change that would break it. Both anchors are unique in the tree today (one hit each), #981 leaves the `next probe in` template untouched, and its two new `/api/agents/runtime/events/` lines land in cli/__tests__/run-loop.test.mjs -- zero in agent.js, so the file-scoped count still reads 1 after it merges. The scoping is load-bearing: an unscoped repo-wide count would go 1 -> 3 on that merge. Prose only; entry 28's findings, dates and numbers are unchanged. Co-Authored-By: Claude Opus 5 --- docs/development/agent-experience-audit.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/development/agent-experience-audit.md b/docs/development/agent-experience-audit.md index aeff7cd83b..e9b4f6f828 100644 --- a/docs/development/agent-experience-audit.md +++ b/docs/development/agent-experience-audit.md @@ -1327,8 +1327,9 @@ Every wake carries a server-composed trigger frame. Its load-bearing sentence > That stamp is when the message was WRITTEN, not when it reached you — **an > unacked event is re-served, so a redelivery arrives with this same stamp.** -The wrapper says the same thing from the other side. On a spawn failure -(`cli/src/commands/agent.js:1078-1081`): +The wrapper says the same thing from the other side. On a spawn failure — +composed in `performRun`'s `tick`, on the `spawnRetryPolicy` catch path, as +`` `${state}, next probe in ${retryIn}` ``: ``` … (1 consecutive) — event 6a842eb896408f264d9a4846 remains unacked; @@ -1341,7 +1342,7 @@ event* and promises it returns. **What actually happens.** `AgentEventService.list()` hard-filters `status: 'pending'`. A failed spawn leaves the event `delivered`, and the wrapper has no nack and no release — the file contains exactly one POST to -`/api/agents/runtime/events/`, the ack at `:1109`, so this is structural rather +`/api/agents/runtime/events/`, the ack, so this is structural rather than an omission. The event is invisible to every subsequent poll by construction: the "next probe in 5.1s" cannot fetch the event the same line just named. Only `garbageCollect()`'s requeue restores it, on a `*/10` cron gated at From d19bb45eba8bd9d4b2d1a7ca9eadfd9d75e8619f Mon Sep 17 00:00:00 2001 From: Lily Shen <115414357+lilyshen0722@users.noreply.github.com> Date: Tue, 18 Aug 2026 06:12:43 -0700 Subject: [PATCH 2/2] docs(ax-audit): anchor on the literal a reader can grep from the log MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The first version quoted the template with its interpolations intact -- `${state}, next probe in ${retryIn}` -- which greps from the source side only. A reader arriving from the other direction holds circuit open, next probe in 1.1m: claude exited with code 1 … and would naturally search "circuit open", landing on the ternary at :1077 that assigns `state`, not on the message it feeds. (Caught by @pod-architect.) `next probe in` is the substring that survives interpolation, so it reads identically in the template and in the output. Two hits in the file today: the message itself, and the `stamp()` docstring quoting it as the example of an undateable line -- both are the right place to land. Note the interpolated form was genuinely unique and the bare form is not, which is the trade: an anchor a reader cannot construct from what they hold is not an anchor, so bidirectional beats unique here. Co-Authored-By: Claude Opus 5 --- docs/development/agent-experience-audit.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/development/agent-experience-audit.md b/docs/development/agent-experience-audit.md index e9b4f6f828..3b16d84fe9 100644 --- a/docs/development/agent-experience-audit.md +++ b/docs/development/agent-experience-audit.md @@ -1329,7 +1329,7 @@ Every wake carries a server-composed trigger frame. Its load-bearing sentence The wrapper says the same thing from the other side. On a spawn failure — composed in `performRun`'s `tick`, on the `spawnRetryPolicy` catch path, as -`` `${state}, next probe in ${retryIn}` ``: +grep `next probe in` — the one literal that reads identically in the source and in the log line you are holding: ``` … (1 consecutive) — event 6a842eb896408f264d9a4846 remains unacked;