← Model losses

Head-to-head comparison

xai / grok-4.7-efficient / medium / medium effort preferred over openai / gpt-6-luna / 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 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.

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.

openai / gpt-6-luna / low / low effort answer

## Recommended design

Treat each scheduled job as a **single-writer state machine** in a durable, linearizable control store replicated across three regions. A job may be claimed or have its authoritative owner changed only with a **two-of-three quorum**. Workers execute outside that store; the store authorizes ownership but cannot make an external, non-idempotent API call atomic with a lease transition.

This design favors safety over availability: during a partition, only the side that can reach quorum can assign work. The minority side stops initiating jobs. If no quorum is reachable, ownership changes stop everywhere.

### Requirements and assumptions

- The control store provides durable linearizable transactions, monotonically increasing per-job epochs, quorum writes, and recovery that does not roll back acknowledged commits.
- Each job has a stable identifier, a schedule occurrence identifier, and a policy for whether missed occurrences are skipped, delayed, or manually reviewed.
- Workers may pause, resume, crash, or become partitioned at any point. Clocks are not authoritative.
- An external API may apply a request while its response is lost; it provides neither idempotency keys nor a fencing-token check.
- Jobs are non-safety-critical, so delaying or suspending execution is preferable to risking concurrent or duplicate irreversible effects.

If the control store cannot provide those properties, do not claim authoritative leases or safe epoch advancement across failover.

### State and ownership transactions

Persist per job: `epoch`, `owner`, `lease_deadline`, `state`, current occurrence, and an append-only transition/effect-attempt history. States include `READY`, `LEASED`, `RUNNING`, `EFFECT_UNKNOWN`, `SUCCEEDED`, and `RECONCILIATION_REQUIRED`.

1. **Claim or takeover:** In one quorum transaction, verify the job is eligible and either unowned or expired according to the control store’s clock; increment `epoch`; set owner and lease deadline; record the transition. Epochs never decrease or get reused.
2. **Renewal:** The current owner renews with a conditional transaction matching both owner and epoch. A stale owner cannot renew or update job state.
3. **Begin execution:** Before any external call, conditionally record the occurrence, epoch, and effect attempt as `RUNNING`. If that write is unavailable, do not call the API.
4. **Record outcome:** Record success only when the worker has evidence of success. A timeout, lost response, or crash after a request may have reached the API is `EFFECT_UNKNOWN`, not failure eligible for automatic retry.
5. **Expiry:** Expiry allows a quorum-authorized successor to take ownership; it does not stop, revoke, or fence a paused worker at the external API.

Use store time for lease comparisons; workers must not decide ownership from local clocks. Choose lease duration and renewal interval as operational configuration, not as correctness proof. Require a safety margin for expected store and scheduling delays; missed renewals make a worker lose authority to update the control state, not necessarily to act externally.

### Guarantees and limits

- **Guaranteed under assumptions:** At most one current owner/epoch is authorized by the control store; stale epochs cannot commit renewals or state transitions. Acknowledged ownership changes survive failover.
- **Not guaranteed:** A stale worker cannot make an external call after pausing past lease expiry; an external side effect occurs exactly once; success can always be distinguished from non-execution after an ambiguous response.
- Epochs are **control-plane fencing only** unless the external service validates them. They cannot fence an API that has no idempotency or fencing support.
- Do not claim exactly-once effects. Automatic retry after an ambiguous call can duplicate an irreversible effect; refusing retry can omit an effect that never occurred.

### Degraded behavior and reconciliation

Without quorum, workers may finish local bookkeeping only if it does not represent new ownership or authorize an external effect. Do not start new occurrences or retry ambiguous effects. On quorum recovery, reconcile from durable state and the audit log; do not infer that a lease expired merely because a worker’s clock says so.

For `EFFECT_UNKNOWN`, stop automatic execution for that occurrence. An operator checks provider records or other authoritative evidence where available and records a decision—confirmed applied, confirmed not applied, or unresolved—with evidence, actor, timestamp, and rationale. Retry only after confirmed non-application or explicit risk acceptance; if evidence cannot resolve the outcome, preserve the unresolved state and require an explicit skip/retry decision. Record every decision as an append-only, attributable audit event.

### Acceptance traces

1. **Partition:** Regions A+B retain quorum; C is isolated. A obtains epoch 7. C cannot claim or renew and must not start a new occurrence. If A pauses and its lease expires, A+B may transactionally assign epoch 8. On rejoin, C’s epoch-6 writes are rejected. Pass if no minority ownership change is accepted and the durable epoch never decreases.
2. **Pause/resume:** A starts an external call under epoch 7, pauses past expiry, and B obtains epoch 8. A resumes. Pass if A cannot renew or commit control-state updates. The API may still accept A’s call; the system must not assert that epoch 8 prevents it.
3. **Crash after send:** A sends a non-idempotent request and crashes before recording the response. Pass if recovery marks the attempt `EFFECT_UNKNOWN`, does not automatically retry, and exposes it for reconciliation. This is safe against an automatic duplicate, but may require manual action even if the request never applied.
4. **No quorum:** All regions are partitioned from one another. Pass if no region advances ownership or starts an effect; scheduling is delayed until quorum returns.
5. **Rejoin/audit:** Rejoining workers submit stale epoch updates and an operator resolves an ambiguous occurrence. Pass if stale updates are rejected and the audit trail identifies the occurrence, epochs, attempt, evidence, decision, actor, and time.

### Alternatives and missing evidence

A provider-supported idempotency key or provider-enforced fencing token would materially improve effect safety, but neither is assumed. An external transactional outbox alone does not solve the gap when the recipient lacks deduplication. A design that permits each partition to continue scheduling improves availability but cannot preserve single authoritative ownership.

No source evidence or implementation details were supplied, so store capabilities, provider observability, lease timings, and operational feasibility remain assumptions to validate. Next, select and verify the control-store guarantees and define per-job missed-run and reconciliation policies before implementation.

Primary judge's stated reason

A receives a forced, weak preference because its explicit cross-epoch dispatch exclusion and corresponding acceptance checks more directly guide implementation of the central ownership-versus-effect distinction. Both answers cover quorum, degraded availability, reconciliation, audit, alternatives, and impossibility limits. This is not an established material quality gap; A's rollback inconsistency and B's substantive ambiguity protections make the comparison close, and an independent review could reasonably reject the preference.

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_c7da9e75947cf2d8c5472e498c3d621ef6363490c54130405cd5cb0c9982459f. A separate independent review is required before calling a concern a verified factual defect. Judge disagreement is not recorded here.