Skip to content

ci: require check-managed-files sync verification in ci-status - #6512

Merged
kyle-sexton merged 2 commits into
mainfrom
ci/require-check-managed-files
Oct 7, 2026
Merged

kyle-sexton merged 2 commits into
mainfrom
ci/require-check-managed-files

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

No related issue: org actions-conventions rollout; adopts the ci-workflows v0.39.0 check-managed-files sync-verify mode as a required gate.

Summary

Adds a check-managed-files job to .github/workflows/pr-require-checks.yml and lists it in ci-status.needs, so ci-status fails when the job fails. On a standards-sync pull request (melodic-standards-sync[bot], head chore/standards-sync, same repository) the action verifies each commit's identity and that the PR content equals sync-manifest apply at standards main HEAD. That check replaces code-owner review of sync PRs. On every other pull request it rejects hand-edits of managed files.

Fix

  • Uses melodic-software/ci-workflows/.github/actions/check-managed-files@6ba73b97b058602c4dd2bb6e2cce234d11011787 # v0.39.0, pinned by full SHA and called from a CODEOWNERS-protected workflow file.
  • Job permissions are exactly contents: read and pull-requests: read. Checkout uses fetch-depth: 0 and persist-credentials: false.
  • No paths filter. The job carries the same contract-only and draft job gate as the other lanes, so ci-status carries the recorded verdict forward on label flips and body edits, and a draft stays red. On merge-group, schedule and dispatch runs there is no PR diff, so the job passes.
  • ci-status stays the only required check and keeps its name.
  • The synced pr-check-managed-files-hosted.yml (advisory, paths-filtered, v0.38.2) is unchanged. It is a standards-managed file and its retirement is decided upstream.

Verification

  • actionlint on the file: clean.
  • zizmor --persona=regular (the persona CI uses): no findings.
  • scripts/check-lane-coverage.sh --check: all 9 lanes reachable from ci-status.needs.
  • scripts/check-docs-only-gate.sh --check: passes. The new job's condition is the sanctioned draft-gate form.
  • Workflow suites pass: ci-fail-a-draft, ci-hold-merge-group, ci-ordered-skips, check-docs-only-gate, check-lane-coverage, workflow-self-paths, lint-shell-filter, check-conformance-registry, plan-test-lanes and check-docs-only (*.test.sh), plus check-conformance-registry.sh --check.

Related

🤖 Generated with Claude Code

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-07T13:50:14.908290Z 71d848c PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@claude

claude Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @kyle-sexton's task in 1m 58s —— View job


Security review complete

  • Gather context (PR diff, custom instructions)
  • Run /review:security-review per custom instructions
  • Post findings

Scope: .github/workflows/pr-require-checks.yml (the only changed file) — the new check-managed-files job and its addition to ci-status.needs.

