Files
XZBT/docs/XZBT_0-1_Verification_Gates.md
T

13 KiB

XZBT 0.1 Verification Gates

Status: Phase 0 awaiting remaining manual checks; worklet loading and user-performed restart persistence passed; GC1 incomplete Related resources: PRD, decisions, format specification

A separate Phase 0 probe has been created and its JavaScript/JSON syntax checked. The agent's direct-file navigation was blocked by browser tool policy; see the attempt record. The user's manual run reports successful import, saves, and context unlock, but worklet loading failed. Version 2 separates the tests and records better diagnostics; its two stubbed regression tests pass, not its browser gate. GC1, benchmark, and soak acceptance remain incomplete. Mark a check complete only with linked evidence; a partial result does not pass a compound acceptance check.

The second user run confirmed cache restoration between page loads, a heard tone, and audio suspend/resume, but Blob worklet loading failed. The version 3 user run verified the embedded-data-URL fix. The subsequent manual restart test, supplied after the explicit full-exit procedure, restored edited activity and volume with zero new saves. The directory-permission/unavailability fallback observation remains pending.

Phase 0 and later gates

Drafting the implementation plan may proceed now. Before committing the deployment architecture, pass GC1. Before implementing shared runtime semantics, complete the shared portions of GC2 and GC3-GC5 contracts and their expected traces. Early GC6 measurements inform expensive subsystem design. Full conformance and real-duration soak results remain release requirements.

Subsystem-specific format details can be completed in dependency order as planned tasks. Do not require the finished engine or eight-hour soak before creating the plan.

Gap Decision Evidence status Gate placement
GC1 Recorded Data-URL worklet load and user-performed restart/settings restoration passed; remaining manual checks pending Phase 0, before deployment architecture commitment
GC2 Recorded; format draft partial Contracts and fixtures incomplete Shared contracts in Phase 0; subsystem contracts before their implementation
GC3 Recorded; transition details open Traces and tests pending Shared resolver contract before Phase 2; tests with implementation
GC4 Recorded; audio mapping details open Prototype and tests pending Clock contract in Phase 0; synchronization tests in audio integration
GC5 Recorded; hook/queue details open Traces and tests pending Ownership contract before actions/audio; full tests with scenarios
GC6 Recorded; thresholds provisional Reference setup and benchmark absent Early combined-load prototype; development and release acceptance
GC7 Recorded Plan/build/library checks pending Milestone planning, then library/build integration

1. GC1: Direct-file feasibility

  • Record OS, browser version/profile, launch path, and storage mode. The preceding environment records and regular-Chrome confirmation establish Windows, Chrome 152, direct-file launch, and IndexedDB in a regular non-Incognito profile.
  • Open the artifact directly from disk with network unavailable. The follow-up capture and user confirmation verify restoration, tone, and worklet with browser-scoped Offline mode enabled. The changed mobile user agent on Win32 does not establish physical Android support.
  • Import two exhibits with the ordinary file picker and activate each. The user confirmed ordinary import and selection of both fixtures worked.
  • Save exhibit definitions, per-exhibit parameters, selection, and master volume to IndexedDB. See the version 1 saves and subsequent restored snapshots, including edited values in the restart record.
  • Close the browser fully, reopen the same HTML, and restore the cached library and settings without selecting source files again. Passed as user-performed evidence following the explicit full-exit procedure; see the restart record for provenance and limits.
  • Verify user-initiated audio unlock and resumed playback. Native tone heard in versions 2/3; AudioContext suspend/resume states observed in version 2. This is not full audio-engine conformance.
  • If needed by the audio design, load engine-owned AudioWorklet code from the single-file artifact. Verified with the data-URL module in the version 3 user run.
  • Test renamed and moved HTML files; record observed storage behavior and the support boundary. The user confirmed restoration from both copies; see file-location evidence and limits.
  • Test unavailable/failed storage; session playback works and the UI explains lack of persistence. Injected-failure evidence confirms settings changes, import, and heard native playback remain operational with zero successful writes; the user subsequently confirmed the visible session-only warning. Passed using application fault injection, not real browser permission denial.
  • Test directory import/remembered handles where available and ordinary-picker fallback where unavailable or permission is denied. Directory import completed in the injected-failure run and ordinary import/activation passed separately. Actual denial/unavailability fallback remains unverified. Remembered handles are optional and not implemented in this probe; verification is required if implemented in the runtime.

Evidence: prototype artifact, reproducible steps, environment record, observed results. If ordinary-mode persistence fails, reopen decision 1 before dependent architecture commitment.

2. GC2: Format contract completeness

  • Complete shared document, type, reference, ValueSpec, ConditionSpec, time, and ownership contracts.
  • Fill the format-specification contract register in subsystem dependency order.
  • Implement an internal structural schema plus separate semantic validation.
  • Provide complete valid and invalid fixtures with expected diagnostics.
  • Reject unsupported versions, unknown behavior fields, invalid reference types, recursive components, illegal graph cycles, and excessive resources.
  • Produce two contrasting complete audiovisual exhibits early; expand toward all PRD challenge cases.
  • Reconcile prior conversation proposals into the local documents; resolve conflicts explicitly.

