IN PROGRESS
pre-registered
pinned commit
b613be0d48d3
experiment.md hash at pin
04ac9341f54d
updated

EXPERIMENT · IN PROGRESS

Which event-pipeline defense stops duplicate ledger postings when the broker dies

RESULT · SEALED UNTIL ANALYSISFour designs of a payment event pipeline, compared under injected faults for duplicate ledger postings. Not API double submission: the client-to-service boundary is excluded.

02 method

pre-registered
amendment
UTC−07:00

New void reason host_degraded, and operating conditions against host contention

hypothesis wording unchanged · made after gate trials were seen

amendment
UTC−07:00

The campaign runner and its block plan, derived from the pre-registered seeds

changed a hypothesis: no

amendment
UTC−07:00

Analysis definitions; H2's balance off read as residual after losses

hypothesis wording unchanged · H2 read so it does not contradict H3; set before any campaign data

amendment
UTC−07:00

The cost runs: fixed-rate and ramp, with seeds and step rule

changed a hypothesis: no

Pre-registration tagged prereg-v1 before the first measured trial. The pinned commit, tagged campaign-v1, adds amendments A1 to A4, all before the first campaign trial; A5, for the cost-run harness, is planned after the campaign. A1 followed gate-trial observations.

Rule C-R, which decides what counts as a sustained load rate, was set on 2026-10-09 after the first reconnaissance pass's data (part A) was seen, before pre-registration. Reconnaissance also shaped the host-swap rules C-S and D27.

  • One fault per trial, seeded
  • Kills, pauses, network blackholes
  • Random-time and targeted faults
  • 760 trials in 190 blocks, paired by seed
  • N: naive at-least-once
  • K: Kafka transactions
  • I: idempotency key at the sink
  • O+I: Debezium outbox plus key
  • Detection gate before the campaign
  • One host, combined KRaft mode

Fault codes (from the pre-registration)

F1
SIGKILL the leader broker of a seeded payments partition
F2
docker pause a seeded broker
F3
blackhole between the producer role and all brokers
F4-svc
SIGKILL the service at after_source_commit
F4-con-r
SIGKILL a seeded consumer instance
F4-con-t
SIGKILL a consumer at before_kafka_commit
F5
zombie consumer: at after_poll, docker pause the consumer with its batch in hand

03 findings

  1. gateDetection gatepassed

    The harness must be able to see a nonzero: positive and negative controls run before the campaign.

    Amendment A1: the pass holds without the degraded trials (5 of 42 gate trials showed signs of host contention). The gate record is not shown.

  2. H1 (the boundary)NOT RUN YET

    K shows ledger duplicates in at least 8 of 10 F4-con-t trials and at least 8 of 10 F5 trials.

    Falsified if K falls below 8 of 10 in either cell. Each duplicated payment appears once in payments-applied: output once, ledger twice.

  3. H2 (the key at the sink)NOT RUN YET

    I and O+I show zero ledger duplicates and zero balance-off accounts in every cell.

    Falsified by any duplicate, or any balance off that lost payments do not explain (amendment A3). Published either way; it leads.

  4. H3 (the dual write)NOT RUN YET

    N, K and I each lose payments in at least 8 of 10 F4-svc trials.

    O+I loses none in any cell. Falsified by any shortfall, any F3 trial over 120 s without a loss, or any O+I loss.

  5. H4aNOT RUN YET

    No stack loses a payment in F1 or F2.

    Falsified by any loss. The pre-registration calls H4 genuinely uncertain: all-zero is as publishable as any other outcome.

  6. H4bNOT RUN YET

    K shows duplicates in more F1+F2 trials than N, each with a logged abort, timeout or fencing error.

    Falsified if K's count is no higher than N's, or any K duplicate trial lacks the logged cause. Confirmatory contrast.

  7. H4cNOT RUN YET

    Any N trial with a duplicate has a logged commitSync failure in the same trial.

    Falsified if an N duplicate trial lacks the logged cause. With no N duplicate trial it is vacuously not falsified.

  8. H5 (the commit window, under random crashes; the non-obvious one)NOT RUN YET

    K's commit-window duty cycle exceeds N's, and K shows duplicates in more F4-con-r trials than N.

    Falsified if K's share is no higher than N's. If the paired interval includes zero it is inconclusive, never support for no difference.

  9. H6aNOT RUN YET

    I's maximum sustainable rate is within 10% of N's.

    Falsified if I's rate falls more than 10% below N's. Absolute numbers are this laptop's; ratios between stacks are the transferable claim.

  10. H6bNOT RUN YET

    K and O+I each add no-fault p50 end-to-end latency over N.

    Falsified by p50 at or below N's with non-overlapping run ranges; overlapping ranges are inconclusive. K versus O+I is not predicted.

04 outcomes

What each outcome would decide

  1. OUTCOME

    Everything as predicted

    DECISION

    a measured map of where each guarantee stops: targeted cells show each boundary is reachable, random cells show how often

  2. OUTCOME

    H5 holds

    DECISION

    Kafka transactions, used with an external sink, raise the duplicate rate under random crashes; the duty cycle explains why

  3. OUTCOME

    K holds where the documentation says it shouldn't (H1 falsified)

    DECISION

    the windows are narrower than the documentation implies, or something absorbs them; the trial timelines say which

  4. OUTCOME

    I or O+I shows a duplicate or a balance off

    DECISION

    a duplicate under a unique key is the most serious finding available; it leads, with the trial's full timeline

  5. OUTCOME

    O+I loses a payment

    DECISION

    CDC opened a gap; the slot snapshots and Connect logs show where

  6. OUTCOME

    Broker death harms no stack (H4 all-zero)

    DECISION

    the title's fear is misplaced, and the danger is on the consumer side. The title is reworded at publication; the slug stays

  7. OUTCOME

    The detection gate fails

    DECISION

    the gate's failure is the post

What I'd tell a platform team

Once the campaign is analysed: where each guarantee stops, and whether Kafka transactions with a Postgres sink raise the duplicate rate under random crashes.

Happy to go deeper on any of this.

Download resume