Scenario acceptance / XZBT 0.1
Start or cancel a scenario, inspect its status, or run the frozen two-hour development workload. Acceleration verifies logical behavior; the soak requires real elapsed time and audio output.
import { mkdirSync, readFileSync, writeFileSync } from 'node:fs'; import { createHash } from 'node:crypto'; import { resolve } from 'node:path'; import { fileURLToPath } from 'node:url'; import { bundleRuntime } from './build-xzbt.mjs'; import { longScenarioExhibit, scenarioChallenge } from './scenario-fixtures.mjs'; import { validateExhibit } from '../src/runtime/validator.js'; export function buildScenarioAcceptance() { const root = fileURLToPath(new URL('..', import.meta.url)); const workload = structuredClone(longScenarioExhibit); workload.meta = { id: 'phase6-soak', name: 'Phase 6 development soak', version: '1.0.0' }; workload.runtime.seed = 4206; workload.scenarios.pulse = { trigger: { type: 'interval', every: '20s' }, duration: '5s', onStart: [ { type: 'event', event: 'signal' }, { type: 'sound', sound: 'drone' }, { type: 'override', target: 'parameters.activity', value: 0.9, scope: 'scenario', transition: { out: '2s' } } ], timeline: [] }; const fixtures = [longScenarioExhibit, scenarioChallenge, workload]; mkdirSync(resolve(root, 'prototypes/phase6'), { recursive: true }); for (const document of fixtures) { const result = validateExhibit(document); if (!result.valid) throw new Error(JSON.stringify(result.errors)); writeFileSync(resolve(root, document === workload ? 'prototypes/phase6/workload-v1.xzbt' : `exhibits/${document.meta.id}.xzbt`), JSON.stringify(document, null, 2) + '\n'); } const runtime = bundleRuntime(false); const data = JSON.stringify(fixtures).replace(/
Start or cancel a scenario, inspect its status, or run the frozen two-hour development workload. Acceleration verifies logical behavior; the soak requires real elapsed time and audio output.