Repository navigation
docs(repo): how to read a replay batch before writing it up - #365
antonwolfy wants to merge 4 commits into
Conversation
A write-up of a review replay batch can over-read it in ways the docs did not warn about: crediting "the guidance" when only the root file was in the start context, calling a date split out of sample, reading an interval that includes 0 as no effect, resting a suggestion on a descriptive p, quoting location-credited hits as content matches, and adding totals by hand. reviewing.md gets a "Reading a replay batch" subsection, linked from the Step 4 reading note. It gives one rule per mistake, each naming the field or command that answers it: first_prompt_tokens and reach for delivery, a guidance-commit listing and repo compare --task for leakage, the inconclusive note's mde, p_holm versus descriptive rows, repo report --hits, and the --json outputs for totals. A sibling of the "A rule the review proposes" bullet asks that a replacement line proposed for a stale claim be checked like the claim, in every place it speaks for. Contract §9 points at the subsection from the repo report --hits bullet; the contract's own rules are unchanged. Docs only: no changelog fragment, since dokimi/docs/ is outside the paths the fragment step gates. Signed-off-by: Anton Volkov <antonwolfy@gmail.com>
There was a problem hiding this comment.
🟡 Changes recommended
The guidance needs full-text hit validation, history checks covering symlink chains and targets, and leakage-filtered comparisons for null results to prevent misleading review conclusions.
3 open issues
What changed in this PR
3 new findings.
This docs-only PR adds guidance for interpreting repository review-replay batches before writing conclusions, using existing reporting and comparison tools.
Changes:
- Adds checks for guidance delivery, leakage, statistical interpretation, credited hits, and totals.
- Requires proposed replacement claims to be checked across all relevant files.
- Links the evaluation contract to the new guidance without changing runtime behavior or contract rules.
| File | Description |
|---|---|
dokimi/docs/reviewing.md |
Adds replay-batch interpretation and replacement-claim verification guidance. |
dokimi/docs/repo-evaluation-contract.md |
Links hit-reporting documentation to the replay-batch guidance. |
Review effort: Balanced
|
✅ OpenCodeReview: Review complete: 0 finding(s) across 1 selected item(s). Review details
|
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #365 +/- ##
=======================================
Coverage 94.29% 94.29%
=======================================
Files 308 308
Lines 39322 39322
Branches 6651 6651
=======================================
Hits 37077 37077
Misses 1432 1432
Partials 813 813 🚀 New features to boost your workflow:
|
The audit of a replay write-up (item5/replay-reading) used guidance:rev:<sha> against guidance:none, as the new "Reading a replay batch" subsection assumes, but reviewing.md and the contract's §9 replay example named guidance:raw. For a replay that is wrong: a review_replay task's base is its PR's merge base, and workspace preparation applies the arm to that base's tree, so guidance:raw keeps the guidance as it was at each PR's base, a different set per task and none before the guidance was added, not the guidance under review. - reviewing.md "Past review comments": compare guidance:none with guidance:rev:<sha> of the guidance under review, and say why not raw. - reviewing.md step 4 row: the raw command stays for the repository's own tasks; a clause says a replay batch passes guidance:rev:<sha>. - contract §9: the replay example runs guidance:rev:<sha>, with a one-line comment on why. Signed-off-by: Anton Volkov <antonwolfy@gmail.com>
The same guidance:raw pairing as the reviewing.md bullet the previous commit fixed: section 6 told a reader to run review_replay tasks with guidance:none and guidance:raw. Each task starts from its PR's base, so raw gives it the guidance of that time; the arm to compare is guidance:rev:<sha> of the guidance under review. Signed-off-by: Anton Volkov <antonwolfy@gmail.com>
Review comments on the "Reading a replay batch" subsection of reviewing.md, each checked against the code: - Delivery: the first_prompt_tokens delta is a mean over tasks and cells of a total and names no file. It is evidence, confirmed with reach under the cells' harness and version and, where a credit turns on it, with the cells' traces. - Leakage: guidance is read with symlinks followed (contract section 8), so the git log covers every link on the way and the file it resolves to; a commit that changed only the target is otherwise missed. - Leakage is not one-sided: flagged tasks can inflate a gain or mask a loss, so a gain, a null and a loss are all read without them. The sentence saying leakage weakens a gain, not a null, is gone. - Inconclusive: where the interval includes 0 but p_holm is below 0.05, repo compare prints the disagreement note in place of the inconclusive one, with no mde; p_holm is the one to read there. - Hits: repo report --hits cuts each comment and finding to 100 characters, and a match keeps 200 (graders/review.py CUT). A cited pair is read in full, the thread's comment in gold.json or at its url and the finding in answer.txt. - The delivered-file check is for attributing a hit to a guidance rule only: a finding's rule is the agent's own label, and a guidance:none hit has no guidance to check. Signed-off-by: Anton Volkov <antonwolfy@gmail.com>
|
Review round on the bots' comments (Copilot and exai-bot, 8 threads, all on d840bc8), answered in cbe759d:
Earlier commits since opening: be55ddd and 786465c (a replay compares |

Summary
Follow-up to an audit of a written-up repository review that replayed past PR reviews as
dokimi:review_replaytasks (guidance:noneagainst aguidance:rev:<sha>arm, 26 tasks, 3 reps).The write-up over-read the batch in seven ways that the docs did not warn about. It credited a
nested-file rule when only the root
AGENTS.mdwas in the start context. It called a date splitout of sample when later guidance commits named replayed PRs. It read an interval of
[-0.066, +0.100] as "no measurable gain". It rested a suggestion on a descriptive p of 0.049. It
cited location-credited hits that made a different point. It added up totals by hand and got them
wrong. And its fact-check proposed replacement lines that were themselves wrong.
The tooling for each check is already on
main:agent.first_prompt_tokensand its compare row,repo compare --task, the inconclusive note withmde, the interval-vs-p note, thedescriptive-p line,
details.matchesandrepo report --hits. What was missing is a page thattells the person writing up a replay batch to use them.
docs/reviewing.md's Step 4 note saidonly "without tasks there is no outcome measurement".
The docs also named the wrong arm for a replay.
docs/reviewing.md(step 4 row, "Past reviewcomments") and the contract's §9 replay example compared
guidance:nonewithguidance:raw. Areview_replaytask'sbaseis its PR's merge base (contract §4.6), and workspace preparationapplies the arm to that base's tree (§3, steps 1 and 5).
guidance:rawkeeps the files as theyare there (
workspace.py_apply_armreturns before touching them), so each task gets theguidance as it was at that PR's base. That is a different set per task, and none for a PR older
than the guidance. The arm that runs the guidance under review over old bases is
guidance:rev:<sha>(§3), which is what the audited replay used.The fourth commit answers the review comments on the subsection; each change below was checked
against the code. The
first_prompt_tokensdelta is a mean over tasks and cells of a total(
compare.py), so it points at files but does not name them. Guidance is read with symlinksfollowed (contract §8), so a leak check that logs only the link misses a commit to its target.
Leakage can mask a loss as well as inflate a gain. Where the interval includes 0 but
p_holmisbelow 0.05, compare prints the disagreement note in place of the inconclusive one, so there is no
mdeto quote.repo report --hitscuts each text to 100 characters (format_hits), and astored match to 200 (
CUTingraders/review.py). A finding'sruleis the agent's own label(the replay prompt asks for a "short rule name").
Changes
docs/reviewing.md: a new "Reading a replay batch" subsection under "A repository's agentsetup", linked from the Step 4 reading note. It asks the reader to:
first_prompt_tokensdelta as evidence, not proof. Confirmwhat loaded with reach under the cells' harness and version and, where a credit turns on it,
with the cells' traces. Do not read
process:guidance_read0 from a Bash-only agent as"never read". Name what was delivered as what was tested.
on the way and the file it resolves to. Flag the tasks a commit names or whose threads
predate a rule change, and read a gain, a null or a loss without them via
repo compare --task.mde: an interval that includes 0 is inconclusive. Quote theinterval and
mde, say what the data rules out, and size the next run byn_tasks * (mde / target)^2. Wherep_holmis below 0.05 anyway, read the disagreementnote and
p_holminstead.first_prompt_tokens,--metricandprocessrows are descriptive. A guidance suggestion needs a gate or score row atp_holm,and a section or rule suggestion needs an arm that edits that section; without one, say it
comes from reading.
window. Find the pairs withrepo report --hits, then read each cited pair in full (the thread'scommentingold.jsonor at itsurl, the finding inanswer.txt), and say how many held. A hitattributed to a guidance rule also needs that rule in a file the cell started with or read.
repo report --json,repo compare --jsonand
grade.jsonmetrics; a total no command prints is summed by a script.docs/reviewing.md: a sibling of the "A rule the review proposes" bullet. A replacement lineproposed for a stale claim is checked like the claim, in every place it speaks for.
docs/repo-evaluation-contract.md§9: one sentence after therepo report --hitstext thatpoints at the new subsection. The contract's rules are unchanged.
docs/reviewing.mdand contract §9, second commit: a replay comparesguidance:nonewithguidance:rev:<sha>of the guidance under review (the PR's head, ormain). The "Past reviewcomments" bullet says so and why not
guidance:raw. The step 4 row keeps itsguidance:none,guidance:rawcommand for the repository's own tasks and adds one clause for areplay batch. The §9 replay example runs
--arm guidance:none,guidance:rev:<sha>, with aone-line comment.
docs/preparing-a-repository.md§6 ("Measure what the guidance would have caught"), thirdcommit: the same pairing, fixed the same way.
docs/reviewing.md, fourth commit (review comments): in "Reading a replay batch", thefirst_prompt_tokensdelta is evidence to confirm, not proof. The leakagegit logcoverssymlinks and their targets, and leakage is read as two-sided. The inconclusive bullet covers
the case where the disagreement note takes the inconclusive note's place. A cited hit is read
in full past
--hits' cut. The delivered-file check applies only when a hit is attributed toa guidance rule. The subsection stays at about 60 lines.
dokimi/docs/is outside the pathsscripts/check_changelog_fragment.pygates (
dokimi/dokimi/,dokimi/data/, the install tables).Two open PRs would give two of these checks a field each: #359 (recording
public_atand
guidance_commitsfor leak checks) for the leakage cut, and #357 (judged recallover credited hits) for the hit check. The subsection will name those fields once the PRs merge.
Until then it describes the manual check.
Risk
None: docs only. No command, field or output changes.
Testing
On a Linux review host, at
cbe759d(onmain93ff3a4):make ci-local: 30 passed, 0 failed, 7 skipped. Three skips are on the PR side:test-latest,docs.yml:deployandpip-audit.yml:reporthave a job condition that is false on a PR. Four arewhat the host lacks:
external-catalog-smokeneeds Docker and network,conda-forge-depsneedsmicromamba, semgrep secrets needs semgrep and the network, and
cli-surface / Package the resultuses an expression the local runner does not evaluate. 12542 tests passed (5 skipped, 6 xfailed).
Changed-line coverage: no measurable lines (docs only).
tests/test_docs_code_refs.py,tests/test_growth_ratchet.py,tests/test_audit_test_quality.pyand
tests/test_import_architecture.py: 292 passed. The commands and flags the subsection names(
repo report --hits,repo compare --task,--json) are checked against the CLI. No testreads the §9 replay example.
mkdocs build --strict: builds; the#reading-a-replay-batchanchor and the linked contractanchors (
#45-built-in-graders,#9-running) exist in the built site.Revert
git revertof the four commits. Nothing is stored or versioned.Checklist
pytestpasses (no tests change; the suite passes)ruff,mypy, and schema checks passAGENTS.md.github/.licenserc.yaml) (no new files)