← Model losses

Head-to-head comparison

openai / gpt-6-astra / high / high effort preferred over openai / gpt-6.1-sol / low / low effort · close win.

Primary judge: Sol 6.1, requested Low. Effective provider effort and internal attempts were not verified. A close win is still a scored preference; it does not establish a material defect.

Reviewed public evidence

Task goal

Design a durable webhook inbox for one PostgreSQL database and multiple workers. An authenticated source supplies eventID, accountID and payload; deliveries are duplicated and reordered. Persist acknowledgement before returning success, deduplicate by source/account/eventID, process with expiring leases and fencing, preserve per-account dependencies, bound retries and poison events, and recover crashes without claiming exactly-once external effects. Define state transitions, transaction boundaries, backpressure and acceptance failure cases.

Give one coherent design with explicit requirements, assumptions and alternatives, state/invariant/transaction details appropriate to the stated scope, and measurable pass/fail acceptance checks. Do not invent benchmark measurements, provider costs, source inspection, executed tests or objective passes. Every contributor must independently answer the complete identical question; there are no separate roles, files or tool evidence.

openai / gpt-6-astra / high / high effort answer

## Recommendation and assumptions

Use a **transactional PostgreSQL inbox, one execution lane per account, and renewable leases with monotonically increasing fencing tokens**. A successful webhook response means “durably accepted,” not “processed.”

This is an independent design based only on the supplied requirements. No implementation was inspected and no tests were executed.

### Required contracts

1. **Authenticated identity:** derive `source` from authentication and verify that it may submit for `accountID`. Do not trust source identity supplied inside the payload.
2. **Stable event identity:** retries retain the same `(source, accountID, eventID)` and immutable event contents.
3. **Dependency information:** event IDs and arrival order alone cannot reveal dependencies. For this design, require an authoritative, contiguous **per-account sequence number** in the authenticated envelope or payload.
   - Provision the account’s starting sequence explicitly; never assume the first arrival is the first event.
   - If multiple sources affect the same account, they must share that sequencing authority. Independent source sequences cannot establish cross-source order.
   - Without this additional contract, the system can serialize arrival order, but cannot truthfully guarantee preservation of source dependencies.
4. **Source retry behavior:** the source retries timeouts, retryable non-success responses, and ambiguous outcomes using the same identity.
5. **Durability scope:** acknowledge only after PostgreSQL reports a durable commit. Use logged tables and appropriate WAL/fsync settings. If success must survive primary loss and failover, synchronous replication and promotion policy must preserve acknowledged commits; asynchronous replication alone does not provide that guarantee.
6. **External effects:** downstream systems may support stable idempotency keys or fencing. Where they do not, ambiguous effects require reconciliation or explicitly accepted duplicate risk.

Sequence numbers impose stronger ordering than a dependency DAG, but make the correctness boundary straightforward.

## Durable records and invariants

### Records

**`account_lane`**
- Canonical account key.
- `completed_seq`: highest contiguously resolved sequence.
- Monotonic `fence`, never reset or reused.
- Optional active event, owner, lease expiry, and attempt deadline.
- Administrative hold and reason.

**`inbox_event`**
- Primary key: `(source, accountID, eventID)`.
- Unique constraint: `(account_lane, sequence)`.
- Immutable sequence, payload, and fingerprint of the defined immutable envelope.
- State: `pending`, `running`, `retry_wait`, `succeeded`, `quarantined`, or `skipped`.
- Attempt count, retry deadline, next eligibility time.
- Current attempt token, error classification, and timestamps.

**Supporting records**
- Attempt/audit records.
- Transactional capacity accounting.
- Optional effect-intent/outbox records, uniquely keyed by event identity and effect name.

Define the fingerprint precisely: either require identical bytes on retries or specify canonical encoding. Include sequence and all other semantically immutable metadata. A mismatching duplicate is an identity conflict, not a harmless retry.

### Invariants

1. At most one accepted event exists for each deduplication key.
2. At most one accepted event occupies each account sequence.
3. Only sequence `completed_seq + 1` can execute.
4. At most one **currently authorized** attempt exists per account. Expired workers may still physically run.
5. Every worker mutation requires the current event, owner, fence, and an unexpired lease.
6. Local business changes, event completion, and cursor advancement commit together.
7. Failure, expiry, and quarantine do not advance the cursor.
8. Attempts and processing time have finite configured budgets.
9. Quarantining an event does not silently declare its dependencies satisfied.

