Repository navigation
fix(pr-convention-policy): track the pr-contract issue-ref-pattern shape - #774
Conversation
ci-workflows#733 moved the composite's issue reference out of inline awk literals into ISSUE_REF_PATTERN (read through ENVIRON, defaulting to DEFAULT_ISSUE_REF_PATTERN) and reworded the missing-linkage message. The copy check still looked for the inline literals and ran the analyzer with no ISSUE_REF_PATTERN, so the reference group compiled to "()" and 347 sample bodies read as closing without any #N. The extractors now read both shapes (older pins still run the inline one), the behavioral run passes run.sh's default pattern, and a new check holds action.yml's issue-ref-pattern default equal to run.sh's, since any other default switches the analyzer to its custom-pattern rules. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 8m 11s —— View job Code review complete
Scope: all 5 changed files in I traced the new Finding (posted inline on
|
|
Claude finished @kyle-sexton's task in 1m 30s —— View job Security review complete
Scope: No security issues found. Notes from the review:
|
|
claude-security-review has reviewed this pull request through 2db3648; a later push is reviewed from there. |
|
claude-review has reviewed this pull request through 2db3648; a later push is reviewed from there. |
parseCompositeIssueRef backs three checks, so a run.sh that reads ISSUE_REF_PATTERN without declaring its default was reported up to three times. Every check now names that finding under the composite's base location and the collector drops an exact repeat. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Claude finished @kyle-sexton's task in 1m 2s —— View job Security review complete
Scope: incremental — only the delta since this lane's last review at No security issues found. This commit is the fix for the duplicate-reporting finding from the prior review round (three call sites independently raising the same
No new input-handling, injection surface (command/path/template), secret/token handling, authz logic, or trust-boundary change is introduced — this is purely error-message plumbing inside a maintenance drift checker. No Every other file in this PR was reviewed at |
|
Claude finished @kyle-sexton's task in 2m 14s —— View job Code review complete
Scope: incremental diff only, per the review-scope header — Result: no findings. This commit is a direct, well-targeted fix for the only finding raised in the last review round (the duplicate/triplicate What changed and why it holds up:
I could not execute |
) Refs: melodic-software/claude-code-plugins#7924 ## Summary Registers ci-workflows v0.49.0 `intake-triage.yml` (`ff8cd36321423de961381e608e4a31563e74adb3`) in runner policy. claude-code-plugins#7924 repins its intake caller to that SHA, and its runner-policy gate fails today with `runner-target-contract: ... no reviewed runner-input contract (auto-approval declined: inputs changed since the previously reviewed ...intake-triage.yml@182aca3...)`. **Owner sign-off pending.** The README rollout paragraph says "sign-off pending"; replace that with "signed off by hand on <date>" when you sign it off, then mark this ready. ## Fix - `components/runner-policy/policy.json`: a new `intake-triage.yml@ff8cd36` entry that copies the v0.45.0 entry (`3c8a4b2`) and adds three inputs to `allowedInputs`: `issue-number`, `allowed-author-ids` and `allowed-bot-sender-ids`. Secrets (`CLAUDE_CODE_OAUTH_TOKEN`) and caller permissions (`contents: read`, `issues: write`) are unchanged. - `components/runner-policy/README.md`: the rollout paragraph for v0.49.0, sign-off pending. - `components/runner-policy/runner-policy.test.mjs`: a test that the v0.49.0 entry is exactly the v0.45.0 entry plus those three inputs, and that it is the only v0.49.0 key. ### Input diff, v0.45.0 to v0.49.0 `workflow_call` Read from both files at their SHAs (ci-workflows#773 and #774 are the only intake commits in the range): | Input | v0.45.0 | v0.49.0 | Registered here | |---|---|---|---| | `issue-number` | absent | added | yes | | `allowed-author-ids` | absent | added | yes | | `skipped-label` | absent | added | no: no caller passes it (same rule v0.45.0 applied to `allowed-bot-sender-ids`) | | `allowed-bot-sender-ids` | declared, unregistered | declared | yes: the #7924 caller now passes it | The other seven inputs, the outputs (`triage-failed`, `failure-class`) and the one secret are unchanged. ### Security note - Each new input is a numeric-id allowlist or an issue number. `allowed-author-ids` and `allowed-bot-sender-ids` are comma-separated numeric user ids. The job `if:` rejects an empty list and a leading, trailing or doubled comma, then matches `,<id>,` exactly. `issue-number` is checked against `^[1-9][0-9]{0,9}$` in a "Resolve the issue" step, read from the API, and refused when it is a pull request. - The OWNER or MEMBER `author_association` gate is replaced by the id allowlist. An `opened` issue runs only when its author opened it and the author's id is listed (a bot's sender id in the bot list). - The `workflow_dispatch` path is admitted only for an actor whose `github.actor_id` is in one of the two lists. Only a listed dispatching bot's login reaches `allowed_bots`. - A new `skipped` job (`issues: write`, inside the caller's grant) posts a notice and, when `skipped-label` is set, applies that label after checking it exists. No secret reaches it. - No secret, `runs-on` routing or caller-permission change. ## Verification - Runner-policy tests: `ℹ tests 314`, `ℹ pass 314`, `ℹ fail 0`, including `✔ intake-triage at the v0.49.0 tag copies its v0.45.0 entry and adds only the author-gate inputs`. - `node components/runner-policy/runner-policy.mjs --root .` in this repository: `Runner policy passed.` - Against the claude-code-plugins#7924 worktree (`fix/7886-intake-author-ids`, `--repository-visibility public`): - with its current vendored policy: `.github/workflows/intake-triage.yml#intake-triage: runner-target-contract: the reusable workflow path@SHA has no reviewed runner-input contract (auto-approval declined: inputs changed since the previously reviewed melodic-software/ci-workflows@182aca3)` - with `--policy` set to this branch's `policy.json`: `Runner policy passed.` - with this branch's `runner-policy.mjs`: `Runner policy passed.` - That worktree was not modified (`--policy` flag, no file copy). - Pre-commit hooks: typos, editorconfig, markdownlint, gitleaks and biome clean. ## Related - claude-code-plugins#7924 passes its runner-policy gate once this merges and the policy syncs to that repository. - Precedent: #797 (v0.45.0 entries). 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
No related issue: repair standards main after ci-workflows#733
Summary
check-pr-convention-copieshas been red on main since melodic-software/ci-workflows#733 (merged 2026-10-11 17:13Z) changed the pr-contract composite'srun.sh, for example run 38159506436. The gate's behavior with the default pattern is unchanged; the drift checker was reading the old source shape.Fix
#733 changed four things the checker anchored on:
match(chunk, /(close|...)[ \t]*:?[ \t]*([a-z0-9_.-]+\/[a-z0-9_.-]+)?#[0-9]+/)) breakmatch(chunk, closing_regex)) break, withclosing_regex = "(close|...)" separator refandreffromENVIRON["ISSUE_REF_PATTERN"](defaultDEFAULT_ISSUE_REF_PATTERN='([a-z0-9_.-]+/[a-z0-9_.-]+)?#[0-9]+')rest ~ /^(refs|relates[ \t]+to):...#[0-9]+[ \t]*$/)rest ~ non_closing_regex)withnon_closing_regex = "^(refs|relates[ \t]+to):[ \t]*" ref "[ \t]*$"linkage_errors+=('Missing a native closing keywordlinkage_errors+=("Missing a ${keyword_kind} closing keywordISSUE_REF_PATTERN; unset,refbecame()and 347 sample bodies (xcloses #12,Closes #12x, ...) read as closingChanges, all in
components/pr-convention-policy/:DEFAULT_ISSUE_REF_PATTERN.ISSUE_REF_PATTERN/DEFAULT_ISSUE_REF_PATTERN. A run.sh that reads the variable without declaring, falling back to and exporting the default is drift.issue-ref-patterndefault must equal run.sh's default (or be empty). Any other value flips the analyzer to its custom-pattern separator for every caller that leaves the input unset.check-contract-run.sh.txtis now ci-workflows 8b3cc4bf28. It is verbatim apart from onespellchecker:ignore-next-lineawk comment, needed because this repository's typos lane flagsturein an upstream comment. The previous fixture is kept ascheck-contract-run-literal-ref.sh.txtfor the older-pin shape.Verification
npm run test:pr-convention-lockstep: 90 pass, 0 fail. Before the fix, the new fixture produced 37 failures.npm run lint:pr-convention-copiesagainst live ci-workflows main:every copy matches policy.json.#Ngrammar (both the enforcement-pattern probe and the behavior check catch it), a default separator losing the optional colon (the behavior check catches it), and a mismatched action.yml default. The existing mutation tests still pass against the new fixture.Related
🤖 Generated with Claude Code