Merged
Conversation
…n backref heuristic (#1722, #1727) #1722: `.oss.json` may now declare `lane_guards` -- a list of {prefix, test, why} objects a managed repository uses to register its own cross-cutting guard tests, merged into `lane_setup_patterns.CROSS_CUTTING_GUARDS` (a claude-oss-only table until now) whenever `known_guards`/`guards_for_files` are called with a repo. Validated by a new `oss_config.lane_guards_problem`. #1727: `review_return.classify` no longer forecloses `states-findings` on a fully-enumerated `FINDINGS: N` message whose only back-reference phrase sits at or after the first of at least two enumerated blocks -- confined to material the message demonstrably carries, rather than pointing outside it. #392's own defended shape (a preamble gesture ahead of a trailing, unrelated bullet list) and every `tests/test_review_return_backref_1270.py` single-block fixture are unaffected. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
A spawned Explore review found the first draft's `_backref_confined_to_
enumeration` checked only position ("at or after the first enumerated
block's own start"), which reopens the #392 class it was supposed to
guard: an unrelated trailing section can inflate the block count past
`claimed`, and a message can enumerate exactly `claimed` real findings
and then announce an undisclosed extra issue in a separate trailing
paragraph -- both wrongly shielded a genuinely dangling gesture.
Fixed by checking each block's own paragraph span (`_block_span`: from
its marker to the next marker, the next blank line, or the end of the
body) instead of a bare position bound. Both reproductions are now
pinned as must-fire regressions in tests/test_review_return_1727.py,
alongside a new must-not-fire case for a genuine multi-line finding
whose aside sits on a continuation line of the same block.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…o text Observed during this lane's own self-review round: a reviewer final message piped through `review_return.py --framed` (per the review-return phase file) was misclassified `referred-not-stated`, even though it fully states two real findings, because a fenced code block quoting example/repro text inside finding #1's own body contains the words `_BACKREF` matches on. Not a fix -- a fragment for /oss:curate to weigh against the module's own four prior hardening rounds (#1270, #1327, and now this). Co-Authored-By: Claude Sonnet 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
lane_guardskey to.oss.json-- a list of{prefix, test, why}objects a managed repository uses to register its own cross-cutting CI guard tests. Merged intoscripts/lane_setup_patterns.py's built-inCROSS_CUTTING_GUARDStable via a new_repo_declared_guards(repo)function, wired intoknown_guards()/guards_for_files(). Tolerant by construction: missing/malformed.oss.json, nolane_guardskey, or a malformed entry all degrade to "no extra guards" rather than raising. Validated by a newoss_config.lane_guards_problem()function.scripts/review_return.py'sclassify()so a fully-enumeratedFINDINGS: Nmessage is no longer forced intoreferred-not-statedpurely for containing an incidental back-reference phrase ("shown above", "given ... earlier") -- only when that phrase is confined to the paragraph span of an already-enumerated block. A back-reference in the message's preamble, in a separate trailing paragraph, or in a single-block message still forecloses exactly as before.Motivation
Both issues were filed from measured, repeated costs on a downstream maintainer loop (claude-supertool): #1722 from 6 of 8 developer-lane PRs in one day each needing an extra CI round for a repo-specific guard the lane never ran locally; #1727 from three independently dispatched lanes in one tick each hitting the same false-trigger shape on different diffs.
Review
Two reviewers (Explore, oss:auditor) ran per
agents/developer/review.md. Explore found two real issues, both fixed: the confinement check's first draft used bare position rather than block span, reopening the #392 false-shielding class from a different angle; fixed with a_block_span()-based per-match check plus three new regression tests. A docstring overclaim resolved as a side effect of that same fix.oss:auditorreturnedFINDINGS: 0across all four defect classes.A related classifier limitation (quoted repro text inside a fenced code block can itself trip the backref heuristic) was found and logged to
trap.d/rather than patched here, deferred to/oss:curate.Test plan
tests/test_lane_setup_patterns_1722.py(21 new tests): red (StopIteration/AttributeError) before the fix via git-stash, green after.tests/test_review_return_1727.py(6 tests) plus two later regression tests: red before the fix, green after (141 passed, 1 pre-existing skip, across the narrowed 8-file suite).lane_setup.py --claim: 3 cross-cutting guards, all run and green.Closes #1722
Closes #1727
🤖 Generated with Claude Code
[AI-generated]