# Phase 166 locally actionable completion evidence

Date: 2026-07-15

## Completion audit

Phase 166 defines 130 runtime requirements across ten spatial-computing areas
and ten validation requirements. The implementation is present in eleven focused
Rust workspaces under `libs/neith/spatial-*`. A source audit found no `todo!`,
`unimplemented!`, ignored test, placeholder implementation, or unused-code
allowance in phase-owned Rust sources.

All locally actionable work for the two unchecked acceptance items is complete.
The former `external` module only named the missing resource and could not
accept or grade evidence. It now provides serde-backed, fail-closed acquisition
contracts, strict graders, synthetic negative/decision fixtures, and the
`spatial-validate` operator CLI. Synthetic evidence can exercise every decision
but can never set `certified: true`.

## Requirement-to-evidence matrix

| Requirements       | Authoritative package    | Primary evidence                                                                                              | Passing tests |
| ------------------ | ------------------------ | ------------------------------------------------------------------------------------------------------------- | ------------: |
| 166.1.1–166.1.15   | `spatial-core`           | session, anchors, mesh/segmentation, objects, lighting, planes, targets, geospatial, VPS, privacy             |            71 |
| 166.2.1–166.2.15   | `spatial-volumes`        | volumes, immersive/shared spaces, passthrough, portals, spectator mirror, magnification                       |            57 |
| 166.3.1–166.3.15   | `spatial-input`          | gaze, hands, gestures, touch, voice, keyboard, controller, accessibility                                      |            49 |
| 166.4.1–166.4.15   | `spatial-avatars`        | persona, rigs, expression/lip sync, pose, wardrobe, presence, privacy and safety                              |            77 |
| 166.5.1–166.5.15   | `spatial-render`         | stereo, foveation/VRS, reprojection, power, HDR, distortion and test patterns                                 |            39 |
| 166.6.1–166.6.10   | `spatial-physics`        | scene collision, gravity, resting/contact, hands, lighting/shadow, safety                                     |            28 |
| 166.7.1–166.7.10   | `spatial-audio`          | HRTF, room acoustics, obstruction/reverb, ambisonics, voice/mic and blend                                     |            35 |
| 166.8.1–166.8.15   | `spatial-sdk`            | native/engine/WebXR adapters, USDZ, authoring/simulation/debug/perf, UI and deep links                        |            75 |
| 166.9.1–166.9.10   | `spatial-anchors-collab` | discovery/relay, shared anchors/meshes/CRDT, voice/gaze, latency, roles and replay                            |            34 |
| 166.10.1–166.10.10 | `spatial-os`             | shell, windowing/multitasking, launcher/store, routing, guardian, access and clipboard                        |            33 |
| 166.11.1–166.11.10 | `spatial-conformance`    | real-crate latency/calibration/jitter/mesh/occlusion/thermal/drift/WCAG checks plus hardware evidence graders |            32 |

All 530 Rust tests pass with zero failures and zero ignored cases. The existing
Phase 73 `@maya/vr-studio` Nx test target also passes. No user-facing UI
changed, so Playwright and mobile automation are not applicable.

## Open external acceptance gates

The two ledger entries remain unchecked because repository-local fixtures are
not substitutes for physical evidence.

| Requirement | Locally complete evidence contract                                                                                                                                                                                                                                                                                                                                     | External evidence still required                                                                                                                                                                                      |
| ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 166.11.6    | `grade_battery_trace` requires identified provenance and device model; strictly increasing dense samples; monotonically non-increasing battery; a two-hour run; at least 90 Hz and 100 nits; foreground MR mode throughout; start/reserve thresholds; bounded sample gaps; and no critical-thermal samples.                                                            | A live capture on each release target headset. The default policy certifies two hours from at least 95% charge with at least 5% reserve. Product-specific policies may raise, but not silently bypass, those targets. |
| 166.11.10   | `grade_dogfood_trace` requires the Phase 73 `@maya/vr-studio` and Phase 166 `@neith/spatial-runtime` identities plus ordered, timestamped milestones for session start, tracking convergence, MR entry, visible passthrough, production open, world anchor, object manipulation, take capture, spectator mirror and shutdown. Production/take artifacts are mandatory. | A live identified headset session of at least ten minutes, including at least five minutes in MR mode and tracking convergence within thirty seconds.                                                                 |

Malformed provenance, non-increasing time, charging during the endurance trace,
sparse samples, dimmed/downshifted operation, missing artifact identities,
out-of-order milestones, short sessions, and synthetic provenance all fail
closed. Reports distinguish a valid synthetic metric result from a certifying
live result.

## Operator entry point

The release build emits a file-oriented CLI. Exit status is 0 only for certified
live evidence, 2 for well-formed evidence that does not certify, and 1 for
malformed inputs:

```bash
spatial-validate battery <trace.json> [policy.json]
spatial-validate dogfood <trace.json> [policy.json]
```

## Verification

The following commands passed sequentially for every
`libs/neith/spatial-*/Cargo.toml` manifest:

```bash
cargo fmt --manifest-path <manifest> -- --check
cargo clippy --manifest-path <manifest> --all-targets -- -D warnings
cargo test --manifest-path <manifest> --all-targets
cargo build --release --manifest-path <manifest>
```

`NX_DAEMON=false pnpm nx run @maya/vr-studio:test -- --run` also passed. An
additional uncached direct Vitest invocation was terminated after fifteen
minutes because its RSS grew continuously from 2.6 GiB to 6.5 GiB without
producing a result; the repository's resource-safety policy requires stopping
such pressure. The authoritative Nx project target had already completed
successfully. Verification ran on a 15 GiB host with 31 GiB swap and an
unrelated BFF development watcher; no full-workspace gate was attempted.
