Files
XZBT-NGN/test-fixtures/PROVENANCE.md
T

186 lines
10 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Reference fixture provenance
The owner selected the `abacusai` set on 2026-09-13. The source is
`G:/.vibe/SciFi-XZBT/exhibit-test/abacusai/reference-exhibits/`.
Only the three exhibit directories, shared dependencies,
and upstream README were copied. The external source is unchanged.
These files are NGN test fixtures, not product code. Their upstream README
describes upstream verification and is not evidence of NGN verification.
Local compatibility corrections:
- Eight read-only descriptors used `kind: telemetry`, which is not
one of Contract 5.2's four kinds. They now use `kind: state` with their
existing value types; IDs and backing readings are unchanged.
- Planetarium's action argument metadata was named `args`; it is now named
`arguments` under the owner's 5.2 clarification.
- The shared fixture invoke path now enforces declared argument types,
required fields, allowed keys, enums, and numeric/string constraints.
- Planetarium's magnitude reader and native dispatch still used the old
camelCase ID. They now match its existing canonical `sky.magnitude-limit`
descriptor, fixing a null snapshot value and failed native writes.
- Final Step 5 closure: Haunted House's haunt-level reader now clamps to 0–1
and rounds to integer hundredths, matching its unchanged 0.01 descriptor step.
The internal drifting simulation and Manifest behavior remain continuous;
snapshots and mutation events share this normalized reader. Previously the
reader rounded to thousandths and could report off-step values.
NGN has no fixture-specific target logic. These corrections apply only to
the local fixture copies. No upstream fixes or independent conformance
certification are claimed.
## Step 6.7B resync (2026-09-15)
The `scifi/` fixture was resynced from the real SciFi-XZBT exhibit source at
`G:/.vibe/SciFi-XZBT/` after that repo's Step 6.7B implementation (SciFi
Observation Surface Integration, `docs/architecture/XZBT-NGN-Step6.7A-SciFi-Observation-Surface.md`).
Copied files (byte-for-byte from source, no fixture-local corrections):
- `index.html` — two new `<script>` tags for `surface-mode.js`/`surface-bus.js`
- `js/app.js` — boot-mode resolution, console/observation branching, the
surface-attachment bus wiring, `view.pillars`/`view.warp-flight` routing
- `js/contract-adapter.js` — `surfaces`/`instanceId` constructor options,
the `view.pillars`/`view.warp-flight` targets, `onLocalChange`/`onLocalAction`
hooks, `describe()`'s conditional `surfaces` field (the version bump this
bullet originally listed was not present in the resynced file; see the
handshake correction below)
- `js/observation-engine.js` — WARP/PILLARS dock buttons now route through
`onMutation` (matching the existing VIEWPORT/RED ALERT/PRESET pattern)
instead of mutating engine state directly
- `css/style.css` — additive `body.surface-observation` rules
- `js/surface-mode.js` (new) — boot-mode resolver + surface catalog
- `js/surface-bus.js` (new) — instance-scoped BroadcastChannel sync
No fixture-local corrections were added on top of this resync; the fixture
is a faithful mechanical copy of the source as it stood after Step 6.7B.
`js/audio.js`, `js/config.js`, `js/core-animations.js`, `js/visualizer.js`,
`js/observation-bezels.js`, `js/generative-experience.js`, and `js/control-bus.js`
were not touched by Step 6.7B and were not recopied. `dist/` was not
regenerated at resync time (no PowerShell available in the environment that
performed the resync); it reflected a pre-6.7B build then and has since been
rebuilt from source — see the Step 6.7 packaging pass below.
## SciFi adapter handshake correction (2026-09-15)
Correction to the record above: the Step 6.7B resync note listed a "version
bump to 5.3.0" for `js/contract-adapter.js`, but no such bump was present in
the file as resynced — it still read `version = '5.2.0'` / `contractMinor = 2`.
The adapter also still carried a pre-5.3 inbound gate in `_setupWindowBridge`:
```js
if (!e.data || typeof e.data !== 'object' || e.data.xzbt !== '5.2') return;
```
That is an exact-string comparison against the advisory `xzbt` field, which
Contract 5.3 §6.5 designates as diagnostics-only metadata ("The negotiated
session contract major/minor is authoritative after handshake"). Because
XZBT-NGN's host stamps outgoing envelopes `xzbt: '5.3'` (Step 6.3), the gate
silently dropped every host message — including `hello` — and NGN's handshake
timed out against this exhibit (`tests/postmessage-interop.test.js`, four
tests).
Two source-side corrections were made in `G:/.vibe/SciFi-XZBT/js/contract-adapter.js`
and then copied here verbatim, keeping the one-directional source -> fixture
flow this file documents:
1. The inbound filter now checks the advisory field's *presence and type*
(`typeof e.data.xzbt !== 'string'`), matching how XZBT-NGN's host validates
the same field. It no longer branches on any particular value, so the
field cannot act as a compatibility gate for any sender.
2. The adapter advertises the contract it actually implements: `contractMinor`
`2` -> `3` and the exhibit product version `'5.2.0'` -> `'5.3.0'` (its
`describe()` already emitted the Contract 5.3 `surfaces` field added by
Step 6.7B). The file header now reads "Specification v5.3" to match.
The outbound advisory `xzbt: '5.2'` stamps on this adapter's own envelopes were
deliberately left unchanged: §6.5 makes the value non-authoritative, Step 6.7B
documented the envelope as unchanged, and no receiver — NGN included — reads
that value for admission. (`dist/` was rebuilt from source in the packaging
pass below.)
Resynced file (source and fixture byte-identical,
SHA-256 `10ED30527153D5B30F23557BA6EC427884D470AB6561AC33C47E7F17AFA28DD9`):
- `js/contract-adapter.js`
## Step 6.7 packaging pass (2026-09-15)
`tools/package.ps1` was run against the SciFi-XZBT source tree to regenerate
the standalone single-file artifact (that repo's one-input/one-output
distribution rule):
- Command: `powershell -ExecutionPolicy Bypass -File .\tools\package.ps1 -Force`
- Output: `G:/.vibe/SciFi-XZBT/dist/SciFiAmbientDisplay_V179b9db.html` —
920,730 bytes (12 script blocks + 1 style block inlined), SHA-256
`DFD9A91CB04CABD7BD6AAA53DA0FA7A641DBB21E3B3E11FAF3EC75946D6FA271`
- Replaced: a pre-6.7B build of the same filename (SHA-256
`B441820627D3FB23994D129B7425D781797E705867AC02967F96846B243435D4`, dated
9/13, before the Step 6.7B source changes). Byte-identical content of that
pre-6.7B build is retained unchanged as
`dist/SciFiAmbientDisplay_Va723f46=1.html`.
- Filename caveat: the filename carries SciFi-XZBT's HEAD commit `179b9db`,
but the build reads the working tree, which is ahead of that commit — that
repo's contract work, including the handshake correction above, is still
uncommitted there. The artifact does not correspond to a single commit.
- Fixture mirror:
`test-fixtures/reference-exhibits/scifi/dist/SciFiAmbientDisplay_V179b9db.html`
was copied verbatim from the source build; the two files are byte-identical
at the hash above.
Verification of the regenerated artifact (raw output in
`evidence/step6.7-packaging.txt`):
- Structural: each of the 13 inputs (`css/style.css` and the 12 scripts) is
inlined verbatim — the built file contains every source file as a
contiguous byte-identical block after newline normalization; zero
`<script src=`, `<link href=` and `<img src=` references remain; the two
Step 6.7B scripts (`surface-mode.js`, `surface-bus.js`) are present in
`index.html` order; the corrected handshake filter
(`typeof e.data.xzbt !== 'string'`) is present and no exact advisory `xzbt`
comparison remains anywhere in the file.
- Runtime, `file://`: the document boots standalone — 12 inline `<script>`
elements, none with `src`, zero `<link>` elements, console UI renders
(`readyState: complete`, 4 canvases, theme classes applied), and
`window.xzbtContractAdapter` exists with `contractMinor: 3`,
`version: 5.3.0`, and the two-entry surface catalog.
- Runtime, served over `http://127.0.0.1:4173/test-fixtures/...` (the served
path NGN fixtures use): a same-origin host simulation stamped
`xzbt: '5.3'` negotiates — `hello.result` contract `{major: 5, minor: 3}`,
exhibit version `5.3.0`; `describe.result` reports 63 targets plus
`surface.console`/`surface.observation`; `state.result` returns. This is
the handshake/describe/state path the pre-fix build failed.
- Boundary note: from `file://`, a same-window `postMessage` cannot exercise
the handshake because the adapter's origin guard rejects it (Chrome reports
`e.origin` as `"null"` for `file://` documents while `window.location.origin`
is `file://`). That is the adapter's designed same-origin/self safety
filter, not a defect; NGN attaches exhibits over `http://` only.
## Accepted Contract 5.3 baseline (2026-09-15)
`f163de264388f1e411cf9e54f26f72a254888afd` is the accepted Contract 5.3
baseline, marked by the annotated tag `contract-5.3-accepted-baseline`.
The NGN full suite passed **154/154**, and the SciFi Observation surface smoke
suite passed **24/24**. The final live eight-point NGN verification also passed,
including pane geometry, synchronized presentation state, lifecycle handling,
console-only heavy subsystems, standalone attachment, and the inert orphan
waiting state.
This baseline adds two fixture-local integration corrections after the earlier
source-to-fixture resync: `css/style.css` clears the console overlay's centered
16:9 geometry when Observation is embedded in an NGN pane, and `js/app.js`
presents an inert waiting state after an owner-attachment timeout. They do not
create a second authority or alter the upstream exhibit's contract behavior.
The console's existing 16:9-lock checkbox behavior is pre-existing and
unrelated to these corrections. It remains console presentation behavior; the
embedded-surface override is intentionally limited to keeping that behavior
from affecting NGN pane geometry.
Step 6.7 and Step 6.8 are complete and accepted, and Step 6.5 state synchronization
is satisfied by existing implementation and later evidence. Non-blocking operator
checks and the unreproduced session renegotiation observation are tracked
separately. Step 6 is closed at Step 6.10 (see
`docs/reference/XZBT-NGN-Step6.10-Closure-Report.md`).