fix(pr-convention-policy): parse the scan_linkage hook validator in lockstep-drift - #634
Conversation
…ockstep-drift claude-code-plugins#4636 replaced the hook validator's KEYWORD_ERE with a per-line scan_linkage whose closing pattern is CLOSING_ERE, so the lockstep check could no longer parse it and failed every PR. Parse CLOSING_ERE, translate [[:blank:]], and assert the validator still lowercases the line before matching, as the composite check already does. Closes #633 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LCEBhuXxZAT8K619tC6T5f
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Claude finished @kyle-sexton's task in 2m 53s —— View job Code review complete
No blocking findings. Reviewed the diff in
Two caveats on what I could not independently verify in this sandbox (flagging per review policy rather than restating author claims as confirmed):
Both are environment limitations, not defects found in the diff. |
|
Claude finished @kyle-sexton's task in 1m 0s —— View job Security review — PR #634
Scope: Findings: none. This PR only changes the regex-based parser inside the lockstep-drift checker ( No CRITICAL / IMPORTANT / SUGGESTION security findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 55d33cc17b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…tor EREs
The lowercasing check only proved `lower="${line,,}"` existed; it still
passed if scan_linkage matched CLOSING_ERE or NO_ISSUE_ERE against the raw
line. Require every `=~ $CLOSING_ERE` to read `$chunk` (a slice of the
lowercased line) and every `=~ $NO_ISSUE_ERE` to read `$lower` (the
lowercased body), and fail on any other operand.
Refs: #633
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LCEBhuXxZAT8K619tC6T5f
|
Claude finished @kyle-sexton's task in 50s —— View job Security review — PR #634 (HEAD
|
|
Claude finished @kyle-sexton's task in 4m 20s —— View job Code review complete
Reviewed 1 finding, posted inline on
Everything else checked out on read-through:
Not independently verified (environment limitations, not defects found):
|
…ine start `CLOSING_ERE='` is a substring of the sibling `NON_CLOSING_ERE='` declaration, so an unanchored match would read the non-closing pattern if the validator ever declared it first. Anchor both declarations to the start of a line. Refs: #633 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LCEBhuXxZAT8K619tC6T5f
|
Claude finished @kyle-sexton's task in 2m 34s —— View job Code review complete
No blocking findings. Reviewed This PR has already been through two full rounds of automated review on this thread, each surfacing one real issue that got fixed in a follow-up commit:
Re-verified the current HEAD from scratch rather than re-trusting the prior passes:
One residual, non-blocking observation, not raised as a finding because it's speculative rather than demonstrated: the new Not independently verified (environment limitations, not defects found in the diff):
|
|
Claude finished @kyle-sexton's task in 48s —— View job Security review — PR #634 (HEAD
|
Closes #633
Summary
pr-convention-lockstepfailed on every open PR withdrift: hook validator: KEYWORD_ERE / NO_ISSUE_ERE declarations not found. melodic-software/claude-code-plugins#4636 rewrote the hook validator around a per-linescan_linkageand renamed its closing pattern toCLOSING_ERE, soparseValidatorPatternscould not find it. The validator and the ci-workflowspr-contractcomposite still agree, so this was a parse failure, not drift.Fix
parseValidatorPatternsreadsCLOSING_ERE(plus the unchangedNO_ISSUE_ERE) and translates[[:blank:]]as well as[[:space:]].iflag, matched against${line,,}. The parser now asserts that lowercasing is present and the probes lowercase their input, the same way the composite check already assertslower = tolower(line).policy.jsonis unchanged. Every closing keyword and no-issue marker it lists is still accepted by both the composite (run.shscan_lineand theno-issuetest) and the validator. The newRefs:/Relates to:acceptance and negated-closer rejection are enforced by both, butpolicy.jsonhas no field for them andpr-convention-policy.mjsand the pinned reusables do not implement them, so recording them would be a separate change.Verification
npm run test:pr-convention-lockstep: 40/40 pass.npm run test:pr-convention-policy: 11/11 pass.npm run lint:pr-convention-lockstepagainst live sources with a token:pr-convention lockstep: all copies and consumer pins match policy.json, exit 0.biome checkon both touched files: clean.Related
pr-contractnegation andRefs:change the validator mirrors)🤖 Generated with Claude Code
https://claude.ai/code/session_01LCEBhuXxZAT8K619tC6T5f