Skip to content

build(ci): own the yaml and ajv packages the workflow checks use - #18645

Merged
kyle-sexton merged 4 commits into
mainfrom
chore/ci-deps-package
Nov 24, 2026
Merged

kyle-sexton merged 4 commits into
mainfrom
chore/ci-deps-package

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

Summary

The workflow checks and the workflow-structure tests stop borrowing yaml and ajv from .github/standards/runner-policy/node_modules and load them from scripts/ci-deps/, a package this repository owns. This is the first reader move of the standards sync track (Brief Q2: synced CI-only files are read from a run-time standards checkout; readers move first, copies are deleted last).

Fix

  • scripts/ci-deps/{package.json,package-lock.json}: yaml 2.9.1 and ajv 8.20.0, the same pins as .github/standards/runner-policy/package.json today, engines node >=24.
  • scripts/check-{read-caller-keys,artifact-retention,workflow-template-size}.mjs resolve from scripts/ci-deps; the 11 tests that createRequire or symlink the copy's packages, and their test-scope lines, point there too.
  • pr-require-checks.yml: the gate job installs scripts/ci-deps beside runner-policy (cache key on both lockfiles); the test legs install scripts/ci-deps in place of runner-policy. Same in maintenance-audit-test-selection.yml.
  • scripts/setup-env.sh and pr-run-activity-read.yml's base-copy step use scripts/ci-deps in place of runner-policy.
  • .github/dependabot.yml: weekly npm entry for /scripts/ci-deps, 3-day cooldown, minor/patch group, like the other npm roots.

Not changed: runner-policy.mjs still runs from the copy (its own install stays in the gate job), and the copy's Dependabot entry stays until the copy is deleted.

Verification

  • Passed locally: the 11 shell tests (act-turns-denied, check-affected, check-artifact-retention, check-read-caller-keys, ci-review-plugin-source, pr-unblock-trusted-base, read-lane-broker-check, read-runner-dispatcher-gate, write-runner-{hold-labels,never-rules,revoke-step}), node --test on check-workflow-template-size.test.mjs and setup-env.test.mjs, the three checks with --check, and actionlint on the three changed workflows.

Related

Closes #18644

🤖 Generated with Claude Code

The workflow checks (read-caller-keys, artifact-retention,
workflow-template-size) and the workflow-structure tests loaded yaml and
ajv from the node_modules of the synced runner-policy copy. They now load
them from scripts/ci-deps, a package this repository owns, pinned to the
same yaml 2.9.1 and ajv 8.20.0, with its own Dependabot entry. The gate
job, the test legs, setup-env and the read lane's dependency copy install
it. runner-policy.mjs still runs from the copy.

Closes #18644

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-24T00:36:06.604776Z 6b1ae59 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6b1ae59e65

ℹ️ 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".

@github-actions

github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

PR body contract — issue linkage

This PR body conforms to the issue-linkage contract. Nothing to do.

@github-actions github-actions Bot added the needs-issue-linkage Pull request body has no issue linkage line; set by the check-contract step, advisory. label Nov 24, 2026
@github-actions

github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 0483f22f4a9329d7921898ce70f7396c0a65ed38: read 29 of 29 changed file(s); 0 finding(s), 0 as inline comments.

Security review: PR #18645 (blocking only)

No security issues found. I read all 29 changed files in full. This lane already reviewed an earlier head (6b1ae59e), so this review reports only CRITICAL and IMPORTANT findings, and there are none.

The pull request moves the yaml and ajv packages that the workflow checks and structure tests load from .github/standards/runner-policy/ into a new package this repository owns, scripts/ci-deps/. Since the last review, two things changed: the read lane's copy step now creates $DEST/.github, and read-lane-broker-check.test.sh has a new test for that step.

What I checked:

  • Read lane (pr-run-activity-read.yml)
    • The copy step still copies only from the trusted .base checkout into $RUNNER_TEMP/setup-env (L1248-L1253).
    • The install runs the base's setup-env.sh against those base copies. Only the node_modules trees built from the base are copied into the head checkout (L1478-L1486).
    • The pull request head still cannot choose which packages get installed. The rm -rf/cp -R loop over head directories works the same way it did before; only the directory name changed. So nothing is widened.
    • The new mkdir -p "$DEST/.github" fixes the missing-directory failure noted in the earlier review.
  • Gate and test legs (pr-require-checks.yml, maintenance-audit-test-selection.yml)
    • npm ci --prefix scripts/ci-deps runs in jobs that already run the pull request's own code, including the root npm ci.
    • The new lockfile pins exact versions from registry.npmjs.org with sha512 integrity hashes (ajv 8.20.0, yaml 2.9.1, the same pins as runner-policy).
    • No permissions: block, trigger, if: condition or ci-status hold step changed. The only removals in pr-require-checks.yml are two comments.
  • Dependabot: the new weekly npm entry for /scripts/ci-deps has a 3-day cooldown and only opens update pull requests, which go through the usual gates.
  • Trust controls: the change does not touch the trusted-trigger check, the lane token request or broker, the kill switch or any merge-hold script. The only deleted text is comments about where the dependencies came from; none of it is a guardrail instruction.
  • Embedded text: none in the PR context.

