← Model losses

Head-to-head comparison

xai / grok-4.7-efficient / high / high 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 / high / high effort answer

The design below is a proposal from the problem constraints only. No repository, run, or measurement was available.

## Conclusion

Use a single quorum log (3 regions, commit quorum 2) as the only authority for schedule identity, lease epochs, and effect state. Regions may execute only a protocol-authorized send, and each job instance gets at most one automatic attempt. Ambiguous external outcomes are quarantined for audited human resolution. This is fail-closed ownership, not exactly-once effects.

Confidence: high on the impossibility claims and on mutex of authorization under an intersecting quorum. Not a claim about any existing codebase.

### Requirements

1. Authority mutex: at most one recorded holder of a non-expired execution lease for a given attempt.
2. Single automatic attempt: at most one `INTENT_COMMITTED` per `(job_id, period_key, attempt_seq)`, and no automatic return to a sendable state after that.
3. Fence before send: a worker may start a send only after a linearizable quorum check that its epoch is current, unexpired, and already the intent owner. Follower/stale reads are not sufficient.
4. Fail closed: if a worker cannot reach quorum, it must not grant, intend, or start a send.
5. Clocks are not ownership: wall-clock skew must not create a second holder. Store order and store time decide expiry.
6. Pause/resume is untrusted: in-memory “I am owner” is discarded on resume. A resumed worker re-reads the fence before any send.
7. Irreversible non-idempotent API: any outcome that does not prove the call never left the process is non-retryable automatically.
8. Audit: every grant, renew, expiry, fence, intent, observation, ambiguity, and human decision is an append-only quorum entry. The log must never contain `exactly_once_effect=true`.
9. Non-safety-critical: a missed or delayed run is acceptable. A second automatic send is not.
10. Manual retry is a new `attempt_seq`, separately leased and fenced, never an in-place reuse of the old epoch.

### Assumptions

- Three regions, asynchronous network, unbounded partition delay, crash-stop or pause/resume workers. No bound on freeze length between a successful check and a later syscall.
- Quorum log is linearizable when a majority is connected. Majorities intersect, so two grants cannot both commit.
- External API calls are irreversible and support neither idempotency keys nor a reliable “did my call land?” query.
- Creating a job-instance row is idempotent. Performing the external action is not.
- `period_key` is a name chosen in the quorum log by a tick owner, not a fact inferred independently from each region’s wall clock.
- A narrow local “no bytes submitted” abort is recordable only if the same live process records it before any IO submission. Death after submission is ambiguous.
- TTL and dwell are policy inputs. No numeric optimum is asserted here.

### Impossible guarantees

- Exactly-once external effects. After intent, the process can die in the window where the call may or may not have reached the API, and nothing in this system can tell those apart. Retry duplicates; not retrying can miss or can hide a call that already happened.
- At-least-once effects, under this design. Missed runs are the chosen failure mode.
- At-most-once effects once a human authorizes another attempt, or once a worker is frozen after a successful pre-send check and later resumed into the syscall. Fencing cannot claw back bytes already eligible to leave the machine.
- Ownership safety based on comparing regional wall clocks.
- Safe single-region execution during a partition that has no majority. Choosing that would void the mutex.
- A 2PC or “transactional send” with an API that is not a transaction participant.
- Using absence of a `SEND_STARTED` log line as proof that no send occurred. That record can be missing because the process died after the send.

Fencing limits: a fencing token gives mutual exclusion of authorization records and rejects stale writers. It does not bound check-to-send delay, does not recall an in-flight call, and is only as fresh as the last linearizable quorum RPC.

### Authoritative epochs and state

In-memory region state is a cache. The quorum record is authority.

`fencing_token` equals the epoch assigned by the grant’s log index. Rights are split:

- `may_send`: only for the current holder, only while the lease is unexpired, only after intent, only if a linearizable pre-send check still matches, and only if this attempt has not already been authorized to send.
- `may_append_observation`: the epoch that committed intent may append an observation even after expiry, so a late fact is not discarded. Observation never re-enables send.

States for one `attempt_seq`: `PENDING` → `LEASED(e)` → `INTENT_COMMITTED(e)` → (`MISSED_FENCED` | `NO_EFFECT_LOCAL` | `CLOSED_OBSERVED` | `AMBIGUOUS`). Human states: `MANUALLY_RESOLVED`, plus an optional child attempt. `CLOSED_OBSERVED` means “we saw a protocol response and will not retry,” not “the business effect happened once.”

Invariants:

