Skip to content

Keep file views inline and close verifier and redaction gaps - #3

Merged
DmitrL-dev merged 1 commit into
mainfrom
fix/receipt-packing-verifier
Sep 28, 2026
Merged

DmitrL-dev merged 1 commit into
mainfrom
fix/receipt-packing-verifier

Conversation

@DmitrL-dev

Copy link
Copy Markdown
Owner

Summary

  • File views stay inline. cat, nl, sed, head, tail, and git show/diff/blame outputs up to 64 KiB are no longer packed. In a recorded 0.1.10 session, 3 packed reads (two file views, one rg) caused 5 extra artifact reads in smaller ranges, and the agent started splitting its reads to stay under the 6 KiB threshold.
  • Artifact reads are never repacked. A command that reads a receipt artifact now passes through unchanged. The read is counted as artifact_rereads/artifact_reread_bytes, and --report adds net_saved_bytes = saved_bytes - artifact_reread_bytes.
  • More test runners stay inline on unknown status. Unknown-status output from cargo/go/npm/pnpm/yarn/bun test, jest, vitest, Gradle, Maven, and similar runners is no longer packed, matching the existing pytest/unittest rule.
  • Verifier parsing: 2>&1-style descriptor duplication is accepted. Go word flags (-short, -bench, -shuffle) are no longer read as help requests.
  • Redaction:
    • indented diagnostics after an Authorization header are kept;
    • an unterminated private-key marker redacts only its key-like lines, not the rest of the output;
    • env-style secret names (AWS_SECRET_ACCESS_KEY, GITHUB_TOKEN), common token prefixes, and URL user-info passwords are now redacted;
    • matching is linear on long token-like runs.
  • Verification debt: prose files (.md, .rst, .adoc) under source directories no longer create debt, and neither do failed apply_patch results, including Exit code: N headers.
  • test_hook_commands skips the generator tests when scripts/generate_hook_commands.py isn't packaged with the installed plugin.
  • Version 0.1.11+codex.20260928; CHANGELOG, README (EN/RU), SKILL.md, and docs/savings.md updated.

hooks.json and sol_bootstrap.py are unchanged, so the pinned loader protocol and the hook trust hash stay the same.

Verification

  • python -m unittest discover -s plugins/sol-codex/scripts -p 'test_*.py': 71 tests, OK (7 Windows-only skips), Python 3.9 on macOS. New tests cover every change above.
  • scripts.test_installed_hooks, scripts.test_upgrade_cache, and scripts/benchmark_receipts.py pass.
  • The sanitizer handles 200 KB token runs and 5,000 unterminated key markers in under 0.5 s. An intermediate version took 21 s on 13 KB; a regression test now covers this.
  • scripts/validate_repository.py and scripts.test_release_tools fail with the same 14 errors and 7 failures on clean main. They come from tracked research data and are handled in a separate PR.

Not changed on purpose

  • Verifier wrapping stays limited to Bash in bypassPermissions.
  • Env-assignment prefixes (FOO=1 pytest) are still rejected.
  • The global threshold still overrides the Astra threshold, as documented.
  • Code-mode receipt events are still counted: the hook payload does not identify code mode.

🤖 Generated with Claude Code

A recorded session showed every packed file read followed by one or two
artifact reads in smaller ranges. File views up to 64 KiB now stay inline,
artifact reads are never repacked and are counted against the local byte
difference (`net_saved_bytes`), and unknown-status output from common test
runners stays inline like pytest.

Verifiers accept `2>&1` and Go word flags such as `-short`. Redaction keeps
diagnostics after Authorization headers and unterminated key markers, covers
environment-style secret names, token prefixes, and URL passwords, and stays
linear on long token runs. Prose files under source directories and failed
apply_patch results no longer create verification debt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@DmitrL-dev
DmitrL-dev force-pushed the fix/receipt-packing-verifier branch 2 times, most recently from e96e510 to 780652c Compare September 28, 2026 03:43
@DmitrL-dev
DmitrL-dev merged commit 5df42e3 into main Sep 28, 2026
36 checks passed
@DmitrL-dev
DmitrL-dev deleted the fix/receipt-packing-verifier branch September 28, 2026 06:31
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.

2 participants