live-gate · diff
git:20261021.69a7f00 to git:20261021.98334d7
3 added, 2 removed. Audit A to A.
---
name: live-gate
description: Run the LethAL live integration gate against the Cronus BC container — the frozen per-mutant tables through both backends. Use when validating a layer end-to-end on live infra, or when the user says "run the live gate" / "run the itests live". Publishes to a live BC container, so it is user-invoked only.
disable-model-invocation: true
---
# Live gate
The authority for LethAL correctness (unit tests are structurally blind to AL that can't compile / real BC behavior). Runs the env-gated integration itests foreground and checks the frozen per-mutant tables. A differing verdict = BLOCKED (a real regression), never "close enough".
## Prerequisite: harness + publish order (bcdev path)
The instrumented target depends on the `LethAL Control` extension and every RunMutant routes through it. Publish order to the container (Cronus28, or one of the BC on Linux servers `bc1`-`bc3`, which `scripts/bc-linux-setup.ts` prepares; Cronus284 is CentralGauge's, never LethAL's):
1. `LethAL Control` (`extensions/lethal-control`) — must expose `HarnessInfo`, `RegisterArtifact` is IN-PROCESS only (no OData write), `RegisteredArtifact` + `RunMutant` OData actions.
2. The instrumented sandbox target (the itest publishes it — needs the LethAL Control dependency + `lethal-control.app` symbol staged).
3. `fixtures/sandbox-tests`.
4. `fixtures/sandbox-probes` (protocol-invariant probes).
Precondition: at most ONE instrumented target installed per container; no concurrent/external publish during the run.
## Run (foreground — do NOT poll/background)
```bash
cd U:/Git/LethAL
LETHAL_ITEST_BCDEV=1 bun run itest:bcdev
```
Inside the kraken container, run it from the repo checkout instead of `U:/Git/LethAL`; the gate reaches `Cronus28` by name. Publishing the control app Global is host-only: ask the owner.
**The al-runner leg GATES again** (R93 closed, `51e6415`). It was skipped while v2's CLI rewrite left it unrunnable; the adapter landed and it passes per-mutant on v2.
```bash
LETHAL_ITEST_ALRUNNER=1 LETHAL_ALRUNNER_PATH="H:/al-runner-builds/c39ad5de/al-runner.exe" bun run itest:alrunner
```
In the kraken container `LETHAL_ALRUNNER_PATH` is already set (`/work/tools/al-runner/current/al-runner`, the daily local build), so drop it from the command.
**Check the al-runner version before trusting a verdict from this leg.** al-runner publishes several times a day, and it is a globally-installed dotnet tool that `dotnet tool update` can move between one gate run and the next. Measured 2026-08-07: 2.0.0.0 reported a runner-enforced timeout as `TIMEOUT after <n>s`, and 2.0.1.0 — released the same day — changed it back to `Test exceeded <n>s timeout.`. The gate prints `al-runner build under test: <version>` as its first line; read it. If it is not what the freeze below names, that is a TOOL change, not a code regression — re-measure the contract (`docs/measurements/README.md` §"al-runner v2") before touching anything. `dotnet package search MSDyn365BC.AL.Runner --exact-match` lists what is published.
Connection details come from the gitignored `fixtures/sandbox-app/.vscode/launch.local.json` + `fixtures/sandbox-app/lethal.config.local.json` (Cronus28, sshadows/1234, company `CRONUS Danmark A/S`, tenant default).
## Expected (frozen — BLOCKED on any difference)
- - **bcdev**: killed **3** / survived **12** / no-coverage **4** (20.0%), baseline green, per-mutant baseline matches `packages/runner/itest/bcdev.baseline.json`, all protocol-invariant probes pass, ≥1 clean attestation (`observedAny && !identityMismatch`) per deployed artifact, NO `identityMismatch` on any run.
- - **al-runner**: killed **3** / survived **12** / no-coverage **4**, baseline green, per-mutant baseline matches `packages/runner/itest/al-runner.baseline.json`, and since R220 (2026-09-09) the table equals bcdev's PER MUTANT. The 3 kills are the same three bcdev kills (`IsOverBudget`, killed by `OverBudgetDetected`, a bare `Error(...)` test). The 4 no-coverage mutants are `SandboxPricing`'s: until R220 wired al-runner's own `--coverage`, this backend ran them without coverage and reported them survived (3 / 16 / 0). All four legs (one-shot, rerun, `--server`, resource selector) must match per mutant; the platform-app pin is asserted on the two one-shot legs only, since `--server` never receives it (R235). Version under the freeze: 3 / 12 / 4 was measured on v2.11.0 (R220, 2026-09-09); on 2026-09-26 the same build failed only the pin check (R235); after R235's fix, the same day on v2.11.0: PASS, 19 verdicts identical on all four legs, pin engaged on both one-shot legs. On v2.12.0 (2026-09-29, R338): PASS, the same 19 verdicts on all four legs, after R338 taught the build parse 2.12's default output (`[bc] selected` is verbose-only there). The v1-era `asserterror` defect (R7) is fixed upstream: the canary reports `defect-not-reproduced` each session, and this fixture never exercised it either way. Since R321 it also runs `fixtures/sandbox-symbols` under `[LETHALA]` and `[LETHALB]`, each 5 / 8 / 0 over 13, one-shot, `--server` and resource legs matching the pre-committed table and equal per mutant; baselines `al-runner.symbols-lethala.baseline.json` and `-lethalb`, which the gate refuses to run without (record once with `LETHAL_ITEST_RECORD_SYMBOL_BASELINES=1`, never a pass).
+ The frozen figures, per gate and per leg, are on the gate pages: `docs/gates/bcdev.md`, `docs/gates/alrunner.md`, and the rest listed in `docs/gates/README.md`. `packages/runner/tests/gate-pages.test.ts` keeps those pages equal to the committed baselines, so do not copy figures into this skill. On top of the figures:
+ - **bcdev**: baseline green, per-mutant baseline matches `packages/runner/itest/bcdev.baseline.json`, all protocol-invariant probes pass, ≥1 clean attestation (`observedAny && !identityMismatch`) per deployed artifact, NO `identityMismatch` on any run.
+ - **al-runner**: baseline green, per-mutant baseline matches `packages/runner/itest/al-runner.baseline.json`, and the table equals bcdev's PER MUTANT. Every leg (one-shot, rerun, `--server`, resource selector) must match per mutant; the platform-app pin is asserted on the one-shot legs only. The symbol-set baselines are refused when missing (record once with `LETHAL_ITEST_RECORD_SYMBOL_BASELINES=1`, never a pass).
## On failure
BLOCKED. Live execution is the authority — diagnose the root cause (not a shotgun retry), fix in one commit, re-run. Do not proceed on a differing verdict, failing probe, attestation mismatch, or a never-attested artifact. **No standing exceptions.** The al-runner one is retired: that leg gates again. Before diagnosing an al-runner failure as a code regression, check the version line the gate prints — an upstream release is the likelier cause and is not a regression.
## Optional (touches shared infra)
```bash
LETHAL_ITEST_BCDEV=1 bun run itest:stale-publish
```