Evidence: versioned specification/schema/fixtures and validation results. Naming a node or behavior does not close its contract.

3. GC3: Resolution semantics

  • Record exact target capabilities, override defaults, smoothing, and interrupted transition rules.
  • Define expected traces for a bound bus gain receiving a direct override.
  • Define expected traces for a parameter override feeding a binding.
  • Verify stored user edits during masking and release toward the updated lower value.
  • Verify priority ties and competing duration/scenario overrides.
  • Verify automation continues while masked and permitted modulation applies after an override.
  • Verify numeric clamps and unsupported target/stage diagnostics.
  • Reject conflicting bindings and dependency cycles without introducing undocumented delays.

Evidence: contract examples and deterministic resolver tests when implemented.

4. GC4: Time and reproducibility

  • Define logical tick ordering, maximum work per turn, long-stall behavior, audio lookahead, and audio unlock alignment.
  • Define PRNG algorithm, seed normalization, and stream derivation for the runtime version.
  • Compare simulation traces at different render frequencies using the same logical inputs.
  • Hide/restore the document and explicitly pause/resume; no missed wall-clock work is replayed.
  • Verify visibility restoration does not undo an explicit pause.
  • Verify audio suspends/resumes consistently and expired pre-unlock one-shots are not replayed.
  • Verify manual SAMPLE does not perturb cadence/scenario random streams.
  • Use deterministic signal fixtures for audio-reactive decision tests.
  • Distinguish accelerated logical tests from real-time audio behavior and soak tests.

Evidence: clock/PRNG contract, logical traces, and browser/audio observations. No cross-device pixel or waveform equality claim is required.

5. GC5: Ownership and failure

  • Define hook ordering, allowed hook actions, failure propagation, cleanup deadlines, deferred expiry/order, and dispatch-budget behavior.
  • Start resources through nested events and confirm inherited scenario ownership.
  • Verify duration overrides terminate with their owner and bounded releases eventually dispose.
  • Verify persistent state mutations survive a later critical failure.
  • Inject failures into startup, ordinary actions, and termination hooks; cleanup still completes.
  • Verify condition triggers require a false condition before rearming.
  • Verify at most one pending deferred request per definition, expiry, and eligibility recheck.
  • Exercise event/scenario feedback and show bounded dispatch with diagnostics.
  • Repeat completion/cancellation/failure cycles; counters return to baseline after releases finish.

Evidence: lifecycle traces, resource-count samples, and failure-injection results.

6. GC6: Performance and audio acceptance

  • Record CPU/GPU/RAM, OS, browser version, 1920 x 1080 viewport, device-pixel ratio, sample rate, and relevant power settings.
  • Fix benchmark exhibit/version/seed and counts for particles, links, trails, effect passes, audio nodes, and concurrent voices.
  • Prototype combined visual/audio load early and record supported limits.
  • Define warm-up duration, measurement window, frame interval sampling, and retained-memory sampling method before collecting acceptance data.
  • Check the provisional p95 frame interval threshold of less than 33.3 ms and report progress toward the 60 FPS target.
  • Record active resource baselines and verify expected return after repeated lifecycle operations.
  • Specify and test digital output peak ceiling, numerical tolerance, finite samples, release behavior, and unavoidable master routing.
  • Stress overlapping recipes and listen for clicks, clipping, and objectionable release artifacts.
  • Run a two-hour development soak and an eight-hour release soak; record retained-memory trends, resource counts, frame intervals, audio glitches, and scheduler growth.

Evidence: fixed workload, environment, measurement method, results, and investigated anomalies. Any threshold revision must be recorded before rerunning acceptance; do not silently change the benchmark to produce a pass.

7. GC7: Scope, updates, and build

  • Map all PRD completion criteria and challenge cases to milestones and evidence.
  • Integrate two contrasting exhibits early; make Phase 9 the completion/audit phase for all five reference exhibits.
  • Define import equality and parameter compatibility precisely.
  • Verify identical imports are no-ops and changed same-ID content requires an explicit replacement choice.
  • Verify invalid refreshes leave the last valid definition and configuration intact.
  • Verify compatible parameter preservation, numeric bound changes with notice, removed/new parameters, and incompatible-type/enum resets.
  • Validate and prepare a candidate without observable playback before stopping the working exhibit.
  • Inject activation failure; dispose of the candidate and attempt a fresh restart of the previous exhibit with saved settings.
  • Build separate source modules into one self-contained HTML artifact reproducibly.
  • Test the delivered artifact directly and offline; no external runtime scripts, modules, assets, fonts, or CDN requests are required.

Evidence: implementation-plan coverage, library failure tests, build instructions, and artifact verification.

Evidence record template

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.