# Phase 180 Windows Host Local Contracts

Date: 2026-07-02

Scope: `180.C.36` remains hardware/signing gated, but it is no longer a pure
paper gap. The Windows host pieces that can be proven on Linux are implemented
as deterministic contracts in
`apps/bellona/remote-host/src/windows-host-support.ts` and tested in
`apps/bellona/remote-host/src/windows-host-support.test.ts`.

## Implemented Local Contracts

- `180.C.36.01` / `180.C.36.06`: signed MSI, Windows Service account, delayed
  auto-start, service recovery, signing environment, verification commands,
  canary update channel, compatibility checks, rollback plan, and Authenticode
  signing-readiness validation for required CI environment values.
- `180.C.36.02`: desktop strategy resolver for DXGI Desktop Duplication,
  UIAutomation focus, SendInput injection, locked desktop, UAC secure desktop,
  session-zero, and headless states.
- `180.C.36.03`: Windows permission provider projected through the shared
  `@bellona/host-runtime` permission report, covering DXGI availability, UAC,
  NTFS ACLs, Controlled Folder Access, Smart App Control, and Defender Firewall.
- `180.C.36.04`: isolated Chrome/Edge CDP managed-profile launch plan with
  explicit `127.0.0.1` CDP binding, valid TCP port validation, personal-profile
  rejection, managed-profile root/path traversal guards, and launch-time
  `initialUrl` rejection so navigation always goes through `browser.navigate`
  policy checks before Chrome/Edge touches a page.
- `180.C.36.05`: default Windows discovery candidates for Blender, Unreal,
  Chrome, and Edge under Program Files and per-user Edge installs.
- `180.C.36.07`: Windows diagnostic bundle producer using the shared
  cross-platform diagnostic bundle builder, redaction, integrity hash, service
  refs, adapter health, audit, config, permissions, and desktop strategy.
- `180.C.36.08`: Windows render-node and browser-admin workstation candidates
  routed through the existing `180.C.30` fleet scheduler/role model.
- `180.C.36.09`: macOS-to-Windows command parity comparison that reports missing
  capabilities instead of hiding gaps, and a Stage 36 gate input that must carry
  a passing structured comparator result with browser, desktop, and Unreal MVP
  command anchors.
- `180.C.36.10`: Stage 36 evidence gate requiring current canonical UTC
  millisecond Windows runner artifact records for every stage evidence slot,
  artifact identifiers that name the checklist item, exact evidence slot, and
  concrete non-placeholder run/artifact suffix they prove, `WIN-HOST-` evidence
  with concrete suffixes for host/probe/parity runs, `WIN-SIGN-` evidence with
  concrete suffixes for signed-update rollback, a distinct `MAC-HOST-` runner
  identity with a concrete suffix for parity, an `operator:windows-acceptance:`
  identity with a concrete suffix for final feature-parity acceptance, final
  acceptance timestamp after every prerequisite Stage 36 evidence record, signed
  update rollback evidence captured after the signed MSI/service lifecycle
  record, macOS/Windows parity evidence captured after the Windows capability
  records it compares, and a gap-free parity comparator result, with stale
  artifacts, non-canonical timestamps, and artifact identifiers duplicated
  within and across stage evidence records rejected, including duplicates hidden
  behind case-only suffix changes.

## Still Gated

The following evidence cannot be produced in the Linux sandbox and keeps the
stage checkboxes open:

- Build and install the signed MSI on Windows.
- Register and exercise the Windows Service lifecycle, crash restart, graceful
  shutdown, repair, rollback, and uninstall.
- Probe real DXGI Desktop Duplication, UIAutomation, SendInput, UAC, Defender
  Controlled Folder Access, Smart App Control, and Windows Defender Firewall.
- Launch real Chrome/Edge with CDP and discover real Blender/Unreal installs.
- Collect a real Windows diagnostic bundle from an installed host.
- Run macOS-to-Windows capability parity against both real hosts, including the
  browser, desktop, and Unreal MVP command anchors.
- Attach non-placeholder Stage 36 evidence records from the real Windows host
  runner, Windows signing runner, macOS parity runner, and final accepting
  operator.

## Verification

Focused verification:

```bash
pnpm nx test @bellona/remote-host -- windows-host-support.test.ts --reporter=verbose
pnpm nx test @bellona/remote-host -- --reporter=dot
pnpm exec tsc --noEmit -p apps/bellona/remote-host/tsconfig.app.json
```

The focused Windows support suite currently covers 38 local contract tests,
including the signing-readiness evaluator and Stage 36 evidence gate.

The direct `tsc` command runs against the checked-in TypeScript 6.0.3 compiler
without CLI or inherited tsconfig deprecation overrides, matching the Phase 180
verification command.

Broader Phase 180 release verification remains gated by `180.C.29.08` through
`180.C.29.12`.
