docs: record the phase 6 scenario evidence and status

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
This commit is contained in:
2026-09-06 22:54:40 +00:00
co-authored by Claude Opus 5
parent 1cde2f9f68
commit f60b3b6442
6 changed files with 181 additions and 8 deletions
+14 -4
View File
@@ -9,10 +9,10 @@ XZBT is a self-contained browser runtime for declarative procedural audiovisual
| Resource | Purpose | Status |
| --- | --- | --- |
| [MVP Product Requirements Document](XZBT_0-1_MVP_Product_Requirements_Document.md) | Product scope, user behavior, delivery requirements, and release acceptance | Document revision 0.3; format version remains 0.1 |
| [Format Specification 0.1](docs/XZBT_0-1_Format_Specification.md) | Runtime semantics, contract inventory, and required authoring examples | Document revision 0.4; Phase 0 shared contracts and the complete Phase 3a-3c audio subsystem contract, remaining subsystem contracts in dependency order |
| [Format Specification 0.1](docs/XZBT_0-1_Format_Specification.md) | Runtime semantics, contract inventory, and required authoring examples | Document revision 0.10; audio, visual, cadence/event, and scenario contracts complete |
| [Gap Closure Decisions](docs/XZBT_0-1_Gap_Closure_Decisions.md) | Decisions and rationale for the seven pre-implementation gaps | Record revision 0.3; GC1GC5 Phase 0 evidence complete |
| [Verification Gates](docs/XZBT_0-1_Verification_Gates.md) | Evidence required before architecture commitment, subsystem work, and release | Phase 0 complete; later subsystem, GC6, and GC7 checks scheduled |
| [Implementation status](docs/IMPLEMENTATION_STATUS.md) | Current phase, stop reason, saved work, and resume prerequisites | Implemented through Phase 3c slice 3; stopped before slice 4. Phase 1 direct-file and Phase 3 audible observations pending |
| [Implementation status](docs/IMPLEMENTATION_STATUS.md) | Current phase, stop reason, saved work, and resume prerequisites | Implemented through Phase 6; real-duration soak, direct-file and hardware/listening gates pending |
| [Implementation plan](docs/XZBT_0-1_Implementation_Plan.md) | Sequenced phases, completion/challenge mapping, and GC6/GC7 verification schedule | Phase 19 plan recorded |
The PRD is authoritative for product requirements. The format specification is authoritative for runtime semantics where a contract is explicitly defined. The decision record explains those choices; the verification gates define how to check them. These documents must be updated together when a decision changes. An unresolved conflict is a specification defect, not permission for an implementation to choose silently.
@@ -21,7 +21,17 @@ The earlier ChatGPT discussion, **Discuss Application Vision** (conversation `6a
## Planning entry point
Phase 0 is complete, and the production runtime is implemented through Phase 3c slice 4 (master protection), with 102 automated tests passing. Slice 4's hardware measurement and listening acceptance remain pending; the [standalone audio acceptance page](prototypes/phase3/XZBT-audio-acceptance.html) and [run instructions](prototypes/phase3/README.md) are ready for user testing. The Phase 1 direct-file two-fixture restart and Phase 3 audible acceptance remain open — no sound has been heard from a production build. Combined workload measurements and release soak tests remain later explicit gates.
The production runtime is implemented through Phase 6, with 252 automated checks passing.
Scenarios support seven trigger types, relative/random timing, finite repeats, branching,
priority/concurrency, nested-event ownership, bounded cleanup, and development acceleration.
Exhibit E runs for forty logical minutes; A/B expose temporary scenario overrides. Open
`XZBT.html`, import the exhibits, then use the scenario Start/Cancel controls.
Run `npm run test:phase6` for scenario tests and `npm run build:scenario-acceptance` for the
[standalone scenario/soak page](prototypes/phase6/XZBT-scenario-acceptance.html).
[Instructions](prototypes/phase6/README.md) explain the real two-hour development soak,
which remains pending. Earlier direct-file restart, audio listening/protection, and
Phase 4h hardware gates also remain open; accelerated tests do not close them.
The full PRD completion criteria remain the 0.1 release target. Early integrated demonstrations are milestones, not completed MVPs. Reference exhibits develop alongside the engine; Phase 9 completes and audits the suite.
@@ -35,7 +45,7 @@ Copy `.env.example` to `.env` for local repository configuration. `.env` and its
The repository's existing [LICENSE](LICENSE) is preserved.
## Phase 12 runtime
## Runtime build and verification
Build the standalone, dependency-free runtime with the pinned Node version in `.nvmrc`:
+11 -3
View File
@@ -1,10 +1,10 @@
# XZBT implementation status
**Updated:** September 6, 2026
**State:** Phase 3 audio engine implemented through slice 3c-4 and automatically verified; Phase 4 visual implementation is complete through 4g, with automated verification and a standalone visual challenge page; Phase 5 Events and Cadence implemented and verified across all 14 traces and reference exhibits AD. The Phase 4d4g and Phase 5 review triages ([reviews/02-triage.md](../reviews/02-triage.md), [reviews/03-phase5-triage.md](../reviews/03-phase5-triage.md)) have been worked through: every Tier-1 finding is fixed and covered by a test on the production code path, and the residual items are tracked in [reviews/04-followup-debt.md](../reviews/04-followup-debt.md). Slices 3c-4/4h hardware measurement/listening acceptance and Phase 1 direct-file import/restart observation remain pending; Phase 6 (scenario director) is unblocked
**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; scenario director, final generated-UI, measured performance, and soak work remain assigned to later phases.
**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](evidence/phase0/2026-09-04-user-run-v3.md) verifies embedded data-URL worklet loading in direct-file Chrome. The subsequent [user-performed restart test](evidence/phase0/2026-09-04-user-restart.md) 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](evidence/phase0/2026-09-05-user-directory-fallback.md) have been confirmed.
@@ -16,7 +16,7 @@ The user requested sequential implementation with a stop on problems. The [manua
| 3 — Audio engine | Slices 3c-13 complete; 3c-4 implementation verified, user acceptance pending | [Contract](evidence/phase3/2026-09-05-phase3c-contract.md), [lifecycle/voices](evidence/phase3/2026-09-05-phase3c-lifecycle-voices.md), [automation](evidence/phase3/2026-09-05-phase3c-automation.md), and [protection evidence](evidence/phase3/2026-09-05-phase3c-protection.md). 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](evidence/phase4/2026-09-06-phase4e-procedural.md), [4f execution evidence](evidence/phase4/2026-09-06-phase4f-execution.md), [4g fixtures](evidence/phase4/2026-09-06-phase4g-challenges.md). Fourteen challenge fixtures and first visuals for AD execute without subject-specific renderer code. Slice 4h and PRD 130 display judgment remain open. |
| 5 — Events and cadence | Complete | [Automated evidence](evidence/phase5/2026-09-06-phase5-events-cadence.md) 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 | Not started | Earlier phases and scenario contracts |
| 6 — Scenario director | Implemented; real-duration soak pending | [Phase 6 evidence](evidence/phase6/2026-09-06-scenario-director.md), 21 scenario tests, reproducible forty-minute Exhibit E, production GC5 counters; [acceptance instructions](../prototypes/phase6/README.md). |
| 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 |
@@ -157,3 +157,11 @@ Final verification: **229 checks pass**, including **14 Phase 5 tests**. Both st
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 AD 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](evidence/phase6/2026-09-06-scenario-director.md).
+9
View File
@@ -4,6 +4,15 @@
**Status:** Phase 0 GC1GC5 decisions and shared contract evidence complete; GC6/GC7 implementation evidence remains scheduled\
**Related resources:** [PRD](../XZBT_0-1_MVP_Product_Requirements_Document.md), [format specification](XZBT_0-1_Format_Specification.md), [verification gates](XZBT_0-1_Verification_Gates.md)
**Phase 6 implementation checkpoint (September 6, 2026):** Format Specification section
21 completes the previously deferred scenario trigger/timeline shapes while preserving
GC5 hook ordering, ownership, deferred expiry and bounded cleanup. One active instance
per definition, symmetric exclusivity, cooldown from termination, dependency-resolved
first timestamps and one lazy record per repeated entry make admission and finite
execution explicit. Scenario streams are isolated per definition/instance. Production
GC5 and accelerated Exhibit E evidence is [recorded here](evidence/phase6/2026-09-06-scenario-director.md).
The real two-hour development soak and earlier hardware/listening gates remain pending.
Numbering preserves the seven gaps discussed during PRD preparation. Recording a decision closes a design question; it does not establish that a browser feature, performance target, or lifecycle guarantee has passed testing.
| Gap | Primary PRD placement | Supporting verification |
+1 -1
View File
@@ -13,7 +13,7 @@
| Phase 3 — Audio engine | 3460, 118120, 129, 137 | Complete audio subsystem contract, graph compiler/nodes/components/buses, lifecycle, automation, protection, unlock mapping, and voice limits. Run audio challenge and real GC4 synchronization checks. Begin reference Exhibits A/B audio. Delivered in three installments: **3a** sources and control sources (PRD 3642), **3b** processing, routing, modulation, graph legality, authoring limits, components, sounds/recipes, and buses (PRD 4353, 55, 56, 59, 60), **3c** automation precedence, lifecycle, unlock behavior, voice ceilings, and master protection (PRD 54, 57, 58, 118120). |
| Phase 4 — Visual engine | 6989, 119120, 130, 138 | Complete visual subsystem contract and generic renderer features. Run visual challenge. Begin reference Exhibits AD visuals, then execute the early combined GC6 benchmark before fixing later optimization strategy. |
| Phase 5 — Events and cadence | 6168, 9091, 139 | Complete cadence/event shapes, selection/cooldown/overlap/anti-repetition, and event dispatch. Re-run dispatch budget and manual-stream isolation against production code. Integrate automatic behavior in Exhibits AD. |
| Phase 6 — Scenario director | 92102, 131, 140 | Complete trigger/timeline shapes; implement eligibility, branching, priority, concurrency, ownership, cleanup, and accelerated time. Re-run all GC5 traces with real resource counters. Build Exhibit E and temporary overrides in A/B. Run the two-hour development soak. |
| Phase 6 — Scenario director | 92102, 131, 140 | Implemented and automatically verified: section 21 contract, director, production GC5 resource traces, forty-minute Exhibit E, A/B temporary overrides, and standalone acceptance/soak page. **Two-hour real-duration GC6 soak remains pending.** See [Phase 6 evidence](evidence/phase6/2026-09-06-scenario-director.md). |
| Phase 7 — Dynamic UI | 103107, 117118, 123, 141 | Complete UI contract; generated controls, soundboard, master volume, pause/resume, accessibility. Verify five distinct generated surfaces and SAMPLE isolation. |
| Phase 8 — Library/persistence hardening | 108116, 121127, 132133, 142 | Directory/multi-file/drop import, refresh, update reconciliation, handles, transactions, recovery, and diagnostics. Execute every GC7 library failure and replacement test. |
| Phase 9 — Reference completion/audit | 128133, 143145 | Complete all five exhibits, all three challenge suites, direct/offline artifact audit, fixed benchmark, resource/leak cycles, and eight-hour release soak. Audit every MVP completion criterion before declaring 0.1 complete. |
+14
View File
@@ -122,4 +122,18 @@ Subsystem-specific format details can be completed in dependency order as planne
## Evidence record template
### Phase 6 checkpoint — September 6, 2026
The production scenario director now re-runs the GC5 ownership, failure/hook, condition,
deferred-order/expiry, dispatch-budget and repeated-cleanup cases with real runtime
voice pools, visual instances, overrides and scheduler records. The native audio API is
doubled in automated tests; the production graph/lifecycle code executes. Forty-minute
Exhibit E traces are reproducible using accelerated fixed ticks. Evidence is in
[the Phase 6 record](evidence/phase6/2026-09-06-scenario-director.md).
The self-contained [acceptance page](../prototypes/phase6/XZBT-scenario-acceptance.html)
and versioned [development workload](../prototypes/phase6/workload-v1.xzbt) are ready.
No two-hour real-time soak, retained-memory plateau, audio listening result, or Phase 4h
hardware benchmark is claimed by this checkpoint. Those GC6 checkboxes stay open.
For each result, record gate/check ID, date, specification revision, implementation revision or artifact hash, environment, fixture/seed, procedure, expected result, actual result, pass/fail/not-applicable status, linked logs or measurements, and unresolved limitations. A not-applicable result requires a reason. Do not prefill results from intended behavior.
@@ -0,0 +1,132 @@
# Phase 6: Scenario Director Acceptance Evidence
**Date:** September 6, 2026
**Status:** Implementation and automated acceptance complete; real-duration two-hour development soak and hardware/listening gates pending
**Specification References:** PRD 92102 (Scenario Model 0.1), 131 (Scenario Acceptance Challenge), 140 (Development Phase 6: Scenario Director); Format Specification Revision 0.10, Section 21 ("Scenario Model 0.1")
---
## 1. Executive Summary
Phase 6 completes the Scenario Director and Scenario Model 0.1 of XZBT, delivering:
1. **Contract & Schema:** Complete Section 21 normative contract in the Format Specification and authoritative JSON Schema definitions in `schema/xzbt-0.1.schema.json` for `ScenarioDefinition`, `ScenarioTrigger`, `TimelineEntry`, `ConcurrencySpec`, `EligibilitySpec`, and `ScenarioControlAction`.
2. **Static & Semantic Validation:** Implemented in `src/runtime/scenario-validation.js`, integrated with `src/runtime/validator.js` and standalone CLI `tools/validate-exhibit.mjs`. Enforces authoring bounds (at most 64 definitions, 1024 entries per definition, 1024 repeat occurrences), identifier patterns, non-negative literal durations, trigger parameters, cycle detection on anchor dependencies (`after`), termination hook action restrictions (`set` and non-persistent one-shot `sound` only; `ERR_UNSUPPORTED_TARGET`), and scenario control actions (`start`, `stop`, `enable`, `disable`).
3. **Runtime Scenario Director Subsystem:** Implemented in `src/runtime/scenario.js` and integrated with `src/runtime/performance.js`, `src/runtime/actions.js`, `src/runtime/audio-engine.js`, `src/runtime/resolution.js`, and `src/runtime/app.js`:
- **Seven Trigger Types:** `manual`, `once`, `interval`, `random-interval`, `probability`, `condition` (with startup hold disarming, hold interruption, and false-tick rearming per GC5), and `event`.
- **Admission & Concurrency:** Symmetric exclusivity (`scope: 'global' | 'group'`), replacement policy (`replace` requiring strictly higher priority), deferred queues (`policy: 'defer'`) with single-request deduplication and 5-minute logical timeout, and capacity limits (at most 16 active instances, at most 1 active instance per definition).
- **Timeline Scheduling:** Absolute (`at`) and relative (`after` + `delay`) timestamps, anchor dependency resolution, deterministic tie-breaking, lazy finite repeats (`repeat.count` up to 1024, `repeat.every`), and weighted branching (`choose`) with conditional filtering and per-instance PRNG stream isolation (`scenario / <id>:<ordinal>`).
- **Ownership & Bounded Cleanup:** `scenario`, `persistent`, and `performance` ownership. Resource tracking across real voice pools, visual instances, and parameter/bus duration overrides. On termination, future timeline entries are removed, termination hooks run, active resources transfer to bounded cleanup owners (capped at 5000ms), and visual instances honor originating scenario relations.
- **Logical Clock Synchronization & Pre-unlock Intents:** Shared logical time, pause/resume reasons (`user`, `visibility`), and retention of up to 16 pre-unlock continuous sound intents started by scenarios.
- **Accelerated Development Time:** `advanceTicks()` executing production fixed ticks without wall-clock delay or native audio overhead.
4. **Content Integration:** Authored exhibits:
- `exhibits/exhibit-e.xzbt`: Exhibit E — Long Passage, a forty-minute procedural scenario with approach, repeated signals, branching disturbance, and recovery.
- `exhibits/scenario-challenge.xzbt`: Scenario Challenge fixture covering 5-second, 3-minute, condition hold, event trigger, exclusive group, and deferred queue cases.
- `exhibits/exhibit-a.xzbt` & `exhibits/exhibit-b.xzbt`: Augmented with temporary scenario overrides (`withTemporaryScenario()`).
- `prototypes/phase6/workload-v1.xzbt`: Frozen workload for development soak testing (seed 4206).
5. **Acceptance & Soak Tooling:** `prototypes/phase6/XZBT-scenario-acceptance.html`, `prototypes/phase6/acceptance.js`, and `prototypes/phase6/README.md` providing standalone, zero-dependency browser testing with live controls, 40-minute accelerated advancement, and two-hour real-time soak data collection with exact Web Audio frame capture.
6. **Verification:** All 15 acceptance traces of Section 21.6 verified in `test/phase6-scenarios.test.mjs` (traces 114 automated; trace 15 tooling and workload delivered). The full repository test suite passes **252 checks with 0 failures**. Independent builds of `XZBT.html` and `XZBT-scenario-acceptance.html` produce deterministic, byte-identical SHA-256 digests.
---
## 2. Test Execution and Acceptance Traces
The 15 acceptance traces defined in Section 21.6 of the Format Specification:
| Trace | Title | Verification Target | Status |
|---|---|---|---|
| **Trace 1** | Duration Endpoints | Five-second and multi-minute duration endpoints; boundary beats at the exact endpoint execute before completion; empty undurated scenarios complete in their start tick. | PASS |
| **Trace 2** | Relative Timing & Repeats | Absolute/relative ties maintain definition and entry document order; forward relative references (`after`) resolve correctly; repeat intervals stay lazy without expanding upfront. | PASS |
| **Trace 3** | Weighted Branching | Weighted choices exclude false condition and zero-weight branches; preserves per-instance PRNG streams; manual SAMPLE evaluations do not alter decisions. | PASS |
| **Trace 4** | Trigger Types | Verifies `once`, `interval`, `probability`, `random-interval`, `manual`, and `event` triggers fire at expected timestamps. | PASS |
| **Trace 5** | Condition Trigger (GC5) | Startup-true condition disarming (must observe a false tick first), hold timer cancellation on interruption, and false-tick rearming. | PASS |
| **Trace 6** | Deferred Queue (GC5) | Deduplication preserves original expiry timestamp and input scope; rechecks eligibility and cooldown on admission; 5-minute timeout expiry. | PASS |
| **Trace 7** | Exclusivity & Concurrency | Symmetric global/group exclusivity; parallel starts; higher-priority replacement cancels victim; active capacity defers atomically. | PASS |
| **Trace 8** | Nested Event Ownership (GC5) | Resources created through nested events inherit the scenario owner; exercises real voice pools, visual instances, and duration overrides. | PASS |
| **Trace 9** | Lifecycle Cleanup (GC5) | Completion, cancellation, critical startup failure, and action failure preserve prior `set` mutations, run cancel hooks, and continue past hook failure. | PASS |
| **Trace 10** | Duration Override Release (GC5) | Scenario termination bounds duration override release to 5s max; masked user edits remain stored and restore on release. | PASS |
| **Trace 11** | Termination Hook Budget (GC5) | Ordinary dispatch budget exhaustion ($1024$ units) cannot be softened and preserves the independent 256-action termination hook budget. | PASS |
| **Trace 12** | Repeated Cycle Baseline (GC5) | 24 repeated completion, cancellation, and failure cycles return all production counters and native allocations to exact baseline. | PASS |
| **Trace 13** | Accelerated Exhibit E | Forty logical minutes run through production fixed ticks; two runs with equal seeds produce byte-identical decision traces. | PASS |
| **Trace 14** | Pause/Resume & Disposal | User and visibility pause reasons preserve logical time; disposal clears active ownership and removes all subscriptions. | PASS |
| **Trace 15** | Two-Hour Development Soak | Frozen combined workload (`workload-v1.xzbt`, seed 4206) in standalone acceptance runner. Physical run requires real hardware and listening. | Tooling Ready (User Gate) |
### Test Suite Execution Output
```
> node test/phase6-scenarios.test.mjs
✔ 21.6.1 duration boundary beats run before completion, empty finite timelines complete (55.9253ms)
✔ 21.6.2 absolute/forward-relative ties keep document order and repeats stay lazy (1.6336ms)
✔ 21.6.3 weighted choices exclude false/zero branches and preserve per-instance randomness (2.4319ms)
✔ 21.6.4 once, interval, probability, random interval, event and manual opportunities (1.6158ms)
✔ GC5 condition startup disarming, interrupted hold and false-tick rearming (1.1711ms)
✔ GC5 deferred deduplication preserves expiry and rechecks eligibility and cooldown (0.4421ms)
✔ 21.6.7 group/global exclusivity is symmetric; replacement is strict and deferred order stable (0.6647ms)
✔ 21.6.7 active capacity defers atomically and admits after cancellation (0.8045ms)
✔ GC5 nested ownership uses real voice pools, visual instances and duration overrides with bounded cleanup (19.3919ms)
✔ GC5 critical startup/ordinary failures preserve set, run cancel hook, continue past hook failures (0.6007ms)
✔ GC5 dispatch exhaustion cannot be softened and reserves termination hook budget (7.7733ms)
✔ GC5 repeated completion/cancellation/failure cycles return production counters and native allocations to baseline (140.7785ms)
✔ 21.6.14 pause reasons and direct disposal clear active ownership before resource teardown (0.7258ms)
✔ continuous pre-unlock intentions disappear with their owner and never replay one-shots (0.3824ms)
✔ scenario control stop blocks remaining ordinary actions for the terminated owner (0.2923ms)
✔ scenario contract rejects malformed shapes, dangling anchors, feedback and unsupported hooks in both validators (3.2885ms)
✔ 21.6.13 Exhibit E completes forty logical minutes through production fixed ticks reproducibly (8429.4419ms)
✔ signals.scenario.active is visible to onStart and termination hooks in the same tick (0.3851ms)
✔ a persistent sound and a detached persistent visual survive their originating scenario (6.5028ms)
✔ production audio releases obey paused logical time and dispose after the bounded release (5.2905ms)
✔ scenario acceptance build is reproducible and embeds only valid declarative fixtures (20.2825ms)
tests 21
suites 0
pass 21
fail 0
cancelled 0
skipped 0
todo 0
duration_ms 8706.5378
```
Full repository regression (`npm test`): **252 tests pass, 0 fail**.
---
## 3. Content and Exhibit Validation
All exhibits and challenge fixtures validate with 0 errors via `tools/validate-exhibit.mjs`:
```
> node tools/validate-exhibit.mjs exhibits/exhibit-e.xzbt exhibits/scenario-challenge.xzbt exhibits/exhibit-a.xzbt exhibits/exhibit-b.xzbt exhibits/exhibit-c.xzbt exhibits/exhibit-d.xzbt prototypes/phase6/workload-v1.xzbt
[PASS] exhibits/exhibit-e.xzbt (0 errors)
[PASS] exhibits/scenario-challenge.xzbt (0 errors)
[PASS] exhibits/exhibit-a.xzbt (0 errors)
[PASS] exhibits/exhibit-b.xzbt (0 errors)
[PASS] exhibits/exhibit-c.xzbt (0 errors)
[PASS] exhibits/exhibit-d.xzbt (0 errors)
[PASS] prototypes/phase6/workload-v1.xzbt (0 errors)
```
- **Exhibit E (`exhibits/exhibit-e.xzbt`):** Forty-minute journey with 12 repeated signal beats, branching disturbance/drift overrides, continuous drone sound, visual spawned rotating rings, cadence interaction, and clean recovery.
- **Scenario Challenge (`exhibits/scenario-challenge.xzbt`):** Six scenarios demonstrating 5-second, 3-minute, condition hold, event trigger, exclusive group, and deferred queue policies.
- **Exhibits A & B (`exhibits/exhibit-a.xzbt`, `exhibits/exhibit-b.xzbt`):** Augmented with temporary `disturbance` scenario override driving activity, cadence intensity, and continuous resonance sound.
- **Soak Workload (`prototypes/phase6/workload-v1.xzbt`):** Combines forty-minute journey with 5-second resource cycles every 20 seconds under seed 4206.
---
## 4. Deterministic Build Digest
Rebuilding runtime and acceptance artifacts via `tools/build-xzbt.mjs` and `tools/build-scenario-acceptance.mjs`:
| Artifact | File Size | SHA-256 Digest | Determinism |
|---|---|---|---|
| `XZBT.html` | 544,151 bytes | `8c34cf53cd9252fe5de7376a0af00d906c28f5a656ce89071311cc791fb1a1ef` | Byte-identical across clean builds |
| `prototypes/phase6/XZBT-scenario-acceptance.html` | 534,145 bytes | `9ffe5712b0848f0507c41db44638624b97729ae7feb7bc37923fae400938e94e` | Byte-identical across clean builds |
| `prototypes/phase4/XZBT-visual-acceptance.html` | 542,481 bytes | `6700c26b71b64de4ed719aead76ffa07c330109d3a707428d09c6d4042956d9a` | Byte-identical across clean builds |
---
## 5. Verification Boundaries and Open Gates
1. **Automated Acceptance:** Closed. All 14 programmatic acceptance traces, validation rules, budget constraints, baseline recoveries, and the accelerated 40-minute Exhibit E pass automated verification.
2. **Two-Hour Development Soak (GC6):** Open. The standalone runner `prototypes/phase6/XZBT-scenario-acceptance.html` and frozen workload `workload-v1.xzbt` are delivered and verified. In accordance with the project testing boundary, running the 7200-second continuous soak and recording audio listening observations/frame histograms requires a physical reference system (1920 × 1080) and user observation.
3. **Earlier User-Observed Gates:** Direct-file restart (Phase 1), audible listening/protection acceptance (Phase 3), and Phase 4h hardware benchmark remain open at their scheduled gates.