Skip to content

Migrate review action dependencies to Node 24 (WEB-5090) - #44

Merged
miguelcalderon merged 5 commits into
mainfrom
miguel/web-5090-migrate-monorepo-github-actions-to-node-24-and-verify
Sep 24, 2026
Merged

miguelcalderon merged 5 commits into
mainfrom
miguel/web-5090-migrate-monorepo-github-actions-to-node-24-and-verify

Conversation

@miguelcalderon

@miguelcalderon miguelcalderon commented Sep 24, 2026 •

Copy link
Copy Markdown

What

Bumps the action's own GitHub Action dependencies to Node 24 releases, pinned by commit SHA, in action.yml and both workflows:

Action Before After
actions/checkout v4.3.1 v5.0.1
actions/cache, cache/save v4.3.0 v5.1.0
actions/setup-python v5.6.0 (action), v4.9.1 (test CI) v6.3.0
actions/setup-node v4.4.0 v5.0.0
actions/upload-artifact v4.6.2 v6.0.0

Nothing changes for users of the action: the reviewer still runs on Node 18, test CI on Node 20, and inputs, outputs, triggers, permissions and cache keys are untouched. setup-node v5 turns on package-manager caching by default, so it is explicitly disabled to keep the previous behavior.

Also included:

  • A small offline guard, scripts/check-action-runtime-dependencies.py, that fails when any action reachable from action.yml is recorded as anything other than Node 24 or Docker. External composite actions must have their dependencies recorded and are checked recursively; ones with local ./path steps are rejected, since the runner resolves those against the caller's workspace. It reads a fixture of per-SHA runtimes and has its own tests. PyYAML is added as a dev-only dependency for it.
  • scripts/refresh-action-runtime-metadata.py --check compares every fixture record, runtime and composite dependencies, with the upstream manifest at that SHA, so the fixture is derived, not asserted. --write refreshes it. Only full-SHA pins are accepted.
  • README and AGENTS.md notes on the runner requirement (actions/runner 2.327.1 or newer) and how to install test dependencies.

Why these versions

These are the first Node 24 major of each action, not the newest (v7 exists for most of them). This PR is about the runtime change only. Later majors carry unrelated behavior changes, for example checkout v6 moves persisted credentials to a separate file. The monorepo follow-up can move further as its own decision.

Context

First step of WEB-5090. Next comes a PSPDFKit monorepo PR that adopts this repo's merged SHA and updates its other actions.

Validation

  • Guard: 6 errors on the old pins, clean on the new ones. refresh-action-runtime-metadata.py --check: all 15 records match upstream.
  • Tests: 28 checker tests pass; full Python suite 247 passed locally, 250 on CI. The workflow-level test applies the checker's own policy rather than its own. The 3 test_eval_engine.py failures are pre-existing and reproduce on main.
  • actionlint and git diff --check clean. Both CI workflows green.

Not validated yet

  • Hosted behavior of the composite with the new versions (cache restore/save, artifacts, Check Runs, comments, failure and draft paths). This PR's own code-review job ran as a draft and only exercised checkout v5. Test in an approved sandbox, not against production PRs.
  • Self-hosted runners: the inventory was inaccessible, so confirm they run actions/runner 2.327.1 or newer before adopting.

@miguelcalderon miguelcalderon self-assigned this Sep 24, 2026
@miguelcalderon
miguelcalderon marked this pull request as ready for review September 24, 2026 10:55
github-actions[bot]
github-actions Bot previously approved these changes Sep 24, 2026

@github-actions github-actions 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.

📋 PR Summary:
This PR migrates every GitHub Action dependency of the composite action and this repository's own CI workflows from Node 20 action releases to Node 24 releases (checkout v5, cache/cache-save v5, setup-python v6, setup-node v5, upload-artifact v6), keeping all pins as immutable commit SHAs. Application Node.js versions (18 in the composite, 20 in test CI) and the public action contract are deliberately unchanged. To guard the migration, it adds an offline runtime checker (scripts/action_runtime_dependencies.py plus a CLI wrapper) that walks local composite actions and validates each external uses reference against a recorded JSON metadata fixture, with focused pytest coverage. PyYAML is introduced as a test-only dependency via a new requirements-dev.txt, installed in test CI and documented in the README.