Use database constraints plus explicit row locks under `READ COMMITTED`; application checks alone are insufficient. Establish one lock order, for example capacity records → account lane → event. Worker transactions that do not need capacity records start at the account lane.

## State transitions

| From | To | Condition |
|---|---|---|
| Absent | `pending` | Valid admission commits |
| `pending` / `retry_wait` | `running` | Event is the account head, retry time has arrived, and budgets remain |
| `running` | `succeeded` | Current unexpired attempt commits successful processing |
| `running` | `retry_wait` | Current attempt records a retryable failure |
| Expired `running` | `retry_wait` | Recovery records lease expiry; another attempt remains allowed |
| `pending` / `retry_wait` / `running` | `quarantined` | Permanent failure, exhausted budget, or unresolved effect ambiguity |
| `quarantined` | `retry_wait` | Audited recovery grants a new bounded budget |
| `quarantined` | `skipped` | Explicit, authorized resolution establishes that continuing is valid |

`pending` also covers dependency-blocked events. Eligibility is derived from the account cursor; it need not be materialized in another state.

A missing sequence blocks later events. A gap timer raises an operational alert and may place the lane on hold; it never manufactures success for the missing event.

## Transaction boundaries

### 1. Receive and acknowledge

Before opening a transaction, authenticate, authorize, enforce request-size limits, and validate the envelope.

Inside one transaction:

1. Acquire the required capacity and account locks in the prescribed order.
2. Look up the deduplication key:
   - Same immutable envelope: return the existing acceptance result without reserving capacity again.
   - Different envelope: reject with an identity-conflict response.
3. Check sequence validity and uniqueness. A new identity cannot replace an already accepted or resolved sequence.
4. Verify capacity and the allowed sequence-gap window.
5. Insert the event and reserve its storage/work capacity.
6. Commit.

Return `202 Accepted` only after that commit succeeds. An exact duplicate may also receive `202`, even if processing later failed: acceptance and processing status are separate concepts.

If the connection fails during commit, the outcome may be unknown. Do not claim that admission failed atomically. Return a retryable error if possible; a same-key retry discovers the committed record or inserts it once.

A notification can wake workers after admission, but polling remains authoritative. Notifications are not durable work storage.

### 2. Claim an account head

In a short transaction:

1. Select an eligible account using `FOR UPDATE SKIP LOCKED`.
2. Lock its head event and recheck eligibility.
3. If an old attempt expired, record expiry and apply retry/exhaustion policy.
4. Increment the persistent account fence.
5. Increment the event attempt count.
6. Assign owner, attempt token, lease expiry, and an absolute attempt deadline.
7. Change the event to `running` and commit.

Perform processing outside the transaction. Do not hold database locks across network calls.

Use database wall-clock time, sampled after lock acquisition, for lease decisions. Transaction-start timestamps can become stale while waiting for locks.

The claim counts as an attempt even if the worker crashes before doing useful work. This conservatively bounds crash loops.

### 3. Renew

A short transaction locks the lane and event and verifies:

- Matching owner, event, and fence.
- State is `running`.
- The current lease has not expired.
- The absolute attempt deadline has not passed.

Extend the lease only up to that deadline. An already expired worker cannot revive its lease, even if nobody has reclaimed the event.

If renewal fails or its outcome is unknown, the worker stops initiating new effects. Already-issued external requests may still complete.

### 4. Commit successful local processing

Lock the lane and event, then validate ownership and expiry again.

In the same transaction:

- Apply PostgreSQL business mutations.
- Record any durable effect intentions.
- Mark the event `succeeded`.
- Advance `completed_seq` by exactly one.
- Clear active ownership.

A stale worker must roll back all those writes. Checking the token and then committing business changes in a separate transaction would defeat fencing.

For accounts whose next event depends on external completion, do **not** advance the cursor merely because an outbox entry exists. Advance only after the required external result is durably resolved.

### 5. Failure and recovery

A current worker can record failure and clear its lease transactionally:

- Transient failure: `retry_wait`, with capped exponential backoff and jitter.
- Permanent failure or exhausted budget: `quarantined`.
- Ambiguous non-idempotent external outcome: quarantine or reconciliation hold.

A reaper uses the same locks to reclaim expired attempts. Recovery must work without cooperation from the crashed worker. Apply backoff to crash recovery too, so repeated worker deaths cannot produce a hot reclaim loop.