The earlier summary comment is not re-posted: it reported no findings.

critical-findings: 0

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude-review: 1 inline finding(s) on 6b1ae59e65643d5c2ffada7c4fad1890227a0abc; the summary is in this lane's pull request comment.

claude-lane: claude-review

@github-actions

github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed 0483f22f4a9329d7921898ce70f7396c0a65ed38: read 29 of 29 changed file(s); 0 finding(s), 0 as inline comments.

Code review: PR #18645, own the yaml and ajv packages in scripts/ci-deps (blocking only)

This lane already reviewed an earlier head (6b1ae59e), so this review reports only blocking findings. I read all 29 changed files in the diff.

No blocking findings on this head.

The earlier finding is fixed

  • The finding: the read lane's "Copy the dependency setup from the base" step did not create $DEST/.github.
  • The fix: the step now runs mkdir -p "$DEST/$deps" "$DEST/.github" (pr-run-activity-read.yml L1248-L1253). The cp .base/.github/requirements-ci.txt "$DEST/.github/requirements-ci.txt" copy no longer fails.
  • The new test: scripts/read-lane-broker-check.test.sh now has a regression test.
    • It lifts the setup-env step's run block from the workflow and runs it against a fake .base tree.
    • It asserts that .github/requirements-ci.txt and scripts/ci-deps/package-lock.json arrive and that ready=true is written.
    • The lifted script runs without -e, so a failed cp alone would not change the exit code. The file-existence checks still catch a missing .github directory, so the test fails if the regression comes back.
    • READ_YML is defined before the new block (L186), and the step's id: setup-env matches what the test looks up.

Closing issue #18644

The rest of the diff matches the issue's Done-when list:

  • The lockfile and manifest pins: yaml 2.9.1, ajv 8.20.0, engines >=24.
  • The three checks' resolve paths and their not-installed messages.
  • The 11 tests' createRequire paths, symlinks and test-scope lines.
  • The gate job installs both packages and keys its cache on both lockfiles; the test legs and maintenance-audit-test-selection.yml install scripts/ci-deps only.
  • The setup-env.sh loop.
  • Both docs.
  • The Dependabot entry.

The "no other reader of runner-policy node_modules" item rests on the earlier head's grep. This diff adds no new reader.

Not verified

I could not run anything here (no shell). The test plan's local runs and actionlint passes are the author's claims and are unverified.

Lane notes

  • Loosened checks: the prompt had no loosened_check_verdict: or loosened_check_patterns: lines, so I used fail with no consumer entries. It had no decision-record line either, so I did not check the citation requirement. This change loosens no check.
  • Other inputs: no plugin manifest changed, and there were no settled threads.
  • Spend: the only extra cost is one more npm ci (of scripts/ci-deps) in the gate job, on the Actions minutes this repository already uses.

Verifier dropped 0 of 0 candidates.

@melodic-automation-lanes melodic-automation-lanes Bot added the needs-session A pr-unblock stop a session builder takes: a change the lane cannot make. Not an owner stop. label Nov 24, 2026
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

The pr-unblock lane stopped address-feedback on this pull request: the pull request changes .github/workflows/, which the lane token cannot push, so the lane does not address its review threads. The lane labels it needs-session for a session builder, who makes the change this lane cannot, and the run ends in a failing pr-unblock/address-feedback status on the head the lane gated.

When a retry on this head can change the outcome, the lane runs one on its own, up to its per-head cap, and edits this comment if it stops again; a run that does not stop clears the status. When no retry can (a review thread the lane does not take or settle, or a failing check after the retries are spent), a person resolves the threads or gets the checks green, then dispatches the workflow below: that run finds the cause gone and clears the status. On a pull request the lanes App opened, the dispatchers start that run once per stop; on any other, a person does. A new commit to the branch starts clean.

To run it again on this head now, dispatch the pr-unblock workflow:

gh workflow run pr-unblock.yml -R melodic-software/claude-code-plugins -f pr-number=18645 -f activity=address-feedback

@github-actions github-actions Bot removed the needs-issue-linkage Pull request body has no issue linkage line; set by the check-contract step, advisory. label Nov 24, 2026
@kyle-sexton

Copy link
Copy Markdown
Member Author

Owner: active, left: create $DEST/.github in pr-run-activity-read.yml (two review threads), merge main, re-queue. ETA 10:45 PM EST.

kyle-sexton and others added 2 commits November 23, 2026 21:58
The copy step created only scripts/ci-deps under the destination, so
copying .github/requirements-ci.txt failed and every skill-kind read-lane
run failed. read-lane-broker-check.test.sh now runs the step's shell
against a stub base.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 24, 2026
Merged via the queue into main with commit 509bea3 Nov 24, 2026
72 checks passed
@kyle-sexton
kyle-sexton deleted the chore/ci-deps-package branch November 24, 2026 04:20
@github-actions github-actions Bot added the merge-path: owner-agent Post-merge accounting record (README.md, Merge paths) label Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-path: owner-agent Post-merge accounting record (README.md, Merge paths) needs-session A pr-unblock stop a session builder takes: a change the lane cannot make. Not an owner stop.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Own the yaml and ajv packages the workflow checks parse with

1 participant