ADR 0154: beamtalk-uat as the External Acceptance Gate for Full Environments

Status

Accepted (2026-11-26)

Context

The model: swamp-uat

The owner's reference is Paul Stack's The Gate Between Our Agent Code and Our Users, which describes systeminit/swamp-uat. This ADR adopts that design and maps it onto Beamtalk.

The three regressions the article cites all passed swamp's unit tests and all sat at integration seams. UAT caught each within minutes of the merge.

What beamtalk-uat is today

beamtalk-uat already cites the same article. Its CLAUDE.md already says the released bundle is under test, that tests beat code, and that every red files a Linear Bug. What it runs falls short of the model.

The harness is about 2,800 lines of Rust (src/lib.rs, src/scenario.rs, src/lsp.rs, src/mcp.rs). It auto-discovers projects/<name>/expect.toml and runs one surface per scenario. There are 16 scenarios:

KindCountWhat it checks
cli_*12Exit code and a stdout/stderr substring for new, new --app, fmt-check, lint, lint --format json, type-coverage, --help and build. Only cli_build compiles.
lsp/*1 fixture, 4 capabilitieshover, completion, definition, documentSymbol against the server in AST mode. There is no workspace and no BEAM.
mcp_*2One evaluate call each.
smoke1beamtalk test on a one-class project.

[[step]] sequences work only inside one session-backed surface. A scenario cannot start a release and rpc into it, start two nodes, or edit a file and watch the REPL pick it up. As the owner puts it, this is "more like arg parsing".

Against the model:

What got through on 2026-11-26

What already exists, so this ADR doesn't duplicate it

Existing suite or toolBuilds fromAnswersStays in beamtalk
Rust, EUnit, stdlib and BUnit tiers (just test)sourceIs each unit correct?✓
REPL protocol and cross-surface parity testssourceDo the protocol and surfaces agree, down to framing?✓
examples/cluster/scripts/e2e.shsourceDoes ADR 0126 work across three local nodes?✓
liveview.yml, liveview-e2e.ymlsourceDoes the IDE work against the same commit's workspace?✓
ci-platforms.yml, the otp-matrix jobsourceDo the tests pass on macOS, Windows and each supported OTP?✓
Micro and dispatch benchmarks (bench-dispatch keys, vs-elixir rows, reduction and word counts)sourceIs this dispatch path fast? Did this PR fix it?✓
Coverage (coverage.yml)instrumented sourceWhich lines run?✓
cross-repo.ymlsourceDoes beamtalk-http build against main?replaced by J9

Each of these builds from the same commit it tests. None answers the user's question: with only the published artifacts, the public registry, my OS and my OTP, can I get from install to a running service, and is it fast and safe?

That question covers everything between the source tree and the user:

Constraints (owner decisions)

Decision

1. Purpose and the user-only rule

beamtalk-uat proves that a user holding only published artifacts can use every command, complete every supported journey, stay safe under adversarial input and get acceptable performance, on every release target and supported OTP major.

The user-only rule. A test may use only what a user has:

Tests never check out beamtalk source, never set an undocumented variable and never call an internal function. If a test needs one of these, that is a finding: a docs Bug or a missing feature.

This rule is the line against the in-repo suites. Those suites ask "is the code right?" uat asks "does the shipped thing work for a user?" A behaviour pinned by a fast in-repo test is not re-asserted at finer grain here.

2. Governance: the uat CLAUDE.md, and what enforces it

The rewritten CLAUDE.md opens with these rules, adapted from swamp-uat:

  1. Tests are more accurate than the code under test. When a test fails, the default assumption is that Beamtalk (the toolchain, IDE, extension or installer) must change, not the test.
  2. Never weaken, relax, skip or update a test, schema or threshold to match current behaviour unless the owner explicitly asks you to update the UAT. This covers:
    • loosening a Zod schema;
    • raising a perf threshold or multiplier;
    • widening a timeout;
    • adding a target or OTP exclusion;
    • demoting a blocking test to incubating (§ 10);
    • changing the perf method.
  3. Every red files a Linear Bug against BT, automated by triage.yml (§ 11).
  4. Every regression gets a permanent test. A bug found against a published artifact by hand, by a user or by a downstream package is not closed until uat has a test that fails on the broken release and passes on the fixed one. BT-5283 and BT-5264 are the first two.
  5. Independence. uat never imports, vendors or builds Beamtalk source.

What enforces rule 2. The article relies on CLAUDE.md alone. This ADR adds one real gate and one tripwire. It does not claim the tripwire is proof.

3. Per-target artifacts, OTP, and the trigger

Targets. These are the bundle targets release.yml builds. Each is tested on the runner image that built it. Today release.yml, edge.yml, nightly.yml and liveview-release.yml use floating labels (ubuntu-latest, macos-latest), so Phase 0 pins them in beamtalk to the images below. "The image that built it" is then a fact, and an image bump is a reviewed change on both sides.

TargetRunner (pinned in Phase 0)EdgeNightlyTag
linux-x86_64ubuntu-24.04✓ every publish✓✓
macos-arm64macos-15✓ hourly (fast set)✓✓
macos-x86_64macos-15-intel—✓✓
windows-x86_64windows-2022—✓✓

The macOS edge leg needs two beamtalk changes, both in Phase 0. First, edge.yml must publish a macos-arm64 asset (owner decision 3). Second, install.sh --edge must stop exiting on anything but linux-x86_64.

OTP axis. The dispatch payload carries otp-support.toml's window. Artifacts are built on min-major.

TargetNightly / RC OTPNotes
linux-x86_64min-major (all layers) and max-major (contracts, J1 to J4, J6)J1 also checks that OTP 27 on PATH gives a clear, structured error from doctor and build.
macos-arm64max-majorbrew installs the newest.
macos-x86_64min-major
windows-x86_64max-majorThe erlang.org installer offers the newest.

A window bump in otp-support.toml is picked up from the payload, with no uat edit.

Dispatch. edge.yml, nightly.yml and release.yml each send repository_dispatch with event-type: beamtalk-artifact:

{ "channel": "edge|nightly|release", "version": "0.6.0-edge+c6b28b3",
  "tag": "edge|nightly|v0.6.0", "sha": "<commit>",
  "otp": { "min-major": 28, "max-major": 29 },
  "assets": { "beamtalk-…-linux-x86_64.tar.gz": "<sha256>", "…": "…",
              "beamtalk-ide-…": "<sha256>", "beamtalk-….vsix": "<sha256>" },
  "ide_image": "ghcr.io/jamesc/beamtalk-ide@sha256:<digest>" }

Today release.yml sends beamtalk-release. During migration, uat accepts both event types, mapping beamtalk-release to channel: release with no assets map. It verifies such a run against the published .sha256 files instead. The old type is dropped in the same release that switches release.yml.

Download once per run. Rolling releases (edge, nightly) are replaced in place, so a later shard could find newer bytes than an earlier one. A resolve job therefore:

  1. downloads every asset in the payload once;
  2. checks each against its sha256;
  3. uploads them as one workflow artifact, which every shard installs from.

J1 is the one test that uses the live installer. It runs inside resolve before the fan-out, and checks that what install.sh fetched has the payload's sha256. If any hash no longer matches at resolve time, the rolling release has moved on. The run ends as superseded (§ 11): cancelled, no Bug. uat's workflows use concurrency groups per channel with cancel-in-progress: true for edge and nightly. Release-candidate runs are never cancelled.

4. Clean rewrite: TypeScript on Playwright Test, with Zod

beamtalk-uat is rewritten. The Rust harness, expect.toml, surface types and projects/<scenario>/ are deleted. These carry over:

The harness is TypeScript on Playwright Test, used as a general runner, with Zod for JSON contracts. swamp shows TypeScript and Zod working for this job. Playwright Test was chosen over Deno's runner for what a multi-process, multi-surface gate needs:

NeedWhat provides it
Ordered journeys with per-step reportingtest.step(). A red reads "J4 › rpc into release › step 5/9".
Time budgetsPer-test and per-step timeouts, plus a global limit.
Diagnosable failurestestInfo.attach(), the HTML report, JUnit XML and traces.
Tiers and selectionTags with --grep, and projects.
TeardownFixtures with guaranteed teardown, for the process-tree kill and leak checks.
Parallelism--workers, --shard=i/n.
LiveView, .vsix smokeNative Chromium, already proven in liveview-e2e.yml. @vscode/test-electron is TypeScript too.
Cross-platform, no cold buildNode behaves the same on all three OSes. npm ci from a cache takes seconds.

Use real clients. MCP steps use the official MCP TypeScript SDK client. LSP steps use vscode-jsonrpc and vscode-languageclient. These are what Claude Code, other agents and VS Code use. A framing bug every real client tolerates is not user-facing. One that breaks them turns uat red. Byte-level framing stays in beamtalk's protocol and parity suites.

Fixtures stay Beamtalk. The apps under test are real Beamtalk projects in fixtures/, with BUnit for in-app assertions. The judge is not Beamtalk, so a broken toolchain cannot take down its own verdict.

5. Four layers of tests

beamtalk-uat/
├── tests/
│   ├── cli/            # Layer 1: one file per leaf command, path mirrors it (30 files)
│   │   ├── build.test.ts   release.test.ts   run.test.ts   …
│   │   ├── deps/add.test.ts   deps/list.test.ts   deps/update.test.ts
│   │   ├── workspace/{list,stop,status,attach,transcript,logs,create,prune}.test.ts
│   │   └── generate/{native,stubs}.test.ts   registry/site.test.ts
│   ├── journeys/       # Layer 2: J1 to J10
│   ├── adversarial/    # Layer 3: one file per category (§ 7)
│   ├── bench/          # Layer 4: user-level performance gates (§ 8)
│   └── editors/        # .vsix smoke (§ 6)
├── schemas/            # Zod: lint JSON, type-coverage JSON, MCP results, LSP results, releaseInfo, lockfile
├── fixtures/           # real Beamtalk projects (hello_web, counter_live, farm_cluster, …)
├── lib/                # env, toolchain, otp, proc, repl (pty), mcp, lsp, release, node, ide, bench, artifacts
├── bench/thresholds.toml   # p75 thresholds and multipliers (owner-gated)
├── targets.toml        # exclusions and incubating/blocking status (owner-gated)
└── playwright.config.ts

Layer 1: command contracts. There are 30 leaf commands:

Each file checks:

publish runs against a local bare-git package remote and a local-directory registry (a documented BEAMTALK_REGISTRY form). It never touches the real index or a real package repository.

Layer 2: journeys (§ 6). Ordered, cross-surface user stories sharing one environment.

Layer 3: adversarial tests (§ 7). Eight categories: swamp's seven, with "distribution security" split out because Beamtalk ships a distributed runtime.

Layer 4: performance gates (§ 8).

A journey reads as the user's story. Here is J3:

// tests/journeys/j3-packages.test.ts
import { journey, expect } from '../../lib';
import { LockfileSchema } from '../../schemas';

journey('J3 registry package serves HTTP', {
  tier: 'gate', budget: '8m', targets: 'all',
}, async ({ env, bt, step }) => {
  const app = await step('new --app', () => bt.newProject('hello_web', { app: true }));

  await step('deps add buccaneer from the real registry', async () => {
    await bt.in(app).run(['deps', 'add', 'buccaneer']);
    const lock = LockfileSchema.parse(await app.lockfile());
    expect(lock).toPin('buccaneer');
    expect(lock).toPin('catalina');              // transitive, resolved via the index
  });

  await step('overlay fixture source', () => app.overlay('fixtures/hello_web'));
  await step('build, warnings as errors', () =>
    bt.in(app).run(['build', '--warnings-as-errors']));

  const port = env.ports.allocate();
  const svc = await step('beamtalk run . (service mode)', () =>
    bt.in(app).spawn(['run', '.'], { env: { PORT: `${port}` },
      readyOn: 'stderr:/^Started hello_web v/m' }));   // the documented service-mode banner

  await step('serve a request', async () => {
    const res = await env.http.getUntilReady(`http://127.0.0.1:${port}/`, { within: '20s' });
    expect(res.status).toBe(200);
    expect(await res.text()).toBe('hello from beamtalk');
  });

  await step('stop cleanly, leave nothing behind', () => svc.interrupt({ expectExit: 0 }));
});

The fixture overlays the scaffold's src/. The [application] supervisor that new --app generates starts a fixture actor, and its start-up sends HelloWeb serve:

// fixtures/hello_web/src/hello_web.bt
Object subclass: HelloWeb

  /// Start the server on $PORT; answers Catalina's server supervisor.
  class serve -> Result(ServerSupervisor, Error) =>
    port := (System getEnv: "PORT" default: "4000") asInteger
    Buccaneer start: #{#port => port} handler: [:ex |
      ex sendResp: 200 headers: #() body: "hello from beamtalk"
    ]

Readiness is the service-mode banner beamtalk run . documents on stderr (Started <app> v<version>), followed by polling HTTP. Readiness never depends on fixture logging alone.

Rules shared by every layer:

6. The journey catalogue

#JourneySteps (abridged)Catches
J1InstallDocumented OTP install (§ 1). Then install.sh with the documented channel flag (--version vX.Y.Z, --nightly, --edge) or the zip plus PATH into a clean HOME; the archive fetched has the payload's sha256; --version matches; doctor is healthy. Then: install twice; --prefix with a space in it; --prefix without write permission gives a clear error; two OTPs on PATH (asdf and a system erl), where doctor names the one in use; OTP 27 on PATH gives a structured error. Finally --uninstall.Packaging, checksums, archive layout, OTP selection.
J2Project lifecyclenew → fmt-check clean → build → test → edit → lint finds it → fmt fixes it → run → build --escript → run the escript with no beamtalk on PATH → new --app → run . → Ctrl+C exits cleanly.Scaffold drift (BT-2476), the build cache, output routing, escript packaging (ADR 0099).
J3Registry packagesdeps add from the real registry → lockfile pins the closure → build --warnings-as-errors → buccaneer serves HTTP → deps update → warm rebuild. Offline: with the network blocked (HTTPS_PROXY set to a dead port), a locked project still builds from cache, and an unlocked deps add fails with a clear message.Index resolution, git checkout, the type checker against real packages, degraded-network behaviour.
J4Releasesrelease → start → ping → rpc "Beamtalk releaseInfo" → stop → leak check. TLS variant (RELEASE_DISTRIBUTION=tls, generated CA) plus a loopback client on the same host. --upgrade-from flags an unmigrated shape bump. Restart-based upgrade (ADR 0125 §2.1): stop 1.0, start 1.1 in place, and the node answers. Hot relup is not a v1 capability and is not tested.Launcher verbs, BT-5264-class epmd, TLS preflight, .cmd launchers.
J5Two-node clusterTwo farm_cluster releases → connect → named send → a class reference crosses the wire → hot reload on one node → skew is announced → kill a node → NodeDown is seen.ADR 0126 behaviour from installed artifacts.
J6Live developmentREPL in a pty: spawn a Counter, send it messages, edit the file, :sync; the same actor keeps its state and runs the new code. MCP via the SDK: evaluate → save_method → test → flush, and the change is on disk. LSP in workspace mode: diagnostics, and go to definition into a dependency.Hot reload, flush, LSP workspace mode.
J7LiveView IDEInstall the IDE archive → bin/server <workspace-id> → Playwright: page loads → eval round-trips → System Browser shows the class → edit a method → the workspace sees it. Linux variant: the candidate image (§ 10).Bundle/IDE skew, packaging, the Attach topology.
J8Upgrade pathinstall.sh --version <previous>, verified against that release's published .sha256 (so it works even when the previous release predates the § 3 payload) → project and release → install the candidate over it → the same project builds, tests and releases → --upgrade-from is clean → the old ~/.beamtalk cache is harmless.Cache and lockfile compatibility, stale install state.
J9Downstream canariesFor each registry package: its default branch and its latest tag. First, beamtalk build and beamtalk test, built as a consumer would build a dependency; errors and test failures are blocking-class. Then beamtalk build --warnings-as-errors and beamtalk test --warnings-as-errors, the satellites' own CI commands; a red that appears only here is a new-warning finding, filed and never blocking. A tag whose index entry declares a min-beamtalk newer than the candidate is skipped, with a note. Each tag's resolved commit is recorded in the run. Runs isolated (§ 7).BT-5283 / BT-5290.
J10Workspacesworkspace create → repl attaches → a second shell workspace attaches and sees the same bindings → transcript streams → stop → status shows stopped → kill -9 a workspace node → list and status report it stale, not running → prune removes it → no epmd registration is left.Workspace lifecycle across CLI invocations, stale-state recovery.

What J1 tests, and when the plain path runs. J1 tests the installer, pinned with its documented flags, so it reaches the exact candidate. The unpinned releases/latest path cannot see a candidate by design. It is exercised by a post-promotion smoke: J1, unflagged, on every target after promote. That run can't block, because the release is already out. A red files a priority-2 Bug.

Editors. Phase 6 adds a .vsix smoke in tests/editors/ using @vscode/test-electron: install the candidate .vsix, open a .bt file in a project, and get a diagnostic from the bundle's LSP. The Tauri desktop app is not tested by uat. Consequences states that gap.

7. Adversarial coverage, Beamtalk-specific

There is one file per category. Each test runs against the installed bundle. A test that finds today's behaviour lacking is a finding: it lands incubating with its Bug linked (§ 10). It is not softened to pass.

CategoryTests
Distribution securityWorkspace and foreground-REPL cookies are per-process, in a 0600 file, never ~/.erlang.cookie or nocookie (BT-5066). epmd and distribution listen only on loopback by default. A node with the wrong cookie is refused. TLS release: a plain-TCP client cannot connect, a peer whose certificate is from another CA is refused, and the launcher refuses an option file lacking verify_peer / fail_if_no_peer_cert or containing verify_fun / partial_chain (deploying.md). The console WebSocket binds 127.0.0.1 unless bind is set.
Secret leakageA sentinel secret, set in a cookie and in an env var a program reads, never appears in: stdout or stderr at -v and -vv; REPL errors; MCP evaluate errors and structured content; run --raw-mfa stacks; workspace and release logs; crash dumps; ps argv of started nodes.
Path traversalnew ../escape; a dependency or index entry containing .. or an absolute path; deps add --path pointing outside; a release tarball with ../ members fed to --upgrade-from; release --output refusing ~, /, the project root and src/ (deploying.md).
InjectionLauncher rpc / eval arguments with shell metacharacters stay Beamtalk text (bin/<n> and bin/<n>.cmd). Project names with ;, spaces or quotes. A registry git URL with an ext:: or --upload-pack payload is refused.
Signals and atomic writesSIGTERM (on Windows, a process kill) during build: the next build is correct. SIGKILL during release: the .beamtalk-swap journal recovers. SIGTERM during MCP flush: the source is either old or new, never partial.
LocksSIGKILL a build holding the project lock: the next build proceeds within 5s. Concurrent builds wait. Two release runs on one --output serialise. CLI, LSP and MCP refreshing one registry cache never see a half-written index.
Concurrency and hot reload under load:sync a class while 4 senders drive 10,000 messages per second at its actors: no lost messages, no crash, and every reply comes from the old or the new method. Five MCP sessions save_method one class: the result is one of the five, and flush writes a file that compiles.
Resource exhaustion and corrupt state100 MB to Transcript, a 50 MB MCP evaluate result, and deep recursion: no OOM, and a bounded, explained error. A corrupt beamtalk.lock, registry cache, .beam or workspace metadata.json, and a read-only project: each gives a structured error with a hint, never a crash or hang.

beamtalk-uat is public, so security reds stay private. Leakage tests use sentinel secrets, so their output reveals nothing real. A working bypass of a cookie, TLS or bind check is different: in a public log, it is a disclosed vulnerability. Therefore:

J9 runs third-party code, so it gets no secrets. beamtalk test on a package's branch or tag runs code its author controls, including native builds. J9's jobs therefore run with permissions: {}, no secrets and no tokens. They upload only JUnit and report artifacts. A separate report job, which never executes downloaded code, reads those artifacts as data and posts results. This isolation applies to every job that runs code not authored in beamtalk-uat or beamtalk.

8. Performance gates

Method (the article's): each benchmark runs 2 warmup iterations, which are discarded, then 5 measured iterations. It reports p50, p75 and p95 and gates on p75:

p75 ≤ threshold[benchmark][target] × multiplier[runner_class]

Benchmarks (the owner's list), each against the installed bundle:

BenchmarkMeasuresFixture
compile.cold / compile.warmbeamtalk build wall time, _build empty / warmbuccaneer plus deps
lifecycle.new_build_testnew → build → testthe scaffold
repl.startup / repl.eval_rtttime to the first usable prompt; round-trip of 3 + 4a project REPL
release.startbin/<n> start → first successful pinghello_web release
actor.throughput / actor.latencymessages per second; p75 send→reply between local actorscounter_live
cluster.sendp75 cross-node named-send round tripfarm_cluster
registry.resolve.cold / .warmdeps add + resolve + fetch, cold / warm index cachehello_web
lsp.hover / lsp.completion / lsp.definitionrequest→response p75, workspace modehello_web

That is 14 measurements. These catch what micro-benchmarks miss: release-build flags, packaging, startup, install layout and registry behaviour. beamtalk keeps bench-dispatch, the vs-elixir rows and the reduction and word counts. uat does not re-measure dispatch paths.

Where perf gates. Perf gates on linux-x86_64 and macos-arm64, on dedicated jobs that run nothing else at the same time. On macos-x86_64 and windows-x86_64 it runs report-only, weekly and on release candidates, until a non-Linux perf regression actually escapes. Packaging and release-build regressions are mostly platform-independent, so this halves the most expensive line. Edge runs skip perf: shared-runner noise would turn a per-merge signal into a flake generator. A nightly breach files a performance Bug. A release-candidate breach blocks promotion.

9. Harness capabilities

10. Gating: what runs when, what blocks, and how tests graduate

TriggerArtifactLayersTargets / OTPBlocks
Every edge publish (merge to main)edge bundleedge-fast: contracts, J1, J2, J4, adversarial fast subsetlinux-x86_64 / minNothing. Posts a uat-edge status on the merged commit. A red files a Bug. Superseded runs cancel.
Hourly, if edge movedlatest edgeedge-hourly: J3, J6, J9 on linux; the macOS fast set (contracts, J1, J2, J4 including TLS, adversarial fast subset) on macos-arm64linux-x86_64 / min; macos-arm64 / max (as § 3: brew installs the newest)Nothing. A red files a Bug within the hour (owner decision 3, coalesced).
nightly publishnightly bundlesall four layers (perf gates on linux and macos-arm64, report elsewhere)all 4 / per § 3Nothing. Reds file Bugs.
Weeklylatestall four layers, plus J9 on macOS and Windows, plus perf report on macos-x86_64 and Windowsall 4Nothing. Catches drift in OS images, the registry and GitHub.
Tagged release candidatevX.Y.Z pre-release assets + candidate IDE imageall four layersall 4 / per § 3Promotion, see below.
After promotionlatestJ1 unflaggedall 4Nothing; the release is out. Red files a P2 Bug.
beamtalk PR with ci:uatPR-built linux bundleedge-fastlinux-x86_64Informational (Phase 8).
workflow_dispatchanyanyanyn/a

Graduation: every new test starts incubating. Rule 4 and § 7 add tests continuously, and some land red on purpose. If every red blocked, the first release candidate after a new layer lands would be frozen. So:

Promotion is the blocked step, as in the article: "any fail blocks the binary." Today release.yml builds and publishes on release: published, so users can install before uat reports. Under this ADR:

  1. Build and attach. A tag push builds every target and attaches all assets to a GitHub pre-release: the bundles, the IDE archives and the .vsix. It also pushes the IDE image to ghcr.io/jamesc/beamtalk-ide:rc-<sha>. This requires splitting release-vscode.yml, liveview-release.yml, liveview-docker.yml and desktop-release.yml into build-and-attach and publish inputs. Today each runs both as one step under publish: ${{ github.event_name == 'release' }}. Build and attach run here. Only the publish halves wait for promote.

  2. Dispatch. beamtalk dispatches uat with the § 3 payload: every asset's sha256, and the image digest.

  3. Test and report back. uat runs every layer on every target against those bytes. It posts a uat/<channel>/<version> commit status for people to see. It also sends repository_dispatch back to beamtalk (event-type: uat-gate) with {tag, sha, version, assets, ide_image, result, run_id}, using a token scoped to dispatch into beamtalk only.

  4. Promote. promote.yml runs on that dispatch, in a protected GitHub Environment, release-promotion:

    • Only promote.yml on main may deploy to it.
    • It holds the only copies of the Marketplace token and the ghcr push and retag credentials, so no other workflow can publish.
    • The owner is a required reviewer for the first three promotions. The owner can later remove that.

    promote.yml ignores statuses. It reads the tag and sha from the payload, never GITHUB_SHA, and refuses unless all of these hold:

    • the tag still resolves to sha;
    • it re-downloads and re-hashes every pre-release asset and each matches the payload. Uploads use --clobber, so a re-run leg or a later workflow_dispatch could have replaced bytes after uat tested them;
    • the rc-<sha> image digest matches ide_image;
    • the API shows run_id is a completed, successful run of uat's gate.yml on uat's main, for this exact version and sha;
    • result is success.

    When all hold, it:

    • marks the release latest (make_latest), which install.sh follows;
    • publishes the tested .vsix to the Marketplace;
    • retags the tested image digest as <version> and latest;
    • runs the desktop publish.

    A refusal files a Bug.

  5. On red. The release stays a pre-release, Bugs are filed, and the fix is a new tag. The owner can promote by hand, with a recorded waiver, through the same Environment. No agent can, because no agent holds the Environment's credentials or its reviewer role.

A pre-release is not private, and this ADR accepts that. install.sh --version vX.Y.Z installs pre-releases by tag, and publishing one notifies repo watchers. A red candidate therefore reaches anyone who pins its exact version, and it uses up that version number: the fix ships as the next patch. Draft releases would hide candidates, but uat would then need a token to download them, which breaks the documented install path. Exposure is the smaller cost.

What blocks promotion:

The min-beamtalk index key (owner decision 1, amended). Registry index entries gain an optional per-version key:

[[versions]]
version = "0.3.0"
git = "https://github.com/jamesc/beamtalk-mint"
tag = "v0.3.0"
min-beamtalk = "0.7.0"   # this release needs toolchain ≥ 0.7.0

What never blocks:

cross-repo.yml is retired once J9 covers beamtalk-http in the hourly edge run.

11. Failure classes and triage

ClassMeaningFiles to
toolchainBeamtalk did the wrong thing (the default, per rule 1).Linear BT Bug
performanceA p75 over threshold.Linear BT Bug, performance label
securityA distribution-security or leakage red (from the private repo, § 7).Linear BT Bug, priority 2, with the bundle attached in Linear only
downstreamJ9 only: the package's code is wrong.The package's repository, linked from a BT comment
docsA test needed something undocumented, or followed a documented step that doesn't work (for example apt OTP, § 1).Linear BT Bug, area docs
infraThe runner, network or GitHub failed.Nothing. One re-run, then the owner.
supersededA rolling release moved on during the run (§ 3).Nothing. Cancelled.
harnessuat's own bug.A beamtalk-uat issue

triage.yml is modelled on beamtalk's ci-triage.yml. It fingerprints each red as (layer, test, step, target, otp, normalised first error line). It then comments on the open BT issue carrying that fingerprint, or creates a Bug with:

Secrets (owner decision 4). beamtalk-uat holds its own Linear API key and Claude OAuth secret, scoped to that repository and to the triage job, and only for runs of uat's main or schedule, never for PR or fork runs. The triage agent's tools are read-only plus Linear, and it treats logs as untrusted data.

There are no automatic retries inside a run. A test that fails and then passes on a rerun is filed as flaky.

12. Platform matrix, sharding and cost

Per-run figures, from the rows. The Linux column is warm runner-minutes. macOS is budgeted at 1.5× and Windows at 2×. Each shard also pays about 3 minutes of setup: restore npm and browsers, then install the bundle and OTP from the run's artifact.

Layer / journeylinuxmacos-arm64macos-x86_64windowsLinux min
Contracts (30 leaf commands)✓✓✓✓10
J1 Install (with edge cases), J2 Lifecycle (with escript)✓✓✓✓8
J3 Registry + HTTP + offline✓✓✓✓7
J4 Releases✓✓✓✓ (TLS incubating)6
J5 Cluster✓✓✓incubating5
J6 Live dev✓✓✓✓ (ConPTY)6
J7 LiveView✓✓✓— (ADR 0091)7
J8 Upgrade✓✓✓✓7
J10 Workspaces✓✓✓✓4
J9 Canaries (11 packages)✓weeklyweeklyweekly25
Adversarial, public categories (6)✓✓✓✓9
Adversarial, private repo (2)✓✓✓✓4
.vsix smoke✓✓—✓3
Functional total101114 (76 × 1.5)110 (73 × 1.5)138 (69 × 2)
Linux max-major leg (contracts, J1 to J4, J6)37
Perf (14 measurements × 7 runs, dedicated)20 (gate)30 (gate)30 (report, weekly and RC)40 (report, weekly and RC)

Shard plan:

TargetShardsPer-shard workWall
linux min-major6 (J9 4-way inside one)≈ 17 + 3≈ 20 min
linux max-major2≈ 19 + 3≈ 22 min
macos-arm646≈ 19 + 3≈ 22 min
macos-x86_646≈ 18 + 3≈ 21 min
windows8≈ 17 + 4≈ 21 min

Perf runs as one job per gated target, in parallel with the functional shards.

RunRunner-minutesWall timeHow it adds up
Nightly≈ 635≈ 30 to 60 minFunctional 101 + 37 + 114 + 110 + 138 = 500. Setup on 28 shards ≈ 85. Gated perf 20 + 30 = 50.
Release candidate≈ 705≈ 35 to 75 minNightly plus report-only perf on macos-x86_64 and Windows (+70).
Weekly on latest≈ 830≈ 45 to 75 minRC plus J9 on macOS and Windows (25 × 1.5 × 2 + 25 × 2 = 125).
Per edge publish (edge-fast)≈ 34≈ 15 minContracts 10 + J1/J2 8 + J4 6 + fast adversarial 4 = 28 over 2 shards, plus setup 6.
Per active hour (edge-hourly)≈ 105≈ 20 minLinux J3 7 + J6 6 + J9 25 = 38 over 4 shards, plus setup 12 = 50. macOS fast set 28 × 1.5 = 42 over 2 shards, plus setup 6, plus the macOS edge build in beamtalk ≈ 7 (warm).

The wall-time ranges depend on macOS runner concurrency. GitHub caps concurrent macOS jobs per account. A release candidate's 12 macOS shards can queue behind each other, and behind the hourly edge macOS leg, which is why the upper ends are higher.

Per day, at about 50 merges a day (main took 51 first-parent commits on 2026-11-25):

The total is ≈ 4,000 runner-minutes a day, ≈ 1,200 of it macOS.

Running every journey plus a macOS leg on every merge, as the earlier draft did, would have cost ≈ 50 × 125 ≈ 6,000 a day before nightly. That is why the heavy edge layers and the macOS leg are coalesced to hourly.

If even this is too much, the next lever is to coalesce edge-fast too: run it on at most one publish per 15 minutes. That keeps "a Bug within the hour" and roughly halves the edge-fast line.

BT-5273 lessons, applied:

13. LiveView feasibility

Feasible, with beamtalk changes in Phases 2 and 7:

14. What happens to the 16 current scenarios

The rewrite PR lists the mapping, and no contract is dropped silently.

Prior Art

User Impact

Steelman Analysis

Evolve the current Rust harness (add cross-surface [[journey]] to expect.toml)

Fold the journeys into beamtalk's own e2e suite

Keep uat as a smoke test

Write the harness in Beamtalk (dogfood)

Erlang common_test

TypeScript on Deno with Zod (swamp's exact stack)

Python, pytest and playwright-python

Tension points

Alternatives Considered

Each is steelmanned above:

Consequences

Positive

Negative

Neutral

Implementation

Phases follow the 80/20 point: Phases 0 to 2 cover all four 2026-11-26 incidents and make promotion real. Every later layer lands incubating and graduates (§ 10), so nothing added after Phase 2 can freeze a release.

PhaseScopeSizeWhy this order
0. Skeleton, governance, artifactsuat: Playwright Test project; env, toolchain, otp, proc and artifacts libraries; the resolve job with download-once fan-out and superseded; Zod schemas/; leak checks; failure bundle; 4-target × OTP workflow; CLAUDE.md rules; CODEOWNERS, targets.toml, branch protection, Claude App identity, governance.yml tripwire; J1, J2, and Layer 1 for the 7 already-covered commands; delete the Rust harness; accept both event types. beamtalk: pin runner labels; edge.yml publishes macos-arm64; install.sh --edge on macOS; edge.yml and nightly.yml dispatch with the § 3 payload.M (uat) + S (beamtalk)Everything builds on it.
1. Canaries, releases, triageJ9, isolated (permissions: {}), in edge-hourly, with consumer-build (blocking-class) and --warnings-as-errors (file-only) passes and min-beamtalk skipping. In beamtalk: the min-beamtalk index key in docs/beamtalk-packages.md, and beamtalk publish writing it; J4 on linux and macOS, including the TLS step (the permanent BT-5264 test); triage.yml with fingerprints, classes and repo-scoped secrets; retire cross-repo.yml.MCatches BT-5283 and BT-5264 within the hour.
2. Thin promotionbeamtalk: split build-and-attach from publish in release.yml, release-vscode.yml, liveview-release.yml, liveview-docker.yml and desktop-release.yml; tags publish a pre-release with every asset attached and the rc-<sha> image; promote.yml in the release-promotion Environment, with re-hashing, run verification and owner review for the first three; the post-promotion J1 smoke. uat: the uat-gate dispatch back. Blocking set: contracts (7), J1, J2, J4, J9 on tags.MThe gate becomes real. Everything after this lands incubating.
3. Remaining contracts, registry, workspacesLayer 1 for the remaining 23 leaf commands, plus the missing-JSON feature Bugs; J3 with offline; J10; J1's install edge cases and J2's escript step. All incubating.MThe newcomer's first-service path.
4. Adversarial layerThe six public categories in uat; beamtalk-uat-security (private) for distribution security and leakage, with its triage. Incubating; findings filed.MNeeds Phase 1's release and node handles.
5. Performancelib/bench.ts (2 + 5, p50/p75/p95, paired-ratio column); the 14 measurements; 10 report-only nightlies; the owner sets thresholds.toml; gating turned on for linux and macos-arm64.MCalibration needs real nightly data.
6. Live development and editorsJ6 (REPL pty with ConPTY, MCP via the SDK, LSP workspace mode); the .vsix smoke.MInteractive-first is principle #1.
7. Cluster, upgrade, LiveViewJ5, J8; nightly.yml publishes IDE archives (S, beamtalk); ide.ts, J7 and the rc-<sha> image variant.L (+S)The most harness work.
8. Opt-in PR runsA ci:uat label in beamtalk builds a linux bundle and calls uat's reusable gate.yml (edge-fast).SNice to have once the rest is stable.

Affected components:

Migration Path

There are no user-facing changes. For maintainers:

Owner Decisions (2026-11-26)

These were raised as open questions in the first draft and settled by the owner. They are folded into the sections above:

  1. Canary blocking: yes, amended after review (review findings 4 and 17).

    • A J9 canary blocks promotion only on build errors and test failures in a package's latest tag.
    • New warnings are filed as Bugs and do not block.
    • Registry index entries gain an optional min-beamtalk key, so a package release can opt out of toolchains it doesn't support. J9 skips such a tag, with a note.

    See § 6 J9 and § 10.

  2. Pre-release, then promote: yes. The VS Code, IDE, Docker and desktop publishing runs from promote, so editors and the IDE ship only after uat passes (§ 10, Phase 2).

  3. Edge on macOS: yes. edge.yml builds macos-arm64, and uat runs the macOS fast set on the latest edge every hour, coalesced for cost (§ 10, § 12).

  4. Triage secrets: beamtalk-uat holds its own Linear and Claude secrets, scoped to that repository and to the triage job (§ 11).

  5. J5 on Windows: incubating at first, then blocking after about two weeks green, under the general graduation rule (§ 10).

The user-level performance gates (§ 8) and the split that leaves micro and dispatch benchmarks and coverage in beamtalk are also owner decisions.

Implementation Tracking

Epic: BT-5302 Status: Planned (2026-11-26)

[uat] issues are implemented in jamesc/beamtalk-uat. [beamtalk] issues are implemented here.

PhaseIssues
0. Skeleton, governance, artifactsBT-5303 (uat harness rewrite), BT-5304 (uat governance), BT-5305 (uat J1, J2 and the first contracts), BT-5306 (beamtalk runner pinning and dispatch payload), BT-5307 (beamtalk macOS edge asset and install.sh --edge)
1. Canaries, releases, triageBT-5308 (beamtalk min-beamtalk key), BT-5309 (uat triage), BT-5310 (uat J9), BT-5311 (uat J4, edge-fast, macOS fast set), BT-5312 (beamtalk: retire cross-repo.yml, docs)
2. Thin promotionBT-5313 (beamtalk build/publish split, pre-release), BT-5314 (uat release-candidate gate flow), BT-5315 (beamtalk promote.yml in a protected Environment)
3. Contracts, registry, workspacesBT-5316 (uat remaining contracts), BT-5317 (uat J3), BT-5318 (uat J10, J1 edge cases, J2 escript)
4. AdversarialBT-5319 (uat public categories), BT-5320 (private beamtalk-uat-security)
5. PerformanceBT-5321 (uat perf gates)
6. Live development and editorsBT-5322 (uat J6), BT-5323 (uat .vsix smoke)
7. Cluster, upgrade, LiveViewBT-5324 (uat J5, J8), BT-5325 (beamtalk nightly IDE archives), BT-5326 (uat J7)
8. Opt-in PR runsBT-5327 (beamtalk ci:uat)

References