Add the Phase 6 evidence record, update the implementation status, verification gates, gap-closure decisions, implementation plan and README for the scenario director, and state plainly that Phase 6 is not accepted until its two-hour real-duration soak is observed. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01M7dgfQ12mpM4JjSMv3inLA
23 KiB
XZBT implementation status
Updated: September 6, 2026
State: Phase 6 scenario implementation and automated acceptance complete: section 21 contract, seven triggers, timelines/repeats/branches, admission/concurrency, nested ownership, bounded cleanup, Exhibit E, A/B overrides and acceptance tooling. 252 automated checks pass. The required two-hour real-duration development soak remains pending, as do earlier direct-file, audio/listening and Phase 4h hardware gates. Phase 6 is not fully accepted until its soak evidence is recorded.
Planning baseline: 05fe2b4e021ba86e4a290d05b63c7cae0e386128
Exact demarcation: GC1 direct-file feasibility (10/10 checks), GC2 shared format contracts, GC3 resolution semantics, GC4 clock/PRNG semantics, and GC5 ownership/failure semantics are complete at the Phase 0 contract-oracle level. The Phase 1 production runtime skeleton, Phase 2 common grammar, audio engine through Phase 3c slice 4's implementation, visual engine through 4g, and Phase 5 Events and Cadence pass automated checks. Phase 1's direct-file two-fixture restart observation, Phase 3's audible acceptance (no sound has been heard from a production build), and real-browser measured master protection remain open. The visual subsystem contract is complete at Phase 4a-4c and its aggregate ceilings are provisional pending the slice 4h GC6 measurement; visual implementation through 4g is present; the scenario director is now implemented (section below); final generated UI, measured performance, and real-duration soak acceptance remain open.
The user requested sequential implementation with a stop on problems. The manual version 3 evidence verifies embedded data-URL worklet loading in direct-file Chrome. The subsequent user-performed restart test restored Blue Study activity 0.37 and master volume 0.19 immediately on reopening. Native tone output and AudioContext suspend/resume are also observed. Ordinary file import, selection of both exhibits, regular Chrome mode, and directory cancellation/denial fallback have been confirmed.
| Phase | Status | Evidence or next prerequisite |
|---|---|---|
| 0 — Contracts and feasibility | Complete | GC1 passed; GC2–GC5 shared contracts and traces passed; GC6/GC7 later gates scheduled and mapped |
| 1 — Runtime skeleton | Implemented; acceptance pending | Automated evidence passes production-module, lifecycle, PRNG-vector, cache/restore, fixture-validation, and deterministic-build tests. Direct-file two-fixture import/restart remains a user-observed gate. |
| 2 — Common grammar | Complete | Automated evidence covers production GC2 conformance, typed values, signals, actions, same-tick bindings, transitions, override precedence/release, and parameter restoration. |
| 3 — Audio engine | Slices 3c-1–3 complete; 3c-4 implementation verified, user acceptance pending | Contract, lifecycle/voices, automation, and protection evidence. Slice 4 requires real-browser measurement and user listening; PRD 129 and real GC4 audio acceptance remain open. |
| 4 — Visual engine | Implemented through 4g; user acceptance pending | 4e procedural evidence, 4f execution evidence, 4g fixtures. Fourteen challenge fixtures and first visuals for A–D execute without subject-specific renderer code. Slice 4h and PRD 130 display judgment remain open. |
| 5 — Events and cadence | Complete | Automated evidence covers contract Section 20, schema/validation with static cycle detection, 1024-action budget, 16-level nesting, priority cadence clocks, minGap, recency relaxation, ambient voices, and manual SAMPLE PRNG isolation. |
| 6 — Scenario director | Implemented; real-duration soak pending | Phase 6 evidence, 21 scenario tests, reproducible forty-minute Exhibit E, production GC5 counters; acceptance instructions. |
| 7 — Dynamic UI | Not started | Earlier phases and UI contracts |
| 8 — Library and persistence hardening | Not started | Earlier phases and library contracts |
| 9 — Reference suite completion/audit | Not started | Earlier phases, challenge coverage, benchmark and soak evidence |
Work saved
- A self-contained Phase 0 probe for import, isolated probe caching, settings restoration, user-initiated audio, embedded engine worklet loading, suspend/resume, and injected storage failure.
- Two minimal import fixtures and manual test instructions.
- Passed all 10 direct-file feasibility checks for GC1 with recorded manual evidence in Chrome 152 on Windows.
- Authoritative JSON Schema (schema/xzbt-0.1.schema.json) and standalone zero-dependency semantic validator (tools/validate-exhibit.mjs).
- Automated GC2 conformance test matrix (test/gc2-runner.test.mjs) verifying 12 valid and fault-injected fixtures with zero errors.
- Format Specification Revision 0.3 with exact shared GC3 resolution/binding/transition, GC4 clock/PRNG/audio-alignment, GC5 ownership/failure/dispatch, and GC7 import/update/build contracts.
- Executable Phase 0 contract models and tests for GC3–GC5; the combined Phase 0 run passes 27 tests with zero failures.
- A sequenced implementation plan mapping every MVP completion group, reference challenge, GC6 measurement stage, and GC7 library/build verification stop.
- Preserved user evidence runs for versions 1, 2, 3, offline, file relocation, and directory fallback.
Phase 1 entry condition
The injected-storage-failure run and audio follow-up confirm in-memory activity changes, successful directory import, and heard native playback despite 16 expected failed saves. The user subsequently confirmed the visible session-only warning. The injected-storage-failure check passed; this does not establish real browser permission-denial behavior.
Worklet loading and the user-performed restart/settings test have passed and need not be repeated without a relevant code change. The offline restoration, tone, and worklet check also passed with explicit user confirmation of browser-scoped Offline mode; see offline evidence. The user confirmed regular Chrome mode and ordinary import/activation. The directory-permission/cancellation fallback observation is now complete; see directory fallback evidence. GC1 is fully satisfied.
The browser rejection explicitly forbids agent workarounds through alternate browser surfaces, raw commands, or indirect execution. No workaround was attempted. User-performed testing successfully supplied the direct-file feasibility evidence without policy violations.
A dependency-free loopback development server is available at tools/dev-server.mjs. It serves the workspace at http://localhost:5173/ for later automated development testing only and listens on both IPv4 and IPv6 loopback. It may support source-level UI or regression work after Phase 0, but direct-file operation remains the primary distribution architecture.
Phase 0 remains complete and the Phase 1 implementation now reuses the GC4 PRNG known vectors in the production SeededRNG. The mandatory direct-file Phase 1 observation, combined-load measurements, production subsystem conformance, two-hour development soak, and eight-hour release soak remain outstanding at their mapped gates.
Phase 1 implementation
The modular runtime sources now live in src/runtime and build deterministically with node tools/build-xzbt.mjs into the self-contained root XZBT.html. The artifact has no external runtime dependencies or requests. Two minimal, subject-neutral fixtures live in exhibits; one uses fixed seed 42 and one requests cryptographic entropy. Phase 2 extends both with small common-grammar examples.
Automated Phase 1 checks cover JSON/version/metadata failure, the frozen GC4 state/output vectors, byte-identical import behavior, in-memory restore, prepare-before-teardown activation recovery, and byte-identical standalone builds. The existing GC2–GC5 suites still pass when run in-process. Phase 1 is not marked accepted until the built artifact imports both fixtures directly from disk, restores them after a full browser restart, and records the Phase 1 GC6 environment details required by the implementation plan.
Phase 3a and 3b audio subsystem
Format Specification revision 0.4 adds section 14 (pipeline, canonical units, audio graph objects, node-field resolution scope, frequency-ceiling staging, audio reproducibility scope, and the six source and control-source node contracts) and section 15 (nine processing and routing nodes, the component instance node, routing, modulation semantics with an explicit modulatable-property registry, twelve graph legality rules, authoring limits, components, sound definitions and recipes, and buses). A Phase 3a review closed four blocking defects in the draft before Phase 3b began: the node-identity contradiction, the missing graph container shape, the conflated audioMaxFrequency validation stages, and the undocumented sample-hold PRNG child key. Those four, and nine further gaps, are recorded in the Phase 3 evidence file.
Implementation lives in src/runtime/audio-contract.js (declarative tables), src/runtime/audio-graph.js (pure validation, component expansion, legality), and src/runtime/audio-engine.js (deterministic instantiation, Web Audio realization, and the AudioSubsystem runtime owner). Validation never opens an AudioContext, which the test suite asserts directly. tools/validate-exhibit.mjs now delegates its audio checks to the shared module instead of carrying a second implementation. exhibits/minimal-audio.xzbt exercises components, modulation, buses, a shared recipe, and both recipe modes.
npm test runs 62 tests with zero failures. Two clean builds produce byte-identical artifacts with digest 64d9932ed863dbae66f309504b88e19370ad2c9017e92c32bd61ea1ea39a3f17.
At the Phase 3a/3b checkpoint, automation, lifecycle/voices, and measured protection were still future work. The subsequent slice records below supersede that implementation status. PRD 129, real GC4 synchronization, peak/finite-sample capture, and listening observations remain open.
Phase 3c contract (slice 1)
Format Specification section 16 completes the audio subsystem contract. Phase 3c is delivered in four slices, recorded in the implementation plan: the contract (done), lifecycle and voices (done), automation (done), and measured master protection (implementation done; user acceptance pending). Each slice ends green and committable.
Section 16 was contract only at slice 1.
Phase 3c lifecycle and voices (slice 2)
Slice 3c-2 implements the seven-state lifecycle state machine (CREATED, SCHEDULED, ACTIVE, RELEASING, FINISHED, DISPOSED, FAILED) per section 16.3, the engine-owned internal release gain per 16.4, authorable release durations (0ms to 10s) on recipes, determinable one-shot ending bounds calculation per 16.5 (and ERR_INDETERMINATE_ONESHOT validation for unbounded sources), voice ceilings (64 one-shot, 16 continuous) with 4-step eviction order (FINISHED -> RELEASING -> ACTIVE -> refuse) and WARN_VOICE_LIMIT per 16.6, full disposal, and removal of the fixed 4-second dev timer from src/runtime/app.js.
npm test runs 67 tests with zero failures. Two clean builds produce byte-identical artifacts with digest d7d16a89f9b1a9e21262232382d7ae53a0a84abafce191a873327e66dc4103a6.
At the slice-2 checkpoint, slices 3 and 4 remained. No sound had been heard from a production build.
Phase 3c automation (slice 3)
Slice 3c-3 implements section 16.1 graph-local tracks, all three modes and four curves, strict literal time ordering, numeric ValueSpec validation, component expansion/encapsulation, conflict detection, and the 64-track / 256-total-point expanded limits. Procedural values are sampled once in depth-first document order. Native audio-clock scheduling holds curve endpoints, sums modulation before the safety clamp, and propagates exposed component controls. Section 16.2 is integrated into the shared Phase 2 resolver and the application's live bus gains; masked automation advances and override release follows its current value.
npm test passes 88 tests, including 21 new slice-3 tests. The self-contained build is deterministic; the artifact digest is 6aa1b659e1f06ca3175ac62a4544cc3342e8731f6d6f186c68fcd667cf683d97. See the slice-3 evidence for exact coverage, scheduling precision, and the test boundary.
Historical checkpoint: Slice 3 ended with the master chain unchanged. The user subsequently authorized slice 4, recorded below.
Phase 3c master protection (slice 4)
The placeholder compressor is replaced by an embedded AudioWorklet with stereo-linked lookahead limiting, a final sample clamp, and per-instance finite-sample guards. Every bus and master-volume gain precedes final protection. Nonfinite input mutes the complete mixed block and raises one warning per instance; measurement records repeat affected blocks. Initialization fails closed when protection is unavailable, and disposal owns all worklet nodes and ports.
npm test passes 102 tests, including 14 slice-4 tests. Production and acceptance builds are deterministic and self-contained. The protection evidence records coverage and limits. A standalone user-run page provides a frozen overlap workload, exact audio-frame capture, twelve challenge recipes and JSON export; see run instructions.
Acceptance checkpoint: Implementation is ready for user testing. The candidate −1 dBFS ceiling, 0.1 dB tolerance and audible release behavior remain provisional. No production audio has been heard or measured; traces 15–17, PRD 129, reference-exhibit listening and real GC4 synchronization remain open. Phase 3 is not accepted, and later phases have not started.
Phase 4a visual contract (slice 1 of eight)
Format Specification revision 0.5 adds section 17, the first of three Visual subsystem contract
sections. It fixes the visual pipeline and its renderer-neutral scope, canonical units with a single
degrees convention, the visuals container, layers, the scene model and the normalized/viewport/
virtual coordinate spaces with contain/cover/stretch fit, 2.5D depth (sign, sorting, parallax,
perspective factor, and per-object depth fog), the fourteen primitives of Visual Primitive Set 0.1,
common visual properties, the normative transform composition order, appearance with the eight-mode safe
blend set and gradient paint, paths and splines with independently addressable points, text restricted to
the three generic font families, and the once-at-instantiation resolution boundary for visual ValueSpec
fields. Five diagnostic codes were added to the section 7 table.
Phase 4 is delivered in eight slices, recorded in the implementation plan: three contract slices (sections 17, 18, 19), three implementation slices (renderer core, procedural systems, automation and effects), a challenge-and-exhibit slice, and the user-observed early combined GC6 benchmark. Each slice ends green and committable.
Section 17 is contract only. No visual runtime code exists, the JSON Schema has no visual definitions, and nothing has been drawn from any build. The deliberate deferral of live numeric text readouts, and the open question of whether sections 17-19 pass a multi-model review before slice 4d begins, are recorded in the slice-4a evidence.
Phase 4b and 4c visual contract (slices 2 and 3 of eight)
Format Specification revision 0.6 adds section 18: visual components and their construct-scoped inputs,
particle systems with a normative semi-implicit Euler integrator and dt-correct drag, nine placement
distributions with a normative sample order, emitters whose fractional accumulator makes cumulative
emission exactly floor(rate x t), repeaters and the copy-scoped repeat.* namespace, a seventeen-behavior
vocabulary and the internal channel set behaviors may write, six procedural fields with a fully specified
coherent-noise function, and trails, ribbons, and links. Seven diagnostic codes were added.
Revision 0.7 adds section 19 and closes the contract: visual automation in two declaration scopes with
repeat and ping-pong loop modes, the persistent and spawned system lifecycle with its own six-state
machine and refuse-rather-than-evict spawn ceiling, the normative camera matrix and both projection modes,
a seven-effect post-processing chain with a stated approximation boundary, and the centralized runtime
ceilings for the whole engine. Two diagnostic codes were added, and the section 8.1 target-capability table
gained exactly four visual rows — camera fields, layer opacity, system visibility, and post-effect
parameters. No per-object visual property is externally addressable in 0.1.
Section 19.5 is now the single centralized ceiling table PRD 120 requires: it restates every ceiling first fixed in sections 10 and 14 through 18 alongside the aggregate visual ceilings, and separates authoring bounds, which reject an exhibit at import, from runtime ceilings, which shed work by a documented deterministic rule and keep the exhibit running. Every aggregate value there is provisional in the same sense the master-protection values of 16.7 are: the shape is normative, the numbers are confirmed or replaced by the slice 4h GC6 measurement.
The visual contract now contains no unresolved forward reference, and npm test still passes 102 tests
with zero failures — all three slices are documentation-only. src/runtime has no renderer module, the
JSON Schema has no visual definitions, and nothing has been drawn from any build. Whether sections 17-19
pass a multi-model review before slice 4d begins remains the one open decision, and 4d is the next slice.
Phase 4e–4g implementation
Final verification: 223 checks pass, including 109 Phase 4 tests. Both standalone builds are deterministic; see the 4f evidence for exact test execution and artifact hashes.
The procedural runtime advances graphic, component, emitter and repeater object behaviors on logical ticks, including point motion and morph geometry. System-local automation updates the render inputs; exhibit automation uses the shared resolution pipeline for public visual targets. Spawned instances have bounded ownership, release, disposal and atomic refusal. Seven post-effects execute on frame pixels; aggregate ceilings remain provisional pending measurement.
All fourteen PRD 130 challenge fixtures and first visual compositions for Exhibits A–D are authored data. The standalone visual review page supplies reproducible test signals and observation export. Automated checks establish execution and deterministic decisions, not visual quality, live audio acceptance, full reference-exhibit completion, or the 4h benchmark. Earlier contract-only checkpoints below remain historical evidence.
Phase 5 events and cadence
Final verification: 229 checks pass, including 14 Phase 5 tests. Both standalone builds are deterministic; the production artifact hash is f3f634d7d33b2f8a57cae541fc31b4dcedce88b2ee2648093f92a2cfc168d718. See the Phase 5 evidence for detailed trace coverage and implementation details.
Format Specification revision 0.9 adds Section 20, completing the Cadence and Event subsystems contract with 14 acceptance traces. The JSON Schema and semantic validator enforce DAG event cycle detection (ERR_CYCLIC_DEPENDENCY), cadence clock range ordering (ERR_INVALID_RANGE_ORDER), and sound cadence metadata. The Action Model enforces the 1024-unit/tick dispatch budget (ERR_DISPATCH_BUDGET), 16-level event nesting depth limit, event parameter scoping and strict type validation (ERR_TYPE_MISMATCH, ERR_UNKNOWN_FIELD), and sound usage gating (ERR_UNSUPPORTED_TARGET). The CadenceSubsystem schedules four class clocks (routine, intermittent, occasional, rare), enforces the 1.5s minimum gap with class priority ordering, applies anti-repetition recency multipliers ([0.0, 0.25, 0.50, 0.75]) with pool relaxation on deadlock, maintains continuous ambient voices, and runs on an isolated PRNG stream (cadence domain). Exhibits A–D include complete audio buses, sound recipes, cadence clocks, and lifecycle events.
Phase 6 scenario director
Format Specification revision 0.10, section 21, completes scenario shapes and semantics. The runtime executes all seven triggers, eligibility/cooldown, symmetric exclusivity, priority replacement/deferred ordering, absolute and random relative timing, lazy finite repeats, weighted branches, and bounded owner cleanup through production fixed ticks. Audio lifecycle disposal follows logical time when attached to a performance. Nested events preserve owner/usage/stream; both override scopes release on termination.
Twenty-one new tests include all GC5 trace categories with production resources, 24 repeated completion/cancellation/failure cycles, and two matching forty-minute Exhibit E runs. The full suite passes 252 checks. A/B now include audio/cadence and temporary activity overrides. The source fixture generator preserves these additions when rebuilding the visual acceptance page.
The self-contained scenario challenge/soak page includes a frozen v1 workload, runtime/workload hashes, frame distributions, counters, memory samples when available and exact worklet output capture. Localhost browser smoke checks establish interactive execution, not direct-file or hardware acceptance. The two-hour real-duration development soak has not been run; Phase 6 remains at that acceptance boundary. See evidence.