A multi-tenant execution and trace kernel for agent work. Fabric runs bounded agents on one or many machines, under policy, with every action recorded: typed streams of events in Postgres, attempts with fences and database-time leases, and an effect broker that records intent, dispatches once and settles unknown outcomes by reading the target back. An organisation control plane (GoodQA) supplies users, orgs, tickets and UI; a personal edition uses a local identity issuer. The decision is in docs/adr/0001-kernel-scope.md.
Agent Fabric is for people and teams who run long unattended agent jobs and cannot accept a worker that double-posts a comment, outlives its lease, spends past a cap or marks work done on its own say-so. The problem: agent runs fail halfway, retry, and touch outside systems. Without a durable record, nobody can tell whether an action happened.
The target has 12 dimensions: multi-harness (including a built-in harness), multi-machine, multi-agent, configurable policy, traceability, long-term work tracking, full computer use, full browser use, inter-agent and inter-harness messaging, gateway trace and control, multi-tenant, and multi-user and org-controlled plus a personal deployment. The roadmap slices F0 to F13 in docs/status-and-roadmap.md close them, and docs/slices.md outlines each slice's acceptance checks and negative cases.
What exists today is the core, not the whole target. It is a single-host, single-operator coding-agent slice with these parts:
- Keeps every mission in PostgreSQL as an event log, driven by a pure state machine with property tests and a separate invariant oracle.
- Gives each attempt a fence and a database-time lease, so a stale worker cannot write.
- Routes outside-world actions through an effect broker that records intent, dispatches once, and settles unknown outcomes by reading the target back; conflicts are quarantined for an operator.
- Confines workers with Landlock (Linux) or Seatbelt (macOS) profiles that must pass negative controls first, and builds worker environments from an allow-list.
- Caps native-API spend before each send, and can require durable human review of every native tool call.
- Refuses to mark a mission done without a live-test receipt for the deployed commit.
What it does not have yet, honestly: tenants and row-level security, an event envelope with versions and trace ids, typed streams other than missions, signed principals, a node agent and machine registry, harness adapters beyond two providers, browser and desktop capabilities, messaging, a gateway and a read API. Each is a named slice in the roadmap; the shipped state and the state of each of the 12 dimensions are in docs/status-and-roadmap.md. Design and data flow of the current core: docs/architecture.md.
What is different: models propose and deterministic code decides, and docs/review-gates.md lists each refusal with the test that fails if it breaks.
Status: early, shadow-only, under review. Nothing here drives a live system yet. The code is being built against a design document and an independent code inspection; findings are fixed in commits that cite the inspection. Treat every claim below as "tested in the ways stated", not as production readiness. Each capability is planned to leave shadow-only mode when its own live acceptance passes on the deployed build; that is not gated on the foundation slices.
internal/domain,internal/reducer: the pure state machine (three independent version counters, four state dimensions, a separate invariant oracle, seeded property tests, must-fail mutants intools/mutants).internal/store: the Postgres authority. One transaction per command with stable replay under an idempotency key, gap-free per-mission events, a transactional outbox that cannot skip late commits, attempts with database-time leases.internal/effects: the effect broker (INTENT -> DISPATCHED -> CONFIRMED | FAILED_DEFINITE | UNKNOWN -> reconciled by readback), approval bound to the request hash, a fake executor and a GoodQA ticket-comment executor. A readback conflict leaves an effectQUARANTINED; only an app-role operator can settle it (fab effect resolve --outcome applied|not_applied --reason --evidence), audited in the append-onlyeffect_resolutionstable. A database guard binds every role: settled outcomes do not change except by retry, effects are never deleted, and a new intent or dispatch holds its live attempt row. A never-sent intent left by an ended attempt is settled withfab effect abandon --reason --evidence, only if it was never dispatched, audited in the same table. State moves follow an allow-list of the broker's own steps. A dispatcher holds the effect's advisory lock from before the DISPATCHED commit until its outcome is recorded, with Precondition plus transport under a deadline (60 s, or the attempt's lease end if sooner); at most half the pool's connections dispatch at once. A dispatch is stale only when its lock is free, its attempt is no longer live and it is older than twice that deadline; stale dispatches are listed byfab effect unresolvedand read back byfab effect reconcile. An outcome whose connection died is recorded once on a fresh connection; a late outcome for a row that moved on is reported (ErrSettleLost), not dropped. Deploy one broker version per database with one transport timeout; a transaction-mode connection pooler (PgBouncer) is unsupported, since the lock is session-scoped. Limits: the app role is the reconciler, so a RECONCILING effect settles to whatever readback the app reports; a DISPATCHED settle needs a receipt naming its dispatch number and outcome, which the app role can still forge by hand. No daemon sweeps unresolved effects yet.fab admit,fab unpauseandfab doneare refused while any of the mission's effects is unsettled (fails closed), andRetryre-arms an effect only while its attempt is live at the effect's fence. Runbook: on a refusal naming "effect(s) … are unsettled", the mission is stuck ifSELECT id, state, dispatches FROM effects WHERE mission_id = '<m>' AND state NOT IN ('CONFIRMED', 'FAILED_DEFINITE', 'NOT_APPLIED', 'RESOLVED_APPLIED', 'RESOLVED_NOT_APPLIED')shows an INTENT or APPROVED row withdispatches > 0, or an UNKNOWN row thatfab effect reconcilekeeps returning to UNKNOWN. Those have no audited exit yet (goodqa#15216, required before the first unattended production mission): the mission stays blocked; do not hand-edit the row.- Done means live-tested:
fab doneis refused untilfab live-testrecords a receipt for the deployed commit of the current candidate, and while any of the mission's effects (reducer or broker) is unsettled. internal/host: Linux (systemd user unit + cgroup inventory + Landlock) and macOS (own session + Seatbelt + inventory by token and inherited descriptor) profiles, each with a negative-control suite that must pass before the profile advertises a boundary.internal/provider/claude: a bounded stream-json parser and a launch line built only from a policy grant (no model names in this repository).internal/sched,cmd/fab: the daemon loop, jobs, waits, a CLI, and a recorded fake provider for shadow runs.
fab metrics prints the fabric's health once in the Prometheus text format
(0.0.4). fab serve-metrics serves the same thing at GET /metrics. It
listens on 127.0.0.1:9464 by default and refuses any address that is not
a literal loopback IP unless --allow-remote is passed, because there is no
auth. It has no write routes, and it runs one collection at a time; a
scrape that arrives during one gets 503. Against DNS rebinding it answers
403 to a request whose Host is a name rather than a literal IP or the listen
address, and to any request that carries an Origin header, so a scraper
must address it by IP.
Every value comes from the database, in one read-only transaction with a
statement and lock timeout (--timeout, default 2s). The collector takes no
row locks, so a dispatch never waits on it directly. One indirect wait
remains: while a migration's exclusive lock request is queued behind a
collection, queries behind that request wait too, for at most the timeout
plus 1s, so keep --timeout short. Label values are ids and enum
values only. Anything else becomes other, and ticket text, questions,
subjects, paths and requests are never read. Live per-process counters (a
broker's executor overruns, dispatch slots in use) arrive later, with an
in-process serve-metrics in the daemon.
| Metric | Type | Labels | Meaning |
|---|---|---|---|
fabric_build_info |
gauge | version | always 1 |
fabric_schema_migrations_applied |
gauge | rows in fabric_schema |
|
fabric_schema_level |
gauge | number of the latest migration | |
fabric_missions |
gauge | execution, terminal | missions by state |
fabric_attempts_active |
gauge | state, lease (live/stale) |
LEASED, PREPARING and RUNNING attempts |
fabric_effects |
gauge | kind, state | effects by state |
fabric_effect_oldest_age_seconds |
gauge | state (QUARANTINED, RECONCILING, UNKNOWN) | oldest effect in that state, 0 when none |
fabric_dispatch_inflight |
gauge | effects in DISPATCHED | |
fabric_dispatch_overdue |
gauge | DISPATCHED past the deadline stamped at dispatch | |
fabric_dispatch_limit |
gauge | configured dispatches per store | |
fabric_sched_counter_total |
counter | name | sched_counters |
fabric_resource_capacity, _held, _spent_month |
gauge | resource, unit | dispatch-gate resources; spent is settled usage this UTC month |
fabric_native_spent_month_usd_micros |
gauge | native provider cost this UTC month | |
fabric_budget_cap_usd_micros |
gauge | scope (month, job, live_test) | fixed ceilings (constants): month USD 20, job USD 5, live test USD 1 |
fabric_asks_open |
gauge | kind | open asks |
fabric_asks_open_oldest_age_seconds |
gauge | oldest open ask, 0 when none |
fab tui is a read-only terminal view of the same state. It needs a terminal
and FABRIC_DSN, and it starts even while the database is down.
- Header: the
/metricsgauges. These are the version, schema level, missions, attempts live and stale, effects UNKNOWN, QUARANTINED and RECONCILING, dispatch in flight against its limit and overdue, open asks, and month spend against its cap. - Missions pane: active missions first, running work on top. Each row shows age and spend against the job cap.
- Attempts pane: LEASED, PREPARING and RUNNING attempts, each marked live or stale.
- Effects pane: UNKNOWN, QUARANTINED and RECONCILING effects, oldest first.
- Asks pane: open asks, oldest first.
- Detail: Enter opens the selected row's mission, with its attempts, effects, asks and decisions. Decisions are its asks of kind decision plus the effect resolutions recorded on its effects.
Keys:
| Key | Action |
|---|---|
| Up/Down, j/k | Move |
| PgUp/PgDn | Page |
| Tab, Shift-Tab | Change pane |
| Enter | Open the mission |
| Esc | Go back, or clear the filter |
/, Ctrl-F |
Filter |
| q, Ctrl-C | Quit |
--keys=off turns off the single-character shortcuts j, k, q and /. The arrows, Enter, Esc, Tab, Ctrl-F and Ctrl-C still work.
--no-color, or a set NO_COLOR, removes every text attribute. Colour is never the only cue:
- the focused row starts with
>; - a warning starts with
!and saysdisconnectedorstale.
--interval (default 2s, at least 250ms) sets the refresh rate. --timeout (default 1s) bounds each refresh.
Every refresh runs in one read-only transaction (metrics.ReadOnly), on a pool whose sessions are default_transaction_read_only, so the view cannot write. A row lock never delays it. Under a table lock, the refresh gives up at its timeout and the header shows ! stale over the last data. A lost database shows ! disconnected: retrying until it returns.
Database text is sanitized before it is drawn: ticket text, ask questions and resolution actors. Control and escape sequences, C1 controls, and bidi and zero-width characters are removed, and the text is cut to the terminal width. Effect subjects and requests, prompt bodies, ask options and errors are never shown. A failure shows only its SQLSTATE.
fab version prints the build revision, the same value as fabric_build_info.
Every mission names its provider when it is created, and it never changes
(goodqa#15087): fab mission new --provider claude-code|anthropic-api is
required, and the database refuses an UPDATE of missions.provider.
claude-code: fabd runs the mission on the Claude Code binary.anthropic-api: onlyfab mission run --grant Fruns it, through the native loop. That loop accepts only an API-key-shaped key, sends it only tohttps://api.anthropic.com(no proxy), and refuses subscription billing.
Each attempt records the path that started it (attempts.path), and the
database refuses an attempt whose path differs from its mission's provider.
Fabd always starts claude-code, fab mission run always starts
anthropic-api, and fab attempt start requires --path (and
--lock-path for anthropic-api). The path is part of the start command's
request hash, so a start command recorded by an older binary and replayed
by a newer one is refused as a changed payload. Live had no in-flight
attempts at the upgrade, so nothing else was done.
Two flags are not the mission provider:
fab daemon --provideris the provider binary fabd launches (claude, or a recorded fake for shadow runs).fab mission run --provider anthropicis the grant's provider field.
The native month cap is keyed on the database clock, never the host's, and a run charges the UTC month it started in, even if it ends in the next one.
FABRIC_REVIEW_GATE=1 makes fab mission run send every native tool call
(read, grep, shell) through a durable review before it can run. With
the variable unset, or anything other than exactly 1, native runs behave
as they did before the gate existed: no review DSN is needed and tools are
not gated. A grant that sets review_gate while the flag is off is refused,
so a run can never believe it is gated when it is not.
With the flag on:
FABRIC_REVIEW_DSNmust name a separate app-role database login (not the owner, not the runner).fab mission runreads it, removes it from its own environment before any worker is built, and the worker never sees it. The runner role cannot read review proposals or results and can only settle the exact attempt, fence and tool call it holds, from bytes the database already stored (migrations 0033 to 0036; rerunfab db rolesafterfab migrate).- The grant's
review_gate.modeisshadow(the default: calls are reviewed and recorded, never executed),evaluate(also never executed) orenforce(approved calls run once).review_gate.safe_toolsnames tools that need no human approval.shellneeds a human by default. FABRIC_ACTOR=op:<name> fab review list|show|approve|rejectis the operator side. It shows request metadata only, never arguments or prompts. Approving or rejecting wakes the waiting native process, which keeps its lock, fence and heartbeat while it waits.
The schema migrations always apply and are harmless with the flag off; only the native wiring is gated.
A worker's environment is exactly what fabric builds, whatever fabd, the
host or the worker user's systemd manager holds. Fabric may set only these
names: FAB_RUN, FAB_MISSION, FAB_ATTEMPT, FAB_FENCE,
FAB_RUN_DIR, FAB_WORKTREE, FABRIC_DSN, FABRIC_HOME, HOME,
PATH, LANG, USER, TMPDIR, SHELL, CLAUDE_CONFIG_DIR,
CLAUDE_CODE_DISABLE_CLAUDE_MDS, XDG_CONFIG_HOME, XDG_CACHE_HOME,
GOCACHE, GOMODCACHE and GOFLAGS (internal/host/env.go). A launch
that sets any other name is refused, so a proxy or locale variable the
claude binary turns out to need is a reviewed code change. On Linux no
value goes on a command line, where sudo and systemd-run would show it to
every local account for the whole run (goodqa#15177). fabd writes the pairs
to <run dir>/.fab-env-<run> (mode 0640, new file, never through a
symlink), every allow-listed name is blanked with systemd-run -E NAME=
(so the manager's value is overridden), and fab __sandbox --env-keep <names> --env-file <file> reads the file, checks that it names exactly
those names, removes it and execs the worker with only those pairs. fabd
removes the file after the run if the worker never read it. The run
directory's group must include the worker account, as the setgid
/srv/fabric/work tree gives it. The worker is a static fab
(CGO_ENABLED=0, see Deploying).
A claude-code launch always passes --setting-sources "", so no user or
project settings load. The --settings file may hold only permissions,
hooks and model, and each hook only type: command, command and
timeout (keys are matched exactly, as Claude Code reads them). Each hook
command must be a single absolute path under FABRIC_HOOKS_DIR, both as
written and once symlinks are resolved. The worker user must be unable to
change the settings file, the hooks directory, each hook, or any directory
or symlink on the way to them: a file or directory owned by the worker or
writable by group or others (a directory may be writable only if it is
sticky and owned by root, like /tmp), or a symlink not owned by root or
fabric, refuses the launch. This matters because Claude Code reloads an
edited settings file in a running session. Managed settings apply whatever
--setting-sources says, so fabric also reads managed-settings.json,
every managed-settings.d/*.json and managed-mcp.json under
/etc/claude-code (Linux) or /Library/Application Support/ClaudeCode
(macOS). Any of these refuses the launch: an env block; a credential or
command helper (including policyHelper, processWrapper and the
sandbox binary paths); managed hooks, plugins or MCP servers (a managed
MCP server would inherit the worker's FABRIC_DSN); or a file that cannot
be read or parsed. A missing file is fine. The macOS managed-preferences
profile and server-managed settings are not read; both are controlled by
the machine's or organisation's administrators.
On Linux, workers start with systemd-run --expand-environment=no, so the
user manager never substitutes $VAR in a worker's arguments (a prompt
included). That flag needs systemd 254 or later; an older systemd rejects
it and the start fails.
A binary refuses to open or migrate a database that holds a migration it
does not embed, and names its own latest migration and the foreign one.
This is checked at start-up only: a long-running process keeps going, and
for 0026 the attempts.path trigger stops an older fabd. Every later
migration therefore stops every binary built before it, worker-side fab
calls included, until that binary is upgraded too. Upgrade all binaries
on a host together.
FABRIC_DSN must be a direct connection or a session-mode pooler, never
a transaction-pooling pgbouncer. The host reconcile lock (held by fabd and
fab reconcile) and each native attempt's agent-run lock are session
advisory locks. Behind transaction pooling they exclude no one: two
reconcilers could run at once, and a second native process could run the
same attempt.
Some states wait for a human on purpose. Clearing them needs an explicit
operator actor, FABRIC_ACTOR=op:<name>, and a --reason. The fab CLI's
default actor chat is refused for these commands (it still works for
everything else), as are fabd, native-runner, import and asks.
This is attribution and friction, not authentication: the actor is
asserted by the caller, so any script that sets op:<name> passes. The
real separation is the database role; a runner role cannot write events
at all. An operator-only role for these commands is follow-up work.
- Parked missions. After six consecutive attempts abandoned before
launch, a mission is parked: no attempt starts, and once nothing is live it
is BLOCKED and frees its slot. Only an operator clears a park:
FABRIC_ACTOR=op:<name> fab admit --mission <id> --reason '<why>' --key <key>. The scheduler, the native runner and the importer get exit 3 (goodqa#15082). - Paused missions. A quarantined attempt pauses its mission, which keeps
its slot. After checking that the quarantined runner is gone,
FABRIC_ACTOR=op:<name> fab unpause --mission <id> --reason '<why>' --key <key>returns it to ADMITTED. It is refused while any attempt is live or unresolved, while any broker effect is unsettled (resolve it first), without a reason, or for a non-operator actor (goodqa#15085). A parked mission that is unpaused goes straight to BLOCKED with its park kept;fab admitthen clears the park. The quarantined attempt stays QUARANTINED: nothing checks by machine that its runner is gone, so check the host before unpausing. An older binary refuses to write to a mission whose log has aMISSION_UNPAUSEDevent, so roll back with care. - Operator reconcile.
fab reconcileruns one reconcile pass for this host, under the host reconcile lock (exit 3 while fabd or another pass holds it). Its commands stay under actorfabd, so a pass and fabd replay each other. To tell the operator pass apart, it writes one stderr line,fab reconcile: operator pass host=<host> actor="<FABRIC_ACTOR>" pid=<pid> expired=<n> quarantined=<n>, and adds one tofabric_sched_counter_total{name="reconcile_operator_passes_total"}. A refused or failed pass writes no such line and does not count. - GoodQA comment readback.
fab effect reconcilereads a ticket's comments in every archive state (goodqa#15260). COMMITTED means the comment was posted at least once; it may since have been archived by retention or undone in Commander (an undo also archives it), and it is never reposted on its own. To post the same text again on purpose, submit a new effect with a new--key. The readback reads at most 5 pages of 200 comments (1,000), archived ones included. A longer thread reads EXHAUSTED ("comment history exceeded the page budget") and moves to QUARANTINED, because a later pass cannot read more; check the ticket by hand and settle it withfab effect resolve --id E --outcome applied|not_applied --reason R --evidence REF(goodqa#15260).not_appliedis final: to post again, submit a new effect with a new--key. - Final admission. Every launch, gated or not, rechecks the attempt's fence, lease and intent revision against the database clock just before the runner starts. A database error at that moment abandons the attempt before launch, and it counts toward the park budget, so a database outage can park missions (fail closed; re-admit them afterwards).
- Linux sandbox findings are still being fixed. A code inspection found that on a same-UID host a worker can reach the user manager's bus and start a sibling unit outside its cgroup and Landlock domain, and can signal same-UID processes. The repair runs workers under a dedicated locked account and verifies stops by cgroup emptiness; until re-review passes, no real provider runs on Linux, only the recorded fake.
- macOS cannot see the environment of Apple platform binaries; attribution
uses an inherited descriptor as a second signal, and a platform binary that
calls
setsidand closes inherited descriptors is still invisible. - A macOS worker runs as fabd's own user, so its file, process-info and
network access is limited by the Seatbelt profile (goodqa#15161):
HOMEmust be an absolute directory other than/, or the launch is refused;- every read under
$HOME, under the account's directory-service home (an overriddenHOMEdoes not move it) and under/Usersis denied. Reads are also denied in the directories holding other runs and other missions' worktrees, unless the work root sits in a shared temp directory. Only the run's directory, its worktree and the reviewed launch inputs are allowed back. The secret paths stay denied even inside those; - the ancestors of what is allowed back can still be stat'ed (metadata
only), so git,
realpathand Node can canonicalise paths; - the launch inputs are the provider's installed directory (after
symlinks),
FABRIC_HOOKS_DIR, the schema file and any extra absolute paths inFABRIC_DARWIN_EXTRA_RO(for example nvm's node directory whenclaudeis an npm install). An entry is refused when it is/, a home, an account's home under/Users, or a directory holding a home, the directory of other runs, or a secret path (so not~/.config,~/Library,~/.dockeror~/.config/fabric). Each launch resolves the provider name again and runs the resolved file, not a symlink in a denied bin directory, so a provider update that repoints the symlink is followed; a name that does not resolve (or a symlink that cannot be followed) refuses that launch by name, never falling back to the symlink or an older file. The controlprovider_starts_under_profileruns the file resolved at fabd start with--version. If--providerdoes not resolve to a file when fabd starts,fab daemonrefuses to start (provider "…" cannot be resolved to a file; refusing to start fabd), on every host and even with--trust-provider, so an unresolvable provider can never silently skip the control (with--trust-providerthe containment gate, this control included, is skipped by design). The read-allow-back directory and the control's file are fixed when fabd starts: restart fabd after moving the provider install to another directory. Any other tool onPATHunder a home is unreadable, so install toolchains outside$HOMEor list them there; - the worker's git uses the run's own global config
(
GIT_CONFIG_GLOBAL), because git exits on a denied~/.gitconfig; - reading other processes' arguments or environment (process info and
kern.procargs2) is denied; - network is denied except outbound TCP to 443 and the database ports of
FABRIC_DSNand the runner DSN (5432 when a postgres URL names no port), plus the DNS resolver socket. Seatbelt filters by port, not host, so any host on those ports is reachable; that is port-scoped, not mediated, egress. Unix-domain sockets are denied too, so tools that use a path socket for their own IPC (gpg-agent, ssh ControlMaster, some language servers) fail. An empty port list means 443 on macOS but no TCP at all on Linux; - the profile is still allow-default for mach IPC, signals and launchd: a worker that asks launchd or LaunchServices to start a process gets an unsandboxed one, and it can signal fabd. These denies are goodqa#15196. The negative controls check a sample of this on the host before an untrusted provider runs:
home_reads_default_denied: canaries in each home are unreadable, and a run-dir file is readable in the same run;network_limited_to_allowed_ports: an allowed loopback port is reached and another is refused;launch_inputs_readable: every launch input is readable;provider_starts_under_profile: the provider starts with--version. The unit testTestDarwinProfileDefaultDenycovers the rest:kern.procargs2, unix sockets, git with the worker's environment in a worktree under a home that holds a.gitconfig, and the sibling and allow-back boundaries.
- The grant is an in-process struct, not a signed envelope; there is no separate host agent yet; the worker still carries a runner database DSN (asks and effects).
- Host jobs are disabled (goodqa#15082). A run used to request a job whose
argv the daemon launched outside the run's sandbox. Now
fab job runandfab job watchexit 3, the runner role has no INSERT onjobs(and migration 0025 refuses one even if granted by hand), and the daemon only retires its own host's leftover REQUESTED rows to FAILED_TO_START. A legacy watcher may still record its exit. Typed, approved job templates are future work; until then a run cannot start work that outlives it. - The dispatch gate (
fab daemon --hold) is an accident guard, not a security boundary yet. It stops the scheduler from over-admitting a resource by mistake. It is not proven against a runner that writes the database directly until the runner-role restrictions (migration 0017,fab db roles) pass independent review. Runners must connect as the runner role (FABRIC_RUNNER_DSN), never as the app or owner role. Fabd hands a worker only that login, checked as a runner role before the first launch whether or not--holdis set; without it fabd launches nothing, and never hands a worker fabd's own login (goodqa#15173). The check refuses a runner login holding any write on any table beyond the runner's list (column grants, DELETE, TRUNCATE and TRIGGER included), or CREATE in the schema (goodqa#15167). Only the owner writesfabric_schema(0029, goodqa#15163), and every function runs with a pinnedsearch_paththat searchespg_templast, so a session's temporary table cannot shadow a table a trigger reads (0029, goodqa#15164). Since 0018 a runner may only submit, dispatch, settle and retry effects for a running attempt, request jobs for one, and raise open asks; approval, effect readback and answers need the app role. These guards bind the runner role, not one run: the role is shared by every runner on a host, so any runner can act for any running mission (raise its asks, submit or settle its effects), and it can read every table. A runner settles dispatches, so a forged transport receipt for a live run is believed; a dispatch left by an ended run goes to the app role's readback (0019). The capacity gate does not depend on these rows. fab metrics,fab serve-metricsandfab tuiconnect with whateverFABRIC_DSNnames; read-only transactions (and, for the TUI, read-only sessions) are the guard. A least-privilege read-only role is not yet provided, and--allow-remotemetrics have no auth.- Store tests need a disposable PostgreSQL 16 (
FABRIC_TEST_DSN); the process-signalling controls are opt-in (FABRIC_HOST_CONTROLS=1).
go test ./... # pure packages; store tests need FABRIC_TEST_DSN
FABRIC_TEST_DSN=postgres://... go test ./... # disposable database only
python3 -I tools/mutants/run.py --repo . --out mutants.tsv
Dependencies: pgx/v5 and x/sys (plus what they pull in).
Toolchain: go.mod needs Go 1.26.0 or later, and pins toolchain go1.26.10, which is what release binaries are built with (goodqa#15299).
Run the go command with GOTOOLCHAIN=local so an older go fails with
"requires go >= 1.26.0" instead of silently downloading a toolchain; the
in-repo scripts that build (internal/host/linux_manager_runtime_controls.sh,
tools/native-mutants/mutants.py) set it and take the go binary from
FAB_GO.
- Back up the database first (
pg_dump -Fc), check the dump withpg_restore --list, and keep the previousfabbinary for rollback. - Build from a fresh
git clonechecked out at the release commit, with the pinned Go 1.26.10 andGOTOOLCHAIN=local CGO_ENABLED=0 go build -trimpath -buildvcs=true -o <path> ./cmd/fab. Check thatgo version -m <path>names go1.26.10, and thatgit status --porcelainis empty, thatgo version -m <path>showsbuild CGO_ENABLED=0(a worker is a static fab, so it loads no shared library a worker-user environment could redirect), and that<path> versionprints the commit's 12-character prefix; refuse to install a build that fails any of these, printsdevelor ends in-dirty. We observed a build from agit worktreecheckout (Go 1.22.2) printdevel; the version check catches it either way. - Stop anything using the database, fabd included, before installing the
new binary (a running fabd launches workers through the installed
fab, and an old fabd with a newfabfails every start), then runfab migrateas the owner. - Run
fab db rolesas the owner after every migration, with the same password files, so the app and runner roles are granted the new tables; without it the app role getspermission denied(SQLSTATE 42501).fab db rolesapplies everything in one transaction, so a failed run changes nothing; rerun it after fixing the cause. Since 0029, fabd refuses to start a worker when the runner login holds any grant thatfab db rolesdoes not give, so skipping this step after an upgrade that changed the runner's grants stops every launch. - Restart, then smoke test:
fab versionandfab metrics(exit 0, andfabric_schema_levelis the newest migration).
fab daemon (fabd) is deliberately not installed as a service on a Linux
live host. It stays that way until the worker sandbox passes re-review (see
Known limits). Live checks run a bounded daemon by hand against the
recorded fake worker and stop it afterwards. A mission whose attempt
was quarantined during such a check keeps its slot until an operator
checks the host and runs fab release or fab unpause.
Rollback: stop everything using the database, reinstall the previous
binary, and restore the dump, either into the same database with
pg_restore --clean --if-exists -d <db> <dump> or into a fresh database
that you then switch to. Everything written after the dump is lost.
The native spend ceilings are constants in the binary, so a rollback also
restores the previous binary's ceilings (before goodqa#15086 the month
ceiling was USD 100, not USD 20).
- docs/review-gates.md: every point where Fabric, or the process that changes it, refuses to proceed without proof. Each gate gives the threat, the invariant, where it is enforced, why it is deterministic, the test that fails if it breaks, and its limits. Also the comparison with published practice and the known gaps.
- docs/threat-model.md: assets, actors, trust boundaries and STRIDE coverage mapped to the gates.
- docs/gate-angles.md: gate types Fabric does not cover yet, with who does them today and a design sketch for each.
- docs/sota/: per-component notes on current practice and how Fabric compares.
Apache-2.0. See LICENSE for the full text and NOTICE for attribution.
SPDX-License-Identifier: Apache-2.0
Copyright (C) 2026 Eric MacDougall