← Model losses

Head-to-head comparison

openai / gpt-6-luna / max / max effort preferred over xai / grok-4.7-efficient / medium / medium effort · clear 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 ownership of non-safety-critical scheduled jobs across three regions. Networks partition, clocks skew, region workers pause and resume, and job execution can trigger irreversible external API side effects without idempotency support. Define authoritative lease epochs, fencing limits, quorum behavior, degraded availability, ambiguous effect handling, manual reconciliation and auditability. Explain which guarantees are impossible and give partition/crash/rejoin acceptance traces without claiming exactly-once effects.

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-luna / max / max effort answer

## Design: quorum-backed leases, fail-closed effects

**Assumptions.** The three-region control plane is a crash/partition-tolerant consensus group with one durable voter per region and a two-of-three commit quorum. It is not Byzantine fault tolerant. Its clocks are monotonic, account for suspend/resume, and have a known maximum error of `ε`; if that bound is lost, lease changes fail closed. Internal state transitions use a linearizable, durable store. External APIs offer neither idempotency nor fencing. Jobs may pause for reconciliation because they are non-safety-critical.

### Authority and lease state

For each job, store `{epoch, holder, lease_until, acquisition_nonce}` in the consensus log. A lease or renewal is authoritative only after quorum commit. Workers’ cached state, local leaders, and minority replicas are not authority.

- A committed acquisition increments the job’s epoch, including reacquisition by the same region. A renewal keeps the epoch. A stable nonce lets a caller resolve a timed-out acquisition without accidentally creating another lease.
- A new acquisition requires a quorum and a committed check that the prior lease has expired past a guard. Set guard `G` above the worst-case relative clock error, drift, and scheduling uncertainty; with clocks each bounded to `±ε`, this includes at least `2ε`, plus the other uncertainty margins.
- The old holder stops work by its conservative local deadline, `lease_until − G`. The authority will not grant a successor until its trusted time is past `lease_until + G`. Uncertain or out-of-bound time means no renewal or takeover.
- Every internal authoritative mutation checks the current epoch, holder, and lease validity **in the same linearizable transaction**. Merely remembering the greatest epoch a resource has seen is insufficient: it may not yet have seen the new epoch.
- Renewals and mutations require quorum. A partitioned worker cannot extend a lease or commit authoritative state. Set renewal cadence `R` and worst-case renewal/commit delay `D` so `R + D + G < L`, where `L` is the lease duration; validate that condition under the deployment’s actual clock and network bounds.

The epoch fences stale workers from integrated internal state. It does **not** fence an external API that does not accept and enforce the epoch.

### Effects and ambiguous outcomes

Use a durable run key such as `(job_id, scheduled_fire_time)` and a per-effect stable ID. Before any external call, persist an immutable intent containing the run/effect IDs, epoch, payload hash, and audit metadata. A quorum transaction validates the current lease and changes the intent from `PREPARED` to `DISPATCHING`. Only then may a restricted egress service submit it. Deny workers direct API egress, disable automatic client/service-mesh retries, and never automatically resend a `DISPATCHING` intent.

The transaction and epoch change are ordered by consensus: if dispatch authorization commits first, it is an outstanding old-epoch attempt; if the epoch change commits first, authorization fails. But a process or request can pause after authorization and reach the provider after takeover. The provider cannot reject the stale epoch, and a timeout or crash after submission cannot distinguish “not applied” from “applied, response lost.” Treat such cases as `UNKNOWN`, block automatic replay of that effect and its dependants, and preserve the possibility of a late result.

This reduces duplicate submissions by our scheduler; it does **not** promise at-most-once effects at the provider. Do not claim exactly-once effects, exactly-once job completion, or that lease transfer prevents stale external effects. A human-authorized retry may duplicate an effect.

### Quorum and degraded availability

