Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
fix([issue-12612]): run the SuperCollider live containment suite under the CI impact planner and gate merges on it
[._.]/ Adam Eivy1f4edd40e457
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex de853d92bb..0455f770d3 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -60,6 +60,7 @@ jobs:# when the diff reaches the job's import closure (scripts/ci-test-plan.js).prompt_history: ${{ steps.plan.outputs.prompt_history }}linux_containment: ${{ steps.plan.outputs.linux_containment }}+ supercollider_live: ${{ steps.plan.outputs.supercollider_live }}windows: ${{ steps.plan.outputs.windows }}windows_mode: ${{ steps.plan.outputs.windows_mode }}windows_files: ${{ steps.plan.outputs.windows_files }}@@ -166,6 +167,7 @@ jobs:SLASHDO_MODE: ${{ steps.plan.outputs.slashdo }}PROMPT_HISTORY_MODE: ${{ steps.plan.outputs.prompt_history }}LINUX_CONTAINMENT_MODE: ${{ steps.plan.outputs.linux_containment }}+ SUPERCOLLIDER_LIVE_MODE: ${{ steps.plan.outputs.supercollider_live }}NODE_MINIMUM_MODE: ${{ steps.node-minimum.outputs.run }}WINDOWS_MODE: ${{ steps.plan.outputs.windows }}WINDOWS_TEST_MODE: ${{ steps.plan.outputs.windows_mode }}@@ -189,6 +191,7 @@ jobs:echo "- Slashdo submodule: \`${SLASHDO_MODE}\`"echo "- Shipped prompt history: \`${PROMPT_HISTORY_MODE}\`"echo "- Linux worker containment: \`${LINUX_CONTAINMENT_MODE}\`"+ echo "- SuperCollider live containment: \`${SUPERCOLLIDER_LIVE_MODE}\`"echo "- Node minimum compatibility: \`${NODE_MINIMUM_MODE}\`"echo "- Windows server tests: \`${WINDOWS_MODE}\` (\`${WINDOWS_TEST_MODE}\`, shards \`${WINDOWS_SHARDS}\`)"echo "- Suite selection reasons: \`${SUITE_REASONS}\`"@@ -1219,10 +1222,131 @@ jobs:# the job is gated on those files' import closure.run: npm test --prefix server -- --run ../autofixer/sandbox.verify.test.js lib/codeAnimationContainment.test.js routes/codeAnimationExecution.test.js services/codeAnimation/containedWorker.test.js+ supercollider-live:+ name: SuperCollider native ${{ matrix.arch }}+ needs: impact+ # Path-gated by the impact planner's static import closure of the live+ # suite and setup script, and part of CI Gate: a red run blocks the merge.+ if: needs.impact.outputs.supercollider_live == 'true'+ permissions:+ contents: read+ defaults:+ run:+ shell: bash+ # Native runners only: emulation cannot prove either host's boundary.+ strategy:+ fail-fast: false+ matrix:+ include:+ - runner: ubuntu-24.04+ arch: amd64+ nodeArch: x64+ - runner: ubuntu-24.04-arm+ arch: arm64+ nodeArch: arm64+ runs-on: ${{ matrix.runner }}+ # The product build has a 90-minute cap; reserve time for installs and the+ # six real render/containment cases, including the bounded timeout case.+ timeout-minutes: 120+ env:+ EXPECTED_DOCKER_ARCH: ${{ matrix.arch }}+ EXPECTED_NODE_ARCH: ${{ matrix.nodeArch }}+ steps:+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1+ with:+ persist-credentials: false+ - name: Require maintainer release for Dependabot+ run: node scripts/ci-dependabot-admission.js+ - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0+ with:+ node-version: 24.x+ cache: npm+ cache-dependency-path: |+ package-lock.json+ server/package-lock.json++ - name: Verify the native Docker host+ run: |+ node --input-type=module <<'NODE'+ import assert from 'node:assert/strict';+ import { execFileSync } from 'node:child_process';+ const server = JSON.parse(execFileSync('docker', ['version', '--format', '{{json .Server}}'], { encoding: 'utf8' }));+ assert.equal(process.platform, 'linux');+ assert.equal(process.arch, process.env.EXPECTED_NODE_ARCH);+ assert.equal(server.Os, 'linux');+ assert.equal(server.Arch, process.env.EXPECTED_DOCKER_ARCH);+ console.log(`Docker ${server.Version}: ${server.Os}/${server.Arch}; Node ${process.version}: ${process.arch}`);+ NODE+ task_data_root="$RUNNER_TEMP/portos-supercollider-live"+ mkdir -p "$task_data_root"+ touch "$task_data_root/.portos-disposable-root"+ printf 'PORTOS_DATA_ROOT=%s\n' "$task_data_root" >> "$GITHUB_ENV"++ - name: Install test dependencies without lifecycle scripts+ run: |+ npm ci --ignore-scripts+ npm ci --ignore-scripts --prefix server++ - name: Build and prove the shipped runtime+ run: |+ npm run setup:supercollider -- --yes | tee "$RUNNER_TEMP/supercollider-first-setup.log"+ cp "$PORTOS_DATA_ROOT/data/supercollider/runtime-evidence.json" "$RUNNER_TEMP/supercollider-first-evidence.json"++ - name: Repeat setup and prove it skipped build and probe+ run: |+ npm run setup:supercollider -- --yes | tee "$RUNNER_TEMP/supercollider-second-setup.log"+ node --input-type=module <<'NODE'+ import assert from 'node:assert/strict';+ import { readFileSync } from 'node:fs';+ import { join } from 'node:path';+ const firstLog = readFileSync(join(process.env.RUNNER_TEMP, 'supercollider-first-setup.log'), 'utf8');+ const secondLog = readFileSync(join(process.env.RUNNER_TEMP, 'supercollider-second-setup.log'), 'utf8');+ const before = readFileSync(join(process.env.RUNNER_TEMP, 'supercollider-first-evidence.json'), 'utf8');+ const after = readFileSync(join(process.env.PORTOS_DATA_ROOT, 'data/supercollider/runtime-evidence.json'), 'utf8');+ assert.match(firstLog, /^✅ Image built$/m);+ assert.match(firstLog, /^✅ Synthetic render probe passed$/m);+ assert.match(secondLog, /^✅ Image already current — skipped the build$/m);+ assert.doesNotMatch(secondLog, /^✅ Image built$|^.*Synthetic render probe/m);+ assert.equal(after, before, 'The second setup must retain the first probe evidence unchanged');+ const evidence = JSON.parse(after);+ assert.equal(evidence.ok, true);+ assert.equal(evidence.platform.os, 'linux');+ assert.equal(evidence.platform.arch, process.env.EXPECTED_DOCKER_ARCH);+ console.log('Both setup runs passed; the second built no image and ran no probe.');+ NODE++ - name: Exercise real synthesis and containment+ working-directory: server+ env:+ PORTOS_SUPERCOLLIDER_LIVE: '1'+ run: npx --no-install vitest run services/superColliderRender.live.test.js++ - name: Record the proven platform+ run: |+ node --input-type=module <<'NODE'+ import { appendFileSync, readFileSync } from 'node:fs';+ import { join } from 'node:path';+ const evidence = JSON.parse(readFileSync(join(process.env.PORTOS_DATA_ROOT, 'data/supercollider/runtime-evidence.json'), 'utf8'));+ const release = readFileSync('/etc/os-release', 'utf8');+ const os = release.match(/^PRETTY_NAME="([^"]+)"$/m)?.[1] ?? 'Linux';+ const lines = [+ `### ${os} / ${evidence.platform.arch}`,+ '',+ `Docker Engine: ${evidence.platform.dockerVersion}`,+ `Runtime: ${evidence.runtimeVersion}; containment policy: ${evidence.policyVersion}`,+ `Image: ${evidence.imageId}`,+ 'Setup: first build and probe passed; second skipped both with unchanged evidence.',+ 'Live suite: all six synthesis and containment cases passed.',+ '',+ ];+ appendFileSync(process.env.GITHUB_STEP_SUMMARY, lines.join('\n'));+ for (const line of lines.filter(Boolean)) console.log(line);+ NODE+gate:name: CI Gateif: always()- needs: [impact, prompt-history, server, client, lint, database, browser, windows-server, node-minimum, linux-containment]+ needs: [impact, prompt-history, server, client, lint, database, browser, windows-server, node-minimum, linux-containment, supercollider-live]runs-on: ubuntu-latesttimeout-minutes: 10# READ only: the reporter lists this run's jobs to name the one whose STEP@@ -1263,6 +1387,7 @@ jobs:CI_GATE_RESULT_WINDOWS_SERVER: ${{ needs.windows-server.result }}CI_GATE_RESULT_NODE_MINIMUM: ${{ needs.node-minimum.result }}CI_GATE_RESULT_LINUX_CONTAINMENT: ${{ needs.linux-containment.result }}+ CI_GATE_RESULT_SUPERCOLLIDER_LIVE: ${{ needs.supercollider-live.result }}run: node scripts/ci-gate-report.jsfull-gate:diff --git a/.github/workflows/supercollider-live.yml b/.github/workflows/supercollider-live.ymldeleted file mode 100644index 1135de8b6d..0000000000--- a/.github/workflows/supercollider-live.yml+++ /dev/null@@ -1,142 +0,0 @@-name: SuperCollider live containment--on:- workflow_dispatch:- pull_request:- branches: [main]- paths:- - '.github/workflows/supercollider-live.yml'- - 'docker/supercollider/**'- - 'scripts/setup-supercollider.js'- - 'server/lib/superColliderRuntime.js'- - 'server/lib/wavAudioFile.js'- - 'server/services/superColliderRuntime.js'- - 'server/services/superColliderRender.js'- - 'server/services/superColliderRender.live.test.js'- - 'server/vitest*.js'- - 'server/package*.json'- - 'package*.json'--permissions:- contents: read--concurrency:- group: supercollider-live-${{ github.event.pull_request.number || github.ref }}- cancel-in-progress: true--defaults:- run:- shell: bash--jobs:- native:- name: SuperCollider native ${{ matrix.arch }}- # Native runners only: emulation cannot prove either host's boundary.- strategy:- fail-fast: false- matrix:- include:- - runner: ubuntu-24.04- arch: amd64- nodeArch: x64- - runner: ubuntu-24.04-arm- arch: arm64- nodeArch: arm64- runs-on: ${{ matrix.runner }}- # The product build has a 90-minute cap; reserve time for installs and the- # six real render/containment cases, including the bounded timeout case.- timeout-minutes: 120- env:- EXPECTED_DOCKER_ARCH: ${{ matrix.arch }}- EXPECTED_NODE_ARCH: ${{ matrix.nodeArch }}- steps:- - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1- with:- persist-credentials: false- - name: Require maintainer release for Dependabot- run: node scripts/ci-dependabot-admission.js- - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0- with:- node-version: 24.x- cache: npm- cache-dependency-path: |- package-lock.json- server/package-lock.json-- - name: Verify the native Docker host- run: |- node --input-type=module <<'NODE'- import assert from 'node:assert/strict';- import { execFileSync } from 'node:child_process';- const server = JSON.parse(execFileSync('docker', ['version', '--format', '{{json .Server}}'], { encoding: 'utf8' }));- assert.equal(process.platform, 'linux');- assert.equal(process.arch, process.env.EXPECTED_NODE_ARCH);- assert.equal(server.Os, 'linux');- assert.equal(server.Arch, process.env.EXPECTED_DOCKER_ARCH);- console.log(`Docker ${server.Version}: ${server.Os}/${server.Arch}; Node ${process.version}: ${process.arch}`);- NODE- task_data_root="$RUNNER_TEMP/portos-supercollider-live"- mkdir -p "$task_data_root"- touch "$task_data_root/.portos-disposable-root"- printf 'PORTOS_DATA_ROOT=%s\n' "$task_data_root" >> "$GITHUB_ENV"-- - name: Install test dependencies without lifecycle scripts- run: |- npm ci --ignore-scripts- npm ci --ignore-scripts --prefix server-- - name: Build and prove the shipped runtime- run: |- npm run setup:supercollider -- --yes | tee "$RUNNER_TEMP/supercollider-first-setup.log"- cp "$PORTOS_DATA_ROOT/data/supercollider/runtime-evidence.json" "$RUNNER_TEMP/supercollider-first-evidence.json"-- - name: Repeat setup and prove it skipped build and probe- run: |- npm run setup:supercollider -- --yes | tee "$RUNNER_TEMP/supercollider-second-setup.log"- node --input-type=module <<'NODE'- import assert from 'node:assert/strict';- import { readFileSync } from 'node:fs';- import { join } from 'node:path';- const firstLog = readFileSync(join(process.env.RUNNER_TEMP, 'supercollider-first-setup.log'), 'utf8');- const secondLog = readFileSync(join(process.env.RUNNER_TEMP, 'supercollider-second-setup.log'), 'utf8');- const before = readFileSync(join(process.env.RUNNER_TEMP, 'supercollider-first-evidence.json'), 'utf8');- const after = readFileSync(join(process.env.PORTOS_DATA_ROOT, 'data/supercollider/runtime-evidence.json'), 'utf8');- assert.match(firstLog, /^✅ Image built$/m);- assert.match(firstLog, /^✅ Synthetic render probe passed$/m);- assert.match(secondLog, /^✅ Image already current — skipped the build$/m);- assert.doesNotMatch(secondLog, /^✅ Image built$|^.*Synthetic render probe/m);- assert.equal(after, before, 'The second setup must retain the first probe evidence unchanged');- const evidence = JSON.parse(after);- assert.equal(evidence.ok, true);- assert.equal(evidence.platform.os, 'linux');- assert.equal(evidence.platform.arch, process.env.EXPECTED_DOCKER_ARCH);- console.log('Both setup runs passed; the second built no image and ran no probe.');- NODE-- - name: Exercise real synthesis and containment- working-directory: server- env:- PORTOS_SUPERCOLLIDER_LIVE: '1'- run: npx --no-install vitest run services/superColliderRender.live.test.js-- - name: Record the proven platform- run: |- node --input-type=module <<'NODE'- import { appendFileSync, readFileSync } from 'node:fs';- import { join } from 'node:path';- const evidence = JSON.parse(readFileSync(join(process.env.PORTOS_DATA_ROOT, 'data/supercollider/runtime-evidence.json'), 'utf8'));- const release = readFileSync('/etc/os-release', 'utf8');- const os = release.match(/^PRETTY_NAME="([^"]+)"$/m)?.[1] ?? 'Linux';- const lines = [- `### ${os} / ${evidence.platform.arch}`,- '',- `Docker Engine: ${evidence.platform.dockerVersion}`,- `Runtime: ${evidence.runtimeVersion}; containment policy: ${evidence.policyVersion}`,- `Image: ${evidence.imageId}`,- 'Setup: first build and probe passed; second skipped both with unchanged evidence.',- 'Live suite: all six synthesis and containment cases passed.',- '',- ];- appendFileSync(process.env.GITHUB_STEP_SUMMARY, lines.join('\n'));- for (const line of lines.filter(Boolean)) console.log(line);- NODEdiff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.mdindex da4ec63507..c7e60da5aa 100644--- a/docs/CONTRIBUTING.md+++ b/docs/CONTRIBUTING.md@@ -141,7 +141,7 @@ After the push (and, when you open the pull request yourself, before`pregate` commit status on the pushed head, bound to the validated tree andnaming the platform and Node it ran on, and the pull request's impact plannerskips the stages it attests to (only stages that ran and passed; never-Windows, Linux containment or the Node-minimum check; and, per stage, never+Windows, Linux containment, SuperCollider live containment or the Node-minimum check; and, per stage, neverone that a change `main` gained since the branch forked could reach). Itrefuses — saying what to rerun — when the receipt did not pass, the treechanged after pregate, the commit is not on the upstream remote yet, ordiff --git a/docs/GITHUB_ACTIONS.md b/docs/GITHUB_ACTIONS.mdindex b475d2f667..027d433805 100644--- a/docs/GITHUB_ACTIONS.md+++ b/docs/GITHUB_ACTIONS.md@@ -7,15 +7,14 @@ publish until the complete CI suite has passed on the exact tree being released.Dependabot pull requests start with a small checkout/admission check only.`Plan test impact` fails with a maintainer-release message before dependency-installation or tests, so the required `CI Gate` remains red. The optional-SuperCollider workflow uses the same check before installing or building.+installation or tests, so the required `CI Gate` remains red. The SuperCollider+job inside `ci.yml` repeats the check before installing or building.Other pull requests, scheduled checks, releases and manual dispatches retaintheir existing behavior. No schedule or repository security setting changes.After reviewing the dependency diff, open the **current commit's** CI workflowrun and choose **Re-run all jobs**, or run `gh run rerun RUN_ID`. GitHub permits-reruns only to repository writers. If SuperCollider also ran, release that-workflow's current run separately. Re-running failed jobs also reruns their+reruns only to repository writers. Re-running failed jobs also reruns theirdependents; re-running only CI Gate cannot release a failed impact check.Tests still have to pass before merging.@@ -652,6 +651,22 @@ The selected work is split across parallel jobs:head tree on every run, so a new dependency is gated without a list edit.Non-PR runs and pull requests into `release` always run it. Pregate reportsit as CI-only.+- **SuperCollider native containment** — builds `docker/supercollider/`, runs+ `npm run setup:supercollider` twice and executes the opt-in live suite+ (`server/services/superColliderRender.live.test.js`) against real Docker on+ native amd64 and arm64 runners. It is the only run of the container boundary+ for untrusted generated `sclang` source, and it is part of `CI Gate`: a red+ run blocks the merge, a skipped one passes. On a pull request it runs only+ when the `supercollider_live` output is true: the diff touches the static+ import closure of the live test, `scripts/setup-supercollider.js` and the+ server Vitest harness (so the spawn, kill and child-environment helpers it+ depends on select it), `docker/supercollider/`, a `package.json` or+ `package-lock.json`, or `ci.yml` (`SUPERCOLLIDER_LIVE_ENTRIES`,+ `SUPERCOLLIDER_LIVE_PATH_RE` and `collectSuperColliderLiveInputs()` in+ `scripts/ci-test-plan.js`). The closure is recomputed from the head tree on+ every run, so a new import is covered without a list edit. Non-PR runs+ (nightly) and pull requests into `release` always run it; `workflow_dispatch`+ of `CI` is the manual evidence run. Pregate reports it as CI-only.- **CI Gate** — always reports one stable required-check result and fails if anyselected job failed or was cancelled. Both block, but the message distinguishesthem: `scripts/ci-gate-report.js` says *cancelled, not failed* and names the@@ -681,7 +696,7 @@ existing `gh` authentication. It runs the registered fidelity cases, keeps alocal receipt, and publishes an exact-commit status for the PR head. Thatstatus is informational: no required check reads it. Software WebGL results donot certify physical-GPU performance, and Mac-local results cannot replace-Windows compatibility or Linux containment.+Windows compatibility, Linux containment or the SuperCollider live suite.### Full-suite shardingdiff --git a/docs/SUPERCOLLIDER.md b/docs/SUPERCOLLIDER.mdindex 0b888c516d..61dd5fc3de 100644--- a/docs/SUPERCOLLIDER.md+++ b/docs/SUPERCOLLIDER.md@@ -173,7 +173,7 @@ Re-rendering the same source with the same seed and settings reproduces the takeThe recipe targets Linux `amd64` and `arm64` Docker engines. Readiness is per machine: a host is `ready` only after the probe has passed on that host's engine with the current image. The probe result records the engine version, OS and architecture, so the evidence names the platform it was proven on. Any other configuration stays visibly unavailable.-The [native Docker workflow](../.github/workflows/supercollider-live.yml) builds the shipped recipe, runs setup twice, and executes the opt-in live suite on both architectures. On 2026-10-02, runtime `3.14.1-portos.1` with containment policy `1` passed on these fresh GitHub-hosted runners at commit `1e2b89bfb5a65941d9ed6a38cbf806182b79b36e`:+The `supercollider-live` job in [`ci.yml`](../.github/workflows/ci.yml) (gated by the impact planner and part of `CI Gate`; see [GITHUB_ACTIONS.md](GITHUB_ACTIONS.md)) builds the shipped recipe, runs setup twice, and executes the opt-in live suite on both architectures. On 2026-10-02, runtime `3.14.1-portos.1` with containment policy `1` passed on these fresh GitHub-hosted runners at commit `1e2b89bfb5a65941d9ed6a38cbf806182b79b36e`:| Host OS | Docker Engine | Native architecture | Evidence || --- | --- | --- | --- |diff --git a/scripts/ci-dependabot-admission.test.js b/scripts/ci-dependabot-admission.test.jsindex 0e71562e23..4b87065c49 100644--- a/scripts/ci-dependabot-admission.test.js+++ b/scripts/ci-dependabot-admission.test.js@@ -42,18 +42,18 @@ describe('Dependabot maintainer release', () => {expect(ci.impact.indexOf('node scripts/ci-dependabot-admission.js')).toBeLessThan(ci.impact.indexOf('node scripts/ci-base-sha.js'));expect(ci.impact).not.toContain('continue-on-error: true');- for (const name of ['prompt-history', 'server', 'client', 'lint', 'database', 'browser', 'windows-server', 'node-minimum', 'linux-containment']) {+ for (const name of ['prompt-history', 'server', 'client', 'lint', 'database', 'browser', 'windows-server', 'node-minimum', 'linux-containment', 'supercollider-live']) {expect(ci[name]).toContain('needs: impact');}expect(ci.gate).toContain('if: always()');expect(ci.gate).toContain('CI_GATE_RESULT_IMPACT: ${{ needs.impact.result }}');expect(summarizeGateResults([{ job: 'impact', result: 'failure' }, { job: 'client', result: 'skipped' }]).verdict).toBe('failure');- const native = workflowJobs(workflow('supercollider-live')).native;+ const native = ci['supercollider-live'];expect(native.indexOf('node scripts/ci-dependabot-admission.js')).toBeGreaterThan(-1);expect(native.indexOf('node scripts/ci-dependabot-admission.js')).toBeLessThan(native.indexOf('actions/setup-node@'));- for (const name of ['ci', 'supercollider-live']) {- expect(workflow(name)).not.toContain('pull_request_target:');- expect(workflow(name)).not.toMatch(/(?:contents|actions): write/);- }+ expect(workflow('ci')).not.toContain('pull_request_target:');+ expect(workflow('ci')).not.toMatch(/(?:contents|actions): write/);+ expect(ci.gate).toContain('supercollider-live]');+ expect(ci.gate).toContain('CI_GATE_RESULT_SUPERCOLLIDER_LIVE: ${{ needs.supercollider-live.result }}');});});diff --git a/scripts/ci-test-plan.js b/scripts/ci-test-plan.jsindex ac94a22101..350cb90bb3 100644--- a/scripts/ci-test-plan.js+++ b/scripts/ci-test-plan.js@@ -595,9 +595,9 @@ export const needsSlashdoSubmodule = (plan) => Boolean(|| plan.server.sources.some((path) => SLASHDO_CONTRACT_SOURCE_FILES.includes(path)));-// Two narrow CI jobs observe a small, enumerable input set, so a pull request+// Three narrow CI jobs observe a small, enumerable input set, so a pull request// that touches none of it skips them (non-PR and release-base runs are forced-// full and always run both). Each gate is the head tree's static import+// full and always run all three). Each gate is the head tree's static import// closure of the job's entry points, computed per run so it cannot drift from// a hand-kept list, plus the non-module inputs named by the pattern. ci.yml is// in both patterns so a workflow edit proves the job still runs.@@ -625,6 +625,22 @@ const LINUX_CONTAINMENT_ENTRIES = [];// The job installs server dependencies from these before running anything.export const LINUX_CONTAINMENT_PATH_RE = /^(?:server\/package(?:-lock)?\.json|\.github\/workflows\/ci\.yml)$/;+// The `supercollider-live` job builds docker/supercollider/ through the setup+// script and runs the opt-in live suite on native amd64 and arm64 runners. The+// setup script and the live test reach the runtime, render service and the+// spawn/kill plumbing through static imports, so the closure — not a literal+// path list — selects the job. The server Vitest config and setup files load+// around the live test; vitestTempRootSetup.js is named by URL, not import.+export const SUPERCOLLIDER_LIVE_ENTRIES = [+ 'server/services/superColliderRender.live.test.js',+ 'scripts/setup-supercollider.js',+ 'server/vitest.config.js',+ 'server/vitest.setup.js',+ 'scripts/vitestTempRootSetup.js',+];+// The recipe directory and the dependency manifests the job installs from are+// not modules, so the closure cannot see them.+export const SUPERCOLLIDER_LIVE_PATH_RE = /^(?:docker\/supercollider\/|server\/package(?:-lock)?\.json|package(?:-lock)?\.json|\.github\/workflows\/ci\.yml$)/;/*** Repository-relative static import closure of `entries` in `cwd`, or null@@ -661,6 +677,9 @@ export function collectPromptHistoryInputs(files, cwd) {/** Static closure of the linux-containment tests and their Vitest harness. */export const collectLinuxContainmentInputs = (cwd) => staticClosureOf(LINUX_CONTAINMENT_ENTRIES, cwd);+/** Static closure of the SuperCollider live suite, its setup script and their Vitest harness. */+export const collectSuperColliderLiveInputs = (cwd) => staticClosureOf(SUPERCOLLIDER_LIVE_ENTRIES, cwd);+/** True when the diff reaches a gated job's inputs; null inputs fail open to running it. */const touchesJobInputs = (changed, inputs, pattern) => inputs === null|| changed.some((path) => pattern.test(path) || inputs.includes(path));@@ -963,14 +982,16 @@ const suiteReasonsFor = (plan, { appRouteOnly = false } = {}) => ({*//*** The CI plan for a diff: the test-suite selection plus whether each- * path-gated job (prompt history, Linux containment) runs.+ * path-gated job (prompt history, Linux containment, SuperCollider live) runs.*- * `promptHistoryInputs` / `linuxContainmentInputs` are the jobs' static+ * `promptHistoryInputs` / `linuxContainmentInputs` / `supercolliderLiveInputs` are the jobs' static* import closures from collectPlanInputs(); null (the default) runs the job.*/export function buildCiTestPlan(changedFiles, options = {}) {const plan = buildSuitePlan(changedFiles, options);- const { forceFull = false, promptHistoryInputs = null, linuxContainmentInputs = null, serverReach = null } = options;+ const {+ forceFull = false, promptHistoryInputs = null, linuxContainmentInputs = null, supercolliderLiveInputs = null, serverReach = null,+ } = options;// Informational: names the changed source behind a large related selection// (#12285). It never changes what runs.const reachNote = !plan.full && plan.server.mode === 'related' ? formatReachSummary(serverReach) : '';@@ -980,6 +1001,8 @@ export function buildCiTestPlan(changedFiles, options = {}) {promptHistory: forceFull || touchesJobInputs(plan.changedFiles, promptHistoryInputs, PROMPT_HISTORY_PATH_RE),linuxContainment: forceFull|| touchesJobInputs(plan.changedFiles, linuxContainmentInputs, LINUX_CONTAINMENT_PATH_RE),+ supercolliderLive: forceFull+ || touchesJobInputs(plan.changedFiles, supercolliderLiveInputs, SUPERCOLLIDER_LIVE_PATH_RE),};}@@ -1403,6 +1426,7 @@ export function emitGitHubPlan(plan) {slashdo: plan.slashdo,prompt_history: plan.promptHistory,linux_containment: plan.linuxContainment,+ supercollider_live: plan.supercolliderLive,windows: plan.windows,windows_mode: plan.windowsMode,windows_files: JSON.stringify(plan.windowsFiles),@@ -1631,12 +1655,13 @@ export function collectPlanInputs({ baseSha, forceFull = false, changedFiles, cw}}- // A forced-full run always runs both gated jobs, so it skips the walks.+ // A forced-full run always runs every gated job, so it skips the walks.const promptHistoryInputs = forceFull ? null : collectPromptHistoryInputs(dependencyFiles, cwd);const linuxContainmentInputs = forceFull ? null : collectLinuxContainmentInputs(cwd);+ const supercolliderLiveInputs = forceFull ? null : collectSuperColliderLiveInputs(cwd);return { changedFiles: collectedChangedFiles, trackedFiles: presentFiles, appDiff, pathContractTests,- clientDependencies, dbDependencies, browserDependencies, dependencyChanges, promptHistoryInputs, linuxContainmentInputs,+ clientDependencies, dbDependencies, browserDependencies, dependencyChanges, promptHistoryInputs, linuxContainmentInputs, supercolliderLiveInputs,serverReach };}@@ -1909,7 +1934,7 @@ function main() {}const {changedFiles, trackedFiles, appDiff, pathContractTests, clientDependencies, dbDependencies, browserDependencies,- dependencyChanges, promptHistoryInputs, linuxContainmentInputs, serverReach,+ dependencyChanges, promptHistoryInputs, linuxContainmentInputs, supercolliderLiveInputs, serverReach,} = collectPlanInputs({baseSha: base,forceFull,@@ -1927,6 +1952,7 @@ function main() {dependencyChanges,promptHistoryInputs,linuxContainmentInputs,+ supercolliderLiveInputs,serverReach,});// Last, over the finished plan: the attestation only ever removes work.diff --git a/scripts/ci-test-plan.test.js b/scripts/ci-test-plan.test.jsindex 37a31d6f71..3793d3f6af 100644--- a/scripts/ci-test-plan.test.js+++ b/scripts/ci-test-plan.test.js@@ -1,6 +1,6 @@import { describe, expect, it, vi } from 'vitest';import { execFileSync } from 'node:child_process';-import { mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from 'node:fs';+import { existsSync, mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from 'node:fs';import { tmpdir } from 'node:os';import { dirname, join, posix } from 'node:path';import { fileURLToPath } from 'node:url';@@ -21,6 +21,7 @@ import {classifyDependencyChange,WINDOWS_INSTALLED_WORKSPACES,collectPlanInputs,+ collectSuperColliderLiveInputs,emitGitHubPlan,forceFullReasonFor,FULL_SUITE_SHARDS,@@ -35,6 +36,7 @@ import {sourceReferencePattern,splitByRunner,structuralTestsFor,+ SUPERCOLLIDER_LIVE_ENTRIES,WINDOWS_CONTRACT_TESTS,WINDOWS_RISK_RULES,} from './ci-test-plan.js';@@ -1920,21 +1922,61 @@ describe('path-gated single-purpose jobs', () => {let staticInputs;const realPlan = (changedFiles) => {staticInputs ??= collectPlanInputs({ baseSha: 'HEAD', changedFiles: [], cwd: repo });- const { promptHistoryInputs, linuxContainmentInputs } = staticInputs;- return buildCiTestPlan(changedFiles, { promptHistoryInputs, linuxContainmentInputs });+ const { promptHistoryInputs, linuxContainmentInputs, supercolliderLiveInputs } = staticInputs;+ return buildCiTestPlan(changedFiles, { promptHistoryInputs, linuxContainmentInputs, supercolliderLiveInputs });};- const gates = (plan) => ({ promptHistory: plan.promptHistory, linuxContainment: plan.linuxContainment });+ const gates = (plan) => ({+ promptHistory: plan.promptHistory, linuxContainment: plan.linuxContainment, supercolliderLive: plan.supercolliderLive,+ });it('runs each job only when the real diff reaches its inputs', () => {- expect(gates(realPlan(['docs/README.md']))).toEqual({ promptHistory: false, linuxContainment: false });+ expect(gates(realPlan(['docs/README.md'])))+ .toEqual({ promptHistory: false, linuxContainment: false, supercolliderLive: false });// Reached only through the hash-declaring migrations' import closure.- expect(gates(realPlan(['server/lib/fileUtils.js']))).toEqual({ promptHistory: true, linuxContainment: true });+ expect(gates(realPlan(['server/lib/fileUtils.js']))).toMatchObject({ promptHistory: true, linuxContainment: true });expect(gates(realPlan(['server/lib/codeAnimationContainment.js'])))- .toEqual({ promptHistory: false, linuxContainment: true });+ .toEqual({ promptHistory: false, linuxContainment: true, supercolliderLive: false });expect(gates(realPlan(['data.reference/prompts/stages/example.md'])))- .toEqual({ promptHistory: true, linuxContainment: false });- expect(gates(realPlan(['server/package-lock.json'])).linuxContainment).toBe(true);- expect(gates(realPlan(['.github/workflows/ci.yml']))).toEqual({ promptHistory: true, linuxContainment: true });+ .toEqual({ promptHistory: true, linuxContainment: false, supercolliderLive: false });+ expect(gates(realPlan(['server/package-lock.json']))).toMatchObject({ linuxContainment: true, supercolliderLive: true });+ expect(gates(realPlan(['.github/workflows/ci.yml'])))+ .toEqual({ promptHistory: true, linuxContainment: true, supercolliderLive: true });+ });++ it('selects the SuperCollider live job for the spawn plumbing its containment cases depend on, not for unrelated files (#12612)', () => {+ // Transitive dependencies of the live suite that the old hand-kept path+ // list never named.+ for (const file of ['server/lib/bufferedSpawn.js', 'server/lib/streamingSpawn.js', 'server/lib/processEnv.js']) {+ expect(realPlan([file]).supercolliderLive, file).toBe(true);+ }+ for (const file of ['docker/supercollider/Dockerfile', 'scripts/setup-supercollider.js']) {+ expect(realPlan([file]).supercolliderLive, file).toBe(true);+ }+ expect(realPlan(['client/src/App.jsx']).supercolliderLive).toBe(false);+ expect(realPlan(['docs/SUPERCOLLIDER.md']).supercolliderLive).toBe(false);+ });++ it('covers a module newly imported by the SuperCollider runtime without editing any list (#12612)', () => {+ const root = mkdtempSync(join(tmpdir(), 'ci-plan-supercollider-'));+ try {+ const write = (path, text) => {+ mkdirSync(dirname(join(root, path)), { recursive: true });+ writeFileSync(join(root, path), text);+ };+ write('server/services/superColliderRender.live.test.js', "import '../lib/superColliderRuntime.js';\n");+ write('server/lib/superColliderRuntime.js', "import './brandNewHelper.js';\n");+ write('server/lib/brandNewHelper.js', 'export const x = 1;\n');+ write('server/lib/unrelated.js', 'export const y = 1;\n');+ const inputs = collectSuperColliderLiveInputs(root);+ expect(inputs).toContain('server/lib/brandNewHelper.js');+ expect(inputs).not.toContain('server/lib/unrelated.js');+ // Every entry is an input even when absent, so deleting one still runs the job.+ for (const entry of SUPERCOLLIDER_LIVE_ENTRIES) expect(inputs).toContain(entry);+ expect(buildCiTestPlan(['server/lib/brandNewHelper.js'], { supercolliderLiveInputs: inputs }).supercolliderLive).toBe(true);+ expect(buildCiTestPlan(['server/lib/unrelated.js'], { supercolliderLiveInputs: inputs }).supercolliderLive).toBe(false);+ } finally {+ rmSync(root, { recursive: true, force: true });+ }});it('gates linux-containment on the whole closure of the tests the job runs', () => {@@ -1948,13 +1990,15 @@ describe('path-gated single-purpose jobs', () => {}});- it('runs both jobs when forced full or when an input walk is inconclusive', () => {+ it('runs every gated job when forced full or when an input walk is inconclusive', () => {expect(gates(buildCiTestPlan(['docs/README.md'], { forceFull: true })))- .toEqual({ promptHistory: true, linuxContainment: true });- expect(gates(buildCiTestPlan(['docs/README.md'], { promptHistoryInputs: null, linuxContainmentInputs: null })))- .toEqual({ promptHistory: true, linuxContainment: true });- expect(gates(buildCiTestPlan(['docs/README.md'], { promptHistoryInputs: [], linuxContainmentInputs: [] })))- .toEqual({ promptHistory: false, linuxContainment: false });+ .toEqual({ promptHistory: true, linuxContainment: true, supercolliderLive: true });+ expect(gates(buildCiTestPlan(['docs/README.md'], {+ promptHistoryInputs: null, linuxContainmentInputs: null, supercolliderLiveInputs: null,+ }))).toEqual({ promptHistory: true, linuxContainment: true, supercolliderLive: true });+ expect(gates(buildCiTestPlan(['docs/README.md'], {+ promptHistoryInputs: [], linuxContainmentInputs: [], supercolliderLiveInputs: [],+ }))).toEqual({ promptHistory: false, linuxContainment: false, supercolliderLive: false });});it('still runs a job when the diff deletes one of its entry points', () => {@@ -1973,9 +2017,11 @@ describe('path-gated single-purpose jobs', () => {it('emits both decisions and ci.yml gates the jobs on them', () => {const log = vi.spyOn(console, 'log').mockImplementation(() => {});try {- emitGitHubPlan(buildCiTestPlan(['docs/README.md'], { promptHistoryInputs: [], linuxContainmentInputs: [] }));+ emitGitHubPlan(buildCiTestPlan(['docs/README.md'], {+ promptHistoryInputs: [], linuxContainmentInputs: [], supercolliderLiveInputs: [],+ }));const outputs = JSON.parse(log.mock.calls.at(-1)[0]);- expect(outputs).toMatchObject({ prompt_history: false, linux_containment: false });+ expect(outputs).toMatchObject({ prompt_history: false, linux_containment: false, supercollider_live: false });} finally {log.mockRestore();}@@ -1992,6 +2038,16 @@ describe('path-gated single-purpose jobs', () => {// A skipped gated job still reports to CI Gate, which treats skipped as passing.expect(jobs.gate).toContain('CI_GATE_RESULT_PROMPT_HISTORY: ${{ needs.prompt-history.result }}');expect(jobs.gate).toContain('CI_GATE_RESULT_LINUX_CONTAINMENT: ${{ needs.linux-containment.result }}');++ // The native SuperCollider matrix lives in ci.yml, is planner-gated, and a+ // red run fails CI Gate (#12612). No second workflow may run it on a PR.+ expect(jobs.impact).toContain('supercollider_live: ${{ steps.plan.outputs.supercollider_live }}');+ expect(jobs['supercollider-live']).toContain('needs: impact');+ expect(jobs['supercollider-live']).toContain("if: needs.impact.outputs.supercollider_live == 'true'");+ expect(jobs['supercollider-live']).toContain('runs-on: ${{ matrix.runner }}');+ expect(jobs.gate).toMatch(/needs: \[[^\]]*\bsupercollider-live\]/);+ expect(jobs.gate).toContain('CI_GATE_RESULT_SUPERCOLLIDER_LIVE: ${{ needs.supercollider-live.result }}');+ expect(existsSync(join(repo, '.github/workflows/supercollider-live.yml'))).toBe(false);});});diff --git a/scripts/lib/pregateReport.js b/scripts/lib/pregateReport.jsindex e01ec73af9..b93b480404 100644--- a/scripts/lib/pregateReport.js+++ b/scripts/lib/pregateReport.js@@ -105,6 +105,7 @@ export function buildPregateReport({windows: plan.windows,promptHistory: plan.promptHistory,linuxContainment: plan.linuxContainment,+ supercolliderLive: plan.supercolliderLive,suiteReasons: plan.suiteReasons ?? {},},stages: stageRecords,diff --git a/scripts/pregate-attest.test.js b/scripts/pregate-attest.test.jsindex 031aac40bf..fac950de27 100644--- a/scripts/pregate-attest.test.js+++ b/scripts/pregate-attest.test.js@@ -23,7 +23,7 @@ const NODE = 26;const encode = (stages, tree = TREE) => encodeAttestation({ tree, stages, os: OS, node: NODE });const stage = (suite, status = 'passed', name = suite) => ({ name, suite, command: `node scripts/${suite}.js`, status, durationMs: 1, exitCode: status === 'passed' ? 0 : 1 });-const plan = { full: false, reason: 'scoped', server: { mode: 'files', files: [], sources: [] }, client: { mode: 'skip', files: [], sources: [] }, lint: { mode: 'full', files: [] }, browser: { files: [] }, db: false, build: false, smoke: false, windows: false, promptHistory: false, linuxContainment: false, suiteReasons: {} };+const plan = { full: false, reason: 'scoped', server: { mode: 'files', files: [], sources: [] }, client: { mode: 'skip', files: [], sources: [] }, lint: { mode: 'full', files: [] }, browser: { files: [] }, db: false, build: false, smoke: false, windows: false, promptHistory: false, linuxContainment: false, supercolliderLive: false, suiteReasons: {} };/** A receipt as pregate writes it, with the given stage outcomes. */const receipt = ({ stages, tree = TREE, treeAfterRun = tree, downgraded = false, skipped = [], base = { ref: 'origin/main', sha: BASE } }) => buildPregateReport({diff --git a/scripts/pregate.js b/scripts/pregate.jsindex 5779d5ed50..30d66432ef 100644--- a/scripts/pregate.js+++ b/scripts/pregate.js@@ -79,6 +79,7 @@ export const UNCOVERED_SUITES = Object.freeze({smoke: 'npm run smoke',windows: 'CI is the only proof',linuxContainment: 'a Linux host with bubblewrap: PORTOS_REQUIRE_LINUX_CONTAINMENT=1 npm test --prefix server -- --run <LINUX_CONTAINMENT_TESTS>',+ supercolliderLive: 'a native amd64/arm64 Linux Docker engine: npm run setup:supercollider -- --yes, then PORTOS_SUPERCOLLIDER_LIVE=1 npx vitest run services/superColliderRender.live.test.js from server/',});/** Remedy when a prerequisite probe ran but failed (timeout, teardown): nothing indicates a missing install. */@@ -121,6 +122,9 @@ export function uncoveredSuites(plan, { options = {}, downgraded = false, prereqif (suiteSelected(plan, 'linuxContainment')) {uncovered.push({ suite: 'linuxContainment', reason: 'needs a Linux host with bubblewrap namespaces', remedy: UNCOVERED_SUITES.linuxContainment });}+ if (suiteSelected(plan, 'supercolliderLive')) {+ uncovered.push({ suite: 'supercolliderLive', reason: 'needs a native Linux Docker engine on amd64 and arm64', remedy: UNCOVERED_SUITES.supercolliderLive });+ }return uncovered;}@@ -641,6 +645,7 @@ async function main() {smoke: raw.smoke,promptHistory: raw.prompt_history,linuxContainment: raw.linux_containment,+ supercolliderLive: raw.supercollider_live,suiteReasons: JSON.parse(raw.suite_reasons ?? '{}'),};console.log(`📋 ${raw.changed_files.length} changed file(s) — ${plan.reason}.`);diff --git a/scripts/pregate.test.js b/scripts/pregate.test.jsindex e7ff030d56..5afeb036fb 100644--- a/scripts/pregate.test.js+++ b/scripts/pregate.test.js@@ -55,6 +55,7 @@ const planWith = (overrides = {}) => ({smoke: false,promptHistory: false,linuxContainment: false,+ supercolliderLive: false,...overrides,});@@ -933,6 +934,8 @@ describe('uncoveredSuites', () => {.toEqual([{ suite: 'windows', reason: 'a Windows runner has no local equivalent', remedy: UNCOVERED_SUITES.windows }]);expect(uncoveredSuites(planWith({ linuxContainment: true }))).toEqual([{ suite: 'linuxContainment', reason: 'needs a Linux host with bubblewrap namespaces', remedy: UNCOVERED_SUITES.linuxContainment }]);+ expect(uncoveredSuites(planWith({ supercolliderLive: true })))+ .toEqual([{ suite: 'supercolliderLive', reason: 'needs a native Linux Docker engine on amd64 and arm64', remedy: UNCOVERED_SUITES.supercolliderLive }]);expect(uncoveredSuites(planWith())).toEqual([]);});