Trust-boundary review (the piece static analysis/zizmor doesn't cover, since this job explicitly replaces code-owner review for standards-sync PRs):

  • Trigger confirmed pull_request (not pull_request_target) with top-level permissions: contents: read (L3-L64, L66-L67) — no secrets in scope for this or any lane here.
  • New job permissions are exactly contents: read / pull-requests: read (L2474-L2476) — least privilege, no write scopes.
  • Checkout uses persist-credentials: false and the action is pinned by full commit SHA (L2478-L2485) — supply-chain pin verification is zizmor's lane and was reported clean per the PR description, not re-litigated here.
  • The job's if: reuses the same contract-only/draft gate predicate as every other required lane verbatim (L2472), and per the header comment a fork PR is never contract-only, so this guard runs on fork PRs exactly as the others do — no bypass for non-same-repo contributors.
  • .github/CODEOWNERS confirms /.github/workflows/** is owned, so this new gate (and any future edit to it) stays under code-owner review even though it's exempting sync PRs from that review — the exemption is narrowly scoped to the mechanism that itself now requires passing commit-identity verification.
  • The actual sync-vs-hand-edit determination (actor identity, commit verification, manifest comparison) is delegated to the external check-managed-files action, which is outside this diff and out of scope for this lane (no source to audit; the action is a pinned, versioned dependency).

Instruction-surface check: the diff is purely additive (no rule, allowlist, or gate is removed, narrowed, or softened), so the instruction-exception-register lens doesn't apply here.

No security issues found in the reviewed file. The change is a workflow addition with least-privilege permissions, a pinned action reference, a persist-credentials: false checkout, and a draft/contract-only gate consistent with the existing lanes — no injection surface, no secret exposure, and no bypass path for the required-check logic within the diffed file.

@claude

claude Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @kyle-sexton's task in 4m 33s —— View job


Claude's review

  • Gather context (PR diff, body, repo instructions)
  • Run /review:code-review per custom instructions
  • Post inline findings
  • Final summary

Ran the review:code-review CI lane over the single changed file, .github/workflows/pr-require-checks.yml (+33/-2). Scope: correctness and maintainability of the new check-managed-files job; security findings are out of scope for this lane where a security lane runs on this repo.

Posted 2 inline findings:

  1. Line 2474 — check-managed-files is the only gated job missing needs: [select-tests], which every sibling gated job declares (even ones that don't read its outputs, for ordering). If select-tests errors, this would be the one lane that can still report success independently while every other lane goes red.
  2. Line 2491 — the new step passes no with: inputs, while the only other in-repo caller of the same composite action (pr-check-managed-files-hosted.yml:105-114) explicitly passes standards-ref: main. Flagged for verification against the v0.39.0 action's actual input contract, since I can't reach the ci-workflows repo from this sandbox to confirm whether that input is still required or was made optional by the new sync-verify mode.

Everything else checked out: the new job's if: gate matches the standard contract-only/draft condition verbatim, permissions are exactly contents: read + pull-requests: read as described, the checkout uses fetch-depth: 0 + persist-credentials: false, the action is pinned by full 40-char SHA with a version comment, ci-status.needs picks it up, and the top-of-file job-count comment was updated correctly (seven → eight working jobs, list extended).

Note: the PR body's test-plan items (actionlint, zizmor, the various scripts/check-*.sh --check runs, workflow suites) are author-claimed; I did not independently re-run them in this review.

@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review has reviewed this pull request through 47289d3; a later push is reviewed from there.

Comment thread .github/workflows/pr-require-checks.yml Resolved
Comment thread .github/workflows/pr-require-checks.yml Resolved
@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

claude-review has reviewed this pull request through 47289d3; a later push is reviewed from there.

@claude

claude Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @kyle-sexton's task in 38s —— View job


Claude's review

  • Gather context (incremental diff since 71d848c, custom instructions)
  • Run /review:code-review per custom instructions, scoped to the incremental change
  • Post findings

Scope: incremental — only the change in .github/workflows/pr-require-checks.yml since this lane's last review of 71d848c, per .claude-lane/incremental.diff:

@@ -2472,6 +2472,7 @@ jobs:
   check-managed-files:
+    needs: [select-tests]
     # The contract-only gate, verbatim, and the draft gate (see `ci-status`).

This is commit 47289d3, which addresses exactly the first finding from the prior review on 71d848c: check-managed-files was the only gated job missing needs: [select-tests].

Verification:

  • The added line matches the established sibling pattern verbatim — needs: [select-tests] is used identically by lint-repo (L508), lint-shell (L1062), check-plugins (L1317), check-skills (L1740), test-bash (L2074), test-python (L2235), and test-node (L2317).
  • check-managed-files now correctly tracks select-tests's health, so it can no longer report success independently if the resolver errors — resolving the ordering gap flagged previously.
  • No other lines changed; permissions, the if: gate, checkout config, and the action pin are all untouched from the already-reviewed 71d848c.

No new findings. The only other open item from the prior review — whether standards-ref (passed explicitly by the only other caller of this action, pr-check-managed-files-hosted.yml) is still required in v0.39.0's sync-verify mode — is unchanged by this commit and remains unresolved; it's not re-flagged here since it's outside this incremental diff's scope.

@claude

claude Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @kyle-sexton's task in 45s —— View job


Security review complete

  • Gather context (incremental diff, custom instructions)
  • Run /review:security-review for the incremental change
  • Post findings

Scope: incremental review since 71d848c404423fc7165a4b258de1dc5f7645819d, confined to .github/workflows/pr-require-checks.yml. The only change in this increment is:

   check-managed-files:
+    needs: [select-tests]

(This addresses the prior code-review lane's finding that check-managed-files was the only gated job missing the select-tests ordering dependency.)

Analysis: this is a pure job-ordering edge — check-managed-files now waits for select-tests before starting, same as every sibling gated job. It:

  • consumes no select-tests output (no needs.select-tests.outputs.* reference), so no new data flow is introduced
  • does not change the job's permissions: (still exactly contents: read + pull-requests: read, confirmed at L2476-2479)
  • does not change the job's if: gate, trigger, checkout, or the pinned action call
  • is not an instruction-surface deletion — nothing is removed, narrowed, or softened; it only adds a run-order constraint

No security-relevant surface in this increment (skip-gate condition 2). No security issues found.

@kyle-sexton
kyle-sexton merged commit f9050dd into main Oct 7, 2026
29 checks passed
@kyle-sexton
kyle-sexton deleted the ci/require-check-managed-files branch October 7, 2026 14:19
kyle-sexton added a commit that referenced this pull request Oct 7, 2026
…6518)

No related issue: follow-up to the claude-code-plugins trust-root
rollout so standards-sync PRs stop needing code-owner review for synced
data files

> **Gate met:** #6514 merged, pinning the required `check-managed-files`
job (inside `ci-status` in `.github/workflows/pr-require-checks.yml`) to
ci-workflows v0.39.1. Merging still needs code-owner review, since this
PR edits `.github/CODEOWNERS`.

## Summary

The org `trust-root` ruleset requires code-owner review for any path
`.github/CODEOWNERS` assigns (github-iac `OrgRulesets.cs:182`,
`RequireCodeOwnerReview = true`, with `RequiredApprovingReviewCount = 0`
so only owned paths need approval). `/.github/standards/** @kyle-sexton`
owns every synced standards file, so each standards-sync PR waits on a
human review even when it touches only synced data.

## Fix

Add owner-less entries after `/.github/standards/**` (last match wins;
an entry with no owner unowns the path) for the files that are both
synced by the standards sync manifest and outside `.github/workflows/`:

- `.github/standards/github-actions-conventions/vocabulary.json`
- `.github/standards/github-actions-conventions/vocabulary.schema.json`
- `.github/standards/pyright/pyrightconfig.json`
- `.github/standards/runner-policy/package-lock.json`
- `.github/standards/runner-policy/package.json`
- `.github/standards/runner-policy/policy.json`
- `.github/standards/runner-policy/policy.schema.json`
- `.github/standards/runner-policy/repository-policy.schema.json`

Still owned: every `.github/workflows/**` file (including
`pr-review-hosted.yml`, `pr-review-security-hosted.yml`,
`pr-check-managed-files-hosted.yml`), `.github/CODEOWNERS`,
`runner-policy.mjs`, `trusted-actors.json`,
`trusted-actors.schema.json`. The trust-root paths list in
`docs/conventions/pr-pipeline/README.md` is updated to match.

## Verification

- Each unowned path appears in the `paths:` list of
`.github/workflows/pr-check-managed-files-hosted.yml` and in
`melodic-software/standards` `distribution/sync-manifest.yml` (main
`ee50a0e`) under the `github-actions-conventions`, `pyright` and
`runner-policy` components, all three in the claude-code-plugins
`managed:` list.
- `gh api
repos/melodic-software/claude-code-plugins/codeowners/errors?ref=fix/codeowners-unown-synced-standards`
returns `{"errors":[]}`.
- A last-match simulation over every file under `.github/standards/`
shows the 8 paths above unowned and `runner-policy.mjs` plus both
trusted-actors files owned by `@kyle-sexton`.
- The repo has no CODEOWNERS test or lint under `scripts/` or
`.github/`; `markdownlint-cli2` passes on the edited README.

## Related

- github-iac `OrgRulesets.cs` `trust-root` ruleset; ADR 0007 amendment
extending it to claude-code-plugins.
- The `check-managed-files` job in
`.github/workflows/pr-require-checks.yml` is required through
`ci-status` (since #6512). It fails a hand edit of any sync-managed file
and passes a standards-sync PR only when every commit is the sync App's
and the content matches the manifest; that check replaces code-owner
review for these files. The synced `pr-check-managed-files-hosted.yml`
runs the same guard advisory and paths-filtered.
- #6512 (made the guard required), #6514 (repinned it to ci-workflows
v0.39.1).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant