# XZBT-NGN Step 6.7 — Closure Report **Status: accepted.** As of 2026-09-15, Step 6.7 is closed and `f163de264388f1e411cf9e54f26f72a254888afd` is frozen as the accepted Contract 5.3 baseline by the annotated tag `contract-5.3-accepted-baseline`. The full automated suite, the SciFi surface smoke suite, packaged standalone verification, and the live eight-point NGN verification have all passed. *(Note: Step 6.8 was subsequently completed and accepted, and Step 6 is closed at Step 6.10; see the [Step 6.10 closure report](XZBT-NGN-Step6.10-Closure-Report.md).)* - Step 6.7A (design, no code): [architecture report](../architecture/XZBT-NGN-Step6.7A-SciFi-Observation-Surface.md) - Step 6.7B (implementation): [implementation report](XZBT-NGN-Step6.7-SciFi-Surface-Adaptation.md) - Packaging evidence: [step6.7-packaging.txt](../../test-fixtures/evidence/step6.7-packaging.txt) - Fixture provenance: [PROVENANCE.md](../../test-fixtures/PROVENANCE.md) ## 1. What this report closes Three items were outstanding when the 6.7B session ended; all three are now closed: 1. The five failing `tests/postmessage-interop.test.js` tests (the "handshake gating mismatch") — resolved 2026-09-15, committed in `745912e` (§3). 2. The packaged standalone-build verification (6.7B report §K.14) — performed 2026-09-15 (§4). 3. Source/fixture provenance for the SciFi-XZBT fixture — re-verified, and extended with the packaging record (§5). The final two fixture-level presentation corrections are included in the accepted baseline: the embedded Observation surface owns its NGN pane geometry, and an orphaned Observation URL presents an inert waiting state without creating authority. ## 2. Step 6.7 delivery summary SciFi-XZBT remains one document with two boot modes (`js/surface-mode.js`), advertising a Contract 5.3 Observation presentation surface as a query-mode view of its own `index.html` (`?surface=observation&xi=`, the §31.4 form that keeps the surface inside the single-file build). Console mode owns the single Contract 5.3 session, the one authoritative SciFi state, and an instance-scoped `BroadcastChannel` bridge (`js/surface-bus.js`); an Observation document attaches to that authority and never creates a second one. Two new canonical targets (`view.pillars`, `view.warp-flight`) carry the surface control path, and the heavy subsystems (WebLLM/Kokoro experience, visualizer, control bus, contract adapter, hotkeys, sleep timer) remain console-only, guarded by `isConsoleMode`. NGN `src/**` was not modified by Step 6.7B: NGN renders whatever surface catalog `describe()` advertises, generically. New focused coverage from 6.7B is `tests/scifi-surfaces.test.js` (24 tests) and `tests/local-surfaces.test.js` (20 tests, one driving SciFi's real descriptors); both are part of the full-suite run recorded in §7. ## 3. Handshake defect: root cause and correction **Root cause.** `js/contract-adapter.js`'s `_setupWindowBridge` admitted inbound messages only when the advisory envelope field matched exactly: `… e.data.xzbt !== '5.2'` → return. NGN's host stamps outgoing envelopes `xzbt: '5.3'` (`src/host.js`, since Step 6.3). The adapter therefore silently dropped the host's `hello` and every message after it; NGN's request timeout produced four `hello timed out` interop failures. The fifth failure was the existing static regression guard doing its job: an exact-string comparison against the advisory field existed in a maintained file. **Contributing defect.** The same adapter advertised `contractMinor = 2` and product version `'5.2.0'` while already implementing the Contract 5.3-only `surfaces` field in `describe()`, so the two interop assertions expecting `contract.minor === 3` could not pass either. **Correction** (in `G:/.vibe/SciFi-XZBT/js/contract-adapter.js`, then copied verbatim into the fixture): the inbound filter now checks only the advisory field's presence and type (`typeof e.data.xzbt !== 'string'`) — matching the host's own envelope validation — and the adapter advertises `contractMinor = 3` / `version = '5.3.0'`. Four lines in one file changed: the header comment, `version`, `contractMinor`, and the filter. The outbound advisory `xzbt: '5.2'` stamps were deliberately left unchanged (advisory only; no receiver gates on the value; SciFi's own browser harness reads the envelope as-is). **Coverage.** The fix's behavior is pinned by `tests/postmessage-interop.test.js`'s static guard ("no maintained bridge source gates on exact equality against the advisory `xzbt` field") plus its two behavioral regression tests that negotiate an *unexpected* advisory tag — the same tests that were failing. No test was added or weakened for this correction. ## 4. Packaged standalone verification (this pass) `tools/package.ps1` was run against the SciFi-XZBT source tree (`powershell -ExecutionPolicy Bypass -File .\tools\package.ps1 -Force`, exit code 0). It regenerated `dist/SciFiAmbientDisplay_V179b9db.html`, replacing a pre-6.7B build (SHA-256 `B441820627D3FB23994D129B7425D781797E705867AC02967F96846B243435D4`; a byte-identical copy of that pre-6.7B content is retained as `dist/SciFiAmbientDisplay_Va723f46=1.html`). The new artifact: - 920,730 bytes; 12 script blocks + 1 style block inlined - SHA-256 `DFD9A91CB04CABD7BD6AAA53DA0FA7A641DBB21E3B3E11FAF3EC75946D6FA271` - mirrored verbatim into `test-fixtures/reference-exhibits/scifi/dist/` (both copies byte-identical) Verification performed on the regenerated artifact: - **Inlining** (6.7B report risk R7: inlining failure is silent): every one of the 13 inputs is present as a contiguous byte-identical block after newline normalization; the built file contains zero `