xai / grok-4.7-efficient / xhigh / xhigh 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 / xhigh / xhigh effort answer
The design below is fail-closed epoch leasing with a quorum-committed pre-effect barrier and ambiguity quarantine. It is reasoning from the problem statement only. No system was inspected, and nothing here was executed.
## 1. Design
**Recommendation:** For each scheduled occurrence, a 3-region quorum is the only authority that may grant a monotonic lease epoch. A worker may transmit the irreversible call only after that epoch’s pre-effect record has committed. If the process may already have put bytes on the wire and the success ack is missing, the occurrence is quarantined. No later epoch is granted until a human certifies no effect. Delay is accepted. Automatic duplicate dispatch is not.
**Confidence:** Medium-high on the protocol invariants under crash faults and partitions. Low on fit to any existing scheduler or API, because no source, API contract, or store was provided.
### Requirements
1. Identity of an occurrence is `(job_id, nominal_slot)`, not “whichever region clock fired first.”
2. At most one epoch may be authorized to dispatch that occurrence, and at most one automatic dispatch may be attempted, unless a human later certifies that no effect happened.
3. A minority partition must not grant, renew, or dispatch.
4. Wall-clock skew must not create, extend, or transfer execution rights.
5. Pause, crash, lost ack, or lease expiry after a possible send must not be treated as “safe to retry.”
6. Every grant, fence, dispatch authorization, outcome, and human close is append-only auditable.
7. Without quorum, new execution stops. Stalling is acceptable because the jobs are non-safety-critical.
8. The design must not be described as exactly-once, effectively-once, or duplicate-free in the external system.
### Assumptions
- Three regions, crash faults only. A buggy or Byzantine worker can still call the API; fencing does not restrain the external service.
- A majority store can commit compare-and-swap transitions (Raft or equivalent). The log is the authority.
- The external API has no idempotency key, no fence-token check, and no reliable “did this occurrence already happen?” query. A success response is evidence only of a response, not of uniqueness.
- Operators can sometimes determine the external outcome out of band, and can act on a quorum-committed reconciliation.
- Clock skew is assumed bounded by an operator parameter `ε`. That bound is an assumption, not a measurement.
- “Non-safety-critical” is interpreted as “stall and repair by hand,” not “duplicates are cheap.” If product owners prefer duplicates over delay, this design is the wrong one.
### Authoritative lease epoch
An epoch is `(occurrence_id, fence)`, where `fence` is a quorum-assigned integer that only increases. The holder is `(region, worker_generation)`. A paused process keeps its old generation; a restarted worker must CAS a new generation before it can act. In-memory lease state is never authority.
Lease lifetime is a committed record plus renewals, not a local timer. The holder may continue only while it holds a fresh quorum renew ack for that same fence. A fast local clock cannot extend a lease. A slow local clock may only cause an early abort, which is safe.
### Fencing limits
These are operator parameters, not measured values: lease `TTL`, renew period `Tr`, assumed skew `ε`, dispatch budget `Dmax`, local freshness `Tf`.
- Require `TTL >= 3*Tr + 2*ε` so one lost renew and skew do not look like a second owner.
- Dispatch is allowed only when all of the following hold: applied log shows this holder and fence; pre-effect for this fence is committed; no local send record exists yet; last renew ack is younger than `Tf`; remaining committed window is greater than `Dmax`.
- If remaining window is too small, do not send. Renew or release.
- Fence expiry stops a worker from starting a call. It does not recall a call already sent. The external API will not see the fence.
- After pre-effect commit, a superseded or expired epoch is not reassigned. It becomes ambiguous.
### Quorum and degraded availability
`N=3`, grant/renew/pre-effect/outcome/reconcile require 2. One region down: the other two may still lease. A singleton partition: no grant, no renew, no dispatch. Total partition: no new calls; occurrences stay pending or, if pre-effect already committed, ambiguous.
A holder that loses quorum stops starting calls immediately. It does not wait out a local TTL if renew has failed. If it had not committed pre-effect, a later majority may expire and reassign that fence. If pre-effect had committed, the majority already sees it and must not reassign.
Reachability does not override quorum. A region that can reach the API but not a majority still must not call. Before pre-effect, a holder that cannot reach the API releases the lease so another region may take it. After pre-effect, it cannot hand off.
### State, invariants, transactions
States: `PENDING`, `LEASED`, `ATTEMPTING`, `DONE_ACK`, `FAILED_NO_EFFECT`, `AMBIGUOUS`, `RECONCILED_EFFECT`, `RECONCILED_NO_EFFECT`, `WAIVED`.
Invariants:
- One row per `(job_id, nominal_slot)`, inserted idempotently.
- `fence` never decreases. At most one `PRE_EFFECT` exists until a human sets `RECONCILED_NO_EFFECT`.
- `DONE_ACK` is allowed only for the fence that committed pre-effect, and only as an observation of an ack, including a late ack after rejoin.
- Automatic transition back to leasable requires `FAILED_NO_EFFECT` or human `RECONCILED_NO_EFFECT`.
- `ATTEMPTING` and `AMBIGUOUS` are not leasable.
Transactions, each a quorum CAS:
1. **Grant.** From `PENDING` or `RECONCILED_NO_EFFECT`, if fence is the expected value: increment fence, set `LEASED`, holder, generation, leader-time expiry. Append audit.
2. **Renew.** Same fence and holder only. Extends committed expiry. Rejected if fenced or expired.
3. **Pre-effect.** From `LEASED`, same fence and holder, window still covers `Dmax`: set `ATTEMPTING`. This commit is the point of no automatic return.
4. **Local send barrier.** After applying pre-effect, the holder durably records `SEND_STARTED` locally, then transmits once. Crash before that local record, with local disk intact and this generation the only sender: may commit `FAILED_NO_EFFECT`. Crash after it, lost disk, lost ack, or pause across the send: `AMBIGUOUS`.
5. **Ack.** Same fence, from `ATTEMPTING`: `DONE_ACK` plus response digest. A late ack after expiry attaches to that same fence; it is not permission to send again.
6. **Expire without pre-effect.** Majority may fence and return the occurrence to leasable.
7. **Expire or suspect with pre-effect.** Majority sets `AMBIGUOUS`. No new fence is granted.
Grant is refused until nominal slot time is reached on the quorum leader’s clock, minus `ε`. Early regional clocks cannot open the slot. Late clocks only delay proposals.
### Ambiguous effects
Ambiguous means: pre-effect committed, or local send may have started, and no trustworthy terminal observation exists. Timeouts, partitions, pauses, and crashes are the same state. The system does not guess. It does not start a compensating call. It alerts and waits.
`FAILED_NO_EFFECT` is narrow. “The API timed out” is not in it. “TCP connected” is not in it. Only a holder that still owns the fence and can show it did not start the send may use it. If that proof is gone, the state is ambiguous.
### Manual reconciliation and audit
The decision log is the audit log. Each entry has occurrence, fence, from/to state, actor, consensus index, leader time, local time, and reason. Human time and leader time may disagree; the index is the order.
An operator closes `AMBIGUOUS` with exactly one quorum entry: effect observed, no effect observed, or waived. Each carries operator id, ticket id, and an evidence note. Effect or waive is terminal. No-effect sets a retry bit and allows a later grant to take a new fence. The gap between automatic quarantine and human close must remain visible. There is no silent auto-close.
### Guarantees that are impossible
- Exactly-once external effects. A crash or partition between send and ack cannot be distinguished from “never arrived” or “arrived and will complete later” (two generals). Leases do not cross that boundary.
- Recalling an in-flight call by incrementing a fence, unless the API itself enforces the token. It does not.
- Proving a dead worker did not send, if its disk or process state was lost after pre-effect.
- Progress during a quorum loss, while also preventing a minority from dispatching.
- Using wall clocks to order or own work across regions under skew.
- A bounded execution delay. Partition delay is unbounded by choice.
- Making `DONE_ACK` mean “the external world observed this once.” It means “this epoch observed one success response.”
What is possible: at most one quorum-authorized automatic attempt; no minority grant; ambiguity preserved instead of retried; every authorization and human override audited.
### Acceptance traces
These are pass/fail predicates on the log and on whether a worker transmitted. They were not run.
**Partition, no pre-effect.** R1 holds fence 7. R1 becomes a minority and its renew fails. Pass: R1 transmits nothing further; after expiry the majority may grant fence 8; the log shows fence 7 ended without `PRE_EFFECT`. Fail: any send from R1 after failed renew, or two `PRE_EFFECT` rows.
**Partition after pre-effect.** Fence 7’s pre-effect is committed, then R1 is isolated and may still be inside the call. Pass: majority sets `AMBIGUOUS` and grants no fence 8; R1 on rejoin may attach an ack to fence 7 only. Fail: a second grant, a second send, or an automatic move to `PENDING`.
**Crash before local send record.** Pass: recovery commits `FAILED_NO_EFFECT` or leaves it leasable after fence expiry, and a later epoch may run. Fail: recovery transmits again under the same fence.
**Crash or pause after send started, ack missing.** Pass: state becomes `AMBIGUOUS`; resumed worker does not transmit again; new generation is refused for that fence. Fail: resume retries the call, or a peer treats timeout as `FAILED_NO_EFFECT`.
**Clock jump.** One region’s clock jumps forward by more than `TTL`. Pass: it neither self-grants nor extends the committed expiry; dispatch still requires a fresh quorum renew. Fail: local time alone opens a slot or keeps a fence alive.
**Total partition, then rejoin.** Pass: zero new pre-effects during the split; on rejoin, a single majority history remains; stale renews for an old fence are rejected. Fail: two committed grants for the same occurrence, or a stale holder’s success path opening a new attempt.
**Human close.** Pass: `RECONCILED_NO_EFFECT` is the only path from `AMBIGUOUS` to a new fence, and the audit entry has a human actor. Fail: a timer, a worker vote, or a region rejoin clears ambiguity.
## 2. Alternatives discarded
- Active-passive VIP or “region with the newest timestamp wins”: split brain under partition and pause. No fence.
- At-least-once relay or outbox: durable intent only. Without an idempotent API it still duplicates.
- Two-phase commit with the API: the API is not a participant.
- CRDT ownership: concurrent owners under partition.
- Auto-retry on timeout: directly violates the irreversible-effect constraint.
- Human approval before every dispatch: safe but rejects the scheduling goal. Humans are reserved for ambiguity.
- Sticky home region with no failover: simpler and avoids cross-region lease races, but a home-region outage stalls its jobs even when another region has quorum and API reachability. Reasonable fallback if quorum operations are unavailable. It does not meet multi-region takeover.
- Invert the policy to at-least-once duplicates: coherent only if duplicate external effects are explicitly cheaper than delay. The problem statement does not say that.
## 3. Missing evidence
No scheduler, store, API, clock-sync, or operator workflow was in evidence. Consequences: `ε`, `TTL`, `Dmax`, and “definitive no-send” depend on an unstated runtime; a hidden idempotency key or effect query would allow a weaker quarantine; a Byzantine worker is outside this design; safety-critical jobs would need a different availability choice. Conclusions about an existing codebase would be unsupported.
## 4. Next useful action
Write the occurrence CAS table and the seven predicates above as an executable log checker against a fault-injected quorum prototype. Do not score a run as exactly-once, and do not treat a successful ack as proof that no duplicate effect occurred.
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 pre-effect takeover barrier and associated acceptance trace make the intended recovery behavior easier to implement and check. B's more careful account of stale-worker capabilities is a substantial countervailing benefit. This is not an established material quality difference; 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_1562ae5741480b86c8f9b125dadcdea3328eab38b686fa626a4efbe5efcd50b1. A separate independent review is required before calling a concern a verified factual defect. Judge disagreement is not recorded here.