Skip to content

feat(ci): let CI libraries and actions read a standards checkout - #18649

Merged
kyle-sexton merged 2 commits into
mainfrom
feat/standards-dir-readers
Nov 24, 2026
Merged

kyle-sexton merged 2 commits into
mainfrom
feat/standards-dir-readers

Conversation

@kyle-sexton

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

Copy link
Copy Markdown
Member

Closes #18648

Summary

Expand step for reading CI-only standards files from a run-time melodic-software/standards checkout instead of the synced .github/standards/ copies. Readers learn to take a standards checkout when a caller names one; with none named they read exactly what they read today. No workflow passes the new input in this PR, so no run changes behavior.

Fix

  • .github/scripts/lib/trusted-actors.mjs: trustedListPath(env, fallback), $STANDARDS_DIR/components/trusted-actors/trusted-actors.json when STANDARDS_DIR is set, else the fallback. Every reader that defaulted to the .base copy goes through it (pr-merge: clear-escalations, enable-auto-merge, release-eval-hold; pr-unblock: address-feedback, feedback-dispatch, fix-ci-context, dispatch, refine-event-dispatch, review-dependency, gate-source.mjs's same-tree read; the pr-verify replay probe).
  • resolve-config: new standards-path input (env STANDARDS_DIR). When set, the vocabulary and trusted-actor list come from components/github-actions-conventions/ and components/trusted-actors/ under it, with the same realpath containment check as base-path (resolves outside standards-path). read-status.mjs loadTrustedActors takes STANDARDS_DIR first. Readers in pr-unblock that build a BASE_PATH-only env for resolve-config now also pass STANDARDS_DIR through.
  • check-trusted-trigger, check-born-triaged, select-trusted-text: new standards-path input; when set the list is read from it and trusted-actors-path is ignored.
  • dependency-classify.mjs: policyPath(env, fallback) for the Dependabot policy (components/dependabot-policy/policy.json), used by dispatch.mjs and review-dependency.mjs.

Precedence: a named standards checkout wins over an explicit trusted-actors-path / TRUSTED_ACTORS(_PATH) / DEPENDABOT_POLICY, since an action input's default cannot be told apart from an explicit value. Basis: owner answer to Brief acceptance Q2 ("yes; gating files (runner-policy, trusted-actors) change expand-then-contract").

Hold

The changed resolve-config, check-trusted-trigger and lib/trusted-actors.mjs files are hold-floor paths, but this repository sets merge.diff-check.path-holds false, so the path hold applies only to Dependabot PRs (docs/conventions/pr-pipeline/README.md, owner decision Q21); CI Status does not hold this PR for an approval.

Verification

  • node --test over the tests of every changed file and the sparse-checkout closure tests: 1844 + 1093 (resolve-config directory) + 374 pass, 0 fail.
  • New tests: standards checkout wins over the fallback and an empty one keeps it (trusted-actors.test.mjs, dependency-classify.test.mjs); read-status and gate-source read the standards list; resolve-config reads the vocabulary from standards-path, never base-path's when standards-path is set, base-path's when it is empty, and fails red on a symlink leaving standards-path.
  • Review follow-up (b1846ac): resolve-config fails red on a trusted-actors symlink leaving standards-path (fails if the read falls back to base-path or drops containment); review-dependency main with STANDARDS_DIR set needs no TRUSTED_ACTORS or DEPENDABOT_POLICY.
  • scripts/sync-hold-floor.py --check and node scripts/sync-credential-legs.mjs --check pass.

Related

  • Not in this PR: readers that call resolve-config with only a base path from a function parameter (declare-test-scope.mjs, post-merge-demotion-alert/merge-path.mjs and report.mjs, branch-cleanup/cleanup.mjs, check-wip-cap.mjs) and the ~20 scripts that read only env.TRUSTED_ACTORS_PATH get their standards path from the workflows, in the follow-up that repoints workflows.

🤖 Generated with Claude Code

The trusted-actor list, vocabulary and Dependabot policy readers take a
melodic-software/standards checkout when a caller names one
(STANDARDS_DIR, or a new standards-path input on resolve-config,
check-trusted-trigger, check-born-triaged and select-trusted-text) and
otherwise keep reading the .base synced copy, so no caller changes
behavior. resolve-config keeps its realpath containment check for the
standards checkout. No workflow passes the input yet.

Closes #18648

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:39:35.772915Z f63d2cc 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.

@github-actions

github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

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

Security review (incremental): PR #18649

No security issues found. This was an incremental, blocking-only review: only CRITICAL and IMPORTANT findings would be reported. It covers the push since f63d2ccaaa1b0bab0a02e531c255aa1c63d8fb81. I read every hunk of both files in scope.

What changed: the push adds two test cases and no runtime code.

  • .github/actions/resolve-config/resolve-config.test.mjs adds a test where standards-path is set and the trusted-actor list is a symlink pointing outside it. The test expects the run to fail red with trustedActors.json resolves outside standards-path. It strengthens coverage of the realpath containment check and loosens nothing.
  • .github/scripts/pr-unblock/review-dependency.test.mjs adds a test that runs main with STANDARDS_DIR set and with TRUSTED_ACTORS and DEPENDABOT_POLICY both unset. It checks that the trusted-actor list is read from the standards checkout. This is the optional-env behaviour the previous review already checked.

Trust controls: neither file is part of a control. The resolve-config criteria exclude its tests, fixtures and docs. Neither file widens the trusted-trigger check, the token scope, the kill switch or any merge hold.

Prior findings: the one earlier entry is this lane's summary comment, which had no findings. Nothing to repeat.

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 f63d2ccaaa1b0bab0a02e531c255aa1c63d8fb81; 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 b1846ac9993f0e1480945f63475c82f7708ed939: read 2 of 2 changed file(s); 0 finding(s), 0 as inline comments.

Code review (incremental, blocking only): standards-path trusted-actor read tests

This lane already reviewed an earlier head, so this review reports blocking findings only. The scope is the two test files changed since f63d2cc, and I read both changes in full.

Blocking findings: none.

The earlier finding is fixed. The earlier inline thread said no test would catch a regression in resolve-config's standards-path trusted-actor read, or in review-dependency's env branch that applies when STANDARDS_DIR is set. This push adds a test for each:

  • resolve-config.test.mjs:380-387
    • The test puts a components/trusted-actors/trusted-actors.json symlink in the standards checkout that points outside it. .base has no trusted-actor list.
    • The test expects /trusted-actors\.json resolves outside standards-path/. That matches the error readUnder throws (resolve-config.mjs#L68-L70).
    • The test fails if line 87 falls back to the base path. It also fails if the containment check for trustedActors is dropped. Either way the error would not appear.
    • It covers both regressions the earlier finding named. It also checks that the list is read from the standards checkout, because only that read can produce this error.
  • review-dependency.test.mjs:542-564
    • The test runs main select with STANDARDS_DIR set and with TRUSTED_ACTORS and DEPENDABOT_POLICY unset. It expects proceed=true.
    • If review-dependency.mjs#L441 still required the two vars, need would throw.
    • If trustedListPath stopped reading the standards checkout, there would be no list to give a Dependabot id (L465), so the run would not reach proceed=true.
    • The policy file is absent in this test, just as in the existing main test at line 501. So the test does not pin the policy's standards-path read. Its title names only the list, so that is not a gap against what the test claims.

I did not run these tests; this lane has no shell.

Notes (not findings)

  • Security scoping is left to the dedicated security lane.
  • No path-scoped rule under .claude/rules/ matches these files.
  • The PR context contains no text that tries to instruct this lane.
  • Loosened checks would be marked: fail. This is the default, because the prompt has no loosened_check_verdict: line; patterns: 0. These two files only add tests and loosen nothing. The prompt had no loosened_check_decision_record: line, so I did not check the citation requirement.
  • Spend: none. These changes only add tests.

Verifier dropped 0 of 0 candidates.

@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

Lane run report

Field Value
Run 45301404007

pr-unblock/apply-feedback-patch, attempt 1

Field Value
Model rung 0
Leg base
Run job failure
Activity step skipped
Commits pushed none recorded

Failed GitHub API calls

No failed call recorded by the run job's scripts.

pr-unblock/publish-feedback, attempt 1

Field Value
Model rung 0
Leg base
Run job failure
Activity step skipped
Commits pushed none recorded

Failed GitHub API calls

No failed call recorded by the run job's scripts.

pr-unblock/report-escalation, attempt 1

Field Value
Model rung 0
Leg base
Run job failure
Activity step skipped
Commits pushed none recorded

Failed GitHub API calls

No failed call recorded by the run job's scripts.

…ndency's env

resolve-config's trusted-actor list had no test on the standards-path side:
a fallback to the base copy or a dropped containment check passed the
suite. A symlinked trusted-actors.json that leaves standards-path now must
fail red, which fails under either regression.

review-dependency's main had no run with STANDARDS_DIR set. A run with it
set and TRUSTED_ACTORS and DEPENDABOT_POLICY unset now must proceed and
read the Dependabot id from the standards checkout's list.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01UJUn7JtHsXahAvMdb4rCk1
@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
kyle-sexton added this pull request to the merge queue Nov 24, 2026
Merged via the queue into main with commit 6e28e84 Nov 24, 2026
87 checks passed
@kyle-sexton
kyle-sexton deleted the feat/standards-dir-readers branch November 24, 2026 02:57
@github-actions github-actions Bot added the merge-path: owner-agent Post-merge accounting record (README.md, Merge paths) label Nov 24, 2026
kyle-sexton added a commit to melodic-software/pr-pipeline-sandbox that referenced this pull request Nov 24, 2026
No linked issue: resync from ccp fbaa789

## Summary

Brings every `scripts/lanes/check-sync.sh` SYNCED path to
claude-code-plugins main at `fbaa789fc3d4dd4c13b94d46841a11926b928733`,
from `ac4f20988f97481085e38d05d563ccc00a2bc888`, the source of #406. The
source carries the D2 pull requests
(melodic-software/claude-code-plugins#18649,
melodic-software/claude-code-plugins#18715,
melodic-software/claude-code-plugins#18719,
melodic-software/claude-code-plugins#18712,
melodic-software/claude-code-plugins#18695,
melodic-software/claude-code-plugins#18697), which repoint the lane
files to read trusted-actors, vocabulary, runner-policy and the
Dependabot policy from a standards-main checkout instead of the synced
`.github/standards/` copies.

This one is large: 821 files (816 byte copies, 5 sandbox-own files),
against #406's 46. Expect both review lanes to report
`failure-class=partial`.

Upstream also switched its ci-workflows references from SHA pins (#406:
141 on v0.78.0) to `@main` throughout the synced workflows; the copy
carries that change as is.

## Fix

- SYNCED, byte copy from `fbaa789f` with the ADAPTED, LEFT_OUT and
PINNED paths excluded: 91 added, 15 deleted, 707 modified, 3 renamed
(`babysit_risk*.py` to `diff_risk*.py`). Deleted upstream: the local
actions `scan-upload`, `setup-pinned-node` and `upload-lane-transcript`,
`.github/scripts/pr-review-main/split-diff.py` and
`plugins/discovery/scripts/check-hook-registration.test.sh`.
- The copy drops the stale repin literal
`[".github/workflows/maintenance-repin-ci-workflows.yml", "gate"]` from
`.github/scripts/pr-merge/merge-holds.mjs` (line 492 on main).
- ADAPTED and PINNED: no edit. `.github/standards/` is untouched; phase
F removes it.

Sandbox-own edits, each mirroring claude-code-plugins at `fbaa789f`:

1. `.github/workflows/pr-require-checks.yml`: the merge-queue Set up
Node step uses
`melodic-software/ci-workflows/.github/actions/setup-pinned-node@main`,
and `/.github/actions/setup-pinned-node/` leaves its sparse checkout, as
claude-code-plugins' own `pr-require-checks.yml` does. The local action
it used is gone upstream, so without this every merge-queue run fails.
2. `scripts/lanes/check-sync.sh`: four paths join SYNCED under the
existing "Modules the synced scripts and tests import from outside those
folders" rule, since copied code now reads them:
- `.github/scripts/pr-dispatch-feedback/rerun-ci-status.sh`, which
`pr-dispatch-feedback.yml` runs.
- `.github/scripts/intake-triage/size-split.mjs` and `issue-spec.mjs`,
imported by `admit.mjs`, `work-resolve-issue/check-blockers.mjs`,
`write-issue.mjs` and `pr-verify/resolve-pr.mjs`.
- `.github/lane-registry.json`, read when `lib/lane-registry.mjs` loads
(imported by `pr-merge/refire-refused.mjs`).
3. `docs/conventions/source-control.yaml`: adds `trusted_actors_source:
standards` and `standards_repository: melodic-software/standards`, as
claude-code-plugins' file sets them.
4. Lint config for the copied files, taken from claude-code-plugins' own
configs: `.shellcheckrc` with its `shell=bash`, `external-sources=true`
and `source-path=SCRIPTDIR` lines (shellcheck follows sourced files,
which clears the SC2034 and SC2154 warnings on the copied
`check-hook-registration.sh`, `fetch-docs.sh` and
`provision-prerequisites.test.sh`), and `_typos.toml` with its `abd`
identifier, which `.github/scripts/lib/gate-expression.test.mjs` uses.
No check is disabled.

## Verification

- `scripts/lanes/check-sync.sh fbaa789fc3d4dd4c13b94d46841a11926b928733
--repo <claude-code-plugins clone>` exits 1 with only the four PINNED
lines, as in #406:

  ```text
check-sync: .github/standards/dependabot-policy/policy.json differs from
add8219a557d432d9f4dbd1cac98b0e8a2114b10 (100644
0763ab8, want 100644
a3fa7c3)
check-sync: .github/standards/runner-policy/package-lock.json differs
from 4ac70b2c402920d9c42b9a9f00e86c14d7f785ea (100644
d84d4e7, want 100644
53bb20a)
check-sync: .github/standards/runner-policy/policy.json differs from
9329c4cd64765267e43aef0ceef58c40961cd676 (100644
0eec702, want 100644
b8c22e8)
check-sync: .github/standards/runner-policy/runner-policy.mjs differs
from c277271481af37c9761bcf802a3bc692540bb53a (100755
4d632ca, want 100755
105e36d)
  ```

- Local paths the workflows name (`.base/...`, `./.github/...`): none
newly missing. Three were already missing on main and stay so:
`.base/.github/verify-legacy-fails.json` in `pr-dispatch-feedback.yml`,
`pr-merge.yml` and `pr-unblock-dispatch.yml`, and `.base/lib/cdn-pins`,
read behind an `[ -f ]` guard.
- Relative imports and `new URL(..., import.meta.url)` targets in every
non-test `.github/**/*.mjs`: all resolve but two, both read guarded or
already on main (`scripts/upstream-drift-vendored-report.sh` inside a
try/catch, `docs/upstream/` in `resolve-pr.mjs`).
- `actionlint` over the 9 changed workflows: no findings.
- `node --test --test-concurrency=4` over the 90 changed
`.github/scripts/**/*.test.mjs`: 2795 tests, 2709 pass, 84 fail. The
failures read workflows, scripts or packages this repository does not
carry or install here (`ajv`, `yaml`, `scripts/selection-audit.sh`,
`scripts/affected-tests.sh`, `scripts/plan-test-lanes.sh`,
`security-outside-actor/flag.mjs`, `pr-review-comment-relay.yml`,
`intake-triage.yml` and others), plus two that test this repository's
own `pr-require-checks.yml` concurrency groups. Not compared against
main, since most of these files are new. `merge-holds.test.mjs` alone:
77 of 78 pass; the one failure imports
`security-outside-actor/flag.mjs`. No workflow here runs `node --test`.
- Pre-commit and pre-push hooks pass, none skipped. Added lines scanned
for machine paths and secrets: none.

Not verified: no lane run has exercised this head here.

## Related

- Previous resyncs: #406, #403 and #402.

🤖 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

merge-path: owner-agent Post-merge accounting record (README.md, Merge paths)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Let CI libraries and actions read a standards checkout (expand step)

1 participant