11 files reviewed
File Changes
action.yml Repin cache, checkout, setup-python, setup-node, upload-artifact to Node 24
.github/workflows/*.yml Repin CI actions to Node 24; install dev requirements
scripts/action_runtime_dependencies.py New offline action-runtime checker library and CLI entry point
scripts/fixtures/action-runtime-metadata.json Recorded runtime metadata keyed by exact action SHA
claudecode/test_action_runtime_dependencies.py Tests for checker traversal, CLI exit codes, and pin assertions
claudecode/requirements-dev.txt Test-only PyYAML dependency kept out of runtime requirements
docs & config Runner requirement docs, fixture un-ignore rule, execution plan

Found 5 testing, reliability, and correctness issues. Consider addressing the suggestions in the comments.

Comment thread scripts/fixtures/action-runtime-metadata.json
Comment thread scripts/action_runtime_dependencies.py Outdated
Comment thread scripts/action_runtime_dependencies.py Outdated
Comment thread scripts/check-action-runtime-dependencies.py Outdated
Comment thread claudecode/test_action_runtime_dependencies.py Outdated
- Correct setup-python v4.9.1 fixture record (node16, not node20)
- Add refresh-action-runtime-metadata.py: --check compares every record
  with the upstream manifest at that SHA, --write refreshes it
- Reject external composite records without recorded dependencies and
  validate recorded dependencies recursively, with cycle detection
- CLI: exit 2 with a one-line error on missing or non-action input,
  accept docker:// steps, put the script directory on sys.path
- Workflow test: subset and by-name assertions with a clear message
  for unrecorded actions instead of exact list and index matching
- README: name the actions/runner 2.327.1 floor, document the guard
  and refresh check
- Remove the exec plan; docs/ holds customization docs only

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@miguelcalderon
miguelcalderon marked this pull request as draft September 24, 2026 11:08
@miguelcalderon
miguelcalderon marked this pull request as ready for review September 24, 2026 11:10
@github-actions
github-actions Bot dismissed their stale review September 24, 2026 11:16

Re-reviewing: state changed from APPROVED to APPROVED

github-actions[bot]
github-actions Bot previously approved these changes Sep 24, 2026

@github-actions github-actions 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.

📋 PR Summary:
This PR bumps the action's own GitHub Action dependencies (checkout, cache, cache/save, setup-python, setup-node, upload-artifact) to their first Node 24 majors, pinned by commit SHA, in action.yml and both repository workflows, and explicitly disables setup-node v5's new default package-manager caching to preserve prior behavior. It also adds an offline guard (scripts/check-action-runtime-dependencies.py plus a supporting library) that walks the local composite action graph and rejects any reachable external action whose recorded runtime is not Node 24 or Docker, backed by a SHA-keyed fixture. A companion refresh-action-runtime-metadata.py --check/--write derives the fixture's runtime fields from upstream manifests, PyYAML is added as a dev-only dependency, and README documents the runner requirement and how to run the new tooling.

12 files reviewed
File Changes
action.yml Bump cache, checkout, setup-python, setup-node, upload-artifact to Node 24 SHAs
.github/workflows/*.yml Bump CI actions to Node 24 pins; install dev requirements
scripts/action_runtime_dependencies.py Library that walks composite action graph and validates runtimes
scripts/action_runtime_metadata.py Fetches upstream runs.using per SHA and diffs the fixture
scripts/*.py (CLIs) CLI entry points for the offline guard and fixture refresh
scripts/fixtures/action-runtime-metadata.json Recorded per-SHA action runtimes used by the offline guard
claudecode/test_action_runtime_dependencies.py Tests for the guard, refresh tooling, and pinned CI actions
deps & docs PyYAML dev dependency, runner-requirement docs, fixture un-ignore

Found 3 testing, maintainability, and security issues. Consider addressing the suggestions in the comments.

Comment thread claudecode/test_action_runtime_dependencies.py Outdated
Comment thread scripts/action_runtime_metadata.py Outdated
Comment thread scripts/action_runtime_dependencies.py Outdated
@miguelcalderon
miguelcalderon marked this pull request as draft September 24, 2026 11:33
…equire SHA pins

- Test every job in every .github/workflows file against the fixture
- Refresh script derives composite dependencies from upstream runs.steps,
  mapping the composite's local ./path steps to owner/repo/path@sha
- Reject action references not pinned to a full 40-hex commit SHA

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@miguelcalderon
miguelcalderon marked this pull request as ready for review September 24, 2026 11:37
@github-actions
github-actions Bot dismissed their stale review September 24, 2026 11:41

Re-reviewing: state changed from APPROVED to APPROVED

Comment thread scripts/action_runtime_dependencies.py
Comment thread claudecode/test_action_runtime_dependencies.py Outdated
Comment thread scripts/action_runtime_dependencies.py Outdated
@miguelcalderon
miguelcalderon marked this pull request as draft September 24, 2026 11:48
…harden step parsing

- Validate recorded composite dependencies with the same full-SHA rule as
  manifest references; the refresh tool rejects unpinned fixture keys
- Keep an upstream composite's ./path steps verbatim and reject such records:
  the runner resolves them against the caller workspace, not upstream
- Skip null or non-mapping steps and non-string uses in both modules
- Workflow test helper ignores docker:// steps
- Cover every workflow job, tag pins, malformed steps and local-step
  rejection with tests

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@miguelcalderon
miguelcalderon marked this pull request as ready for review September 24, 2026 12:27

@github-actions github-actions 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.

📋 PR Summary:
Bumps every GitHub Action this repository depends on (checkout, cache, cache/save, setup-python, setup-node, upload-artifact) to their first Node 24 major, pinned by full commit SHA, across action.yml and both workflows, and explicitly disables setup-node v5's new default package-manager caching to preserve prior behavior. To keep the migration from silently regressing, it adds an offline guard (scripts/check-action-runtime-dependencies.py plus action_runtime_dependencies.py) that walks action.yml and its local composites and rejects any external action whose recorded runtime is not Node 24 or Docker, validating external composites recursively through a recorded dependencies list and requiring full-SHA pins throughout. A companion scripts/refresh-action-runtime-metadata.py derives the fixture from upstream manifests at each pinned SHA (--check / --write), so records are derived rather than asserted. PyYAML is added as a dev-only dependency, with 20+ new pytest cases and README notes on the runner requirement (actions/runner 2.327.1+).

12 files reviewed
File Changes
action.yml Node 24 action pins; disable setup-node package-manager cache
.github/workflows/*.yml Node 24 pins; install dev requirements in test CI
scripts/action_runtime_dependencies.py Offline runtime guard with recursive composite and SHA-pin validation
scripts/action_runtime_metadata.py Derives runtime and composite dependencies from upstream manifests
scripts/*.py CLIs CLI entry points for checking and refreshing runtime metadata
scripts/fixtures/action-runtime-metadata.json Per-SHA runtime fixture for legacy and current action pins
claudecode/test_action_runtime_dependencies.py Tests for the guard, refresh tooling, and workflow pins
deps and docs PyYAML dev dependency, runner requirement notes, fixture un-ignore

Found 3 testing and maintainability issues. Consider addressing the suggestions in the comments.

Comment thread claudecode/test_action_runtime_dependencies.py Outdated
Comment thread .gitignore Outdated
Comment thread claudecode/test_action_runtime_dependencies.py
…e un-ignore, update docs

- Add external_reference_errors() so the workflow-level test applies the
  checker's own policy (docker and recorded composites accepted, tag pins
  and legacy runtimes rejected) instead of reimplementing it
- Un-ignore scripts/fixtures/*.json rather than one filename
- AGENTS.md testing section installs requirements-dev, documents the guard
  and refresh check, and drops the stale test count

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@miguelcalderon
miguelcalderon merged commit ceb44b0 into main Sep 24, 2026
2 checks passed
@miguelcalderon
miguelcalderon deleted the miguel/web-5090-migrate-monorepo-github-actions-to-node-24-and-verify branch September 24, 2026 13:37
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