Repository navigation
fix(fork-kit): review kit follow-ups from the #955 reviews - #960
Conversation
…-agent cost, --settings hints (#957) - plan: a base config git cannot read (missing object, partial clone offline) is a plain error with exit 2, not "no queue config"; only a base tree without the file falls back. - plan --base: runs the gate's own Checkout.problem() on the repository's common git folder (linked worktrees too), so grafts, shallow, alternates or attributes are refused as the gate refuses them. - eval cost: counts nested sub-agents of a sub-agent run (by parentAgentId) and workflow agents, prices each message at its own model, and takes model_seen from the run's own transcript. - plan prints a --settings hint when it finds no settings and no queue config but a .github/*review-kit*.json; the copyable commands show [--settings <file>]. - The fork's settings test moves to the fork contract tests; the fork fact moves from REVIEW.md to docs/fork/agent-rules.md. - fork-pr-queue.json: the gate rule's new path in alphabetical order. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
lens: merge-path · reviewer: Claude Opus 5.5 lens agent · read at: 7f0c8e7 Focus answers:
🤖 Generated with Claude Code |
|
lens: code · reviewer: Claude Opus 5.5 lens agent · read at: 7f0c8e7 Per #957 point: 1 base config read errors exit 2 (blob case tested, tree case untested: minor 1); 2 Checkout.problem() before the paths, common git folder for linked worktrees, both tested and mutation-pinned; 3 nested and workflow sub-agents, siblings excluded, per-message pricing, model_seen from the run's own file skipping zero-usage , example glob extended, all tested; 4 🤖 Generated with Claude Code |
|
lens: state · reviewer: lens agent (Claude Opus 5.5) · read at: 7f0c8e7 🤖 Generated with Claude Code |
Fixes #957
Problem
The #955 lens reviews left six small points: in a few cases the review kit's advice did not match the gate, the eval's cost numbers were wrong, the general kit named fork facts, and one list was out of order. None of them changes what the gate passes or fails.
Change
review_kit.pybase_file):plan --basefirst runsgit ls-tree --full-tree <base> -- <config>. Only a tree with no such entry counts as "no queue config". If the tree or the blob cannot be read (a missing object, or a partial clone that is offline),plannow exits 2 with a plain message.changes_from): before it reads the paths,plan --baseruns the gate's ownhead_check.Checkout.problem(). A repository holdinginfo/grafts,shallow, alternates orinfo/attributesis refused, as the gate refuses it, and the message points to--changesor a full clone.git_dirnow returns the common git folder (--git-common-dir). Without that, a linked worktree would be checked in its own private folder, which never holds those files. The docstring's "never fewer paths than the gate sees" is now true, so it stays.review_eval.py):<session>/subagents/is counted, at any depth,workflows/wf_*/included.parentAgentIdinagent-<id>.meta.json. Its siblings are not counted.model_seencomes from the run's own file and skips zero-usage<synthetic>messages.subagents/workflows/*/.--settings: the copyable commands inCOMMENTS.mdandSKILL.md(plan, the lens prompt's check, the check block) now show[--settings <file>]. Whenplanorcheckreads no kit settings and finds no queue config, but.github/holds a*review-kit*.json, the note now names that file:pass --settings <file>.Forktest class is gone fromplan.test.py. It is now areview-kitsection in.github/scripts/fork-contracts.test.py, which also checks that the hint names.github/fork-review-kit.jsonon the real tree. The fork's file name is gone fromREVIEW.md, anddocs/fork/agent-rules.mdnow says to pass--settings .github/fork-review-kit.jsonhere..github/fork-pr-queue.json:.github/fork-review-kit.jsonnow comes after.github/fork-removed-workflows.txt. Two other pairs in that list are out of plain sort order:*/*/**before*.md, and*.ymlbefore*.yaml. Those are older groupings, so I left them alone.Scope
Fork-only tooling (
fork-kit/review, the fork contract tests, fork docs and config). Issue #957.Verification
python3 -I -B fork-kit/review/tests/plan.test.py: 36 OK.eval.test.py: 33 OK.comments.test.py: OK.origin/main'sreview_kit.pyandreview_eval.py, and 6 plan tests and 2 cost tests failed: the base blob deleted, grafts/alternates/shallow, the grafts in a linked worktree's common folder, the settings hint, nested and workflow sub-agents, and per-model pricing. New red-check mutations break each new rule and show that its test then fails.python3 .github/scripts/fork-contracts.test.py: both newreview-kitchecks pass. 40 other checks fail on this machine only becausejqis not installed (jq: command not foundin the pr-guard and secret-scan shell steps). This change does not touch them.vp run check:changed: format, typecheck and tests pass.Claude Opus 5.5 in Claude Code.
🤖 Generated with Claude Code