Repository navigation
fix(pr-convention-policy): read the ci-workflows#815 check-contract shape - #825
Conversation
…hape ci-workflows#815 rewrote two parts of check-contract/run.sh that the lockstep static parsers anchor on, so check-pr-convention-copies failed on every standards PR and on main: - scan_line applies closing_regex with one gsub pass over the lowercased line (marked = lower; gsub(closing_regex, "\n&\n", marked); split) instead of a match(chunk, closing_regex) loop. - negation_trigger scans backward and stops at the fifth word boundary (++seen == 5) or at . ! ? ; , instead of cutting at the punctuation and keeping the last five words (first = (count > 5) ...). The parsers now accept either shape, and each form must keep every anchor: the lowercased source, the closing_regex application, the window size, the five punctuation stops and the window slice. The pre-#815 shape stays accepted for consumer pins and for ci-workflows#820, whose head still carries it. Adds the #815 run.sh as a fixture, with tests that it passes and that each of its anchors, mutated away, is reported as drift. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…behavioral layer The static negation-window check anchored on the five punctuation stops, which made an existing test fail: it asserts that adding ":" to the set is behavioral drift only. The window size and the window slice stay anchored. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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-review reviewed No findings. The only change since the last review (dd68984) is to
|
|
claude-security-review reviewed Security review (incremental, head b25ed4e): no findings. The only change since dd68984 is to
I did not check whether the 100755 mode is needed. That is a convention question, not a security one. Everything else in the PR was reviewed at dd68984 and is unchanged since. |
…xecutable It carries a shebang, and its sibling run.sh fixtures are already 100755. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Refs: melodic-software/ci-workflows#736
Summary
check-pr-convention-copiesfails on every standards PR and onmain(job).
ci-workflows#815 rewrote two parts of
check-contract/run.shthat the static parsers inlockstep-drift.mjsanchor on. The behavioraltests still passed; only the text parsers broke:
drift: gate composite: closing-keyword / no-issue-marker match expressions not found in run.shdrift: gate composite (negated closers): negation_trigger's window, "not only" exception, trigger words, or suffix test not found in run.shFix
Keyword scan: the parser now also accepts the sync: let claude-code-plugins set merge=union on six append-only list files #815 form, where
scan_lineappliesclosing_regexin one pass (
marked = lower,gsub(closing_regex, "\n&\n", marked),count = split(marked, pieces, "\n")). Thematch(chunk, closing_regex)) breakloop is no longerrequired. Before, the scan had to run over the lowercased line; it still must.
Negation window: the parser accepts either shape, and each must keep all of its anchors.
first = (count > N) ..., unchanged.++seen == N) breakplus the window slicetail = substr(line, start, keyword_index - start). The punctuation set (. ! ? ; ,) is left tothe behavioral layer, as before; an existing test asserts that changing it is behavioral drift
only.
Nis still compared againstpolicy.json'swordWindow(5). The "not only" exception, thetrigger words and the
n'tsuffix test are read as before.The pre-sync: let claude-code-plugins set merge=union on six append-only list files #815 shape stays accepted. Older consumer pins still run it, and so does the head of
ci-workflows#820.
New fixture
fixtures/lockstep/check-contract-run-bounded-scan.sh.txt: the sync: let claude-code-plugins set merge=union on six append-only list files #815 run.sh, plus thespellchecker:ignore-next-linecomment the existing fixture carries. New tests:checkPinnedCompositeandcheckCopies, and the negation parser readsthe policy values from it.
gsubapplied to adifferent regex, and
markedtaken from the raw line. A dropped,stop is behavioral drift.Verification
npm run lint:pr-convention-copiesagainst live ci-workflowsmain:every copy matches policy.json.checkPinnedCompositeon each run.sh, with that ref'saction.yml, ran locally: 0 findings forci-workflows
main, for Add uv to the dependabot auto-merge ecosystems or record why not #820's headf43d19ee492d3f8f53e72109023cb50071f92b0c, and for thepre-sync: let claude-code-plugins set merge=union on six append-only list files #815 parent of
cc7613fbf8bacca72700d6498c32145c05fe1f09.npm run test:pr-convention-lockstep: not green locally. The host was overloaded (load average83 on 32 cores), so the hook validator's behavioral harness hit its 10s limit
(
the validator did not finish within 10s). That harness also threw onespawnSync bash EPIPE.Neither involves the composite parsers. CI's hermetic run on this PR is the authoritative result.
Related
🤖 Generated with Claude Code