# Bellona Final GA Release Gate

Status: local gate contract for `180.C.29.08`, `180.C.29.09`, `180.C.29.10`,
`180.C.29.12`, and `180.C.30.10`.

Implementation date: 2026-07-02.

`testing/bellona/remote-control/final-ga-release-gate.ts` encodes the final GA
release gate as a typed evidence contract. It does not certify a release by
itself. Instead, it blocks release until the required verification matrix,
release evidence bundle, product acceptance scenarios, conditional platform
scope, and fleet closure evidence are all attached.

## Covered Checklist Items

- `180.C.29.08`: final verification across format, lint, typecheck, unit,
  integration, contract, Playwright/accessibility, security, performance,
  deployment smoke, and hardware-in-the-loop checks.
- `180.C.29.09`: release evidence bundle covering logs, screenshots or streams
  where allowed, diagnostic bundles, security/privacy review, known risks,
  rollback plan, compatibility matrix, package/supply-chain evidence, Stage 26
  macOS host packaging/acceptance evidence, and operator signoff, including the
  structured `180.C.21.20` operator usability study report.
- `180.C.29.10`: final product acceptance for same-LAN two-MacBook, Hetzner/AWS
  cloud-agent, Blender edit, browser workflow, desktop fallback, Unreal edit,
  artifact transfer, operator approval, takeover, replay export, revocation, and
  uninstall.
- `180.C.29.12`: Stage 29 roll-up gate after docs, SDK, CLI, examples,
  verification, evidence, and acceptance are complete.
- `180.C.30.10`: final one-or-many host fleet gate for secure, observable,
  agent-driven, human-supervised production workflows.

## Local Evaluator

The testing package exposes:

- `createRemoteControlFinalGaReleaseGatePlan()`
- `createPassingRemoteControlFinalGaEvidenceSnapshot()`
- `evaluateRemoteControlFinalGaReleaseGate()`

The evaluator returns `blocked` by default. It only returns `passed` when every
required stage, conditional platform completion or accepted scope-waiver
evidence, verification check, release evidence artifact, acceptance scenario,
and fleet-closure requirement is attached as a valid structured evidence record.
Compatibility ID arrays are summaries only. They do not prove closure without
matching records that include pass status, canonical UTC millisecond capture
time, unique artifacts, and kind-specific release context. Record capture times
must be on or after `2026-07-02T00:00:00.000Z`, the current final-GA evidence
window:

- verification records include one of the planned commands for that check, full
  40-character commit SHA, and a `release-ci:` environment ID;
- release evidence records include reviewer context, automated-log command, full
  40-character commit SHA, and environment ID where applicable, plus rigs or
  operator signoff where applicable;
- the `operator-usability-study-report` release evidence record must be backed
  by a passing structured `evaluateControlRoomOperatorUsabilityStudy()` result,
  so a generic final-GA artifact ID and operator signature cannot stand in for
  the recruited-operator study or top-three friction-fix evidence;
- the Stage 26 macOS packaging/acceptance release evidence record must be backed
  by a passing structured `evaluateMacOSHostStageGate()` result and must name
  the `MAC-OP-01` operator rig and `MAC-HOST-01` host rig, so a generic final-GA
  artifact ID, cloud-only rig record, or rig-only record cannot satisfy the
  macOS host acceptance requirement;
- acceptance records include operator context, required rigs, scenario evidence
  kinds, and scenario artifacts whose IDs name each required evidence slot;
- fleet closure records include fleet run ID, operator, rigs, required fleet
  evidence kinds, and fleet artifacts whose IDs name each required evidence
  slot.