A two-region partition can make progress only on the side that can commit with two voters; the minority cannot grant leases or commit renewals. In a one-one-one partition, no side can commit. Even a current holder that has not reached its expiry cannot authorize a new effect without quorum. Pure local computation may continue, but it has no authoritative commit until quorum returns. This deliberately trades availability for a single authoritative history.

A committed dispatch authorization may still produce a late external effect after quorum is lost. Mark it unresolved; do not interpret loss of quorum as proof that the provider did nothing. If clock uncertainty is unbounded, automatic lease expiry and safe takeover are impossible without an additional trusted timing assumption or an operator-confirmed shutdown of the old holder.

### Reconciliation and audit

On takeover, mark old-epoch `DISPATCHING` intents unresolved. An operator workflow should freeze dependent work; quiesce the old worker and egress path; inspect provider records and relevant business state; then append an auditable decision to confirm applied, confirm not applied, retry, compensate, or leave blocked. If the result cannot be established, leave it `UNKNOWN`, or require an explicitly documented, authorized duplicate-risk decision to proceed. “Confirmed not applied” should require evidence that the old request cannot still arrive, not just a worker timeout.

Keep an append-only, quorum-durable record of lease grants, renewals and epochs; run/effect IDs and payload hashes; dispatch authorizations and available provider responses/references; uncertainty; and operator identity, evidence, ticket, decision and approvals. Never silently rewrite prior outcomes. Avoid storing secrets in the audit record.

### Acceptance traces and pass/fail checks

These are proposed checks, not executed tests; thresholds must use the deployed `L`, `G`, `R`, `D`, and clock-error bounds.

1. **Two-versus-one partition:** Start with region A holding epoch `e`, then isolate it from the other two voters. The majority may grant `e+1` only after the guarded expiry. A cannot renew or commit internal mutations; any old-token mutation after the successor grant is rejected. Pass if the consensus history contains no overlapping committed holders and the minority commits no authority.
2. **One-one-one partition:** No lease acquisition, renewal, or effect-dispatch authorization commits. A holder stops by its conservative deadline. Pass if every attempted new authorization fails without quorum. A previously authorized API request may still complete; the check must not treat that as proof of no effect.
3. **Skew and clock uncertainty:** Inject offsets up to the declared bound and verify guarded handover; exceed or invalidate the bound and verify fail-closed behavior. Pass if the lease protocol does not grant a successor before the guard and no out-of-bound clock is used for takeover.
4. **Pause, takeover, rejoin:** Pause an epoch-`e` worker past expiry, commit `e+1` elsewhere, then resume it. Its internal writes and new dispatch authorizations must fail. An old `DISPATCHING` effect remains `UNKNOWN`; the new owner must not automatically replay it. Pass even if the provider outcome remains indeterminate.
5. **Crash windows:** Crash after intent creation, after `DISPATCHING` commit but before sending, and after provider acceptance but before recording the response. `PREPARED` has no dispatch authorization; either `DISPATCHING` crash window is unresolved and is not automatically resent. Pass if audit state distinguishes these cases and recovery does not claim to know whether the provider applied the effect.
6. **Rejoin and reconciliation:** A returning region reloads committed state, discards cached epochs and cannot renew or mutate with an old token. Pass if any retry follows a recorded reconciliation decision and the audit trail shows who authorized it and why.

**Alternatives and dependencies.** If the API later supports idempotency keys or epoch fencing, pass stable effect IDs or epochs to it and verify its documented semantics; this can improve external guarantees but is not assumed here. If clock bounds cannot be established, use operator-confirmed failover instead of automatic timed takeover, or accept lower availability. No source or implementation evidence was supplied, so these are design recommendations, not claims about an existing system. The next useful step is to validate the clock bound, consensus behavior, egress retry behavior, and provider reconciliation evidence, then run the acceptance checks. This is independent reasoning only; no source review or tests were performed.

xai / grok-4.7-efficient / medium / medium effort answer

## 1. Design recommendation