- I-MUTEX: one current holder per non-expired lease.
- I-SINGLE-AUTO-INTENT: one intent CAS per attempt; intent is the point of no automatic return.
- I-NO-AUTO-REQUEUE: `AMBIGUOUS`, `CLOSED_OBSERVED`, `MISSED_FENCED`, and `NO_EFFECT_LOCAL` never become `PENDING` by themselves.
- I-FENCE: store rejects writes whose token is not the current epoch. Send authorization additionally requires an unexpired lease.
- I-QUORUM / I-MINORITY: grants, intents, checks, and manual authorizations are invalid without a committed majority entry. No quorum means no new send.
- I-AUDIT: transitions are append-only and ordered by store index.
- I-NO-EXACTLY-ONCE-FLAG: no terminal state is defined as exactly-once.

Transactions, each linearizable:

- Grant: allowed only from `PENDING`, or from `LEASED` past deadline with no intent. Sets `epoch = max_epoch+1`, holder, `deadline = store_now + TTL`. Old tokens stay invalid because `max_epoch` never decreases.
- CommitIntent: allowed only to the current unexpired holder. This is the no-return point for automatic execution.
- PreSendCheck: linearizable renew/read. Must see same epoch, holder, `INTENT_COMMITTED`, and unexpired deadline. Only then may the worker enter the send path. On resume, the check is repeated if the send has not started; failure means do not send.
- Expire: no intent → `PENDING` with epoch consumed. Intent present → `AMBIGUOUS`, not `PENDING`.
- RecordObservation: same epoch may append after expiry. A protocol response closes as `CLOSED_OBSERVED`. Timeout, crash, reset, or missing observation becomes `AMBIGUOUS`. Neither closes by retrying.
- ManualAuthorizeRetry: separate committed decision, authenticated actor, parent not sendable, no child yet, store dwell elapsed since intent or expiry. Creates `attempt_seq+1` in `PENDING` with a parent pointer. An override that skips external proof is a distinct audited action, not a silent path.

Schedule ticks use the same lease pattern. The tick winner commits `period_key` rows by CAS. Losing regions must not fire because their local clock says the cron time has arrived. Row creation may be repeated safely; execution may not.

### Quorum, degradation, ambiguity, reconciliation

Quorum behavior: any two regions can commit; a single region cannot. Store leadership and job ownership are different. Any region may propose a grant; the log orders proposals. Pre-send checks must see the latest committed epoch, not a lagged follower.

Degraded availability, stated as policy rather than measured uptime:

- One region down: the other two still schedule. If the holder dies before intent, failover waits out TTL, then one new epoch may be granted. If it dies after intent, that instance is quarantined; other jobs continue.
- Holder paused beyond TTL before intent: lease expires; another region may take a new epoch. The paused worker must not send on the old token.
- No majority (two regions down, or all links cut): no new grants, intents, or authorized sends. An already passed pre-send check can still emit one uncontrollable call. Scheduling of new work halts until quorum returns.
- Clock skew alone: no second holder. A fast worker clock may only cause early renew or early self-stop. A slow worker clock must not extend store expiry.

Ambiguous-effect rule: once intent is committed, automatic executors stop forever for that attempt. `MISSED_FENCED` is only for “check failed and this process did not start send.” `NO_EFFECT_LOCAL` is only for a live pre-IO abort. Everything else, including a crash after a successful check, is `AMBIGUOUS` even if a human later finds that nothing happened. HTTP success is `CLOSED_OBSERVED`, still not exactly-once, and still not a license to send again.

Manual reconciliation: the operator reads the store-ordered audit chain, checks the external system out of band, and commits one decision: effect observed, effect absent, unknown-accept-miss, or authorize one retry. Retry is a child attempt under the same single-attempt rules. Two operators race on a decision version; one CAS wins. Dwell reduces but does not eliminate overlap with a frozen sender. The audit record for a retry must include actor, parent attempt, evidence class, and residual overlap warning. The design does not automate discovery of the external side effect.

### Acceptance traces

These are pass/fail criteria, not executed results. “Pass” means the trace matches the criterion if run. None of these is an exactly-once pass.

