You can't retire an old service until you can prove no accepted work gets lost in the switch.
BLOCKEDAll its own tests pass, and the check measured 17 lost and 10 finished messages back. Scenario messages are SYNTHETIC.
01 / 08
The rejection
A replacement that passes every one of its own tests was turned away. It grades its own work. The messages it dropped were never in those tests.
The program being retired
- name
- beanstalkd stock at 25085c5 (25085c5f090031fd7110613a77fd6f816681d801); its own -v prints 'beanstalkd unknown' because the clone had no tags
- licence
- MIT-style permissive licence, read from LICENSE (Copyright (c) 2007 The authors of beanstalkd.) sha256:bad1fd0e5c
- binary hash
- sha256:58d45e6bad82a56bb83d
- build kind
- stock
- flags
- /Users/sidra/aie-code-lab/reference/frozen/beanstalkd-25085c5 -l 127.0.0.1 -p {port} -b {recovery_dir} -z 1024 -s 1048576
- durability
- persistence on; log sync every 50 ms
Stock build, unmodified. The hash above is the frozen binary that ran. Nothing to disclose.
Which rules lost it
PREPARED reference repair: the labelled fallback, never the default. Written by the team with knowledge of the edge, before the run. Live, Gemini Argon writes this repair from the same failing case. The shipped naive mapper and recovery rules are constructed foils, disclosed at the top of mapper.go and rules.go.
Consequences are counted at message level only.
02 / 08
The flip
Workers agree with each other. That counts for nothing until a probe runs against the real original. Then a belief changes, or it does not.
Wonder and Spark investigate. They never write code. 0 of 0 agents listed here worked in this run.
| Claim | State | Agreement (never enough) | If wrong |
|---|---|---|---|
| H-01 A message accepted at this size survives a kill and restart with the log on, and so does the work after it. | INFERREDbecameREFUTED | 0 concur, 0 dissent (from PREPARED probe design) | If wrong, accepted messages vanish in a restart and nothing reports it. |
| H-02 A body at the -z limit or one byte under it is accepted, then refused on replay, and the rest of that log file is ignored. | INFERREDbecameOBSERVED | 0 concur, 0 dissent (from PREPARED probe design) | If right, a recovery that trusts the replay loses pending work and brings finished work back. |
The one uncommon part, in the original's own words: sizes and limits
It wrote 3 lines to stderr when it started again
- stderr …/recovery/binlog.1:132: job 2 is too big (1025 > 1024)
- stderr …/frozen/beanstalkd-25085c5: Errors reading one or more WAL files.
- stderr …/frozen/beanstalkd-25085c5: Continuing. You may be missing data.
Its binlog files
| file | bytes |
|---|---|
| binlog.1 | 1,048,576 |
| lock | 0 |
| binlog.2 | 1,048,576 |
| after the restart | body bytes | still there |
|---|---|---|
| The job before yours | 24 | yes |
| Your message | 1,023 | gone |
| The job after yours | 23 | gone |
…/frozen/beanstalkd-25085c5 -l 127.0.0.1 -p 51746 -b …/probe-p-prep-sizes-and-limits-z-1/recovery -z 1024 -s 1048576
What the tracer saw on the real original, line by line. Probe P-PREP-SIZES-AND-LIMITS-Z-1 RECORDED pids 78655, 78656 · process isolation on the Mac, not a container
- 35 ms binlog after start: binlog.1 1048576 bytes
- 35 ms binlog after start: lock 0 bytes
- 36 ms binlog after SIGKILL: binlog.1 1048576 bytes
- 36 ms binlog after SIGKILL: lock 0 bytes
- 71 ms stderr …/recovery/binlog.1:132: job 2 is too big (1025 > 1024)
- 71 ms stderr …/frozen/beanstalkd-25085c5: Errors reading one or more WAL files.
- 71 ms stderr …/frozen/beanstalkd-25085c5: Continuing. You may be missing data.
- 71 ms binlog after start: binlog.1 1048576 bytes
- 71 ms binlog after start: binlog.2 1048576 bytes
- 71 ms binlog after start: lock 0 bytes
03 / 08
The repair
This is the PREPARED reference repair, the labelled fallback. Live, Gemini Argon writes the repair in an Antigravity builder, from the ledger, and never grades it.
replacement/internal/recovery/rules.go PREPARED PREPARED
diff --git a/replacement/internal/mapper/mapper.go b/replacement/internal/mapper/mapper.go--- a/replacement/internal/mapper/mapper.go+++ b/replacement/internal/mapper/mapper.go@@ -140,15 +140,17 @@ const NaiveCarryTubePause = false // Active is the shipped table. Each line is independent of the others. A repair edits these lines.+// Repaired (PREPARED reference repair): reserved jobs come back ready, delayed jobs keep the time they+// had left, and tube pauses carry across. var Active = map[string]string{ "ready": "keep_ready",- "delayed": "restart_full_delay",- "reserved": "skip_in_flight",+ "delayed": "keep_remaining",+ "reserved": "requeue_ready", "buried": "keep_buried", } // CarryTubePause is the shipped choice for tube pauses. A repair may flip it.-var CarryTubePause = false+var CarryTubePause = true // Rules is a resolved table for one import. type Rules struct {diff --git a/replacement/internal/recovery/rules.go b/replacement/internal/recovery/rules.go--- a/replacement/internal/recovery/rules.go+++ b/replacement/internal/recovery/rules.go@@ -16,8 +16,10 @@ "strings" ) -// Shipped is the rule set a cutover uses unless told otherwise. As shipped: the naive foil.-const Shipped = "naive"+// Shipped is the rule set a cutover uses unless told otherwise. Repaired: the PREPARED reference+// repair, because a replay that warned on stderr dropped accepted work and brought finished work+// back. It replays at a raised -z when the program warns, and holds if any warning is left.+const Shipped = "prepared" // Sets is every rule set the switch can pick. var Sets = map[string]RuleSet{ Written by the team with knowledge of the edge, before the run. Live, Gemini Argon writes this repair from the same failing case. The shipped naive mapper and recovery rules are constructed foils, disclosed at the top of mapper.go and rules.go.
04 / 08
The independent check
The team that built it does not grade it. A separate executor, with the network off, rebuilt it from the package alone.
Executor
Hybrid: local isolated executor, network none
Hash matches the package: yes. Hybrid: local isolated executor.
candidate sha256:9bd4a2ecc440af36
Conformance
48/48 sealed cases pass
The judge's own case: the message you typed on /demo, at z-1 size, in the probe
Blind sequences
25/25 pass never seen by the replacement
identity
OBSERVED PASS
executed linux/arm64/kedge-replacement sha256:3a5188088943… is the expected artifact (set sha256:6f4d92055e7f…)
measured by Hybrid: local isolated executor (network none) RECORDED
reproducible build
OBSERVED PASS
4/4 artifacts byte-identical: darwin/arm64 (go1.27.3) and linux/arm64 (Debian GNU/Linux 13 (trixie)), set sha256:6f4d92055e7f…
measured by Hybrid: local isolated executor (network none) RECORDED
conformance
OBSERVED PASS
sealed 48/48 cases (2497/2497 checks); original observations 25/25; public suite 306/306 assertions
measured by Hybrid: local isolated executor (network none) RECORDED
05 / 08
The stop
Waiting for the human
Nothing stops until a person approves. Surface: workbench (/mission-control), ASI:One (Kedge Custodian). The wait here was s. The approval carries a one-use id, and the server binds it to this exact candidate.
- action
- stop_original
- candidate hash
- sha256:9bd4a2ecc440af3639dc4c11
- decision
- APPROVED: operator, action, candidate and expiry all match
Free text never authorizes a stop. A change to the candidate voids the approval.
06 / 08
The fence and the count
The fence sits outside the program, in three places, because fencing the queue alone is not enough. Then the count: lost work and finished work are different errors, and both are counted.
- 1Ingress closed. The proxy stops routing to the original. A producer now hears DRAINING. 8 reservations are held frozen so the fence doesn't release them.
- 2Recovery source sealed. Sealed from outside the program, digest 86e2005fdb99. A test write was denied. same user: a convention, not isolation; the container path is the isolated one.
- 3Epoch advanced. Epoch 1 to 2. The sink now refuses a commit from the old epoch.
- 4The original ends. PID 78547 ends. SIGKILL, exit -9. Still alive: no. Writes after the seal: none.
- 5Sealed source replayed. WARNINGS ON STDERR Replay 1 of a copy, by the original's own binary at -z 1024: 38 jobs came back, and the server counts 38. It wrote 3 warning lines to stderr, the first: 'binlog.1:37913: job 142 is too big (1025 > 1024)'. Next: replay.
- 6Sealed source replayed. Replay 2 of a copy, by the original's own binary at -z 2050: 45 jobs came back, and the server counts 45. Nothing on stderr. Next: import.
- 7Recovery rules decide. Import, by the prepared rules (PREPARED reference repair: the labelled fallback, never the default): the replay at -z 2050 is clean and accounts for all 45 pending jobs.
- 8Pending state read. 45 jobs from the sealed source, digest cad04adfab53: 17 ready, 10 delayed, 8 reserved, 10 buried.
- 9Mapper import. The replacement took the pending jobs through the mapper's rule table.
- 10Replacement resumes. Traffic now goes to the replacement, pid 78799, epoch 2.
The naive and reconciling rule sets are constructed foils, written knowing the edge. They show what a reasonable-looking recovery does, and they are not blind work. Prepared is a reference repair, PREPARED, the labelled fallback: live, Argon writes the repair.
Under the prepared rules, 10 finished messages would reach the sink a second time. Duplicates the sink caught after the stop: 0.
- 17
- 0
Attempts are not effects. 183 attempts reached synthetic-sink; 182 committed effects. The ambiguous-ACK window was 22 ms.
| Sink | Durable dedup | Attempts | Committed effects | Dupes suppressed | Stale epoch rejected | Ambiguous-ACK window |
|---|---|---|---|---|---|---|
| synthetic-sink | yes | 183 | 182 | 0 | 1 | 22 ms |
07 / 08
The return
Starting the old program is not the test. Processing the new work is.
New work
New work accepted by the replacement only
Message: new-r3d2f1db38d-000 SYNTHETIC
The way back
PASS On the original: after a restart from its sealed recovery source, 1 message(s) accepted only by the replacement reached a committed effect.
Approval: APPROVED. operator, action, candidate and expiry all match
08 / 08
The receipt
One receipt. Three separate claims, attempts against effects, the unknowns, the way back, the exact flags.
HOLD
- no person approved this candidate
Candidate 9bd4a2ecc440af36. RECORDED
Open the receipt