Skip to content

ci(release): pass GITHUB_ACTIONS to the release-gate mutation sandbox - #29

Merged
kiro-systemf[bot] merged 1 commit into
mainfrom
xs/release-gate-env
Oct 7, 2026
Merged

kiro-systemf[bot] merged 1 commit into
mainfrom
xs/release-gate-env

Conversation

@systemfsoftware-maker

@systemfsoftware-maker systemfsoftware-maker commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes the second red Release gate on main, at 928d17c1 (#28's squash). #28 fixed the planner: run 37584264022's plan · mutation shards job passed. The next step failed.

Root cause

Run 37584264022, job mutation · shard 1/1 (112672895003), step "Mutation at break 100":

exit 3 (RuntimeError): shard child for ../packages/starter failed with exit code 2: exit 2 (ConfigError): mutation runs only on main CI — run mutation testing on main CI (GitHub Actions)

stryker-js 17.0.2's refuse-local-mutation decision (src/refuse-local-mutation.workflow.ts; in the installed dist, run-stages-*.mjs decide and guardOf) admits a mutation run in only three cases:

  • GITHUB_ACTIONS is "true";
  • ALLOW_LOCAL_MUTATION is "1";
  • the run is dry-run only.

The step ran stryker through ./.github/actions/sandbox, which clears the environment, with pass-env: MUTATION_SHARD. The runner's GITHUB_ACTIONS=true never reached stryker. The planner passed because stryker plan is not a mutation run.

Change

  • release-gate.yml: the mutation step's pass-env now lists GITHUB_ACTIONS and MUTATION_SHARD.

  • sandbox-proofs/release-gate-planner.test.ts becomes sandbox-proofs/release-gate.test.ts. Both cases share one Schema decode of release-gate.yml. The new case:

    • reads the mutation job's stryker run step: its command, hosts and pass-env;
    • runs that command through sandbox with those flags, in a fixture where node_modules/.bin/stryker is a stand-in that records the environment it receives;
    • requires GITHUB_ACTIONS=true and MUTATION_SHARD=1/1.

    It runs in test:sandbox, which check:ci and the CI test leg run. stryker itself is never run by the test.

Sabotage proof

With main's release-gate.yml, the new case fails:

the release-gate mutation step hands stryker the GITHUB_ACTIONS flag its main-CI guard admits ... FAILED
error: Error: stryker saw "GITHUB_ACTIONS=\nMUTATION_SHARD=1/1\n"

This is the same missing flag as the CI log. With the fix it passes.

Local gates on 2fa84d89

pnpm bootstrap 0 · format:check 0 · gate:tasks 9/9 · gate:dist 2/2 · test:sandbox 5 passed (13 steps) · commitlint 0.

Not proven here

The step is now known to clear the main-CI guard. What stryker does after that guard, inside this sandbox, has never run anywhere: the guard stopped every run so far. Mutation does not run locally and workflow_dispatch returns 403. So the first proof is the push-to-main Release gate after merge. If it fails at a later point, the fix goes forward in another PR to main.

CONST-W3: release-gate.yml is an evaluator surface (AGENTS.md Boundaries, CONST-E9), and the test is a new check. Both are changed on the explicit ruling of their owner (Kiro) to fix forward a red Release gate, not on the maker's own judgment.

The Release gate on main at 928d17c (run 37584264022) planned 2 mutants in one shard, then shard 1/1 failed: stryker exited 3 with "shard child for ../packages/starter failed with exit code 2: exit 2 (ConfigError): mutation runs only on main CI". stryker-js 17.0.2 admits a mutation run only when GITHUB_ACTIONS is "true", ALLOW_LOCAL_MUTATION is "1", or the run is dry-run only (src/refuse-local-mutation.workflow.ts). The sandbox clears the environment and the step passed only MUTATION_SHARD, so the flag GitHub sets on the runner never reached stryker

The step now passes GITHUB_ACTIONS through as well. The planner test moves to sandbox-proofs/release-gate.test.ts and gains a case that runs the mutation step's command and pass-env list from release-gate.yml through sandbox, with a stand-in for node_modules/.bin/stryker that records the environment it receives, and requires GITHUB_ACTIONS=true and the shard. stryker itself is never run by the test

As a sabotage proof, with main's release-gate.yml the new case fails with stryker saw "GITHUB_ACTIONS=\nMUTATION_SHARD=1/1\n", the same missing flag as the CI log

CONST-W3: release-gate.yml is an evaluator surface (AGENTS.md Boundaries, CONST-E9), and the test is a new check. Both are changed on the explicit ruling of their owner (Kiro) to fix forward a red Release gate, not on the maker's own judgment
@systemfsoftware-maker systemfsoftware-maker changed the title xs/release gate env ci(release): pass GITHUB_ACTIONS to the release-gate mutation sandbox Oct 7, 2026
@kiro-systemf
kiro-systemf Bot merged commit eec5bf6 into main Oct 7, 2026
7 checks passed
systemfsoftware-maker added a commit that referenced this pull request Oct 7, 2026
…ages

Brings main's #29 and #30 (ff44090) into #14. The release-gate mutation step passes GITHUB_ACTIONS through the sandbox, and release-gate.test.ts derives that list from stryker-js's main-CI guard
systemfsoftware-maker added a commit that referenced this pull request Oct 7, 2026
…s into the upstream subtree layer

Brings #14's 42d0000 (dprint excludes the manifest-listed upstream tests only, checked by scripts/dprint-upstream-excludes.test.ts) and its merge of main's #29 and #30. turbo.json's test:scripts inputs keep both sides: this layer's subtrees.toml and repos/xstate-upstream/** and the packages layer's dprint.json, manifests and package test files
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