Enforce a maximum claim count, absolute processing deadline, and per-attempt runtime ceiling. An independent sweep can quarantine expired pending work, including events that never became runnable.

## External effects and fencing limits

A PostgreSQL fence protects PostgreSQL state only when every relevant write validates it transactionally. It cannot retract an external request.

For each logical external effect:

1. Persist an immutable intent before sending.
2. Use a stable idempotency key derived from event identity and effect name—not from attempt number.
3. Retry or query that same logical operation after an ambiguous outcome.
4. Record the confirmed outcome durably.
5. Unblock dependent account work only when the dependency’s completion condition is satisfied.

Where supported, pass the account fence downstream. The downstream must atomically reject obsolete fences. Fencing and idempotency solve different problems: fencing limits obsolete attempts; idempotency prevents repetition of one logical operation.

The key failure window remains:

> The downstream performs an effect; the worker crashes before PostgreSQL records success.

An outbox preserves the intent but does not close this window. Without downstream idempotency, a transactional integration, or reliable reconciliation, automatic retries can duplicate effects. Holding an account avoids unsafe progression but sacrifices availability.

Multiple external effects within an event need separate durable effect identities and reconciliation rules.

## Poison events, ordering, and operations

Quarantine stores the original immutable event and diagnostic history. It blocks dependent successors but must not block unrelated accounts.

Operators may:

- Correct the processing implementation and grant a bounded replay budget.
- Reconcile an ambiguous external operation.
- Apply an audited compensating resolution.
- Skip only when domain rules explicitly permit successors to proceed.

Skipping is a business decision, not a retry policy. Update the event and account cursor atomically, with an audit record. Preserve the original payload rather than overwriting accepted evidence.

Expose queue depth/bytes, oldest unresolved age, sequence gaps, head-of-line blocking, retry counts, lease expiries, quarantine counts, and per-account processing lag. Schedule accounts fairly so one busy or failing account cannot monopolize workers.

## Backpressure and retention

Configure hard limits for:

- Request and payload size.
- Global and per-account unresolved events and bytes.
- Accepted sequence distance ahead of the cursor.
- Concurrent attempts and downstream calls.
- Database connections.
- Retry/recovery budgets and retained history.

Admission reservations must be transactional; independently sampled queue counts can oversubscribe capacity. A simple global capacity row is correct but may contend. If necessary, replace it with bounded reservation allocations whose sum cannot exceed the global budget.

Reserve storage headroom for WAL, indexes, maintenance, and operational writes; logical payload-byte quotas alone do not bound physical disk usage.

Suggested admission responses:

| Condition | Response |
|---|---|
| Unauthenticated / unauthorized | `401` / `403` |
| Malformed or missing required ordering metadata | `400` or `422` |
| Payload too large | `413` |
| Identity or sequence conflict | `409` |
| Account/rate/backlog limit reached | `429`, with retry guidance |
| Database unavailable or global capacity exhausted | `503` |
| Durably accepted or matching accepted duplicate | `202` |

Exact duplicates should remain acknowledgeable when new admission is throttled, provided their durable receipt can be verified.

Retain compact deduplication tombstones after deleting bulky completed payloads. Permanent deduplication requires permanent identity retention. With finite storage, this eventually requires adding capacity or refusing new events. A bounded retention horizon is an alternative only with an explicit source replay/expiry contract; deleting receipts and admitting arbitrary old identities loses deduplication.

## Proposed measurable acceptance checks

These are pass/fail criteria, not executed results.

| Check | Pass condition |
|---|---|
| Concurrent duplicate admission | Concurrent identical submissions produce exactly one durable event and one capacity reservation |
| Conflicting duplicate | Changed immutable contents under the same key receive conflict; original contents remain unchanged |
| Sequence collision | Two identities targeting one account sequence cannot both be accepted |
| Commit/response crash window | Killing the receiver after commit but before response still permits a retry to find exactly one accepted event |
| Durability | Every observed success remains present after crashes/failovers covered by the declared durability policy |
| Reordering | Deliver sequences `3, 1, 2`; execution follows `1, 2, 3`, with no execution of `3` before its predecessors resolve |
| Missing predecessor | With sequence `2` absent, later sequences never execute and the configured gap alert fires |
| Competing claims | Under simultaneous claims, at most one valid lease exists per account; independent accounts can proceed |
| Lease fencing | Pause worker A past expiry, reclaim with B, then resume A: all A’s completion, renewal, and local business writes are rejected |
| Crash recovery | A crashed attempt is recovered within the configured lease/reaper timing bound; renewal cannot exceed the attempt ceiling |
| Retry bound | Persistent failures produce no more than the configured number of automatic claims and then quarantine |
| Poison isolation | Quarantined head blocks its successors while healthy accounts continue within the configured scheduling target |
| Local atomicity | Injected failure cannot leave business writes committed without matching event completion and cursor advancement |
| External ambiguity | An effect accepted before a worker crash is retried with the same idempotency key, or held for reconciliation when safe retry is unavailable |
| Capacity race | Concurrent new admissions never exceed transactional event/byte limits; matching duplicates consume no additional reservation |
| Retention | A replay inside the promised deduplication horizon cannot create another event; the expiry policy is explicitly exercised |
| Lost notifications | Dropping every wake-up notification still results in polling-based processing |