Artifact, rig, and evidence-kind lists must be nonblank and unique. Artifact IDs
must identify the final-GA record kind, requirement ID, and a concrete evidence
suffix, for example `artifact:final-ga:verification:<requirement-id>:run-log`,
`artifact:final-ga:release-evidence:<requirement-id>:bundle`,
`artifact:final-ga:acceptance:<scenario-id>:<evidence-kind>`, or
`artifact:final-ga:fleet:<requirement-id>:<evidence-kind>`. Artifact IDs must
also be unique across the entire final-GA evidence snapshot, so one pasted log,
capture, bundle, or placeholder cannot satisfy independent verification,
release-evidence, acceptance, and fleet requirements. Reviewer IDs must use
`operator:final-ga-reviewer:`, release operator IDs must use
`operator:final-ga-operator:`, and fleet run IDs must use `fleet-run:final-ga:`.
Those contextual prefixes require concrete non-placeholder suffixes, so
trailing-colon placeholders such as `release-ci:` or
`artifact:final-ga:fleet:<id>:` and suffixes such as `todo`, `tbd`,
`placeholder`, `example`, `sample`, `generic`, `unknown`, `none`, or `n/a` do
not pass. Conditional platform waivers apply the same non-placeholder rule to
waiver approver IDs, residual-risk owner IDs, and the terminal segment of
remote-control evidence URLs. Duplicate placeholders or count-only artifact
lists do not satisfy scenario evidence counts or release/fleet rig evidence.
Acceptance and fleet records must also prove every named evidence kind with a
matching artifact ID suffix, so a generic bundle list paired with a valid
`evidenceKinds` array still blocks the gate. Any context appended after a
required evidence slot must also be concrete and non-placeholder, so
`managed-profile-path-placeholder` or `policy-denial-audit-example` does not
pass. Duplicate structured records for the same verification, release evidence,
acceptance, or fleet requirement are also treated as incomplete evidence; each
requirement must have exactly one authoritative passing record.

Conditional platform completion follows the same structured-record rule. Windows
(`180.C.36`) and Linux (`180.C.37`) may satisfy the final GA gate only with
`conditional-platform` records whose reviewer, rigs, evidence kinds, and
artifact IDs prove every required platform evidence slot, and with the matching
platform stage-gate result evidence from `evaluateWindowsHostStageGate` for
Stage 36 or `evaluateLinuxHostStageGate` for Stage 37. Windows final-GA evidence
must cover signed MSI/service lifecycle, desktop capture and input, permissions,
managed browser launch, app discovery, signed update rollback, diagnostics, role
validation, macOS/Windows parity, and operator acceptance. Linux final-GA
evidence must cover package distribution, capture/input strategy, PipeWire
audio, permission policy, headless adapters, render-node role, diagnostics,
package signing, fleet participation, build-node validation, and first-class
node acceptance. Generic final-GA platform bundles are insufficient when the
underlying platform roll-up gate result is missing or incomplete. An accepted
macOS-scoped waiver may still satisfy an out-of-scope conditional platform. Bare
`completedConditionalStageIds`, legacy waiver-ID summaries, and generic platform
bundles remain compatibility metadata only.

Chronology is part of the evidence contract. Final test-log release evidence
must be captured after every verification record it summarizes, operator
acceptance signoff must be captured after every final product acceptance
scenario record, and fleet closure records must be captured after the Stage 29
verification, release evidence, and acceptance records they close over. Early
test-log, signoff, or fleet-closure evidence is treated as incomplete even when
the record is otherwise well formed.

A conditional `180.C.36`/`180.C.37` waiver is accepted only when it includes the
canonical `docs/releases/2026-10-macos-ga.md` release note, a scope statement
that names macOS and the waived target platform, current approval from an
`operator:final-ga-waiver-approver:` identity, residual-risk ownership from an
`owner:final-ga-waiver-risk:` identity, and unique supporting evidence paths
under `docs/domains/bellona/extras/remote-control/`.

This keeps the release gate fail-closed in CI and local verification while still
being honest about what cannot be proven inside a Linux sandbox: live macOS and
Windows host runs, real cloud deployment smoke, stream captures, diagnostic
bundles from final sessions, Stage 26 macOS app/LaunchAgent/signing/install QA
acceptance, recruited-operator usability observations, and operator acceptance
signoff.