**Conclusion:** Use a 3-region majority control plane as the only authority for job ownership, and treat external effects as at-most-one *automatic dispatch attempt per attempt generation*, not exactly-once. A quorum compare-and-swap into `DISPATCHING(epoch, generation)` is the fence. After that CAS, uncertainty is sticky: no second region, epoch, or rejoin may send again unless an operator commits “no effect.” This is the only coherent policy when the external API will not honor idempotency keys or fencing tokens.

**Confidence:** High on the impossibility and ownership rules. Medium on operational defaults (operator bias, lease margins), because no workload, RTT, or API contract was supplied. No source files were in scope; every external-API claim is conditional on the problem statement.

### Requirements

- R1. A job becomes runnable only when the control-plane clock says it is due. Region wall clocks must not gate execution.
- R2. At most one dispatch CAS may commit per `(job, attempt_generation)`.
- R3. A worker may send only after that CAS, only for the granted epoch, and only if a pre-send revalidation still shows that epoch and an unexpired lease with remaining send budget.
- R4. HTTP/client retries are forbidden. One send attempt.
- R5. Any crash, timeout, partition, or pause after the CAS and before a quorum-committed definite result leaves the job `AMBIGUOUS`. Automatic re-dispatch is forbidden.
- R6. Minority partitions cannot grant, renew, CAS, or decide. Quorum loss delays jobs. Delay is acceptable; a second send is not.
- R7. Resume after pause invalidates the lease even if the local monotonic clock did not advance.
- R8. Operator decisions are quorum-committed, attributed, and append-only. The UI must default to “assume effect possible,” never “retry.”
- R9. Do not claim exactly-once, automatic compensation, or a closed send-to-receive window.

### Assumptions

- Three regions; commit requires 2 of 3 linearizable replicas (Raft or equivalent). Workers are not replicas.
- Jobs are non-safety-critical: lateness and stuck ambiguous jobs are acceptable.
- The external API does not support idempotency keys, fencing tokens, or a reliable “did this happen?” query. If a later contract adds any of those, the ambiguous state can shrink; it is not assumed here.
- A definite application response is quorum-logged before it counts. A local 2xx that never reached the log is not knowledge.
- Operators exist. Wrong operator input can still duplicate effects; audit detects that, it does not prevent it.
- No numeric TTL, skew bound, or RTT is asserted. The implementation must *measure and reject* grants when observed RTT or replica-clock disagreement exceeds its configured budget. Those budgets are parameters, not results.

### Ownership, epochs, fencing limits

Authoritative state lives only in the quorum log. Region memory is a cache.

- `epoch` is a per-job monotonic integer. A grant commits `{job, epoch, holder, region, store_deadline}` before the worker may do anything else.
- Renew extends `store_deadline` only for the same epoch and holder.
- A new grant increments the epoch. Stale holders fail closed on renew, CAS, and pre-send revalidation.
- **Fence scope:** the control plane honors epochs. The external API does not. Fencing therefore limits who may *initiate* a send. It cannot recall bytes already on the wire, undo a paused process that already wrote the socket, or stop a delayed packet.
- **Lease scope:** usable send window is store TTL minus grant RTT minus a pause/skew margin minus a send budget. If the measured grant RTT already exceeds the budget, the worker discards the grant and does not CAS. Deadlines are store time plus local elapsed time since the grant ack, never civil clocks.
- **Pause:** `CLOCK_MONOTONIC` on common kernels does not advance across suspend, so a local lease timer is not proof. On any resume, watchdog gap, or failed revalidation, the lease is void. The worker must not send.

Irreducible window: revalidation succeeds, then the process pauses or the network delays the request until after lease expiry and after a *different* generation has been authorized. This design closes the second half by refusing a new generation without an operator “no effect” decision. It does not make the first packet’s arrival time zero.

### State machine and the only ownership transaction

States: `PENDING`, `DISPATCHING`, `AMBIGUOUS`, `COMPLETE_EFFECT`, `COMPLETE_NO_EFFECT`, `ABANDONED`.

One quorum transaction, compare-and-swap:

