Kedge

You can't retire an old service until you can prove no accepted work gets lost in the switch.

BLOCKED
306/306 of its own tests pass.15 accepted messages unaccounted for after cutover.9 finished messages came back.
-z 1024, declaredstock programprocess isolation on the Mac, not a containernaive foil: constructed with knowledge of the near-limit edge
SEEDSYNTHETICLeah, integration maintainer

All its own tests pass, and the check measured 15 lost and 9 finished messages back. Scenario messages are SYNTHETIC.

SEED: target, not measuredRecorded runs on the real original, replayed read-only. Seed rows are labelled SEED. Run run-seed-0002-hold. Kedge has not measured anything yet.

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 (seed text; a real record carries the program's own wording)
licence
MIT-style permissive licence sha256:bad1fd0e5c
binary hash
sha256:58d45e6bad82a56bb83d
build kind
stock
flags
/seed/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

naive foil: constructed with knowledge of the near-limit edge. PREPARED reference repair, shown as the labelled fallback. Live, Argon writes the repair from the ledger in an Antigravity builder. The naive and reconciling rule sets are constructed foils, written knowing the near-limit edge.

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 DONESpark-h01 DONESpark-h02 DONESpark-h03 DONESpark-h04 DONESpark-h05 DONESpark-h06 DONESpark-h07 DONESpark-h08 DONESpark-p1 DONESpark-p2 DONESpark-p3 DONESpark-p4 DONESpark-c1 DONESpark-c2 DONESpark-c3 DONESpark-h09 IDLESpark-h10 CAPPED

Wonder and Spark investigate. They never write code. 23 of 24 agents listed here worked in this run.

ClaimStateAgreement (never enough)If wrong
H-01 Whatever the original accepts with put, it replays on the next start from the same log.INFERREDbecameREFUTED3 concur, 1 dissent (from Spark-h01)If wrong, accepted messages vanish on a restart and nothing fails: the server's own counts agree with what is left.
H-02 A body of exactly the size limit, or one byte under it, is accepted, then refused on replay, and the rest of that log file is ignored.INFERREDbecameOBSERVED1 concur, 1 dissent (from Spark-h03)If wrong, a recovery that trusts the replay loses every pending message after the large one and brings finished ones back.
H-03 A consumer that drops its connection mid-work hands the job back at once, not after the time limit.OBSERVED1 concur, 2 dissent (from Spark-h02)If wrong, a dead consumer's message waits out its limit during the switch and looks lost.
H-04 A job still reserved when its time limit passes goes back to ready.OBSERVED1 concur, 0 dissent (from Spark-h04)If wrong, every message in flight at the switch is read as done and never processed.
H-05 A job delayed past the cutover keeps its remaining delay.UNKNOWN0 concur, 1 dissent (from Spark-h04)Not probed: the receipt lists it as an unknown, never as a pass.
H-06 Two consumers reserving at the same instant never receive the same job.INFERRED3 concur, 0 dissent (from Spark-h05)Agreement among five workers is shown here and promotes nothing. Only a probe can.

The one uncommon part, in the original's own words: sizes and limits

It wrote 3 lines to stderr when it started again

  1. stderr …/recovery/binlog.1:132: job 2 is too big (1025 > 1024)
  2. stderr /seed/frozen/beanstalkd-25085c5: Errors reading one or more WAL files.
  3. stderr /seed/frozen/beanstalkd-25085c5: Continuing. You may be missing data.

Its binlog files

filebytes
binlog.11,048,576
binlog.21,048,576
lock0
after the restartbody bytesstill there
The job before yours24yes
Your message1,023gone
The job after yours23gone
-z 1024, declaredprocess isolation on the Mac, not a container

/seed/frozen/beanstalkd-25085c5 -l 127.0.0.1 -p 62000 -b /seed/rehearsal/original/recovery -z 1024 -s 1048576

What the tracer saw on the seed's example lines, not a measurement, line by line. Probe pr-03-near-limit SEED pids 4121, 4188 · process isolation on the Mac, not a container

  1. 0 ms exec /seed/frozen/beanstalkd-25085c5 -b /seed/rehearsal/original/recovery -z 1024
  2. 36 ms SIGKILL process ended on SIGKILL, exit -9
  3. 71 ms stderr …/recovery/binlog.1:132: job 2 is too big (1025 > 1024)
  4. 71 ms stderr /seed/frozen/beanstalkd-25085c5: Errors reading one or more WAL files.
  5. 71 ms stderr /seed/frozen/beanstalkd-25085c5: Continuing. You may be missing data.
  6. 71 ms binlog after start: binlog.1 1048576 bytes
  7. 71 ms binlog after start: binlog.2 1048576 bytes
  8. 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/prepared.go SEED PREPARED shown as the seed's illustrative diff

@@ func decide(obs Observation) Action {     replay := obs.Replays[len(obs.Replays)-1]-    // import whatever the replay brought back-    return Import(replay)+    if len(replay.Warnings) > 0 && replay.Z == obs.DeclaredZ {+        // the original ignores the rest of a log file after a record it refuses+        return ReplayAt(2*obs.DeclaredZ + 2)+    }+    if len(replay.Warnings) > 0 {+        return Hold("warnings remain at -z " + itoa(replay.Z))+    }+    return Import(replay) }

PREPARED reference repair, shown as the labelled fallback. Live, Argon writes the repair from the ledger in an Antigravity builder. The naive and reconciling rule sets are constructed foils, written knowing the near-limit edge.

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

Antigravity executor, network disabled

Hash matches the package: yes.

candidate sha256:046b8387f537b14a

Conformance

412/412 sealed cases pass

The judge's own case: the message you typed on /demo

Blind sequences

36/36 pass never seen by the replacement

identity

OBSERVED PASS

The rebuilt artifact's hash equals the hash in the package.

measured by Antigravity executor SEED

reproducible build

OBSERVED PASS

Two clean rebuilds gave one hash.

measured by Antigravity executor SEED

conformance

OBSERVED PASS

Every sealed case passed, including sequences the replacement never saw.

measured by Antigravity executor SEED

05 / 08

The stop

Waiting for the human

Nothing stops until a person approves. Surface: ASI:One. The wait here was 38 s. The approval carries a one-use id, and the server binds it to this exact candidate.

action
stop_original
candidate hash
sha256:046b8387f537b14a67525390
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.

  1. 1Ingress closed. The proxy stops routing to the original. A producer now hears NOT_ACCEPTING. 8 reservations are held frozen so the fence doesn't release them.
  2. 2Recovery source sealed. Sealed from outside the program, digest 9c135bafa346. A test write was denied.
  3. 3Epoch advanced. Epoch 1 to 2. The sink now refuses a commit from the old epoch.
  4. 4The original ends. PID 4188 ends. SIGKILL, exit -9. Still alive: no. Writes after the seal: none.
  5. 5Sealed source replayed. WARNINGS ON STDERR Replay 1 of a copy, by the original's own binary at -z 1024: 39 jobs came back, and the server counts 39. It wrote 3 warning lines to stderr, the first: 'binlog.1:132: job 2 is too big (1025 > 1024)'. Next: replay.
  6. 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.
  7. 7Recovery rules decide. Import, by the prepared rules (PREPARED reference repair: the labelled fallback, never the default): a clean replay holds every job the journal has pending and every job the live frame showed.
  8. 8Pending state read. 45 jobs from the sealed source, digest c672eb50a172: 17 ready, 10 delayed, 8 reserved, 10 buried.
  9. 9Mapper import. The replacement took the pending jobs through the mapper's rule table.
  10. 10Replacement resumes. Traffic now goes to the replacement, pid 4300, epoch 2.
With the naive rules, measured on the original, of 201 acceptednaive foil: constructed with knowledge of the near-limit edge
15
accepted, then lost
pending messages that vanished
9
finished, then came back
work already done, handed out a second time

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.

After the stop and the repaired recovery
0
accepted, then lost
pending messages that vanished
0
finished, then came back
work already done, handed out a second time

Under the naive rules, 9 finished messages would reach the sink a second time. The sink has no durable dedup, so duplicates there are UNKNOWN.

0
accepted messages unaccounted for (of 201 accepted)
  1. 15
  2. 0

Attempts are not effects. 159 attempts reached notice-sink; committed effects are UNKNOWN (no durable dedup). The ambiguous-ACK window was 340 ms.

SinkDurable dedupAttemptsCommitted effectsDupes suppressedStale epoch rejectedAmbiguous-ACK window
notice-sinkno: effects UNKNOWN159UNKNOWN03340 ms, 2 messages: msg-0031, msg-0044

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: post-1 SYNTHETIC

The way back

HOLD The original did not process the new message: HOLD

the original did not process the message accepted only by the replacement

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

  • notice-sink: no durable dedup, effects are UNKNOWN
  • notice-sink: 2 messages in the ambiguous-ACK window
  • unknown: H-05: delayed jobs across the cutover were not probed
  • the original did not process the message accepted only by the replacement
-z 1024, declaredstock programprocess isolation on the Mac, not a containernaive foil: constructed with knowledge of the near-limit edge

Candidate 046b8387f537b14a. SEED SEED: target, not measured.

Open the receipt