openai / gpt-6.1-sol / xhigh / xhigh effort preferred over openai / gpt-6.1-sol / 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 a durable webhook inbox for one PostgreSQL database and multiple workers. An authenticated source supplies eventID, accountID and payload; deliveries are duplicated and reordered. Persist acknowledgement before returning success, deduplicate by source/account/eventID, process with expiring leases and fencing, preserve per-account dependencies, bound retries and poison events, and recover crashes without claiming exactly-once external effects. Define state transitions, transaction boundaries, backpressure and acceptance failure cases.
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.1-sol / xhigh / xhigh effort answer
## Recommendation and scope
Use PostgreSQL as the authoritative receipt ledger, dependency scheduler, lease authority, and effect-intent store. Workers execute **at least once**; database fencing prevents stale workers from committing database changes. External effects require downstream idempotency or reconciliation—this design does **not** claim exactly-once external execution.
This is an independent, reasoning-only assessment based on the supplied requirements. No source inspection or tests were performed.
### Required assumptions
1. Authentication determines a stable `sourceID`; the request body cannot choose it. The source is authorized for the canonical `accountID`.
2. `(sourceID, accountID, eventID)` identifies one immutable event.
3. The source retries non-successful or uncertain deliveries, or provides an authoritative reconciliation API.
4. **Dependencies are knowable.** A versioned adapter must derive complete prerequisite event identities from the payload or a trusted domain contract. Arbitrarily reordered `eventID`, `accountID`, and opaque payload alone cannot reveal causal order. Serializing receipt order does not solve this.
5. All relevant database business mutations use the fenced transaction protocol.
6. PostgreSQL uses durable WAL commits. An asynchronous failover may lose acknowledged events; zero acknowledged-event loss across failover requires an appropriately configured synchronous replication/failover policy.
The design below supports per-account dependency graphs. A source sequence can be translated into predecessor dependencies when that source guarantees a complete sequence and a known starting point.
## 1. Persistent model and invariants
| Record | Essential contents |
|---|---|
| `inbox_event` | Composite event key; immutable payload/digest; adapter version; acceptance time; state; processing phase; attempts; next eligible time; processing deadline; lease epoch; error/outcome |
| `event_dependency` | Child key and prerequisite key, including prerequisites not yet received |
| `account_gate` | Canonical account; monotonically increasing epoch; current event; lease owner; lease expiration |
| `effect_intent` | Event key and effect number; immutable operation; stable idempotency key; confirmation/ambiguity state |
| Deduplication tombstone | Event key, payload digest, receipt and terminal outcome after payload removal |
Use a unique constraint on `(sourceID, accountID, eventID)`. Dependencies may cross source namespaces but must remain within the same canonical account. Validate those references against the domain contract.
**Invariants**
- There is at most one logical inbox event per deduplication key.
- A receipt is acknowledged only after its database transaction commits durably.
- An accepted event’s payload and dependency set never change silently.
- An event is eligible only when every prerequisite is `SUCCEEDED`.
- Each account has at most one current database lease.
- Every worker mutation validates the current event, owner, epoch, and lease under the account lock.
- `SUCCEEDED` means the defined processing obligations have completed—not merely that a worker started or that an external request was sent.
- Poisoning or blocking a prerequisite never counts as successful dependency satisfaction.
- Every automatic execution has a finite attempt and time budget.
One account-wide epoch fences all workers for that account. Separate accounts can execute concurrently.
## 2. Admission and acknowledgement transaction
Before opening the transaction:
- Authenticate and authorize the source/account.
- Enforce bounded event identifiers, payload size, schema complexity, and dependency count.
- Apply a documented payload canonicalization rule. Without one, differing payload bytes are a conflict.
- Extract dependencies using the selected, versioned adapter.
For an already accepted key, compare the immutable payload digest:
- Same content: return the durable receipt, including when the event is poisoned or completed.
- Different content: return a conflict, such as `409`; retain the original event and record the conflict. Never overwrite it.
For a new event, one short transaction:
1. Lock applicable capacity reservations and the account, using a consistent lock order.
2. Recheck the unique key to handle concurrent duplicate deliveries.
3. Enforce admission quotas.
4. Insert the event, dependency edges, receipt, and quota accounting.
5. Check the bounded account dependency graph for cycles. Persist any necessary quarantine decisions.
6. Commit.
Only then return `2xx`. That response means **durably received**, not successfully processed.
No network calls or handler execution occur inside this transaction. Notifications may wake workers after commit, but durable polling is the recovery mechanism.
**Admission failures**
- Authentication/authorization failure: `401`/`403`.
- Structurally invalid request: `400`/`422`; oversized request: `413`.
- Capacity exhausted: `429` or `503`, normally with `Retry-After`.
- Database unavailable, transaction failed, or commit outcome uncertain: no success acknowledgement.
If commit succeeds but the response is lost, redelivery finds the same receipt. Uncertainty is resolved by the unique key, not by inserting another event.
## 3. State machine and dependency handling
Use these processing states:
| State | Meaning and transitions |
|---|---|
| `WAITING` | Accepted; may await prerequisites. Eligible events can become `LEASED`. |
| `LEASED` | A worker owns the current execution attempt. Can become `SUCCEEDED`, `RETRY_WAIT`, or `POISON`. |
| `RETRY_WAIT` | Retryable failure or expired lease; becomes eligible after backoff, subject to dependencies and budgets. |
| `SUCCEEDED` | Required processing completed; terminal under normal operation. |
| `POISON` | Permanent failure, invalid dependency cycle, or exhausted execution budget. |
| `BLOCKED` | Cannot proceed because of a failed prerequisite or an unresolved dependency deadline. |
Persist a separate processing phase, such as `PREPARE` or `DISPATCH`, so retrying an external operation does not recreate its effect plan.
An event with missing prerequisites remains durable but ineligible. Later arrival of a prerequisite can make it eligible after that prerequisite succeeds. Independent ready events on the same account may proceed; descendants of a poison event may not.
Use bounded dependency counts and bounded unresolved graphs per account. Detect cycles under the account lock. A missing prerequisite exceeding its configured deadline becomes `BLOCKED` and generates an alert or reconciliation task; it is not assumed successful.
If the domain requires a strict account sequence, express it as a dependency chain. A missing or poisoned predecessor then blocks later events deliberately. Gap skipping requires authoritative, audited domain resolution.
## 4. Claim, heartbeat, completion, and recovery
### Claim transaction
Workers select eligible accounts with `FOR UPDATE SKIP LOCKED`, then:
1. Lock the account and candidate event.
2. Read database time **after acquiring the lock**.
3. If the previous lease expired, transition that attempt to retry or poison according to its budgets.
4. Verify prerequisites, retry time, attempt limit, and deadline.
5. Increment the account epoch.
6. Set the current event, owner, and lease expiration.
7. Mark the event `LEASED`, record the epoch, and increment its attempt count.
8. Commit.
Every granted lease—including one lost to a crash—consumes an attempt.
### Heartbeats
A heartbeat is a short transaction that locks the account and verifies the current event, owner, epoch, and an unexpired lease.
- Valid: extend the lease.
- Expired or superseded: reject the heartbeat. The worker must stop trying to mutate database state.
- Renewal cannot extend beyond a configured maximum attempt duration.
Use PostgreSQL time, not worker clocks. Avoid transaction-start timestamps for expiration checks in transactions that may have waited for locks.
### Completion
For database-only processing:
1. Compute outside the transaction where possible.
2. Lock the account and event.
3. Validate ownership, epoch, lease, and prerequisites.
4. Apply business mutations and mark `SUCCEEDED` in the **same transaction**.
5. Clear the account lease and commit.
The account lock serializes completion against takeover. If expiration passes while this short transaction holds the lock, a new owner must wait; expiration makes reclamation eligible, not permission to bypass the locked transaction. Enforce transaction and lock timeouts.
### Crash recovery
Polling workers or a reaper reclaim expired leases using the same account-lock protocol. Expiration invalidates the old attempt; the next grant receives a new epoch.
A resumed old worker cannot renew, fail, complete, or write business state with its previous token.
`SKIP LOCKED` improves concurrency; it does not itself provide fencing or fairness.
## 5. External effects without an exactly-once claim
For an event requiring external work:
1. Under its valid lease, commit an immutable `effect_intent` and any necessary staged local data.
2. Persist phase `DISPATCH`, retaining the event lease.
3. Make the external call **outside** the transaction.
4. In another fenced transaction, record confirmed outcomes.
5. Once all required effects are confirmed, atomically finalize local business state, mark `SUCCEEDED`, and release the account.
After a crash, another worker resumes the persisted phase and effect plan. There is no unfenced, independent outbox consumer: dispatch uses the same account lease protocol.
Use a stable idempotency key derived from event identity and effect number. It must **not** change with the lease epoch.
Where supported, also send the account epoch. A downstream fence must check and persist its highest observed epoch atomically with the mutation. Checking only at request start is insufficient.
**Important limits**
- Remote fencing does not revoke an old request merely because its PostgreSQL lease expired. It can reject stale mutations after a newer epoch is established downstream.
- Fencing alone does not deduplicate repeated effects.
- A timeout after sending a request means **unknown outcome**, not known failure.
- If the remote system supports durable idempotency or authoritative lookup, retry or reconcile the stable key.
- Without either capability, retries may duplicate effects. Ambiguous events must enter reconciliation/quarantine rather than being declared successful.
A dependent event waits for its prerequisite’s required external outcomes—not merely for creation of an outbox row.
## 6. Retry, poison, and retention policy
Configure finite limits:
- `K`: maximum automatic lease grants per event.
- `A`: maximum event processing age.
- `D`: maximum duration of one attempt.
- Capped exponential backoff with jitter.
- Maximum required effects and dependency count.
Classify failures:
- Temporary database/network/provider failure: retry within the budgets.
- Permanent handler or domain failure: poison immediately.
- Expired lease: retry or poison; the consumed attempt remains counted.
- Unknown external outcome: reconciliation-aware retry, then quarantine if unresolved.
- Missing or failed prerequisite: block, never bypass.
Keep error categories, attempt history, effect identities, and reconciliation information. Avoid sensitive payloads in logs.
Operator replay must be authenticated, audited, explicitly bounded, and fenced. It must reconcile previously attempted external effects before repeating them. Skipping an event cannot silently release its dependents.
**Deduplication retention is a correctness requirement.** If redeliveries can occur indefinitely, retain event keys, digests, and dependency outcomes indefinitely. Payloads can have a shorter retention policy. Finite key retention is safe only with a trustworthy redelivery horizon or source watermark. Unbounded identities imply eventual storage growth; backpressure cannot be eliminated by silently forgetting them.
## 7. Backpressure and operational bounds
Apply:
- Per-source request-rate limits.
- Per-account pending-event and byte limits.
- Global retained-storage admission limits, with WAL and maintenance headroom.
- Bounded worker concurrency, effect concurrency, payloads, and dependency graphs.
- Fair scheduling across ready accounts.
Capacity reservations for new events are charged atomically with insertion. An identical duplicate should receive its existing receipt without consuming additional quota, even when new admissions are paused, provided the database remains available.
Use a consistent lock order—capacity records, account, event—when a transaction touches all three. Transactions not touching capacity omit those locks.
Track:
- Intake rejection rate and database storage headroom.
- Ready-event age and dependency-wait age.
- Lease expirations and fenced-write rejections.
- Retries, poison events, and blocked descendants.
- External ambiguity and reconciliation backlog.
Do not promise acceptance during an unbounded outage or guaranteed delivery when the source stops retrying rejected requests.
## 8. Proposed pass/fail acceptance checks
These are **test specifications**, not executed results. Choose limits and timing bounds before testing.
| Check | Pass criterion |
|---|---|
| Concurrent duplicate intake | Many concurrent identical deliveries create exactly one event and one quota charge; acknowledged requests identify that receipt. |
| Identity conflict | Same key with changed payload cannot overwrite the original; conflict is returned and recorded. |
| Crash during admission | Crash before commit leaves no receipt. Crash after commit leaves a recoverable receipt; redelivery does not create another event. |
| Acknowledgement durability | Every successfully acknowledged test event survives restart within the declared durability/failover failure model. |
| Reordering | Deliver child before parent. No child business mutation or external dispatch occurs before parent success. |
| Missing dependency/cycle | Missing prerequisites reach the configured blocked policy; cycles are quarantined; neither releases descendants. |
| Account concurrency | Only one current lease exists per account; unrelated ready accounts progress under the declared workload. |
| Lease fencing | After expiration and takeover, old-worker heartbeat, completion, and business mutations all fail without changing business state. |
| Completion/reaper race | Expiration during completion cannot allow competing fenced database commits. |
| Renewal bounds | Heartbeats cannot extend an attempt past `D`. |
| Atomic database completion | Inject a failure between business writes and success update; both commit or both roll back. |
| Retry bounds | Repeated errors and crashes never exceed `K` grants or the configured age budget. |
| External uncertainty | Kill the worker after remote acceptance but before local confirmation. Recovery reuses the same effect identity and retains uncertainty until resolved. |
| Downstream contract | With supported idempotency, replay causes no additional logical effect within its declared retention period. With supported fencing, a lower epoch cannot mutate after a higher epoch is established. |
| Unsupported external guarantees | Non-idempotent, non-queryable ambiguous effects are quarantined or explicitly permit duplicates; they are never labeled exactly-once. |
| Backpressure | New admissions stop at configured limits without overshoot; existing duplicates add no quota charge; unrelated accounts are not monopolized by one backlog. |
| Long-delayed duplicate | After payload cleanup, retained identity still prevents reinsertion. Unsafe key deletion fails acceptance. |
| Recovery liveness | Under healthy database and worker availability, expired eligible work is reclaimed within the configured polling, scheduling, and bounded-lock-delay allowance. |
## Alternatives, missing evidence, and next action
**Alternatives**
- **Strict source sequence:** simpler than a dependency graph, but requires a reliable sequence contract and explicit gap handling.
- **Explicit dependency graph:** the recommended general model; permits independent events but needs complete dependency metadata.
- **One transaction per handler:** excellent for database-only effects, but must not include remote calls.
- **Receipt-order FIFO:** rejected as a substitute for causal ordering under reordered delivery.
**Missing evidence**
The source’s dependency contract, retry horizon, downstream idempotency/fencing capabilities, PostgreSQL failover policy, and required capacity/latency limits are unspecified. These determine whether the design can meet its ordering, durability, and external-effect guarantees.
**Confidence:** high in the database receipt and fencing design under the stated assumptions; semantic ordering and external-effect guarantees remain conditional on those contracts.
**Next useful action:** establish those contracts and numerical limits, then implement the transactions and run the acceptance matrix with crash and network fault injection.
openai / gpt-6.1-sol / low / low effort answer
## Recommendation and assumptions
Use PostgreSQL as the durable inbox, scheduler, and authority for worker ownership. A successful HTTP acknowledgement means **the delivery is durably recorded**, not processed. Processing is retryable; database effects can be atomic with completion, but arbitrary external effects are not exactly once.
This is an independent design based only on the supplied requirements; no source inspection or tests were performed.
Assumptions and required contracts:
- Authentication determines `source_id` and authorizes the supplied `account_id`; neither is trusted merely because it appears in the payload.
- Deduplication identity is `(source_id, account_id, event_id)`.
- PostgreSQL commit durability is configured to match the promised failure model. If success must survive primary loss, synchronous replication and failover fencing are required; local durable WAL alone is insufficient.
- **Delivery order cannot establish causal order.** Require a source-provided account sequence or explicit predecessor IDs. The design below uses explicit predecessor IDs. If neither exists, only serial processing in an arbitrary observed order is possible—not preservation of unknown dependencies.
- Dependency IDs use the same source/account scope, and handlers have versioned, validated payload contracts.
- External calls have bounded deadlines. Downstream idempotency or fencing support is used where available.
## Persistent model and invariants
An `inbox_event` row contains:
- Identity, immutable payload, canonical payload digest, receipt time, handler version.
- State: `waiting`, `ready`, `running`, `retry_wait`, `succeeded`, `dead`, or `skipped`.
- Attempt count, next eligible time, first-attempt time, error classification.
- Current owner, lease expiry, and account fencing token.
Additional tables:
- `event_dependency(event, predecessor_identity)`: predecessor identities can exist before their events arrive.
- `account_lane`: one row per source/account, holding current event, owner, lease expiry, and monotonically increasing fencing token.
- Optional transactional outbox for external commands.
- Compact deduplication tombstones if completed payloads are removed.
Constraints and invariants:
1. A unique constraint enforces deduplication identity.
2. Duplicate delivery never changes payload or dependencies.
3. An event is runnable only when every prerequisite has succeeded or has been explicitly waived by an audited policy.
4. At most one **current database-authorized** worker exists per account.
5. Every claim increments the account fencing token; every worker mutation checks that token and an unexpired lease.
6. Terminal states are not changed by automatic retries.
7. A worker may still execute code after losing ownership; database fencing does not physically stop it.
8. Deduplication lasts only as long as identity records are retained. Define a replay horizon, or retain tombstones indefinitely.
Multiple independent ready events within an account may be processed in deterministic receipt/identity order. This does not assert causal ordering between them.
## Transactions and state transitions
### 1. Receive and acknowledge
Before opening a transaction, authenticate, authorize account scope, enforce size limits, and perform cheap structural validation.
In one transaction:
1. Create the account lane if needed.
2. Insert the event and its immutable dependency records.
3. On unique conflict, compare canonical digest and dependency metadata:
- Identical: treat as a duplicate.
- Different: return an identity-conflict error; do not overwrite.
4. Commit.
Return `2xx` only after confirmed commit. A duplicate may receive `2xx` even if the original is still waiting or already dead: it has been durably accepted.
A commit timeout or lost response has an **unknown** outcome. Return a retriable failure, never assert rollback; the sender repeats the same identity.
Authenticated, structurally valid events with invalid business content can be durably recorded as `dead`. Clearly malformed requests can instead receive a permanent `4xx`; document this distinction.
### 2. Claim
Workers poll; notifications are optional wake-up hints, never the source of truth.
In a short transaction:
1. Select and lock an eligible account lane using `FOR UPDATE SKIP LOCKED`.
2. If its current event has expired, reclaim that event before starting another account event.
3. Otherwise choose a due `ready`/`retry_wait` event, or a `waiting` event whose prerequisites now satisfy the rule.
4. Check retry and age limits.
5. Increment the lane token, increment the attempt count, set owner and lease expiry using database time, and transition the event to `running`.
6. Commit, then execute outside the transaction.
All paths lock lane before event to avoid inconsistent lock order. Eligibility indexes should cover state and retry time; dependency lookups need predecessor identity indexes.
### 3. Renew
Renew in a short transaction using a conditional update matching lane, event, owner, token, `running` state, and `lease_until > clock_timestamp()`.
Renew both lane and event atomically. Zero affected rows means ownership is lost; stop initiating effects. An expired worker cannot resurrect its lease even if nobody has reclaimed it.
Use database time, not worker clocks. Set renewal cadence comfortably below lease duration; enforce an overall processing deadline so heartbeats cannot preserve a hung attempt forever.
### 4. Finish successfully
Lock the lane and verify current ownership, fencing token, and lease.
- **Database-only effects:** apply business changes and set `succeeded` in the same transaction; release the lane atomically. A stale worker’s entire transaction must roll back.
- **External work via outbox:** commit the business transition, unique outbox command, and event completion atomically. Here, `succeeded` means “command durably scheduled,” not “remote action confirmed.”
- **Direct external call:** perform it outside a database transaction, then conditionally record completion. An unknown remote outcome remains possible.
Do not hold lane locks across network calls.
### 5. Fail or expire
A current worker records a classified failure and either:
- Sets `retry_wait`, computes capped exponential backoff with jitter, and releases the lane.
- Sets `dead` when the failure is permanent, attempt limit is reached, or maximum processing age is exceeded.
Lease expiration permits reclamation with a **new** token. Expired claims count toward the attempt budget, including crashes before handler execution. A recovery worker marks exhausted expired events dead rather than leaving them stranded.
Retry limits, age limits, lease duration, and error classifications are explicit configuration—not unbounded defaults.
## Dependencies and poison events
A missing predecessor keeps an event in `waiting`; later arrival makes it eligible. Periodic reconciliation is necessary even if notifications are lost.
- A dead prerequisite blocks its dependents by default.
- A deadline for missing prerequisites triggers an alert and quarantine reason; it must not silently authorize processing.
- Cycles are invalid. Validate self-dependencies immediately and detect larger cycles through transactional validation or reconciliation.
- Poison events do not monopolize workers through tight retry loops.
- Independent events may continue; descendants remain blocked.
- Operators may explicitly waive a dependency, skip an event, or authorize a bounded replay. Record actor, reason, prior state, and replay generation; never reset the fencing counter.
If strict contiguous account sequence is required instead, use an account cursor and source sequence numbers. Gaps then block all later sequence entries, and an explicit gap-resolution policy is mandatory.
## External effects and crash recovery
Use a stable external idempotency key derived from event identity and effect name—not the retry attempt. Multiple effects need separate persistent effect records.
A downstream service can enforce fencing only if it checks tokens atomically with its effects. A token included merely as request metadata provides no protection. The downstream idempotency retention window must cover possible retries and replays.
Without downstream guarantees:
- A worker can perform an external effect and crash before recording success.
- A retry can repeat that effect.
- A stale worker can act after its lease expires.
Therefore the guarantee is durable intake and retryable processing, with possible duplicate external effects. An outbox closes the database-to-command persistence gap, but its dispatcher still needs downstream idempotency or reconciliation.
Crash recovery follows stored state:
| Crash point | Recovery |
|---|---|
| Before intake commit | Sender retries; no acknowledgement was promised. |
| After intake commit, before response | Duplicate delivery finds the existing row. |
| After claim, before completion | Lease expires; bounded retry with a new token. |
| During database-effect transaction | Effects and completion commit together or roll back together. |
| After external effect, before completion | Retry/reconcile an ambiguous outcome; duplication is possible. |
| After completion commit | Event is terminal and not automatically reprocessed. |
## Backpressure and operations
Set explicit limits for request size, admitted event count/bytes, per-account backlog, worker concurrency, database connections, and external-call concurrency.
For race-free admission, reserve bounded capacity inside the intake transaction—for example through locked capacity counters. Check an existing duplicate before denying a new capacity reservation.
- Reject new work with `429` or `503` and `Retry-After` when capacity is exhausted.
- Never acknowledge an unpersisted event.
- Reserve headroom for duplicate acknowledgements, recovery, terminal-state updates, and operational access.
- Separate per-account limits from global limits and schedule lanes fairly to avoid noisy-account starvation.
- Require sender retries or reconciliation for rejected work; admission rejection can otherwise lose events permanently.
Monitor queue depth/bytes, oldest runnable and waiting ages, missing prerequisites, dead count, retries, expired leases, fencing rejections, intake commit failures, outbox age, and storage headroom. Retention must preserve identities and dependency-resolution evidence.
## Measurable acceptance checks
These are proposed checks, not executed results. Set concrete operational thresholds before testing.
| Test | Pass condition |
|---|---|
| Concurrent identical deliveries | Exactly one identity row; all successful responses follow a durable commit. |
| Same identity, different content | Original remains unchanged; conflicting delivery receives the documented non-success response. |
| Crash around acknowledgement | Every observed `2xx` has a recoverable row under the stated durability model; uncertain outcomes deduplicate on retry. |
| Reordered dependencies | Dependent handler never starts before its prerequisite satisfies the declared completion rule. |
| Missing predecessor/cycle | No unauthorized processing; configured deadline produces a visible quarantine/alert. |
| Multi-worker contention | Never more than one current valid lane owner; no duplicate committed database effect. |
| Lease-expiry race | Old-token renewal, failure, and completion mutations affect zero rows after expiration/reclaim. |
| Database-effect crash injection | Every tested interruption leaves both effect and completion committed, or neither. |
| External ambiguity injection | No exactly-once claim; documented duplicate/reconciliation behavior occurs. With downstream idempotency, repeated keys produce one logical effect. |
| Poison event | Handler claims never exceed configured automatic limits; descendants remain blocked; independent work progresses. |
| Notification loss/restart | Polling recovers eligible and expired work within the configured recovery bound. |
| Capacity exhaustion | New admissions stop at configured reservations; duplicates remain serviceable within reserved headroom; no rejected request is acknowledged as accepted. |
| Retention/replay | Replays within the promised horizon deduplicate and dependencies remain resolvable. |
| Fairness | A continuously eligible account receives service within a specified bound under the declared load envelope. |
## Alternatives, uncertainties, and next action
- Strict sequence cursors are simpler when the source supplies complete ordering; explicit dependencies allow independent progress but require cycle and missing-parent handling.
- Long transactions around external calls are rejected: they consume connections and do not solve remote atomicity.
- In-memory deduplication and locks are insufficient across crashes and workers.
- Unbounded retries or silently skipping poison predecessors violate the durability/dependency contract.
**Confidence:** high in the transaction and fencing pattern; actual durability, capacity, and downstream-effect guarantees depend on deployment and source contracts.
**Next action:** establish the source’s ordering metadata, PostgreSQL failure model, external idempotency contract, and numeric limits; then implement and run the acceptance matrix with crash and lease-race injection.
Primary judge's stated reason
I weakly prefer B because its integrated external-effect workflow makes the dependency boundary easier to implement without accidentally treating queued work as completed remote work. This is a forced, slight preference, not an established material quality gap: the original task does not specify what each prerequisite's completion must mean, and an independent review could reasonably favor A's explicitly declared alternative.
This reason is the judge's assessment. No independent factual-defect finding is asserted by this record.
Battle wave: 1fb32bda-9041-4f2e-818c-0fd4669031e2. Pair: brp1_eccd0ac666ff7a8b255bd992429c18258ac2a583e28f6b09fa33f85aa1ffe2cf. A separate independent review is required before calling a concern a verified factual defect. Judge disagreement is not recorded here.