fix(code-review): stop a docs-only BHA skip from blocking (ISS-10869) - #206
Merged
Merged
Conversation
- arbitrate-budget writes budget.docs_only: true when it waives the BHA floor, so the zero bha_partitions carries its cause - derive-spawn-spec records that zero as skipped reason "docs_only", a benign skip that emits no coverage-gap finding - A zero cap without the marker, and partitions beyond bha_partitions, still record budget_capped and the required gap - docs_only added to SPAWN_SPEC_SKIP_REASONS, SCHEMA.md, start.md - Bump code-review to 3.10.3 Testing: pytest plugins/code-review (1401 passed, 3 skipped); ruff and pyright clean; arbitrate -> derive-spawn-spec -> finalize-result -> verdict chain run for docs-only, mixed and cap-pressure diffs Risks: None identified; the budget key is additive and absent unless the diff is docs-only Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The partitioner keeps docs files, so a docs-only diff has partitions; no_partitions means every file was cached - Rename the zero-cap fleet-summary test, which no longer describes the docs-only case Testing: ruff clean; pytest plugins/code-review Risks: None identified; comments and a test name only Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mikeangstadt
approved these changes
Sep 29, 2026
mikeangstadt
left a comment
Collaborator
There was a problem hiding this comment.
Right fix for the right reason. The marker-on-the-budget approach beats re-deriving docs-only in derive-spawn-spec, the counterfactual set is real, and SCHEMA.md + start.md + the schema constant all moved together. One thing about operator visibility, see the comment.
Resolve the CHANGELOG.md conflict by keeping main's code v1.16.0-v1.16.3 entries and placing this branch's code-review v3.10.3 entry above them (newest-first). main did not bump code-review (still 3.10.2), so this branch's single 3.10.2 -> 3.10.3 bump stands. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- _render_fleet_notes adds an informational "BHA skipped on a docs-only diff." note when spawn.json.spec.skipped[] holds a docs_only entry; before this the fleet summary said nothing - The docs_only skipped entry carries budget_cap: 0 and partition_count, as the zero-cap budget_capped entry does - SCHEMA.md and CHANGELOG.md (code-review v3.10.3) updated Testing: TestISS10869DocsOnlyBhaSkip docs-only case asserts the new fields and renders the fleet summary; removing the note line or the two fields turns it red. uv run pytest plugins/: 2179 passed, 3 skipped. ruff and pyright clean. Risks: None identified Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
On a docs-only diff,
arbitrate-budgetsetsbudget.bha_partitionsto 0 on purpose, because there is no code for Bug Hunter A to read.derive-spawn-specthen recordedbug_hunter_aas skipped withreason: "budget_capped".bug_hunter_ais a required reviewer, so aRequired reviewer dropped: bug_hunter_acoverage gap followed. It said the spawn budget was capped and told the operator to raise--cap, and the verdict came outCHANGES_REQUESTED. Measured on symphony-alpha PR #7712, a single.mdfile.arbitrate-budgetwritesbudget.docs_only: trueintocoverage.json.finalwhen it waives the BHA floor. This happens on the arbitrated path and on theblocked_by_verifypath. Other diffs don't get the key, so golden fixtures don't change.derive-spawn-specrecords a zero cap that carries the marker asskipped[].reason: "docs_only". That reason is benign, likeno_partitions, so no coverage gap is emitted and the verdict no longer blocks.budget_cappedand still emits the HIGH gap. The pre-fix BLOCKING path once hard-coded 0 on code PRs, which is that case. Partitions the budget can't fit also still produce the gap.docs_onlyis added toSPAWN_SPEC_SKIP_REASONS, and SCHEMA.md andstart.mdlist it with the other benign skip reasons.code-reviewgoes 3.10.2 → 3.10.3, with a CHANGELOG entry.Affected:
plugins/code-review/tools/python/{code_review_helpers,code_review_schema,test_code_review_helpers}.py,plugins/code-review/{SCHEMA.md,commands/start.md,.claude-plugin/plugin.json},CHANGELOG.md.Test plan
main(ed49565, v3.10.2) by drivingarbitrate-budget→derive-spawn-spec→finalize-result→verdicton a docs-only diff:budget_capped, one HIGH gap,CHANGES_REQUESTED. With the fix the same chain gives reasondocs_only, no gap, andAPPROVED.TestISS10869DocsOnlyBhaSkipruns that chain for three diffs: docs-only (no gap,APPROVED), mixed docs+code (BHA floor applies,bha_p0spawns), and cap pressure (3 partitions against a budget of 1: twobudget_cappedHIGH gaps,CHANGES_REQUESTED). It also checks that a zero cap without the marker still gives the HIGH gap.docs_onlyfrom the benign setanyinstead ofalldocs filesbudget_cappedas benignuv run pytest plugins/code-review/at bcd0519: 1401 passed, 3 skipped.uv run ruff check .anduv run pyrightare clean, andgit diff --checkis clean.no_partitionsare fixed in bcd0519: the partitioner keeps docs files._is_docs_onlycounts every.mdand.txtfile as docs, includingrequirements.txtandCMakeLists.txt. That rule already decided when BHA gets zero partitions. After this PR, the zero also no longer raises the required-reviewer gap. Narrowing the rule is a separate decision.Closes ISS-10869.
🤖 Generated with Claude Code