Mru Field
The supervisor for hard-to-reach systems on Earth. One process on one Linux board runs an operator's task as three replicas and hands every replica the same input. It decides with the quorum crate and delivers one checked output per cycle.
What it is
Field is for systems that run for months between visits: ocean observatories, buoys and moorings, offshore and remote sites, polar and seismic stations. On each cycle the supervisor reads one input record from a source the operator configures, hands the same bytes to every replica with a shared state record, decides with the quorum crate from mruspace/flight v0.4.0 (unchanged), and delivers one output to a configured sink. It retires a replica that is wrong, hung or dead, and goes on with the ones left. It resumes from a checkpoint after a reset or a power cut.
Status, November 16, 2026: version 0.3.0, built and tested on the bench. It runs on general-purpose processors (Linux x86_64 and ARM64, macOS, and static ARM builds under emulation in CI). It has not run on a board in a system yet, and it has no qualification evidence. The decision rule is the same code that ran on ESA's OPS-SAT PRETTY satellite on October 18, 22 and 28, 2026. The first deployment, an EMSO ERIC ocean test, is proposed for 2027. The source is mruspace/field; the specification is docs/spec.md.
| Replicas alive | Mode | Delivered when | Detected, nothing delivered, when |
|---|---|---|---|
| 3 | Vote | at least two outputs agree | no two agree |
| 2 | Compare | both agree | they disagree; the known-answer test names the bad one and it is retired |
| 1 | Self-check | the replica's two computations agree | they disagree |
| 0 | Halted | never | the run has halted and the log says so |
Spec section 4. The crate decides on a 64-bit FNV-1a hash of each reply (output and next state). The supervisor then compares the agreeing replies byte for byte before it delivers.
A replica that loses a vote gets a strike. Three strikes in 200 cycles start the known-answer test: a pass clears the strikes, a fail retires the replica. A replica that does not answer in time, exits, or sends a record over the size limit is lost at once. With restart_retired (off by default), a fresh process takes a retired slot after a cool-down.
Field is not a service manager. systemd restarts a process that dies. Field catches a process that is alive and wrong, alive and hung, or restarted from zero after a reset. It runs under systemd and does not replace it.
Quick start
Needs Rust stable. The build fetches the quorum crate from mruspace/flight by tag.
git clone https://github.com/mruspace/field && cd field cargo build --release target/release/field version target/release/field check-task tasks/demo/field.conf # is the task deterministic? target/release/field run tasks/demo/field.conf # one cycle per second, until SIGTERM
version prints field 0.3.0 (quorum 0.4.0). check-task prints requests=10000 mismatches=0 lost=0 and exits 0. run writes to out/ and prints the summary when it stops. Stopped with SIGTERM after six cycles:
field=0.3.0 quorum=0.4.0 policy=shrink task=target/release/field-demo-task adapter=none input=tick output=file:out/delivered
cycles=6 delivered=6 detected=0 wrong=- alive=3 mode=vote last_delivered=6 kat_tests=6
stopped=signal at_cycle=6 halted_at=never started=2026-11-18T16:23:04Z written=2026-11-18T16:23:09Z
checkpoint: every=100 resumes=0 last=6 halted=no
footprint: supervisor_max_rss=2048KiB replica_max_rss=1728KiB cpu=0.010s wall=5.6s
limits: memory=128MB/process cpu_share=5% max_run=none reply_timeout=2000ms period=1000ms task_network=deny(not-enforced-here)field 0.3.0 (commit 05c1655) on macOS 27.0.1, Apple M4 (arm64), rustc 1.86.0, November 18, 2026. The footprint line varies by host. The network lock is enforced on Linux only, so macOS shows deny(not-enforced-here).
The demo task is the flown demo's payload (a 4 KiB block filled from the input and hashed with FNV-1a) under the task interface. The keys tasks/demo/field.conf sets:
task = "target/release/field-demo-task" # the replica executable input = "tick" # the cycle number is the input record period_ms = 1000 # one cycle per second output = "file:out/delivered" # cycle, length, bytes, per delivered output dir = "out" # events.csv, summary.txt, checkpoint kat_input = "tasks/demo/kat.in" kat_output = "tasks/demo/kat.out" checkpoint_every = 100 summary_every = 1000 cpu_percent = 5 # the supervisor's share of one core
With a fault schedule
The same task as fast as it answers, 400 cycles, with the bench's fault schedule and the test-only oracle that scores every delivered output. Save this as faults.conf in the repository root:
task = "target/release/field-demo-task"
input = "tick"
period_ms = 0
output = "none"
dir = "out-faults"
kat_input = "tasks/demo/kat.in"
kat_output = "tasks/demo/kat.out"
max_cycles = 400
reply_timeout_ms = 200
faults = "docs/results/2026-10-21-darwin-arm64/faults.txt" # corrupt:2@30, hang:2@60, stuck:1@120
oracle = "target/release/field-demo-task"target/release/field run faults.conf prints:
field=0.3.0 quorum=0.4.0 policy=shrink task=target/release/field-demo-task adapter=none input=tick output=none
cycles=400 delivered=399 detected=1 wrong=0 alive=1 mode=selfcheck last_delivered=400 kat_tests=13
stopped=completed at_cycle=400 halted_at=never started=2026-11-18T16:23:24Z written=2026-11-18T16:23:24Z
checkpoint: every=100 resumes=0 last=400 halted=no
footprint: supervisor_max_rss=2128KiB replica_max_rss=1776KiB cpu=0.030s wall=0.3s
limits: memory=128MB/process cpu_share=none max_run=none reply_timeout=200ms period=0ms task_network=deny(not-enforced-here)
faults: injected=3 caught=3 latency_mean=0.0 latency_max=0 (cycles)
fault: corrupt:2@30 caught=30 latency=0 how=outvoted
fault: hang:2@60 caught=60 latency=0 how=lost
fault: stuck:1@120 caught=120 latency=0 how=diagnoseAnd out-faults/events.csv:
cycle,event,detail 30,injected,corrupt:2 30,outvoted,2 60,injected,hang:2 60,lost,2 120,injected,stuck:1 120,retired,1 diagnose 120,detected,compare 400,stopped,completed
Same build and host, November 18, 2026.
Replica 2's flipped bit is outvoted on cycle 30 and the replica stays. Replica 2 stops answering on cycle 60 and is lost. Replica 1 goes wrong on cycle 120 with two alive: the two disagree, nothing is delivered that cycle, the known-answer test names replica 1, and replica 0 self-checks alone from there. 399 of 400 outputs delivered, none wrong.
Task interface
A replica is a process in any language. The supervisor starts it, talks to it over its standard input and standard output, and stops it by closing its input. All integers are little-endian. Spec section 3.
| Request field | Size | Meaning |
|---|---|---|
| cycle | 8 bytes | The cycle number, from 1 after a fresh start |
| flags | 1 byte | Bit 0: self-check. Bit 1: known-answer test. |
| input length, input | 4 + n bytes | The acquired record, the same for every replica |
| state length, state | 4 + m bytes | The state record from the last delivered cycle; empty on the first cycle of a fresh run |
| Response field | Size | Meaning |
|---|---|---|
| output length, output | 4 + n bytes | The output record |
| state length, state | 4 + m bytes | The next state record |
| second output | 4 + n bytes | Only when the self-check bit was set: the output of the second computation |
A length over record_max or state_max makes the replica lost. Framing in src/protocol.rs.
- Deterministic. The same request gives the same bytes. No clock, no random numbers, no reads of its own, no state between requests other than the state record it is handed.
field check-tasktests this before the task is supervised. - On time. It answers within
reply_timeout_msor it is lost. The first answer after a process starts gets 2 s more, once, for the process start. It exits when its standard input closes. - Self-check flag. Compute twice and return both outputs. The supervisor sets it when one replica is left.
- Known-answer flag. The request carries the record from
kat_input, an empty state and the current cycle. The output must equalkat_outputand must not depend on the state or the cycle. Sent twice at start-up, after three strikes in a window, on a disagreement between two, and everykat_everycycles on the last replica. A wrong or late answer retires the replica. cliadapter.adapter = "cli"runs a program once per request with the input on its standard input, and reads the output to end of file. The state record is handed back unchanged. Slower, and the program cannot keep state, but it needs no code change. A fault schedule needs a long-lived process and is refused with this adapter.
CLI
usage: field run CONFIG
field check-task CONFIG [--requests N] [--seed S] [--inputs FILE]
field versionAny other form prints this text and exits 2.
| Command | What it does | Exit |
|---|---|---|
| field run CONF | Runs the supervisor until it stops, then prints the summary. It stops on SIGTERM or SIGINT (finish the cycle, checkpoint, summary), at max_cycles or max_seconds, at the end of a file: source, or on a halt with on_halt = "exit". | 0 stop, 1 sink or input error, 2 refused configuration or checkpoint |
| field check-task CONF | The determinism test. Starts two instances of task. Each request goes to the first instance twice and to the second once. All three answers must be byte-identical. Stops early after three lost replies. | 0 pass, 1 mismatch or lost reply, 2 task does not start or bad input file |
| field version | Prints field 0.3.0 (quorum 0.4.0). | 0 |
| check-task option | Default | Meaning |
|---|---|---|
| --requests N | 10000 | Requests to send |
| --seed S | 1 | Seed for the generated inputs |
| --inputs FILE | none | Length-prefixed records (4-byte length, then the bytes), one request each, in place of generated inputs |
Generated inputs: every 10th request is the request number as an 8-byte record, the others 1 to 256 random bytes. Every 100th request sets the self-check flag. The state record carries forward from the answers. From src/check.rs.
A task that reads anything but its request fails here. Here the task is a build of the demo task that appends its process ID to every output, and nondet.conf is tasks/demo/field.conf with task = "builds/nondet.sh":
# builds/nondet.sh, executable #!/bin/sh exec target/release/field-demo-task --nondeterministic $ target/release/field check-task nondet.conf; echo "exit=$?" request 1: answers differ (229 bytes in) request 2: answers differ (241 bytes in) request 3: answers differ (78 bytes in) request 4: answers differ (144 bytes in) request 5: answers differ (24 bytes in) requests=10000 mismatches=10000 lost=0 exit=1
Same build and host, November 18, 2026.
field-demo-task
The task Field ships with, for the bench, the scenario checks and a self-contained pilot. The output is the 8-byte hash; the state is an 8-byte count of the requests answered. With no switch it answers requests until its input closes. The task key takes a path with no arguments, so pass a switch through a short shell script, as above and as scripts/staged.sh does.
| Switch | Effect |
|---|---|
| --once | Read one input record to end of input and write the output, for adapter = "cli" |
| --kat DIR | Write kat.in (8 zero bytes) and kat.out to DIR |
| --nondeterministic | Append the process ID to every output; fails check-task |
| --echo | The output is the input record; for the flood bench |
| --big-state | Return a 100 KiB state record, over the default state_max |
| --bug crash@N | Exit on cycle N and later |
| --bug hang@N | Stop answering from cycle N |
| --bug wrong@N | Flip one bit of every output from cycle N |
| --bug every@M | Flip one bit when the input's tick is a multiple of M (a bug only some inputs reach) |
| --bug kat | A wrong answer to the known-answer test only |
| --bug net@N | Right outputs, and from cycle N also 100 UDP datagrams per request to FIELD_DEMO_NET (host:port, default 127.0.0.1:9) |
Every --bug kind except kat acts on ordinary requests only, never on the known-answer test. The bugs make bad new builds for the staged-update and flood tests. From tasks/demo/main.rs.
Configuration
One file, one key = value per line, # comments, strings in double quotes or bare. Every key has a default. An unknown key, or a value the supervisor cannot honor, stops field with exit 2, so a typo cannot run the defaults. Relative paths are relative to the working directory.
| Key | Default | Meaning |
|---|---|---|
| task | /opt/field/task | The replica executable |
| adapter | none | none (the request protocol) or cli (a run-once program) |
| input | serial:/dev/ttyS1:9600 | The source: tick, file:, serial:, tcp: or cmd: |
| input_backlog | queue | queue takes every record in order; newest skips what queued up (since 0.3.0) |
| period_ms | 1000 | Minimum time between cycles; 0 is as fast as the source |
| output | file:/var/field/out | The sink: file:, serial:, tcp:, cmd: or none |
| dir | /var/field | Where events.csv, summary.txt and checkpoint go; created if missing |
| kat_input | /opt/field/kat.in | The known-answer test input record |
| kat_output | /opt/field/kat.out | Its correct output record |
| replicas | 3 | Fixed by quorum 0.4.0; any other value is refused |
| strikes | 3 | Outvotes in a window that start the known-answer test; fixed |
| window | 200 | The strike window in cycles; fixed |
| kat_every | 64 | Cycles between known-answer tests on the last replica |
| checkpoint_every | 100 | Cycles between checkpoints |
| summary_every | 1000 | Cycles between summaries and progress lines |
| restart_retired | false | Start a fresh process in a retired slot after the cool-down; it must pass the known-answer test twice |
| cooldown_s | 600 | The cool-down in seconds; kept in the checkpoint, so it survives a reset |
| memory_mb | 128 | Address-space limit per process (Linux) |
| task_network | deny | deny: a task process can open AF_UNIX sockets only; allow turns the lock off (since 0.3.0) |
| cpu_percent | 0 | CPU share of the supervisor and its task processes; 0 is uncapped |
| reply_timeout_ms | 2000 | Deadline for the request and the reply; a late replica is lost |
| heartbeat | none | file:, serial: or tcp: |
| heartbeat_every_s | 3600 | Seconds between heartbeat lines |
| policy | shrink | shrink (vote, compare, self-check) or tmr (vote, compare, halt on one) |
| on_halt | idle | idle: no cycles, the heartbeat says halted, a restart can end it. exit: summary, exit 0. |
| record_max | 65536 | Largest input or output record, bytes |
| state_max | 65536 | Largest state record, bytes |
| max_cycles | 0 | Stop after this many cycles; 0 is unlimited. Tests and the bench. |
| max_seconds | 0 | Stop after this many seconds; 0 is unlimited |
| faults | none | A fault schedule; tests and a self-contained pilot |
| oracle | none | A fourth, unfaulted instance of the task that scores every delivered output; tests only |
| candidate | none | A new build of the task, brought in by staged update (since 0.2.0) |
| candidate_cycles | 1000 | Clean cycles per trial of a staged update |
Defaults from Config::default in src/config.rs, the same as spec section 9.
Sources and sinks
| Endpoint | As input | As output |
|---|---|---|
| tick | The cycle number as an 8-byte record | Refused |
| file:PATH | Length-prefixed records; the end of the file ends the run cleanly | Cycle (8 bytes), length (4 bytes), bytes; cut back on a resume |
| serial:DEVICE:BAUD | One line per record (raw mode, 8N1, no flow control) | A text line <cycle>,<bytes>, so keep the output ASCII |
| tcp:HOST:PORT | Connects out once and reads length-prefixed records | Cycle, length, bytes |
| cmd:PROGRAM ARGS | Runs once per cycle; its output is the record. A failure is logged and the cycle is not used. | Runs once per output, bytes on its standard input, FIELD_CYCLE in its environment |
| none | Refused | Nothing is delivered |
The heartbeat takes file:, serial:, tcp: or none. Field never listens for connections: every tcp: endpoint connects out. Spec section 8.
Checkpoint identity. The keys that decide results are task, adapter, input, output, policy, replicas, strikes, window, kat_every, record_max, state_max, the known-answer records and the fault schedule by content, oracle, and input_backlog when it is newest. Change one and Field refuses the old checkpoint with exit 2 and does not overwrite it; move it away to start fresh. The other keys only tune a run and can change between restarts. candidate is not in the identity: a staged update comes in on the running run.
Outputs
In dir: events.csv, summary.txt and checkpoint. Delivered outputs go to the sink, in order, with their cycle number. Every number comes from the run's counters; nothing is estimated.
events.csv
One line per event: cycle,event,detail.
| Event | Detail |
|---|---|
| outvoted | The replica that lost the vote |
| retired | The replica and why: strikes, diagnose, periodic, startup, restart |
| cleared | The replica passed the known-answer test; its strikes are cleared |
| lost | The replica did not answer in time, exited, or sent a record over the limit |
| restarted | A fresh process took the retired slot |
| detected | The mode (vote, compare, selfcheck), with bytes when the hashes agreed and the bytes did not; update when the old build disagrees in a staged update |
| wrong | The mode; only with an oracle (tests) |
| halted | Replicas alive |
| stopped | Why: completed, time-limit, signal, end-of-input, halted, sink-error ..., input-error ... |
| resumed | The resume count, with halted when it resumed a halted run |
| progress | Delivered, detected, alive (and wrong, with an oracle), every summary_every cycles |
| injected | A scheduled fault, kind:replica (tests) |
| source | backlog and caught-up skipped=N from=C (input backlog), overlong N (a serial line cut at record_max), or why a cmd: source failed |
| candidate | A staged update: started N, promoted N, rejected N WHY, rolled-back N, paused quorum, updated, removed, changed |
Spec section 8 and the calls to log.event in src/supervisor.rs.
Identical events on consecutive cycles collapse to the first line plus a closing line with the count, for example 500,wrong,vote repeated 251x cycles 250-500, so a long run stays small. The file goes to the kernel after every cycle and is synced at every checkpoint.
summary.txt
Written every summary_every cycles, at a halt and at a stop. field run also prints it when it stops. The lines, in order:
| Line | Contents |
|---|---|
| field= | Field and quorum versions, policy, task, adapter, input, output |
| cycles= | Cycles, delivered, detected, wrong (- with no oracle), alive, mode, last delivered cycle, known-answer tests |
| stopped= | Why (running while it runs), the cycle, the halt cycle or never, start and write time in UTC |
| checkpoint: | Interval, resumes, last cycle, halted |
| footprint: | Peak resident memory of the supervisor and of its task processes, CPU time, wall time |
| limits: | Memory, CPU share, run cap, reply timeout, period, task network |
| input: | Backlog mode and records skipped; only with newest or when records were skipped |
| update: | The candidate, the build in each slot and the state, for example trial:2 clean=417/1000, updated@2000 or rejected:1:old-disagrees@1500; only with a candidate |
| heartbeat: | Lines sent and failed; only with a heartbeat |
| faults:, fault: | With a fault schedule: injected, caught, mean and longest latency in cycles, then one line per fault |
From src/summary.rs.
Heartbeat
One line every heartbeat_every_s seconds to a file (which holds the latest line only), a serial port or a TCP stream: MRU,<cycle>,<mode>,<alive>,<delivered>,<detected>,<resumes>. A halted run keeps sending it with the mode halted. A write that runs out of time counts as failed, and the run goes on.
Checkpoint and resume
Field writes checkpoint (one key=value per line) every checkpoint_every cycles, and on every cycle in which a replica was lost, retired, cleared or restarted. It writes a new file, syncs it, renames it over the old one and syncs the directory, so a power cut leaves the old checkpoint or the new one.
On start with a checkpoint from the same configuration, Field resumes. It cuts events.csv and a file sink back to the checkpoint's lengths, logs resumed, starts replicas for the slots that were alive, writes a checkpoint at once, and continues the counts and the cycle number. A retired replica stays retired. The cycles after the last checkpoint are lost: their inputs were read once and cannot be replayed. A serial or TCP sink has already received those outputs, so cycle numbers can repeat there; a file sink never repeats. A halted run keeps its checkpoint with the halt in it. A completed run keeps it too: the same command again resumes and stops at once.
The quick start run, started again with the same command and stopped after four more cycles, leaves this events.csv:
cycle,event,detail
6,stopped,signal
6,resumed,1
10,stopped,signalSame build and host, November 18, 2026.
Staged updates
Since v0.2.0. A new build of the task is the one change that reaches every replica at once. Three replicas that all took the same bad build agree on its wrong answer, or all stop together. With candidate set to the new build, Field brings it in one slot at a time and keeps the old build as the check until the last slot switches. Spec section 10.
- First trial. With three replicas alive, slot 2 starts the new build, which must pass the known-answer test twice. It then votes against two slots on the old build for
candidate_cyclesclean cycles. - Second trial. Slot 1 takes the new build for as many cycles again. An output is delivered only if the slot left on the old build gave the same bytes, so two slots on the new build cannot outvote it.
- Last switch. Slot 0 switches, and the log says
updated. - Zero strikes. Until then, one fault of a slot on the new build rejects it: an outvote, a lost reply, a failed known-answer test, a cycle with no agreement, or a disagreement with the old build, logged as
old-disagrees. Field takes the new build out of every slot and starts the old build there again. The same candidate is not tried again. - Paused. If a slot on the old build is lost, the new build comes out of every slot and the update waits until three replicas are alive (
paused quorum). - Resets. The checkpoint keeps each slot's build, the trial and a hash of the candidate file, so a resume continues the trial. A changed or removed candidate puts every slot back on the old build. To try a rejected candidate again, remove it from the configuration for one start.
A run with a build that goes wrong on cycle 150, in the second trial. Save staged.conf in the repository root:
task = "target/release/field-demo-task"
candidate = "builds/new-build.sh" # exec target/release/field-demo-task --bug wrong@150
candidate_cycles = 100
input = "tick"
period_ms = 0
output = "none"
dir = "out-staged"
kat_input = "tasks/demo/kat.in"
kat_output = "tasks/demo/kat.out"
max_cycles = 500
reply_timeout_ms = 200
oracle = "target/release/field-demo-task"target/release/field run staged.conf ends with delivered=499 detected=1 wrong=0 alive=3 and update: candidate=builds/new-build.sh builds=old,old,old state=rejected:1:old-disagrees@150. The events:
cycle,event,detail
0,candidate,started 2
100,candidate,promoted 2
100,candidate,started 1
150,detected,update
150,outvoted,0
150,candidate,rejected 1 old-disagrees
150,candidate,rolled-back 1
150,candidate,rolled-back 2
500,stopped,completedSame build and host, November 18, 2026.
The staged-update bench brings each bad build of the demo task in two ways on the same 5,000 cycles: all at once, with task set to the new build, and by staged update, with candidate set to the new build and candidate_cycles = 1000.
| New build | All at once | Staged update |
|---|---|---|
| good | 5,000 delivered, 0 wrong | updated@2000; 5,000 delivered, 0 wrong |
| crash@500 | 499 delivered; all three lost, halted at 500 | rejected:2:lost@500; 5,000 delivered, 0 wrong, 3 alive |
| hang@500 | 499 delivered; all three lost, halted at 500 | rejected:2:lost@500; 5,000 delivered, 0 wrong, 3 alive |
| wrong@500 | 5,000 delivered, 4,501 wrong | rejected:2:outvoted@500; 5,000 delivered, 0 wrong |
| every@97 | 5,000 delivered, 51 wrong | rejected:2:outvoted@97; 5,000 delivered, 0 wrong |
| kat | 0 delivered; no replica starts | rejected:2:startup@0; 5,000 delivered, 0 wrong |
| crash@1500 | 1,499 delivered; halted at 1,500 | rejected:1:lost@1500; 4,999 delivered, 1 detected, 0 wrong |
| hang@1500 | 1,499 delivered; halted at 1,500 | rejected:1:lost@1500; 4,999 delivered, 1 detected, 0 wrong |
| wrong@1500 | 5,000 delivered, 3,501 wrong | rejected:1:old-disagrees@1500; 4,999 delivered, 1 detected, 0 wrong |
| wrong@2500 | 5,000 delivered, 2,501 wrong | updated@2000; 5,000 delivered, 2,501 wrong |
From staged.csv, written by scripts/staged.sh on November 14, 2026: field 0.2.0 on macOS, one Apple M4, the demo task, reply timeout 200 ms, as fast as the task answers. The oracle is the old build, so wrong counts outputs the old build would not have given. One host, one run per row.
The last row is the limit: a bug that first shows after the last switch has no old build left to disagree with, and gets through. A longer trial covers more inputs and more time. The new build must give the same outputs as the old one; an update meant to change outputs is not covered. Write-up: staged updates.
Flood limits
Since v0.3.0. Field does not run a network and cannot stop a flood on one. It makes sure a Field node does not start one, whatever build of the task it runs, and keeps working when its own source is flooded or its own sink is jammed. Spec section 11.
- Task network lock. With
task_network = "deny", the default, Field sets a seccomp filter in each task process (the oracle too) between fork and exec.socketfails with EACCES for every address family but AF_UNIX. On 32-bit ARM the oldsocketcallis refused too, and a system call from another architecture is refused on every target. Enforced on Linux on x86_64, ARM64 and 32-bit ARM. Elsewhere the summary saystask_network=deny(not-enforced-here). If the kernel refuses the filter, the task does not start. User-mode emulators refuse seccomp filters, so the scenario checks under emulation setallow. - Input backlog. With
input_backlog = "newest", after the cycle's record Field reads every complete record already waiting, for at most one period (10 ms whenperiod_msis 0), keeps the newest and skips the rest. It logssource,backlogonce when skipping begins andsource,caught-uponce when it ends. Fortcp:,serial:andfile:sources. Use it when only the current value matters, such as a sensor reading. Keepqueuewhen every record must be processed, such as a command stream. - Writes with a deadline. Every write to a TCP peer or a serial port, for outputs and the heartbeat, ends at 5 s. An output write that runs out of time stops the run with
sink-error tcp: timeoutand exit 1, and keeps the checkpoint, so the service manager can start it again. - Serial lines. A serial line longer than
record_maxis cut as it arrives; the rest is counted and dropped until its newline. In 0.2.0 a source that never sent a newline grew the supervisor's memory without limit.
A staged update compares outputs, so a build that floods a network while every output is right passes it. The lock is what stops that build. The flood bench, with the demo task's --bug net@500 build on 2,000 cycles of 2 ms:
| task_network | Rollout | Datagrams received | Outputs |
|---|---|---|---|
| allow | all at once | 450,300 | 2,000 delivered, 0 wrong, 3 alive |
| allow | staged, updated@1000 | 400,100 | 2,000 delivered, 0 wrong, 3 alive |
| deny | all at once | 0 | 2,000 delivered, 0 wrong, 3 alive |
| deny | staged, updated@1000 | 0 | 2,000 delivered, 0 wrong, 3 alive |
From lock.csv. From cycle 500 the build sends 100 UDP datagrams per request to a local listener; staged runs use candidate_cycles = 500. Datagrams received is what the listener read during the run.
A TCP source sends 16-byte records into 1,000 cycles of 10 ms (100 per second). The task echoes each record, and a collector measures the age of the input when its output arrives:
| Records per second | input_backlog | Median age | Age at most | Skipped |
|---|---|---|---|---|
| 1,000 | queue | 5,553.7 ms | 11,081.3 ms | 0 |
| 1,000 | newest | 0.6 ms | 6.6 ms | 11,175 |
| 10,000 | queue | 6,006.7 ms | 12,003.7 ms | 0 |
| 10,000 | newest | 0.8 ms | 11.2 ms | 122,489 |
From backlog.csv. Every run delivered 1,000 outputs. At 10,000 per second the backlog never cleared, and the log has one source,backlog line for it. Peak supervisor memory was 13,108 to 13,236 KiB in all four runs.
A TCP output peer that accepts and never reads (receive buffer 4 KiB), with the tick source as fast as the task answers and max_seconds = 30. Field 0.2.0 hung once the buffers filled: no cycles, and its 30 s run cap never ran; it was killed at 60 s. Field 0.3.0 ended at 7.7 s with sink-error and exit 1, after 70,428 delivered outputs, with the checkpoint kept.
All flood numbers from stall.csv, lock.csv, backlog.csv and the run directories in docs/results/2026-11-16-linux-aarch64/flood, written by scripts/flood.py on November 16, 2026: field 0.3.0 on Linux 6.10.14 aarch64 in Docker Desktop on one Apple M4; the 0.2.0 build is from tag v0.2.0. One run per row, one host.
What it does not cover: a flood on a network, which Field does not run; a cmd: source or sink, which is the operator's program and not the task; a source faster than Field can read in one period; a backlog under queue; and overload of the processor, which is the CPU share's job.
Tests
cargo test --release # 39 unit tests, 29 integration tests ./scripts/scenarios.sh # 26 checks: 23 ported from mruspace/flight, 3 on staged updates ./scripts/power-cut.sh # ten kills at random cycles, one resume each ./scripts/staged.sh # each bad build, all at once and by staged update python3 -I scripts/flood.py # the network lock, the input backlog and a stalled peer
The unit tests are 29 in the supervisor and 10 in the demo task. The integration tests are in eight files under tests/. The scenario checks are the ones from mruspace/flight that apply to a supervisor with a black-box task; the checks on the radiation sensor and on stuck bits inside the task do not apply. The power-cut check kills the supervisor with SIGKILL ten times at random cycles:
cut 1 at checkpoint cycle 120
cut 2 at checkpoint cycle 202
cut 3 at checkpoint cycle 280
cut 4 at checkpoint cycle 340
cut 5 at checkpoint cycle 400
cut 6 at checkpoint cycle 460
cut 7 at checkpoint cycle 500
cut 8 at checkpoint cycle 540
cut 9 at checkpoint cycle 560
cut 10 at checkpoint cycle 580
ok power cuts: 10 resumes, counts equal an uninterrupted run, retired slots kept, no duplicate eventsSame build and host, November 18, 2026. In that session, cargo test --release passed 39 unit and 29 integration tests, and scripts/scenarios.sh printed "all checks passed". The cut cycles are random and change from run to run.
| CI job | Where | Runs |
|---|---|---|
| test | Linux x86_64, Linux ARM64, macOS (GitHub runners) | Build, unit and integration tests, scenario checks, power cuts |
| static binary | musl builds for aarch64, armv7 and x86_64, each in an emulated Alpine container | Scenario checks, with the network lock set to allow |
| lint | Linux x86_64 | rustfmt and clippy with warnings as errors |
From .github/workflows/ci.yml, on every push and pull request. The staged and flood benches are not in CI; their results are in docs/results.
Of the seven bench steps in spec section 14, six are done: the scenario checks, the determinism test, the fault schedule, ten power cuts (SIGKILL as the cut), staged updates and flood limits. The seven-day run on a bench twin is not done; scripts/soak.sh starts it, and the bench twin does not exist yet.
Limits
- One processor. Three replicas on one processor catch faults in the replicas, not a failure of the processor. It is not a hardware-redundancy test. Replicas on a second processor over a link are planned (spec section 12); none of that is built.
- Bench only. Field has run on general-purpose processors and under emulation, not on a board in a system. The power cuts are SIGKILL; a real power cut on a board is not done. Nothing here is qualification evidence.
- Staged updates. A staged update catches a bad build only while the old build still runs in a slot, and only by its outputs. A false rejection is possible: a fault on the one old slot in the second trial rejects a good build.
- Floods. Field does not run a network and cannot stop a flood on one. The lock covers the task, not the operator's own
cmd:source or sink. - The last replica. In self-check, a fault that hits both computations alike gets through. Only the periodic known-answer test catches a stuck output, after up to
kat_everycycles. - Compare mode. Two replicas that disagree and both pass the known-answer test lose that cycle. Two that both fail halt the run.
- Fixed constants.
replicas,strikesandwindoware 3, 3 and 200, constants of quorum 0.4.0. The configuration refuses other values.
Updated November 18, 2026 · Source: field docs/spec.md · Edit on GitHub · Questions? Get in touch
