Skip to content

skills(review-runs): read the evidence windows from a file, not the command's stdout - #1373

Merged
max-sixty merged 2 commits into
mainfrom
daily/review-runs-35701564957
Sep 22, 2026
Merged

max-sixty merged 2 commits into
mainfrom
daily/review-runs-35701564957

Conversation

@tend-agent

@tend-agent tend-agent commented Sep 22, 2026 •

Copy link
Copy Markdown
Collaborator

prepare-evidence returns both months of the tracking issue in one JSON blob, and the skill tells the session to read it from the command's stdout. On an established tracker that blob is 600–700 KB — far past what a tool result carries — so what actually reaches context is a truncated preview plus a path to a persisted file. Every sweep since 2026-09-18 has hit this and independently improvised the same recovery: re-run the command redirected, then jq the two comment arrays out. This change makes the recipe do that up front, the way the two neighbouring steps that produce large output already do (token_report.py and outage-trackers both redirect to $TMPDIR).

The two extracted files are also how you count a finding's prior occurrences, which Gate 1 requires — but a grep for this run's phrasing only matches entries whose author happened to choose the same words, so the prose routes the count through the ### heading @review-gates.md's finding format gives every entry. Listing those headings is a semantic index small enough to read whole; the phrase grep pulls out the entry behind a candidate. This replaces the "prints both evidence windows" claim that has not been true of this repo's tracker for a month.

Verified against this run's real output: the three jq lines yield tracker #1125 2026-09, a 363 KB current-month file and a 347 KB previous-month file, with 30 ## Run headings across them. The current-month window alone carries 230 ### headings totalling 19 KB, so the index is ~5% of the text it indexes. All 13 pre-commit hooks pass. uv run pytest is 1214 passed, 2 failed — both the test_refresh_consumers.py cases that need PyPI and fail in this sandbox by design.

Prior observations are recorded on #1125.

Gate assessment and observation history
  • Evidence level: High — a consistent pattern across 7 consecutive sweeps, no run-to-run variation.
  • Occurrences: 7. Recorded sizes on the six prior sweeps were 599.7, 608.8, 621.2, 634.1, 651.1 and 684.5 KB; this run's was 699 KB. The store grows roughly 15 KB per sweep within a month and resets at the monthly rollover, so the condition is permanent rather than transient.
  • Structural or stochastic: structural. The output size is a function of tracker size, not of how a session approaches the task — there is no decision point being exercised differently.
  • Change type: targeted fix to an existing recipe. It adds no rule a later session must carry; it corrects one that every review-runs session already loads, and the remedy is the one the earlier entries named ("one line in Evidence accumulation redirecting the command to a file").
  • Why now. The six prior sweeps withheld it against a different trigger — a sweep miscounting Gate 1 occurrences off the truncated preview — which has still never been observed. That is not what this fixes. What it fixes is a shipped instruction that describes behaviour that does not happen, and the per-run double-invocation that follows from it.
  • Scope. .claude/skills/review-reviewers/SKILL.md carries the same "prints both evidence windows" sentence, but its evidence lives in per-consumer gists that have not approached the limit, so it is left alone.

@tend-agent tend-agent added the review-runs Findings from review-runs skill label Sep 22, 2026

@tend-agent tend-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The occurrence-counting recipe this adds matches lexically: grep both windows for a distinctive phrase. But each entry carries whichever wording its own session chose, so a prior occurrence described in other words goes uncounted — and Gate 1 then acts on an undercount, which is the failure mode the evidence store exists to prevent. review-gates.md's finding format gives every entry a ### heading, and those headings are a small enough index to read whole: on tracker #1125's current-month window, 380 KB of comment bodies carry 230 ### headings totalling 19 KB. Listing them first lets the match be on meaning rather than phrasing, with the phrase grep reserved for pulling out the entry behind each candidate. Suggestion inline; I'll push it.

Separately, the description cites list_recent_runs.py as one of three neighbouring steps that "already redirects to $TMPDIR". It doesn't — Step 1 runs it with no redirect and reads its JSON inline; the $TMPDIR file it produces (review-runs-since) is written by the script itself. token_report.py and outage-trackers are the two that redirect.

The rest checks out against the script: current_comments, previous_comments, tracking_number and month are the keys prepare-evidence emits, and github_cli.run captures every subordinate gh call, so nothing else reaches stdout to corrupt the redirected JSON.

Grepping the windows for this run's phrasing only matches entries whose
author happened to choose the same words. Listing the `### ` headings
review-gates.md's finding format guarantees gives a semantic index small
enough to read whole, with the phrase grep left for pulling out the entry
behind a candidate.
@max-sixty
max-sixty merged commit 1475197 into main Sep 22, 2026
11 checks passed
@max-sixty
max-sixty deleted the daily/review-runs-35701564957 branch September 22, 2026 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review-runs Findings from review-runs skill

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants