Commit Graph

319 Commits

Author SHA1 Message Date
Peter Pistorius a6acf41c42 Merge pull request #70 from redwoodjs/changeset-release/main
chore: version packages
@redwoodjs/agent-ci@0.3.4 dtu-github-actions@0.3.4
2026-03-23 10:50:44 +13:00
github-actions[bot] e5bb9804ce chore: version packages 2026-03-22 21:46:27 +00:00
Peter Pistorius 5a903aa8a0 Merge pull request #69 from redwoodjs/pp-fix-node22-json-import
fix: register ESM loader hook for Node 22 JSON import attributes
2026-03-23 10:45:57 +13:00
Peter Pistorius 0f8ca6b046 chore: reference issue #67 in changeset
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 10:43:46 +13:00
Peter Pistorius 25c9f633d6 Update devcontainer. 2026-03-23 10:40:03 +13:00
Peter Pistorius 6ada7215bf fix: register ESM loader hook for Node 22 JSON import attributes
@actions/workflow-parser imports .json files without `with { type: "json" }`,
which Node 22 rejects. This adds a custom ESM loader hook that transparently
patches the missing attribute at runtime.

Closes #67

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 09:30:57 +13:00
Peter Pistorius 17d8a34e37 chore: version packages 0.3.3 @redwoodjs/agent-ci@0.3.3 dtu-github-actions@0.3.3 2026-03-18 08:22:48 +13:00
Peter Pistorius 206f712456 Merge pull request #66 from redwoodjs/fix/remove-execa-dep
fix(dtu): replace execa with node:child_process
2026-03-18 08:16:08 +13:00
Peter Pistorius 6233723198 fix(dtu): replace execa with node:child_process
execa was in devDependencies but imported in production code,
causing ERR_MODULE_NOT_FOUND when running via npx. Replaced with
Node's built-in child_process.exec and removed execa entirely.
2026-03-18 08:14:43 +13:00
Peter Pistorius 1916d5d1ef ci: add binary smoke test to smoke-tests workflow
Build and execute the released binary as part of smoke tests: verify shebang is correct, run built binary directly via node, and run built binary via npx (simulates npx install). Catches shebang issues, broken imports, and bin-field misconfigurations before publishing.
2026-03-18 08:11:25 +13:00
Peter Pistorius b73f926ef5 Merge pull request #62 from redwoodjs/changeset-release/main
chore: version packages
2026-03-18 07:11:11 +13:00
Peter Pistorius b0b9a15abf fix: resolve merge conflict in CHANGELOG.md 2026-03-18 07:09:32 +13:00
Peter Pistorius 8f77c2cbc7 Merge pull request #56 from redwoodjs/dependabot/npm_and_yarn/npm_and_yarn-eeacf2bf74
chore(deps): bump flatted from 3.3.4 to 3.4.1 in the npm_and_yarn group across 1 directory
2026-03-18 07:08:07 +13:00
Peter Pistorius 9660546716 Merge branch 'main' into changeset-release/main 2026-03-18 07:07:25 +13:00
Peter Pistorius 7357393c0e fix: add shebang to CLI entry point for npx compatibility
The dist/cli.js was missing #!/usr/bin/env node, causing npx to execute it as a shell script. Version 0.3.2
@redwoodjs/agent-ci@0.3.2 dtu-github-actions@0.3.2
2026-03-18 07:04:34 +13:00
github-actions[bot] 1162660fe8 chore: version packages 2026-03-17 16:04:52 +00:00
Peter Pistorius 0d5a027e1c chore: add changeset for job execution fixes 2026-03-18 05:04:07 +13:00
Peter Pistorius c2bde4d2ec Merge pull request #61 from redwoodjs/changeset-release/main
chore: version packages
@redwoodjs/agent-ci@0.3.1 dtu-github-actions@0.3.1
2026-03-17 22:37:44 +13:00
github-actions[bot] 2e9e8bb6f9 chore: version packages 2026-03-17 08:41:15 +00:00
Peter Pistorius 6e0ace7c3a chore: add changeset for job execution fixes 2026-03-17 21:37:04 +13:00
Peter Pistorius d85cc56690 Merge pull request #60 from simoncrypta/main
fix: handle rejected promises in job execution
2026-03-17 21:32:02 +13:00
Peter Pistorius ed4a92ebd5 Fix pull-requests. 2026-03-17 21:30:04 +13:00
Simon Gagnon 4bfd515bff refactor: use type guards and attach taskName to error 2026-03-16 23:21:17 -04:00
Simon Gagnon 1dcf0d74ef fix: handle rejected promises in job execution 2026-03-16 23:03:14 -04:00
Peter Pistorius 8fadb39584 Fix docs formatting. 2026-03-17 08:13:29 +13:00
Peter Pistorius 9769aac57b Update docs. 2026-03-17 08:10:35 +13:00
Peter Pistorius e8e2e823ea chore: update README, add engines field, scope release workflow paths 2026-03-16 21:26:58 +13:00
Peter Pistorius d74b1e634e Fix publishing. @redwoodjs/agent-ci@0.3.0 dtu-github-actions@0.3.0 2026-03-16 18:24:38 +13:00
dependabot[bot] 682829fbb4 chore(deps): bump flatted from 3.3.4 to 3.4.1 in the npm_and_yarn group across 1 directory
Dependabot couldn't find the original pull request head commit, f5e2b3d218a7e704cc378f9aae902dc339f96216.
2026-03-16 05:21:31 +00:00
Peter Pistorius 1ad079b338 chore: remove derive package and clean up references 2026-03-16 10:41:20 +13:00
Peter Pistorius c088fb5063 fix: use Node.js 24 for npm OIDC trusted publishing support
npm OIDC requires npm CLI >= 11.5.1, which is bundled with Node 24.
Node 22's npm doesn't support the OIDC handshake, causing 404 errors.
2026-03-16 07:48:21 +13:00
Peter Pistorius ec1b9d12c6 fix: add repository field for npm OIDC provenance verification 2026-03-16 07:31:17 +13:00
Peter Pistorius bad063f192 fix: add NPM_CONFIG_PROVENANCE for OIDC npm publishing 2026-03-16 07:26:44 +13:00
Peter Pistorius 9c1a67bf51 fix: restore derive filter in release test step 2026-03-16 07:23:48 +13:00
Peter Pistorius f009084c59 fix: remove derive filter from release test step 2026-03-16 07:21:27 +13:00
Peter Pistorius 399a1972ba fix: add id-token permission for npm OIDC provenance publishing 2026-03-16 07:09:14 +13:00
Peter Pistorius d2023fc9f3 fix: prevent recursive double test execution in pnpm -r test
pnpm -r test was including the root workspace, whose test script
is itself `pnpm -r test`, causing every test to run twice in parallel.
Both runs share /tmp/dtu_cache, and when one run's beforeEach cleanup
deleted temp files the other run's server was using → ENOENT.

Add --include-workspace-root=false to prevent the root workspace from
being matched by recursive test runs.
2026-03-16 07:00:42 +13:00
Peter Pistorius 31b8a0ce6a Merge pull request #58 from redwoodjs/changeset-release/main
chore: version packages
2026-03-16 06:15:27 +13:00
github-actions[bot] b67be925f1 chore: version packages 2026-03-15 17:00:23 +00:00
Peter Pistorius a3615d1448 Merge pull request #59 from redwoodjs/fix/issue-47-race-condition
fix: prevent generic pool from stealing runner-targeted jobs
2026-03-16 05:59:42 +13:00
Peter Pistorius 8f2dfb1d65 chore: add changeset 2026-03-16 05:43:32 +13:00
Peter Pistorius 38af50c9b2 fix: prevent generic pool from stealing runner-targeted jobs (#47)
When a runner-specific job was seeded, it was stored in both state.jobs
(generic pool) and state.runnerJobs (runner-targeted). A runner polling
before its own job was seeded could fall back to state.jobs and steal
another runner's job, leaving the original runner spinning indefinitely.

Fix: runner-targeted jobs now go only into state.runnerJobs. The generic
pool is reserved for jobs without runner affinity.

Adds three tests covering the race condition, concurrent stress with
8 runners, and the job-theft scenario.

Closes #47
2026-03-16 05:41:47 +13:00
Peter Pistorius 6c7ebad5b9 Merge pull request #57 from redwoodjs/feat/workflow-compatibility
feat: workflow compatibility — cross-job outputs, job-level if, fail-fast
2026-03-15 20:36:06 +13:00
Peter Pistorius d543138c0c feat: cross-job output capture via synthetic step + DTU parsing
The runner's FinalizeJob deletes _temp/_runner_file_commands/ inside the
container before exit, making  files unreachable from the host.

Solution: inject a synthetic 'Capture outputs' step (runs with if:always())
that reads all set_output_* files and echoes them as ::agent-ci-output::key=value.
The DTU parses these prefixed lines and persists them to outputs.json in the
runner's log directory. On job completion, local-job.ts reads outputs.json and
attaches the outputs to the JobResult.

Pipeline verified end-to-end — all 8 smoke tests pass:
- Cross-job outputs (setup-outputs → consume-outputs) ✅
- Job-level if:always() ✅
- Matrix shards with fail-fast:false ✅
- Artifacts, services, env vars ✅

All 279 unit tests pass.
2026-03-15 20:18:37 +13:00
Peter Pistorius b2c061ba1f fix: capture step outputs via DTU and fix _runner_file_commands path
- Fix extractStepOutputs path: _temp/_runner_file_commands/ (not root)
- DTU outputs endpoint now captures and persists outputs.json
- local-job.ts reads outputs.json from log dir instead of work dir
- Add smoke test jobs for cross-job outputs and if:always()

All 279 tests pass.
2026-03-15 19:22:17 +13:00
Peter Pistorius aa7f91e574 chore: add changeset for workflow compatibility features 2026-03-15 08:11:35 +13:00
Peter Pistorius e6ecd4a0ac feat(#54,#55): wire job-level if and fail-fast into CLI orchestration
#54 - Job-level if conditions:
- shouldSkipJob() evaluates if: conditions before dispatching
- Tracks upstream job results (success/failure/skipped)
- Creates synthetic skipped results for skipped jobs
- Default behavior: skip if any upstream dependency failed

#55 - Respect fail-fast setting:
- Replaces unconditional wave abort with parseFailFast check
- Only aborts if not all jobs in wave have fail-fast: false
- Logs when continuing despite failures

All 279 tests pass.
2026-03-15 08:06:49 +13:00
Peter Pistorius 12806b6af0 feat(#53): wire needsContext through CLI orchestration
- parseWorkflowSteps now accepts needsContext parameter
- All expandExpressions calls in step parsing thread needsContext
- cli.ts wave loop accumulates job outputs and builds needsContext
  for downstream jobs
- Step names now use raw YAML value for expression preservation

2 new tests, all 279 pass.
2026-03-15 08:03:43 +13:00
Peter Pistorius 19235bbc16 Merge pull request #50 from redwoodjs/changeset-release/main
chore: version packages
2026-03-15 07:59:01 +13:00
Peter Pistorius 394d748ac9 feat(#52): add resolveJobOutputs to map step outputs to job outputs
resolveJobOutputs() resolves job output templates (e.g.
${{ steps.check.outputs.skip }}) against the flat step outputs
captured by extractStepOutputs().

6 new tests, all 277 pass.
2026-03-15 07:57:02 +13:00