## Verification

```bash
pnpm exec vitest run --config vitest.config.ts tests/final-ga-release-gate.test.ts --reporter=verbose
```

Focused coverage currently passes with 1 file / 36 tests and proves:

- the plan lists the final verification matrix, evidence bundle, acceptance
  scenarios, conditional platform stages, and fleet closure requirements;
- the evidence bundle requires the `180.C.21.20` operator usability study report
  and top-three friction-fix evidence before GA signoff;
- a generic `operator-usability-study-report` release artifact cannot pass
  without passing structured `180.C.21.20` study evaluator evidence;
- the evidence bundle requires the Stage 26 macOS host packaging and acceptance
  artifact before GA signoff;
- a generic `macos-host-packaging-acceptance` release artifact cannot pass
  without passing structured `180.C.26` macOS host stage-gate evidence;
- conditional Windows/Linux scope waiver stage IDs do not pass without explicit
  macOS-scoped release notes and approval evidence;
- completed Windows/Linux conditional stage IDs do not pass without structured
  platform evidence records, malformed platform completion evidence keeps
  `180.C.30.10` blocked, and generic final-GA platform records do not pass
  unless the matching Stage 36/37 platform roll-up gate also passes;
- Linux conditional completion remains blocked when Stage 37 build-node
  validation is absent, and Windows conditional completion remains blocked when
  Stage 36 macOS/Windows parity fails;
- conditional Windows/Linux scope waivers with stale approval timestamps,
  non-contextual waiver approvers or risk owners, or off-path supporting
  evidence do not pass;
- the gate blocks by default instead of treating checklist prose as evidence;
- the gate passes only with a complete evidence snapshot;
- bare requirement ID summaries do not satisfy the gate without matching
  structured evidence records;
- malformed structured evidence records keep their requirements missing and
  surface invalid record IDs;
- abbreviated commit SHAs do not satisfy verification or automated release-log
  evidence records;
- automated release-log evidence must name the command, full 40-character
  release commit SHA, and environment before the `180.C.29.09` evidence bundle
  can pass;
- Stage 26 macOS packaging acceptance evidence must be backed by structured
  Stage 26 gate evidence and name the required non-developer operator and macOS
  host rigs before the `180.C.29.09` evidence bundle can pass;
- unplanned verification commands and duplicate artifact or rig identifiers,
  including case-variant duplicates, keep their requirements missing;
- duplicate structured evidence records for a single requirement keep that
  requirement missing;
- artifact identifiers reused across final-GA evidence groups, including
  case-variant reuse, keep every dependent requirement missing;
- artifact identifiers that do not name their final-GA record kind, requirement
  ID, and concrete evidence suffix keep their requirements missing;
- non-contextual final-GA reviewer, operator, environment, and fleet-run
  identities keep their requirements missing;
- placeholder final-GA evidence suffixes, release identities, fleet run IDs, and
  conditional platform waiver identities keep their requirements missing;
- stale pre-window evidence, non-canonical timestamp formats, and empty
  contextual suffix placeholders keep their requirements missing;
- acceptance and fleet records must cover the named required evidence kinds and
  their artifact IDs must identify each required evidence slot, so count-only or
  generic bundle artifact lists and placeholder evidence-slot sub-suffixes do
  not pass;
- final test-log release evidence must be newer than the verification matrix it
  summarizes, operator signoff must be newer than the acceptance scenario
  evidence, and fleet closure records must be newer than the Stage 29 evidence
  they close over;
- omitting hardware-in-the-loop evidence keeps `180.C.29.08`, `180.C.29.12`, and
  `180.C.30.10` blocked;
- omitting same-LAN acceptance keeps `180.C.29.10` and dependent roll-up gates
  blocked.