## Alternatives and remaining decisions

- **Explicit dependency DAG:** allows independent events within an account, but requires cycle detection, missing-dependency policy, and more complex claiming.
- **Arrival-order serialization:** works with the three supplied fields alone, but cannot preserve unknown source ordering.
- **Whole-account database lock during processing:** simpler for short database-only work; unsuitable for network-bound work and does not fence external effects.
- **Finite receipt retention:** reduces storage requirements by weakening the deduplication contract explicitly.

Confidence is high in the transactional and fencing approach. End-to-end ordering depends on authoritative dependency metadata; safe external retries depend on downstream capabilities.

**Next action:** agree on the sequencing contract, acknowledged-failure durability scope, downstream idempotency/reconciliation behavior, and numerical capacity/retry/retention limits. Then implement the transactions and execute the fault-injection checks above.

openai / gpt-6.1-sol / low / low effort answer

## Recommendation and assumptions

Use PostgreSQL as the durable inbox, scheduler, and authority for worker ownership. A successful HTTP acknowledgement means **the delivery is durably recorded**, not processed. Processing is retryable; database effects can be atomic with completion, but arbitrary external effects are not exactly once.

This is an independent design based only on the supplied requirements; no source inspection or tests were performed.

Assumptions and required contracts:

- Authentication determines `source_id` and authorizes the supplied `account_id`; neither is trusted merely because it appears in the payload.
- Deduplication identity is `(source_id, account_id, event_id)`.
- PostgreSQL commit durability is configured to match the promised failure model. If success must survive primary loss, synchronous replication and failover fencing are required; local durable WAL alone is insufficient.
- **Delivery order cannot establish causal order.** Require a source-provided account sequence or explicit predecessor IDs. The design below uses explicit predecessor IDs. If neither exists, only serial processing in an arbitrary observed order is possible—not preservation of unknown dependencies.
- Dependency IDs use the same source/account scope, and handlers have versioned, validated payload contracts.
- External calls have bounded deadlines. Downstream idempotency or fencing support is used where available.

## Persistent model and invariants

An `inbox_event` row contains:

- Identity, immutable payload, canonical payload digest, receipt time, handler version.
- State: `waiting`, `ready`, `running`, `retry_wait`, `succeeded`, `dead`, or `skipped`.
- Attempt count, next eligible time, first-attempt time, error classification.
- Current owner, lease expiry, and account fencing token.

Additional tables:

- `event_dependency(event, predecessor_identity)`: predecessor identities can exist before their events arrive.
- `account_lane`: one row per source/account, holding current event, owner, lease expiry, and monotonically increasing fencing token.
- Optional transactional outbox for external commands.
- Compact deduplication tombstones if completed payloads are removed.

Constraints and invariants:

1. A unique constraint enforces deduplication identity.
2. Duplicate delivery never changes payload or dependencies.
3. An event is runnable only when every prerequisite has succeeded or has been explicitly waived by an audited policy.
4. At most one **current database-authorized** worker exists per account.
5. Every claim increments the account fencing token; every worker mutation checks that token and an unexpired lease.
6. Terminal states are not changed by automatic retries.
7. A worker may still execute code after losing ownership; database fencing does not physically stop it.
8. Deduplication lasts only as long as identity records are retained. Define a replay horizon, or retain tombstones indefinitely.

Multiple independent ready events within an account may be processed in deterministic receipt/identity order. This does not assert causal ordering between them.

## Transactions and state transitions

### 1. Receive and acknowledge

Before opening a transaction, authenticate, authorize account scope, enforce size limits, and perform cheap structural validation.

In one transaction:

