# Modular Runtime Phase 3 — Backend and UI Modules Gate

Date: 2026-08-01

Status: accepted; Phase 3 gate progress 4/4

## Accepted outcome

The graph lane now turns admitted backend and UI nodes into accepted behavior in real running products. Sol/high plans bounded work from pinned graph state, Luna/xhigh writes only inside isolated ownership, deterministic host code seals candidates and owns privileged verification, fresh Sol/high contexts judge immutable visual evidence, and one queue advances authoritative integration lineage.

Phase 3 is accepted because all four required modes and product slices now pass:

| Required proof | Current evidence | Result |
|---|---|---|
| Real backend feature | One `backend_feature` passes unit behavior, a trusted real HTTP integration check, exact-lineage promotion, and clean authoritative state | accepted |
| Real cooperative UI vertical slice | `ui_foundation -> ui_change` advances two exact integration heads; the running Helios home preserves its shell through a real completion click and two independent visual judgments | accepted |
| Read-only mode | Immutable contract nodes provide pinned artifact/version lineage without a writer lease; graph and resource conformance tests reject mutation or stale versions | accepted |
| Competitive UI foundation | Two same-base coded directions implement concurrently, two Chrome captures serialize, fresh Sol selects one, exactly one winner integrates, and the loser never reaches authority | accepted |

## Current-revision live gate

| Canary | Result | Execution time | Durable evidence |
|---|---:|---:|---|
| Backend feature | 1/1 | 168.426 seconds | [`MODULAR_RUNTIME_PHASE3_BACKEND_CANARY_01.md`](./MODULAR_RUNTIME_PHASE3_BACKEND_CANARY_01.md) |
| Cooperative Helios UI | 1/1 | 801.675 seconds | [`MODULAR_RUNTIME_PHASE3_UI_CANARY_03.md`](./MODULAR_RUNTIME_PHASE3_UI_CANARY_03.md) |
| Competitive Helios foundation | 1/1 | 351.430 seconds | [`MODULAR_RUNTIME_PHASE3_COMPETITIVE_CANARY_01.md`](./MODULAR_RUNTIME_PHASE3_COMPETITIVE_CANARY_01.md) |
| Chrome capture regression | 1/1 | 1.776 seconds | exact pixel, readiness, fonts, console, overflow, and selector assertions |

Total current-revision live execution time for the three product canaries: 1,321.531 seconds. The cooperative rerun deliberately did not overwrite Canary 03's accepted immutable pixels or judgments; it re-proved the same complete behavior against the current runtime source.

## Shared invariants proven

- The ProjectController remains the only authoritative state writer.
- Process exit is never acceptance.
- Sol/high plans and reviews read-only; Luna/xhigh alone writes product code.
- Luna never receives localhost, browser, integration, or Git authority.
- Worker commands and privileged trusted-host commands are distinct but both required.
- Every writable graph node plans from the durable current `integrationHead`.
- Cooperative dependencies advance in order; competitive siblings start from the same base.
- Compatible candidate implementation overlaps; the single physical Chrome resource serializes.
- Visual review consumes exact ordered immutable captures only after deterministic render-health checks.
- A selection transport failure retries only the same sealed evidence; it cannot spend a Luna repair attempt.
- Only accepted exact-lineage candidates enter the serialized integration queue.
- Terminal replay is idempotent and does not repeat model calls, captures, commits, or integration.
- Rejected and losing work remains outside authoritative history.

## Regression gate

Commands:

```text
pnpm --filter @orchestrator/modular-builder-core build
pnpm --filter @orchestrator/modular-builder-core test
pnpm --filter @orchestrator/modular-builder-core check:source
RUN_LIVE_BROWSER=1 pnpm --filter @orchestrator/modular-builder-core exec vitest run test/live-chrome-running-product-capture.test.ts --reporter=basic
NO_COLOR=1 RUN_LIVE_CODEX=1 pnpm --filter @orchestrator/modular-builder-core exec vitest run test/live-backend-feature-canary.test.ts --reporter=basic
NO_COLOR=1 RUN_LIVE_CODEX=1 pnpm --filter @orchestrator/modular-builder-core exec vitest run test/live-ui-vertical-canary.test.ts --reporter=basic
NO_COLOR=1 RUN_LIVE_CODEX=1 pnpm --filter @orchestrator/modular-builder-core exec vitest run test/live-competitive-foundation-canary.test.ts --reporter=verbose
```

Results:

- 179 deterministic tests passed across 33 active suites;
- ten gated live tests were skipped by the deterministic suite and run separately where required by this gate;
- TypeScript passed with no diagnostics;
- 50 source files average 170 logical lines, with p50 136 and p90 370;
- the largest source file is 492 logical lines;
- no source file crosses the 500-line cohesion-review threshold;
- no live canary used a human checkpoint.

## Exact boundary before Phase 4

Phase 3 proves bounded backend and UI modules, not long-horizon product execution. Phase 4 must introduce only the smallest additional mechanisms required to carry a multi-module milestone across process interruption: a rolling one-to-two-milestone planning horizon, dependency-safe implementation waves, durable resume without duplicate work, graph compaction, system-level proof, and measured wall-time improvement. Release authority and Hermes remain later boundaries.
