Skip to content

fix(harness-config): size audit-instructions lanes at 2.7 bytes per token - #12906

Merged
kyle-sexton merged 5 commits into
mainfrom
host-run/12879-bytes-per-token
Nov 3, 2026
Merged

kyle-sexton merged 5 commits into
mainfrom
host-run/12879-bytes-per-token

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

Closes #12879

Summary

audit-instructions converted its token budget to bytes at 3.5 bytes per token, the figure for models before Claude 4.7. Models from 4.7 on produce about 30% more tokens for the same text, so a lane held more text than its budget. This re-pins the figure to 2.7 (3.5 / 1.3) and shows, with a sound negative control, that the change loses nothing.

Fix

  • skills/audit-instructions/SKILL.md: the lane-sizing prose and the lane-runs.sh partition command use --bytes-per-token 2.7, with the glossary pointer, as-of 2026-11-03 and the existing recheck trigger.
  • skills/audit-instructions/evals/evals.json: case 23's expected output names 2.7.
  • A patch changelog fragment. CHANGELOG.md history is left as written.

Verification

Case ai-lane-budget-window (three regex graders: fraction 0.25, budget 50000, bytes per token between 2 and 3), run with claude plugin eval <copy> --ablation none --case ai-lane-budget-window --runs 3 -j 2 --model opus on the subscription login, HOME isolated, Claude Code 2.1.317. Each copy (before = origin/main, after = this branch, control = before with the budget paragraph and partition block deleted) had CHANGELOG.md and every eval file except this case removed; a grep of each copy for 3.5, 2.7 and per.token finds the figure only in the part under test.

Arm Scores run-validity
before (two passes) 0.67 x 6 VALID, VALID
after 1.00 x 3 VALID
control 0.00 x 3 VALID (--own-copy-search-warns)

No loss (1.00 against 0.67), and the control sits clearly below before. The control's own-copy Grep and Glob were denied, but its copy holds no lane-sizing value, so an allowed search would have found nothing.

  • scripts/check-affected.sh --tests on the committed head: 14 passed, 2 skipped (no changed shell or Python).

Left out: the eval case itself, kept out of the PR as one-off measurement tooling.

Related

🤖 Generated with Claude Code

https://claude.ai/code/session_01MWmASLb8hq2u1wgYpFAbZt

kyle-sexton and others added 4 commits November 3, 2026 12:54
…oken

The lane budget converted tokens to bytes at 3.5, the per-token figure
for models before the 4.7 tokenizer. Current models produce more tokens
for the same text, so a lane held more text than its token budget. The
setting is now 2.7 in the prose and the partition command, with the
glossary pointer rechecked as of 2026-11-03.

Measured with case ai-lane-budget-window on before, after and control
copies that carry no CHANGELOG.md and no eval files outside the case.

Refs: #12879, #11823

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 3, 2026 18:53
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-03T18:55:27.073896Z 5966373 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude-review: 1 inline finding(s) on 5966373d5a16d77e92654810f2af9339d87cc9d3; the summary is in this lane's pull request comment.

claude-lane: claude-review

@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed b438c4c3101a5cabe5526c9665fb2179e12b7dbe: read 1 of 1 changed file(s); 0 finding(s), 0 as inline comments.

Code review: PR #12906, incremental check since 5966373

What I reviewed. One file changed since the last review: plugins/harness-config/skills/audit-instructions/evals/evals.json. I read all of its change, which is one hunk. I also re-read the PR context, the settled threads and this lane's earlier findings.

The change. Case 23 gets a new expectation, "Passes --bytes-per-token 2.7 to lane-runs.sh partition", at evals.json:283. It matches the command the skill tells the agent to run at SKILL.md:275 (--bytes-per-token 2.7). It also matches the case's own expected_output at line 279. The JSON is still valid: the new string sits inside the existing array, and commas separate it from the strings around it.

Prior finding. The last round's advisory said that nothing in the repo checked the re-pinned figure. This commit fixes that, and the owner resolved the thread. Putting 3.5 back in SKILL.md would now fail this expectation of case 23. I raise nothing again. The owner decided to keep the ai-lane-budget-window measurement case out of the PR as one-off tooling, and that thread is settled.

Closing issue #12879.

  • "The bytes-per-token figure matches its upstream source, with pointer, as-of date and recheck trigger." This is met, as found last round. An eval expectation now covers the figure.
  • "A before/after/control measurement with no copy holding the old value shows no loss, recorded here." The PR description gives these results: before 0.67, after 1.00, control 0.00. They are the author's claim; I did not run them.

Embedded text. Nothing in the PR context or the thread text tells the lane what to do.

Spend. None: this changes no runs, models or schedules.

Round cap. One earlier round had findings (cap 3), so the cap does not apply.

No new findings.

@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed b438c4c3101a5cabe5526c9665fb2179e12b7dbe: read 1 of 1 changed file(s); 0 finding(s), 0 as inline comments.

Security review: PR #12906 (incremental, 5966373 → b438c4c)

I read the whole incremental change, which is one hunk in one file. It has no security issues.

What changed. plugins/harness-config/skills/audit-instructions/evals/evals.json adds one expectation string to eval case 23: "Passes --bytes-per-token 2.7 to lane-runs.sh partition". It is grader text for the eval. Nothing runs it, and it adds no command, input source, token or credential handling.

What I checked.

  • Trust controls and manifests. The file is not on the trusted paths. It touches none of the trusted-trigger check, the lane token or broker, the kill switch, a merge hold, an action under .github/actions/, or a plugin manifest. No manifest <field> lines apply.
  • Instruction-surface lens. No standing instruction is deleted, narrowed or softened. The change only adds an expectation.
  • PR context. It holds no embedded directives aimed at this lane.
  • Prior findings. This lane's only earlier post is the round-1 summary, which had 0 findings, so nothing carries forward.

Spend (not a hold): none in this push. The earlier change to 2.7 bytes per token, reviewed at 5966373, splits audits into more lanes, which spends subscription or prepaid model usage but creates no billable charge.

critical-findings: 0

Case 23 named 2.7 only in its expected output, which no grader reads,
so a later edit back to 3.5 would pass every eval. An expectation now
checks the value passed to lane-runs.sh partition.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MWmASLb8hq2u1wgYpFAbZt
@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 3, 2026
Merged via the queue into main with commit ed2611b Nov 3, 2026
45 of 46 checks passed
@kyle-sexton
kyle-sexton deleted the host-run/12879-bytes-per-token branch November 3, 2026 19:39
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.

fix(harness-config): re-pin audit-instructions' bytes-per-token estimate with a measurable control

1 participant