1. Create the account lane if needed.
2. Insert the event and its immutable dependency records.
3. On unique conflict, compare canonical digest and dependency metadata:
   - Identical: treat as a duplicate.
   - Different: return an identity-conflict error; do not overwrite.
4. Commit.

Return `2xx` only after confirmed commit. A duplicate may receive `2xx` even if the original is still waiting or already dead: it has been durably accepted.

A commit timeout or lost response has an **unknown** outcome. Return a retriable failure, never assert rollback; the sender repeats the same identity.

Authenticated, structurally valid events with invalid business content can be durably recorded as `dead`. Clearly malformed requests can instead receive a permanent `4xx`; document this distinction.

### 2. Claim

Workers poll; notifications are optional wake-up hints, never the source of truth.

In a short transaction:

1. Select and lock an eligible account lane using `FOR UPDATE SKIP LOCKED`.
2. If its current event has expired, reclaim that event before starting another account event.
3. Otherwise choose a due `ready`/`retry_wait` event, or a `waiting` event whose prerequisites now satisfy the rule.
4. Check retry and age limits.
5. Increment the lane token, increment the attempt count, set owner and lease expiry using database time, and transition the event to `running`.
6. Commit, then execute outside the transaction.

All paths lock lane before event to avoid inconsistent lock order. Eligibility indexes should cover state and retry time; dependency lookups need predecessor identity indexes.

### 3. Renew

Renew in a short transaction using a conditional update matching lane, event, owner, token, `running` state, and `lease_until > clock_timestamp()`.

Renew both lane and event atomically. Zero affected rows means ownership is lost; stop initiating effects. An expired worker cannot resurrect its lease even if nobody has reclaimed it.

Use database time, not worker clocks. Set renewal cadence comfortably below lease duration; enforce an overall processing deadline so heartbeats cannot preserve a hung attempt forever.

### 4. Finish successfully

Lock the lane and verify current ownership, fencing token, and lease.

- **Database-only effects:** apply business changes and set `succeeded` in the same transaction; release the lane atomically. A stale worker’s entire transaction must roll back.
- **External work via outbox:** commit the business transition, unique outbox command, and event completion atomically. Here, `succeeded` means “command durably scheduled,” not “remote action confirmed.”
- **Direct external call:** perform it outside a database transaction, then conditionally record completion. An unknown remote outcome remains possible.

Do not hold lane locks across network calls.

### 5. Fail or expire

A current worker records a classified failure and either:

- Sets `retry_wait`, computes capped exponential backoff with jitter, and releases the lane.
- Sets `dead` when the failure is permanent, attempt limit is reached, or maximum processing age is exceeded.

Lease expiration permits reclamation with a **new** token. Expired claims count toward the attempt budget, including crashes before handler execution. A recovery worker marks exhausted expired events dead rather than leaving them stranded.

Retry limits, age limits, lease duration, and error classifications are explicit configuration—not unbounded defaults.

## Dependencies and poison events

A missing predecessor keeps an event in `waiting`; later arrival makes it eligible. Periodic reconciliation is necessary even if notifications are lost.

- A dead prerequisite blocks its dependents by default.
- A deadline for missing prerequisites triggers an alert and quarantine reason; it must not silently authorize processing.
- Cycles are invalid. Validate self-dependencies immediately and detect larger cycles through transactional validation or reconciliation.
- Poison events do not monopolize workers through tight retry loops.
- Independent events may continue; descendants remain blocked.
- Operators may explicitly waive a dependency, skip an event, or authorize a bounded replay. Record actor, reason, prior state, and replay generation; never reset the fencing counter.

If strict contiguous account sequence is required instead, use an account cursor and source sequence numbers. Gaps then block all later sequence entries, and an explicit gap-resolution policy is mandatory.

## External effects and crash recovery

Use a stable external idempotency key derived from event identity and effect name—not the retry attempt. Multiple effects need separate persistent effect records.

A downstream service can enforce fencing only if it checks tokens atomically with its effects. A token included merely as request metadata provides no protection. The downstream idempotency retention window must cover possible retries and replays.

Without downstream guarantees:

- A worker can perform an external effect and crash before recording success.
- A retry can repeat that effect.
- A stale worker can act after its lease expires.

Therefore the guarantee is durable intake and retryable processing, with possible duplicate external effects. An outbox closes the database-to-command persistence gap, but its dispatcher still needs downstream idempotency or reconciliation.

Crash recovery follows stored state:

