chore(agent-tools): bump Claude Code pin to 2.1.220 + fix stale live dialog-recipe assertions #236

Open
dominik.polakovics wants to merge 2 commits from afk/235 into main

Closes #235

Two coupled changes, per the issue — the fixed tests are the re-verification vehicle the bump procedure (docs/ops.md § "Agent-tools images", ADR-0051) leans on.

1. Live-recipe assertions aligned with the #56 answered-dialog model (pre-existing bug, not drift)

TestCompat_Live_askUserQuestionRecipe and TestCompat_Live_exitPlanModeApproval ended by asserting ReadChat demotes a resolved dialog to a tool chip — stale since issue #56 made a resolved dialog stay a dialog message carrying its recorded Outcome. They now assert that model: a question-kind dialog message whose Outcome.Results record "Blue" and {"Apple", "Cherry"} (order-insensitive via the existing sortedLabels helper, matched by question text), resp. a plan-kind dialog with Approved. The recipe-driving and toolUseResult stages are untouched.

2. The bump (documented procedure; re-verification precondition satisfied per the issue body, 2026-07-25)

  • containers/agent-tools/versions.env: CLAUDE_CODE_VERSION=2.1.220 + linux-x64-musl sha256, moved in one commit with the compat-record update.
  • internal/compat/compat.md: pin header → 2.1.220 (full live re-drive 2026-07-25, issue #235); §5/§12 rewritten for the one real drift — the §12 reversal: 2.1.220 defers the pending-dialog tool_use flush to flush-on-resolve on BOTH spawn arms, so the transcript-scan path is dead as a live dialog source and the §9 hook spool is the sole live source (no port-code change: pendingDialog's suppression rule already models flush-on-resolve; the transcript-scan fallback stays dormant-but-kept). Per-section provenance re-dated on the accumulate-don't-erase convention; incidental 2.1.220 notes added (§1 --permission-mode defaultmanual rename + --forward-subagent-text; §5 six new ignored transcript event types + the CLAUDE_CODE_CHILD_SESSION footnote; §9 prompt_id/permission_mode hook keys); the four deferred verifications recorded as open host-side follow-ups under "Live re-verification".

Verification done on this branch

  • sha256 independently re-verified against downloads.claude.ai/claude-code-releases/2.1.220/manifest.json (linux-x64-musl f1c20514…c3c5b — exact match).
  • go test ./... fully green (hermetic; no fixture or port-code changes needed, as the issue predicted); go vet ./... and gofmt -l clean.
  • The two fixed tests compile and skip cleanly without LAB_COMPAT_LIVE=1.
  • versions.env still sources cleanly in plain sh (its KEY=VALUE contract).

Not runnable in this environment

The LAB_COMPAT_LIVE=1 live probes need tmux and a logged-in claude at 2.1.220; this instance has neither (sandbox binary is 2.1.198, no tmux). The bump's re-verification precondition is satisfied by the 2026-07-25 in-session re-drive recorded in the issue body; please run the two fixed recipe tests host-side under LAB_COMPAT_LIVE=1 against 2.1.220 to close that acceptance box.

CI: this PR touches containers/**, so the agent-tools gate builds the claude image and runs the injection smoke test; merge to main publishes agent-tools:claude-2.1.220 and moves the NixOS toolsImages default (ADR-0054).

🤖 Generated with Claude Code

Closes #235 Two coupled changes, per the issue — the fixed tests are the re-verification vehicle the bump procedure (docs/ops.md § "Agent-tools images", ADR-0051) leans on. ## 1. Live-recipe assertions aligned with the #56 answered-dialog model (pre-existing bug, not drift) `TestCompat_Live_askUserQuestionRecipe` and `TestCompat_Live_exitPlanModeApproval` ended by asserting `ReadChat` demotes a resolved dialog to a tool chip — stale since issue #56 made a resolved dialog stay a dialog message carrying its recorded `Outcome`. They now assert that model: a question-kind dialog message whose `Outcome.Results` record "Blue" and {"Apple", "Cherry"} (order-insensitive via the existing `sortedLabels` helper, matched by question text), resp. a plan-kind dialog with `Approved`. The recipe-driving and `toolUseResult` stages are untouched. ## 2. The bump (documented procedure; re-verification precondition satisfied per the issue body, 2026-07-25) - `containers/agent-tools/versions.env`: `CLAUDE_CODE_VERSION=2.1.220` + linux-x64-musl sha256, moved in one commit with the compat-record update. - `internal/compat/compat.md`: pin header → 2.1.220 (full live re-drive 2026-07-25, issue #235); §5/§12 rewritten for the one real drift — the §12 reversal: 2.1.220 defers the pending-dialog `tool_use` flush to flush-on-resolve on BOTH spawn arms, so the transcript-scan path is dead as a live dialog source and the §9 hook spool is the sole live source (no port-code change: `pendingDialog`'s suppression rule already models flush-on-resolve; the transcript-scan fallback stays dormant-but-kept). Per-section provenance re-dated on the accumulate-don't-erase convention; incidental 2.1.220 notes added (§1 `--permission-mode` `default`→`manual` rename + `--forward-subagent-text`; §5 six new ignored transcript event types + the `CLAUDE_CODE_CHILD_SESSION` footnote; §9 `prompt_id`/`permission_mode` hook keys); the four deferred verifications recorded as open host-side follow-ups under "Live re-verification". ## Verification done on this branch - sha256 independently re-verified against `downloads.claude.ai/claude-code-releases/2.1.220/manifest.json` (linux-x64-musl `f1c20514…c3c5b` — exact match). - `go test ./...` fully green (hermetic; no fixture or port-code changes needed, as the issue predicted); `go vet ./...` and `gofmt -l` clean. - The two fixed tests compile and skip cleanly without `LAB_COMPAT_LIVE=1`. - `versions.env` still sources cleanly in plain `sh` (its KEY=VALUE contract). ## Not runnable in this environment The `LAB_COMPAT_LIVE=1` live probes need tmux and a logged-in claude at 2.1.220; this instance has neither (sandbox binary is 2.1.198, no tmux). The bump's re-verification precondition is satisfied by the 2026-07-25 in-session re-drive recorded in the issue body; please run the two fixed recipe tests host-side under `LAB_COMPAT_LIVE=1` against 2.1.220 to close that acceptance box. CI: this PR touches `containers/**`, so the agent-tools gate builds the claude image and runs the injection smoke test; merge to main publishes `agent-tools:claude-2.1.220` and moves the NixOS `toolsImages` default (ADR-0054). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
TestCompat_Live_askUserQuestionRecipe and TestCompat_Live_exitPlanModeApproval
ended by asserting ReadChat demotes a resolved dialog to a tool chip — stale
since issue #56 made a resolved dialog stay a dialog message carrying its
recorded Outcome. They failed identically on the pinned 2.1.198; the
recipe-driving and toolUseResult stages were and stay correct. Assert the
dialog message's Outcome instead: answers "Blue" and {Apple, Cherry}
(order-insensitive via sortedLabels), resp. plan approval. (issue #235)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
chore(agent-tools): bump Claude Code pin to 2.1.220 (compat re-verified 2026-07-25)
All checks were successful
agent-tools / publish (pull_request) Has been skipped
ci / native (pull_request) Successful in 9m57s
agent-tools / smoke (pull_request) Successful in 13m56s
8ef10d6510
Move CLAUDE_CODE_VERSION + the linux-x64-musl sha256 (verified against the
per-version manifest.json) together with the compat-record update, per the
documented bump procedure (docs/ops.md § "Agent-tools images", ADR-0051).

The 2026-07-25 re-verification drove the full checklist live against the
real 2.1.220 binary: hermetic suite and live probes green, all 22 pinned
marker/key strings present in the bundle. One real drift — a reversal of
§12's key finding: 2.1.220 defers the pending-dialog tool_use flush to
flush-on-resolve on BOTH spawn arms, so the transcript-scan path is dead as
a live dialog source and the §9 hook spool is the sole live source. No
port-code change needed: pendingDialog's suppression rule already models
flush-on-resolve. compat.md records the reversal, re-dates per-section
provenance, adds the incidental 2.1.220 notes (--permission-mode
default→manual rename, --forward-subagent-text, six ignored transcript
event types, prompt_id/permission_mode hook keys, CLAUDE_CODE_CHILD_SESSION
footnote), and lists the four deferred host-side verifications. (issue #235)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Author
Owner

[autoland] verdict: pass

Clean PASS. Checks green: agent-tools/smoke (built the claude image, sha256-verifying the pinned 2.1.220 binary, + injection smoke — the reach-relevant containers/** gate), ci/native (hermetic Go suite). Title is valid Conventional Commits; body carries Closes #235; diff scope (versions.env, compat.md, live_recipes_test.go) matches the issue exactly with no drive-by changes. The two live-recipe assertions correctly re-target the #56 answered-dialog model (DialogOutcome.Results / Approved), and compat.md accurately documents the flush-on-resolve reversal on both arms with the four deferred host-side follow-ups recorded.

[autoland] verdict: pass Clean PASS. Checks green: agent-tools/smoke (built the claude image, sha256-verifying the pinned 2.1.220 binary, + injection smoke — the reach-relevant containers/** gate), ci/native (hermetic Go suite). Title is valid Conventional Commits; body carries Closes #235; diff scope (versions.env, compat.md, live_recipes_test.go) matches the issue exactly with no drive-by changes. The two live-recipe assertions correctly re-target the #56 answered-dialog model (DialogOutcome.Results / Approved), and compat.md accurately documents the flush-on-resolve reversal on both arms with the four deferred host-side follow-ups recorded.
All checks were successful
agent-tools / publish (pull_request) Has been skipped
ci / native (pull_request) Successful in 9m57s
Required
Details
agent-tools / smoke (pull_request) Successful in 13m56s
This pull request has changes conflicting with the target branch.
  • internal/compat/compat.md
  • internal/compat/live_recipes_test.go
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin afk/235:afk/235
git switch afk/235
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Cloonar/coding-lab!236
No description provided.