- T1 Partition minority. Isolate R3. R3’s grant fails and R3 does not send. R1+R2 can still grant. Fail if R3 emits a call or holds a lease the majority does not have.
- T2 Concurrent grant. Two regions CAS the same `PENDING` attempt. Exactly one `LEASE_GRANTED` commits. Fail on two current holders.
- T3 Crash after intent, before send. Intent is durable; no second worker sends after expiry; state is not `PENDING`. Fail on a second automatic send.
- T4 Crash after send, before observation. On rejoin the attempt is `AMBIGUOUS` or otherwise non-retryable, and the log does not say exactly-once. Fail on automatic re-execution.
- T5 Pause past TTL, then resume. If send had not started, resume rechecks, does not send, and does not leave a second automatic holder. If the syscall was already in progress, the result is ambiguous and still not a second authorized sender. Fail if another worker automatically sends.
- T6 Clock skew. Move the holder’s wall clock forward or backward. Store expiry and epoch mutex are unchanged. Fail if skew alone creates two holders or lets a slow clock keep a store-expired lease sendable.
- T7 Total quorum loss. No region self-elects, grants, intends, or newly authorizes a send. Fail if any region executes on local belief alone.
- T8 Rejoin. Old token writes are rejected. If no intent existed, only the new epoch may intend. If intent already existed, the majority must not grant an automatic replacement send. Fail if both epochs become send-authorized.
- T9 Manual retry. From `AMBIGUOUS`, an audited authorize creates one child attempt; the parent token cannot send; the child can be granted once. Fail if retry has no actor entry, reuses the old epoch, or starts without a committed decision.
- T10 Dwell overlap, limitation trace. A frozen post-check sender plus a too-early or post-dwell second authorization can both effect the API. The criterion passes only if the system rejects early retry when the dwell gate is on, warns on authorize, and still does not label the outcome exactly-once. A product claim of exactly-once on this trace is a fail.
- T11 Tick identity. Two regions race to create the same `period_key`. One instance row exists. Execution lease is separate. Fail on two instances or two automatic effects for one period.
- T12 Protocol breach. A worker that sends with no committed intent, or after a failed pre-send check, is a failed implementation, not an accepted race.

### Alternatives discarded

- At-least-once automatic retry. Rejected as the default because a crash loop can duplicate a non-idempotent call. Per-job opt-in would require an idempotent API this problem does not provide.
- Time-only leases or “whose wall clock says cron fired.” Rejected. Skew and pause create split brain.
- 3-of-3 consent before send. More available-region coupling, and it still does not resolve a crash after send. Majority is enough for authorization mutex.
- Sticky regional ownership without a fence. A dead sticky region either stalls work or fails over unsafely.
- Treating missing `SEND_STARTED` as “safe to retry.” False safety; that is the ambiguous window.
- 2PC with the external API, or inventing idempotency keys the API does not honor. Outside the stated interface.
- Human approval before every first send. Unnecessary for non-safety-critical work; reserved for the second attempt.

Implication: operators can expect one authorized automatic invocation per attempt when workers obey the check, delayed failover by about one TTL when the holder dies early, and a hard stop for that instance when the outcome is unclear. They cannot expect every schedule tick to produce the external effect, and they cannot expect a manual retry to be duplicate-free if a paused sender can still wake.

## Alternatives and disagreements

The main disagreement with common schedulers is the idea that a leader lease plus at-least-once redelivery is “effectively once.” Under this API, that pattern duplicates. Another temptation is to auto-retry when the log shows intent but no send record. That hypothesis is discarded: the missing record is exactly what a crash after send looks like. A third discarded idea is degraded single-region mode “just for availability.” That breaks I-MUTEX as soon as the isolated region is not actually alone in thinking so, and even a truly isolated region has no intersecting majority to prove it is alone.

`CLOSED_OBSERVED` versus `AMBIGUOUS` is a bookkeeping split, not a stronger effect guarantee. Collapsing both into one quarantine state would also be coherent; the split only saves human review when a protocol response was actually stored.

## Missing evidence

No source, topology, TTL/pause distribution, API response semantics, or operator identity system was supplied. Consequence: TTL, dwell, and what counts as proof-of-no-effect cannot be calibrated; the transactions above stay protocol requirements, not a fitted implementation. If the real API later adds idempotency or a query-by-client-token, the no-retry rule can be relaxed for that job class only. Until then, relaxing it reintroduces duplicates.

## Next useful action

Fix the quorum CAS transactions and the twelve traces as the implementation contract before choosing a log product or a lease TTL. Do not add an exactly-once metric; track instead grants, fenced rejects, ambiguous quarantines, and manual child attempts.

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

B is the weak, forced preference because its intent-dependent expiry transaction more explicitly prevents automatic takeover from becoming a replacement send after an uncertain attempt. Both cover quorum ownership, fencing limits, degraded operation, reconciliation, auditability, alternatives, and acceptance traces. This is not an established material quality gap; an independent review could reasonably favor A's more consistently qualified presentation.

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