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
[issue-9429] Validate SuperCollider on native Linux Docker runners (#9536)
[._.]/f38ea37faf0c
diff --git a/.github/workflows/supercollider-live.yml b/.github/workflows/supercollider-live.ymlnew file mode 100644index 0000000000..e01898ac01--- /dev/null+++ b/.github/workflows/supercollider-live.yml@@ -0,0 +1,140 @@+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+ - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.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/SUPERCOLLIDER.md b/docs/SUPERCOLLIDER.mdindex 1c8c99967f..cf6986c3e3 100644--- a/docs/SUPERCOLLIDER.md+++ b/docs/SUPERCOLLIDER.md@@ -173,7 +173,14 @@ 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.-As of this change, the recipe has not been built in CI. Docker was not available on the machine where it was authored. The first successful `npm run setup:supercollider -- --yes` on each architecture provides the evidence. Record the outcome in the epic (#9407).+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`:++| Host OS | Docker Engine | Native architecture | Evidence |+| --- | --- | --- | --- |+| Ubuntu 24.04.5 LTS | 28.0.4 | `amd64` | [Passing job](https://github.com/atomantic/PortOS/actions/runs/36961931442/job/110697287482) |+| Ubuntu 24.04.5 LTS | 28.0.4 | `arm64` | [Passing job](https://github.com/atomantic/PortOS/actions/runs/36961931442/job/110697287272) |++Both first setup runs built the image and passed the stock-synth probe. Both second runs skipped the build and probe with byte-identical readiness evidence. All six live cases passed on each host: audible stereo 48 kHz rendering, host/environment/filesystem/network/startup isolation with a non-root uid, syntax rejection, timeout cleanup, cancellation cleanup, and overlapping renders. The suite also runs a parser regression for the real `sclang` error delimiter exposed by the initial runs. No recipe, wrapper, or policy change was needed. These results cover the listed Linux Docker hosts; Docker Desktop on macOS and Windows remains unverified.## Troubleshootingdiff --git a/server/services/superColliderRender.live.test.js b/server/services/superColliderRender.live.test.jsindex 262744fa5f..0b273275e1 100644--- a/server/services/superColliderRender.live.test.js+++ b/server/services/superColliderRender.live.test.js@@ -31,6 +31,17 @@ Ppar([])`;const INFINITE_SOURCE = 'inf.do { 1 + 1 };\nPbind(\\dur, 1)';+// sclang also prints the error text inside Error(...); that closing delimiter+// is not part of the last probe value.+const parseProbeReport = (message) => Object.fromEntries(+ [...message.matchAll(/(\w+)=([^\s)]+)/g)].map(([, key, value]) => [key, value]),+);++it('reads the final containment value from sclang Error(...) output without masking a successful connection', () => {+ expect(parseProbeReport('Error(PROBE hostFixture=false netGateway=false)')).toEqual({ hostFixture: 'false', netGateway: 'false' });+ expect(parseProbeReport('Error(PROBE hostFixture=false netGateway=true)')).toEqual({ hostFixture: 'false', netGateway: 'true' });+});+describe.skipIf(!LIVE)('SuperCollider renders under real containment', () => {let docker;let dataDir;@@ -92,11 +103,12 @@ Error("PROBE" +const error = await render({ source: probe }).catch((err) => err);delete process.env.PORTOS_LIVE_PROBE_SECRET;expect(error.code).toBe('SUPERCOLLIDER_SOURCE_ERROR');- const report = Object.fromEntries([...error.message.matchAll(/(\w+)=(\S+)/g)].map(([, key, value]) => [key, value]));+ const report = parseProbeReport(error.message);expect(report).toMatchObject({hostFixture: 'false', env: 'false', home: '/tmp', writeIn: 'false', writeRoot: 'false',shellIn: 'false', shellRoot: 'false', startup: 'false', netHost: 'false', netGateway: 'false',});+ expect(report.uid).toMatch(/^\d+$/);expect(report.uid).not.toBe('0');expect(connections).toBe(0);expect(scratchLeft()).toEqual([]);