Repository navigation
rtk 0.51.0: make the grep file-list exactness control lossless (follow-up to #693) - #698
Conversation
PR #693 / native-token-tools run 37226622626 failed because our control required unchanged grep file-list stdout after upstream deliberately folded the shared directory prefix. Keep coordinator option (a) and the 0.51.0 pin. Parse the documented <prefix> (N files) header, expand each tail by literal prefix concatenation, and compare the complete reconstructed native path set. Check successful exits, distinct native paths, and the header/tail counts. Use LF records to preserve CR corruption. Keep both diff predicates unchanged and retain exact native/proxy output and exit recovery for every case. Add a native three-file guard fixture whose first filename ends in CR; require the CR signal and byte-identical verbatim output, including the proxy arm. Pinned original sources: - rtk-ai/rtk v0.51.0, e001f773f80b22b7dc4c7a79521b30e35aaef026; published 2026-10-02T13:33:54Z, verified through the GitHub release/tag API. - feac25d15f254dcdbb6c6629b91328a821eb24ce: src/cmds/system/search.rs:612-674 and :1345-1354; tests/search_file_list_fold_test.rs:43-66 at v0.51.0. - 3223a80145e482762abbf50ac01656360f906f14: src/cmds/system/search.rs:631-639 and :1337-1342 at v0.51.0. Append a dated limitation to the existing 0.51.0 receipt and add the dated decision note. Historical receipt claims and observations remain intact. Returned evidence: - Old assertion with the 0.51.0 synthetic receipt shape: one test fails, exit 1 (.bounded-job-035/tmp/red-unittest.txt). - Old native exactness fixture reproduces native exit 0 / 60 bytes / 3 lines, RTK exit 0 / 45 bytes / 4 lines, and byte-identical proxy output; exit 1 at the original control (.bounded-job-035/tmp/red-native.txt and .bounded-job-035/tmp/native-red/results/receipt.json). - Guard test before its fixture/check addition fails, exit 1; an injected folded-tail CR also fails before replacing splitlines() with LF splitting (red-guard-unittest.txt and red-fold-cr-unittest.txt under the job TMPDIR). - Final native exactness fixture: nine checks pass, 11 cases / 33 arms / 73 commands, exit 0 (.bounded-job-035/tmp/green-native-final.txt and .bounded-job-035/tmp/native-green-final/results/receipt.json). Independent raw stdout hashes confirm exact proxy recovery and CR refusal; diff output hashes and exits match before and after the repair. - python3 -m unittest tests.test_native_token_ci: 49 tests pass, exit 0. - All four referencing modules were run: 914 tests, 198 failures, 35 skips, exit 1. Every failure is in tests.test_token_e2e_grader and refuses private fixture output with E_PATH reason=work_tree. An existing /tmp/.git entry triggers tools/token-e2e/frozen_checks.py:1311 despite native git -C /tmp rev-parse --is-inside-work-tree returning exit 128. An isolated failing case reproduces the refusal (grader-isolated-failure.txt). Git diff confirms that the grader, its tests and the privacy guard are unchanged from HEAD. - The other three referencing modules pass independently: python3 -m unittest tests.test_adoption_bootstrap_macos tests.test_agentsview_qualification tests.test_workflow_hardening: 290 tests, 35 skipped, exit 0. - python3 scripts/validate.py: exit 1, registry drift only (seven findings): SHA-256 and byte counts for the changed script, tests and qualification receipt, plus the appended receipt-limitations mirror. Refresh these in manifests/evidence.json at integration; that file remains untouched here. - git diff --check: exit 0. Final acceptance logs: acceptance-native-token-ci-final.txt, acceptance-referencing-modules-final.txt, acceptance-other-referencing-modules.txt and acceptance-validate-final.txt under .bounded-job-035/tmp. Earlier failures and reruns remain alongside them. The requested TMPDIR path is a symlink to isolated /tmp storage, and acceptance uses its canonical path. Native npm uses a job-local cache and distinct empty user/global config files. The initial in-checkout TMPDIR attempt failed the grader preflight and native npm packing; a /dev/null-for-both-configs retry failed with npm's double-loading rejection. Generated job artifacts are ignored for publication. The shared /tmp/.git and all refusal guards remain untouched. Workflow: bounded search-first / diagnosing-bugs / tdd at the user-selected exactness seam, based on original pinned source. Scoped ai-memory retrieval was unavailable under the tool approval policy; no configuration was changed. Provider usage is unknown. The completeness critic in the dated note keeps native rg/-L/NUL/OSC 8, other hosts and model interpretation outside this round. Residual: agent-facing expansion of folded paths is unmeasured. An E2E observation of a wrong expanded path leads to adding grep -l/-rl to the hook exclusions. No upstream Cargo suite or native-model acceptance is claimed. No commit was created. Branch c5/token-pin-move-20261004 remains at bbb299d. Changes are left in the working tree. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Repair PR #698 from 45a7218 without changing the RTK pin. Compare the literal prefix-plus-tail inverse in native engine order, and reject permutations that the former sorted comparison accepted. Add the matched CR-free explicit-operand grep -l sibling: t6b stays verbatim with CR, while t6c actually folds. The fixture now has ten checks across 12 cases / 36 arms. Add isolated native-distinctness and LF record-count rejection controls. With only distinctness deleted, its test fails and the count test passes. With only the LF count deleted, both wrong-count variants fail and the distinctness test passes. All six focused tests pass after restoration. Correct the native-token CI guide with dated history and current behavior. Scope the old validation drift to 421e4ee and record the passing baseline after registry commit 45a7218. Preserve historical receipt data and append the shell-site correction: base arms at 1484, current direct argv at 1486. Correct both unit-test citations to search.rs:1345-1354. Read feac25d's registry hunk: it protects hook pipeline producers, while these standalone direct-argv controls do not enter that rewrite path. Retain minimal sanitized original job-035 red/green streams and current job-042 evidence under evidence/artifacts/rtk-051-file-list-control-20261004/. Reference them from the dated decision and appended receipt limitation. Pinned original sources: - rtk-ai/rtk v0.51.0, e001f773f80b22b7dc4c7a79521b30e35aaef026; release/tag verified by GitHub API and installed rtk --version. - feac25d15f254dcdbb6c6629b91328a821eb24ce: src/cmds/system/search.rs:612-674,1345-1354; src/discover/registry.rs:1536-1546,1775-1779 at the tag. - 3223a80145e482762abbf50ac01656360f906f14: src/cmds/system/search.rs:631-639,1337-1342 at the tag. Validation: - Requested five-module unittest invocation: 966 tests, 35 skipped, no failures, exit 0. The canonical workspace job TMPDIR runs in a private util-linux 2.39.3 user/mount namespace with the original nonzero UID/GID and a byte-identical native Git copy on the same bind mount. Shared /tmp/.git, grader code and privacy guards are unchanged. Failed environment attempts and the eight-test export-canary correction are retained. - Native exactness fixture: ten checks, 12 cases, 36 arms and 76 fixture commands plus one version command, exit 0. Independent inspection verifies engine order, verbatim CR stdout, native/proxy hashes and final source bytes. - scripts/validate.py: exit 1, 35 registry-only findings (ten changed hash/byte entries, one limitations mirror, 24 new artifact registrations). The unchanged 45a7218 baseline passes. manifests/evidence.json is untouched and remains coordinator-owned. - git diff --check: exit 0. Evidence remains local integration and synthetic contract checks; no new upstream Cargo suite, WSL run, native model, provider or other-host acceptance. The dated completeness critic retains the unmeasured modalities for the next file-list sweep. Search-first and diagnosing-bugs used the selected existing fixture and pinned original source; no additional tool adoption was needed. No commit was created. Changes remain in the working tree on c5/rtk-file-list-control-20261004 at 45a7218. Co-Authored-By: Claude Opus 5.5 <[email protected]>
45a7218 to
5e6afa4
Compare
…facts; describe only main's history in the guide The Claude delta read found 421e4ee and 45a7218 cited as sources although the rebase onto 38ac9ac replaced both (421e4ee is 5a4add3 with the same patch; 5e6afa4 replaced 45a7218). Each citation now says pre-rebase, the guide describes #693 then #698, and the note records validate passing after the registry commit. Co-Authored-By: Claude Opus 5.5 <[email protected]>
5e6afa4 to
8f52638
Compare
…d artifact README Co-Authored-By: Claude Opus 5.5 <[email protected]>
…d, its artifact folder and the 0.51.0 receipt's appended limitations on main 38ac9ac (registry last) Co-Authored-By: Claude Opus 5.5 <[email protected]>
8f52638 to
d1e6266
Compare
…egistry plus the owned rows) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…fore the final hot-file commit Co-Authored-By: Claude Opus 5.5 <[email protected]>
… (hot-file protocol: every hot-file edit in the last commit) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…egistry plus the owned rows) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…fore the final hot-file commit Co-Authored-By: Claude Opus 5.5 <[email protected]>
… (hot-file protocol: every hot-file edit in the last commit) Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Claude session native-agent-stack-5f: landing at head Observed main Required checks at this head: 8 pass . Unresolved review threads: 0. |
|
Claude session native-agent-stack-5f: post-merge observation. Landed as |
…usts it (decision 2026-10-04; the user's relayed pointer yes of 2026-10-05) Second of the two pull requests of docs/decisions/2026-10-04-codex-rtk-hook-qualified.md. The command-output row gains two commands, `rtk init -g --codex` (upstream's install: the hook group, RTK.md and an inert @RTK.md pointer in the Codex AGENTS.md; no hook-only mode exists with --codex) and codex_hook_trust.py --apply for that one hook; its post_install acceptance adds the two Global [ok] lines of `rtk init --show --codex` and `codex_hook_trust.py --check`; a new after_sign_in acceptance runs a fresh `codex exec` told to add no prefix and requires `rtk git status` in the executed command (UNRUN: the model call needs the sign-in; the jq filter was checked on a recorded stream). install.sh, accept.sh and the plan JSON agree (check_plan.py: 120 commands, 79 acceptance entries). The plan README, the token session handbook paragraph, a dated note on the RTK card (cards are dated editions), the F9 recipe text and its owner-list test (command-output joins the after-sign-in owners), the generated new-WSL handbook and the decision record's addendum follow. The addendum records the user's "yes for rtk pointer" and the standing rule about upstream installer side effects as the user's words relayed by the command center. The artifact README also notes that its grep fixture cannot show rtk's file-list fold (the control of #698 covers it). Co-Authored-By: Claude Sonnet 5.5 <[email protected]> (cherry picked from commit f99b91f)
Scope
rtk-exactness-controls-diff-and-grep-unchangedcontrol innative-token-toolsfailing on main, because rtk 0.51.0 deliberately folds the shared path prefix of grep file lists. The grep half of the control now checks that the folded output reconstructs the exact native path set (lossless). The diff half is unchanged.14048b840lane:foundationscripts/native_token_ci.py,tests/test_native_token_ci.py,evidence/receipts/rtk-051-qualification-20261004.json(appended dated limitation),docs/decisions/2026-10-04-rtk-file-list-control.md(new),manifests/evidence.json(registry, last commit).SOTA sources
e001f773f80b22b7dc4c7a79521b30e35aaef026, published 2026-10-02T13:33:54Z):Evidence-class table
<prefix> (N files)plus N tails reconstructs the native path set exactly.bounded-job-035/tmp/red-unittest.txt(builder workspace);python3 -m unittest tests.test_native_token_cipassesrtk proxystays byte-equal to native; a CR-in-filename list stays verbatim (the 3223a80 guard)Local commands run
Decision record
docs/decisions/2026-10-04-rtk-file-list-control.md: option (a), keeping 0.51.0 and making the control lossless. The alternative was to hold rtk at 0.50.0. Overturn: an E2E observation of a model mis-expanding a folded path addsgrep -l/-rlto the hook exclusions.Checklist
Built by a bounded GPT Sol worker (job-035); the coordinator committed it, re-registered it and ran the checks above. A cross-family (Claude) read is pending.
🤖 Generated with Claude Code