Skip to content

build: built-in changed-files step replaces ci-plan.ts; actions allowlist enforced - #1049

Merged
jimhoyd merged 10 commits into
mainfrom
claude/standard-release-ci
Sep 30, 2026
Merged

jimhoyd merged 10 commits into
mainfrom
claude/standard-release-ci

Conversation

@jimhoyd

@jimhoyd jimhoyd commented Sep 30, 2026 •

Copy link
Copy Markdown
Collaborator

Part of #1041 (item 3). This PR now carries only the CI part of that item: a small built-in changed-files step replaces scripts/ci-plan.ts, and a test enforces the repository's Actions allowlist.

The owner dropped release-please. Its action is blocked by the Actions policy, and the npm CLI needs a 177-entry tooling lockfile. So scripts/release-bump.ts, its test, release-bump --check in check:code, the Create release workflow and the urlcode-current-version markers are all unchanged from main. The RELEASE_PLEASE_TOKEN repository secret is now unused and can be deleted.

What changed

scripts/ci-changes.ts (39 lines) and .github/ci-filters.yml replace the 354-line scripts/ci-plan.ts.

  • The script runs git diff --no-renames: a pull request against its merge base (base...head), a push tip to tip (before..after).
  • It matches the paths with picomatch against the filter globs in .github/ci-filters.yml. Dot files are included, and a path counts when one pattern includes it and no ! pattern excludes it.
  • It only writes which filters matched. The lanes, plan outputs, job if: conditions and matrices are expressions in ci.yml.
  • The lane semantics are the old planner's:
  • It fails closed:
    • release, dispatch, merge-queue and schedule runs are never classified;
    • the install and the classification step have continue-on-error, and a failed outcome (malformed or absent SHA, unreadable history) selects the full lane;
    • an empty diff selects the full lane;
    • an unknown path is code;
    • every job skips only on an explicit docs or false output, so a missing plan output runs the job.
  • verify-complete is a single expression: plan and docs must succeed, and no job may be failure or cancelled.
  • One narrowing, documented in docs/CI.md: a PR that changes both extension and core code now runs every extension suite on Windows, not only the changed extensions.

Actions allowlist.

  • The policy allows only actions created by GitHub or owned by jimhoyd-com, pinned by full SHA; anything else ends the run in startup_failure.
  • test/workflows.test.ts now fails on any uses: in a workflow or action/action.yml whose owner is not actions, github or jimhoyd-com, or which is not pinned by SHA with a # vX.Y.Z comment.
  • Every existing pin gained its version comment.
  • docs/CI.md documents the policy.

Dependency cost: 0

  • Third-party GitHub Actions added: 0.
  • Root lockfile package entries added: 0. picomatch became a direct devDependency (^4.0.7), but it was already in the tree through typescript-eslint; the lockfile diff is one line in the root devDependencies.

Lines (git diff --numstat origin/main)

Area Added Removed Net
Scripts (scripts/ci-changes.ts, scripts/ci-plan.ts deleted) 39 354 −315
Tests (ci-lanes, deleted ci-plan, ci-workflow, workflows) 287 307 −20
Workflows and filters (.github/) 177 134 +43
Config (package.json, package-lock.json) 2 1 +1
Owned code, total 505 796 −291
Docs (docs/CI.md, docs/DEVELOPMENT-PIPELINE.md, scripts/README.md) 70 30 +40

Evidence

  • npm run verify and npm run test:package pass on this commit, which is up to date with origin/main.
  • actionlint reports nothing new; the three shellcheck warnings in publish.yml's verify step were already there.
  • test/ci-lanes.test.ts runs the real .github/ci-filters.yml through scripts/ci-changes.ts:
    • it runs the script on a real git history (a prose change gives the docs lane; a store change gives the store suite only);
    • it checks the script refuses a malformed range, an absent before-SHA and an unknown commit;
    • it evaluates the plan outputs, job conditions and matrices, porting the old ci-plan cases.

Not proven

The new plan job has not run on GitHub yet. This PR's own CI run is the first proof.

🤖 Generated with Claude Code

@jimhoyd
jimhoyd enabled auto-merge (squash) September 30, 2026 13:47
… the paths-filter plan

Co-Authored-By: Claude Opus 5.5 <[email protected]>
jimhoyd and others added 6 commits September 30, 2026 11:01
…pact in the paths-filter plan

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…hs-filter plan and release-please config

Co-Authored-By: Claude Opus 5.5 <[email protected]>
… actions

The repository's Actions policy allows only GitHub's and jimhoyd-com's actions,
so dorny/paths-filter and release-please-action ended every run in
startup_failure. scripts/ci-changes.ts matches git diff against
.github/ci-filters.yml with picomatch, and release.yml runs the release-please
npm CLI pinned by .github/release-please/package-lock.json. test/workflows.test.ts
now enforces the owner allowlist.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@jimhoyd
jimhoyd disabled auto-merge September 30, 2026 18:30
…the actions allowlist

Owner decision on #1049: keep only the CI part. release-bump.ts, its test, the
Create release workflow and the urlcode-current-version markers are restored
from main; release-please's config, manifest, tooling lockfile and
release-versions.ts are removed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@jimhoyd jimhoyd changed the title build: release-please and dorny/paths-filter replace release-bump.ts and ci-plan.ts (#1041) build: built-in changed-files step replaces ci-plan.ts; actions allowlist enforced Sep 30, 2026
@jimhoyd
jimhoyd enabled auto-merge (squash) September 30, 2026 18:41
@jimhoyd
jimhoyd merged commit 7fb5535 into main Sep 30, 2026
25 checks passed
@jimhoyd
jimhoyd deleted the claude/standard-release-ci branch September 30, 2026 18:52
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