- Preconditions: state `PENDING`, caller’s epoch is current, store now is before `store_deadline`, store now is at or after due time, generation matches.
- Effects: state becomes `DISPATCHING`, record holder, region, epoch, generation, payload hash.
- This CAS is the single automatic attempt. It is not a claim that the effect happened.

Subsequent transitions:

- Worker still alive, send flag never set, no async buffer: may CAS `DISPATCHING → PENDING` only with an explicit “send not started” attestation. This is an optimization, not a proof against kernel buffering. If that attestation is not trusted, leave it `AMBIGUOUS`.
- Request outcome quorum-logged as definite success, and the API contract means effect happened: `COMPLETE_EFFECT`.
- Anything else after CAS — timeout, crash, 5xx, ambiguous 4xx, partition, lost response: `AMBIGUOUS`.
- Operator `MARK_NO_EFFECT` increments generation and returns to `PENDING`. That is a new attempt, not a retry of the old one.
- Operator `MARK_EFFECT_OCCURRED` → `COMPLETE_EFFECT`. Operator `MARK_ABANDONED` is terminal. Compensation, if any, is out of band and logged, never automatic.

Invariant I1: for each `(job, generation)` at most one `DISPATCHING` CAS commits.  
Invariant I2: a newer epoch cannot CAS a job that is `DISPATCHING` or `AMBIGUOUS`. Ownership transfer is not permission to execute.  
Invariant I3: no CAS commits without a majority.  
Invariant I4: `AMBIGUOUS` is sticky until an operator record commits.  
Invariant I5: epoch numbers only increase; a rejoined holder of epoch `e` cannot act once the log shows `e' > e` or a deadline before store now.

### Quorum and degraded availability

| Condition | Ownership | Execution |
|---|---|---|
| All 3 up | Normal grants | Due `PENDING` jobs may CAS once |
| 1 region down or isolated | Other 2 are authoritative | Continues for `PENDING` jobs; isolated holder cannot renew and must stop |
| Holder partitioned with a live majority elsewhere | Majority may bump epoch for *new* grants only | Already `DISPATCHING`/`AMBIGUOUS` jobs stay frozen |
| No majority | No grants, renewals, CAS, or operator commits | No sends. Jobs become late. Alert. Not a failover to local execution |
| Worker paused | Lease void on resume | Must revalidate; stale epoch cannot send |

Degraded mode is “run late or not at all,” never “run on both sides.”

### Ambiguous effects, reconciliation, audit

Ambiguous means “the effect may have happened.” Recovery bias is do-not-send. The operator record must include actor, reason, prior state, epoch, generation, payload hash, and the evidence they used. Allowed commits: effect occurred, no effect (increments generation), abandon, or compensation noted externally. A generation increment without that commit is a defect.

Audit log is the quorum log itself, hash-chained: grant, renew, expire, epoch bump, CAS, dispatch attempt, result, ambiguous, operator decision. It records authorization and claims. It is not external truth.

### Impossible guarantees

- Exactly-once external effects under crash, pause, delay, or a client retry.
- A fence the external API will enforce.
- Safe automatic retry after timeout of a non-idempotent call.
- Distinguishing crash-before-send from crash-after-send once the CAS has committed, unless the worker is alive and its no-send attestation is accepted.
- Progress during quorum loss together with single-dispatch. Availability of execution is the sacrificed side.
- Operator infallibility. Audit makes a bad “no effect” mark visible; it does not make it harmless.
- Closing the gap between “revalidation returned” and “external API received the request.”

### Acceptance traces

Pass/fail is logical. No timings or measurements are claimed.

