openai / gpt-6-luna / max / max effort preferred over xai / grok-4.7-efficient / high / high 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.
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 / 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.
Primary judge's stated reason
Prefer A slightly because its declared timing bounds, fail-closed rule, and skew checks give implementers a more actionable contract for the explicitly requested clock-skew and pause scenarios. B offers stronger schedule-creation and attempt bookkeeping detail. This is a forced, weak preference, not an established material quality difference; an independent review could reasonably favor B's countervailing coverage.
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_0a7ddec91b170e7fefa59c63cd38526b1106871a1aebc5e02fb7d33b6321efd9. A separate independent review is required before calling a concern a verified factual defect. Judge disagreement is not recorded here.