| Crash point | Recovery |
|---|---|
| Before intake commit | Sender retries; no acknowledgement was promised. |
| After intake commit, before response | Duplicate delivery finds the existing row. |
| After claim, before completion | Lease expires; bounded retry with a new token. |
| During database-effect transaction | Effects and completion commit together or roll back together. |
| After external effect, before completion | Retry/reconcile an ambiguous outcome; duplication is possible. |
| After completion commit | Event is terminal and not automatically reprocessed. |

## Backpressure and operations

Set explicit limits for request size, admitted event count/bytes, per-account backlog, worker concurrency, database connections, and external-call concurrency.

For race-free admission, reserve bounded capacity inside the intake transaction—for example through locked capacity counters. Check an existing duplicate before denying a new capacity reservation.

- Reject new work with `429` or `503` and `Retry-After` when capacity is exhausted.
- Never acknowledge an unpersisted event.
- Reserve headroom for duplicate acknowledgements, recovery, terminal-state updates, and operational access.
- Separate per-account limits from global limits and schedule lanes fairly to avoid noisy-account starvation.
- Require sender retries or reconciliation for rejected work; admission rejection can otherwise lose events permanently.

Monitor queue depth/bytes, oldest runnable and waiting ages, missing prerequisites, dead count, retries, expired leases, fencing rejections, intake commit failures, outbox age, and storage headroom. Retention must preserve identities and dependency-resolution evidence.

## Measurable acceptance checks

These are proposed checks, not executed results. Set concrete operational thresholds before testing.

| Test | Pass condition |
|---|---|
| Concurrent identical deliveries | Exactly one identity row; all successful responses follow a durable commit. |
| Same identity, different content | Original remains unchanged; conflicting delivery receives the documented non-success response. |
| Crash around acknowledgement | Every observed `2xx` has a recoverable row under the stated durability model; uncertain outcomes deduplicate on retry. |
| Reordered dependencies | Dependent handler never starts before its prerequisite satisfies the declared completion rule. |
| Missing predecessor/cycle | No unauthorized processing; configured deadline produces a visible quarantine/alert. |
| Multi-worker contention | Never more than one current valid lane owner; no duplicate committed database effect. |
| Lease-expiry race | Old-token renewal, failure, and completion mutations affect zero rows after expiration/reclaim. |
| Database-effect crash injection | Every tested interruption leaves both effect and completion committed, or neither. |
| External ambiguity injection | No exactly-once claim; documented duplicate/reconciliation behavior occurs. With downstream idempotency, repeated keys produce one logical effect. |
| Poison event | Handler claims never exceed configured automatic limits; descendants remain blocked; independent work progresses. |
| Notification loss/restart | Polling recovers eligible and expired work within the configured recovery bound. |
| Capacity exhaustion | New admissions stop at configured reservations; duplicates remain serviceable within reserved headroom; no rejected request is acknowledged as accepted. |
| Retention/replay | Replays within the promised horizon deduplicate and dependencies remain resolvable. |
| Fairness | A continuously eligible account receives service within a specified bound under the declared load envelope. |

## Alternatives, uncertainties, and next action

- Strict sequence cursors are simpler when the source supplies complete ordering; explicit dependencies allow independent progress but require cycle and missing-parent handling.
- Long transactions around external calls are rejected: they consume connections and do not solve remote atomicity.
- In-memory deduplication and locks are insufficient across crashes and workers.
- Unbounded retries or silently skipping poison predecessors violate the durability/dependency contract.

**Confidence:** high in the transaction and fencing pattern; actual durability, capacity, and downstream-effect guarantees depend on deployment and source contracts.

**Next action:** establish the source’s ordering metadata, PostgreSQL failure model, external idempotency contract, and numeric limits; then implement and run the acceptance matrix with crash and lease-race injection.

Primary judge's stated reason

A receives a slight forced preference because its explicit remote-completion gate more directly protects successors whose correctness depends on an external result. B offers better independent progress and substantially equivalent safeguards elsewhere. This is not an established material quality gap; an independent review could reasonably reject this preference.

This reason is the judge's assessment. No independent factual-defect finding is asserted by this record.

Battle wave: 1fb32bda-9041-4f2e-818c-0fd4669031e2. Pair: brp1_83e8338169068f67054b35f12c5ead3fcdf10344de9d39ebc04480944f3ffad7. A separate independent review is required before calling a concern a verified factual defect. Judge disagreement is not recorded here.