- **P1 partition of holder A from majority B+C.** A holds epoch 7. A must not send after its send budget is exhausted. B+C may grant epoch 8 only for `PENDING` jobs. A job already `DISPATCHING` under epoch 7 is not sendable by epoch 8. **Pass:** no second CAS. **Fail:** A sends after budget expiry, or B sends that job.
- **P2 partition before dispatch.** Job is `PENDING`. Only the majority can commit a grant/CAS. **Pass:** one CAS. **Fail:** both sides send.
- **Q1 no majority.** **Pass:** zero dispatch CAS commits. Lateness alone is not failure. **Fail:** any region sends from local state.
- **C1 crash after send, before result is logged.** **Pass:** rejoin leaves `AMBIGUOUS` and does not send. **Fail:** new owner sends.
- **C2 crash after CAS, before send.** Indistinguishable from C1. **Pass:** manual queue, no auto send. **Fail:** automatic retry. A false ambiguous is an accepted cost.
- **C3 crash before CAS.** **Pass:** job stays `PENDING`; a later holder may CAS once. **Fail:** two CAS commits for the same generation.
- **R1 stale rejoin.** A’s epoch 7 lease expired; log has moved on; job is `DISPATCHING` or `AMBIGUOUS`. **Pass:** A revalidates, aborts, does not send. **Fail:** A sends because local memory still says owner.
- **R2 pause across expiry with a frozen monotonic clock.** **Pass:** resume revalidates and is refused by the log. **Fail:** send proceeds on the local timer alone.
- **A1 operator `MARK_NO_EFFECT`.** **Pass:** one new generation, one new CAS, audit contains the operator commit. **Fail:** send without that commit, or two generations in `DISPATCHING`.
- **A2 operator `MARK_EFFECT_OCCURRED`.** **Pass:** terminal, no later CAS. **Fail:** any later automatic send.
- **A3 client retry enabled.** **Fail** even if all lease checks pass. One logical attempt that emits two HTTP tries is a broken fence.

## 2. Alternatives and discarded hypotheses

- **At-least-once outbox.** Rejected. An outbox reliably repeats the external call, which is the wrong direction without idempotency.
- **Active-active regions.** Rejected. Concurrent owners duplicate irreversible effects.
- **Lease without epoch, or wall-clock lease only.** Rejected. Pause, skew, and delayed rejoin can overlap two holders. Epoch plus pre-send revalidation is the minimum internal fence.
- **Fixed primary region with no majority failover.** Discarded as worse availability: one isolated primary stops the system even if the other two are healthy. Majority lease is the better alternative and still does not create exactly-once.
- **2PC with the external API.** Impossible. It is not a participant and does not lock.
- **“CAS rollback proves no effect.”** Likely false positive if the host, proxy, or kernel already transmitted. Treat that rollback as untrusted unless the process is alive and the no-send flag is explicit; otherwise stay ambiguous.
- **“HTTP 2xx in worker memory proves complete.”** False if the worker dies before the quorum log. Recovery must still treat the job as ambiguous and bias the operator toward effect-occurred.

## 3. Missing evidence and consequence

No API contract, query method, payload identity rule, RTT/skew envelope, or operator SLO was supplied. Consequence: definite no-effect responses cannot be enumerated; lease numbers must not be invented; a job with no external query can remain ambiguous indefinitely; duplicate effects remain possible if an operator, a client retry, or the irreducible delay window fires. Those are design bounds, not test results.

## 4. Next useful action

Write the quorum CAS and log schema for `PENDING → DISPATCHING` and the sticky `AMBIGUOUS` rule, including a pre-send revalidation that fails closed on resume, then review the ten traces above as specification checks. Do not add a retry path unless the external API gains a real idempotency or query contract.

Primary judge's stated reason

B is preferable because its dispatch/recovery rules provide a more internally consistent implementation and acceptance-test contract. A's rollback exception leaves implementers choosing between an allowed recovery transition and a stated invariant. This is a clear specification-level advantage, not a demonstrated runtime failure or proof that B prevents duplicate external effects.

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

Battle wave: 4f1c6dfb-2901-4e06-85bf-7ed497044a25. Pair: brp1_98a9c5d34475173b115acea17e76a1c2566b7b9600aa534f6a74e6bda49c75e1. A separate independent review is required before calling a concern a verified factual defect. Judge disagreement is not recorded here.