cursor / grok-4.7 / Grok 4.7 High / high effort preferred over cursor / composer-2.5 / Composer 2.5 default / unknown 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
Review the production BattleRanks publisher behavior for correctness and recovery. Supplied evidence (same for every reviewer): an immutable JSONL journal commits only newline-terminated records; an export cursor records line number, journal device/inode identity and last-line SHA256; batches contain at most 12 whitelisted evaluated-outcome and supporting evidence events; HTTP ingest is idempotent per event identity, with a 30-second request timeout; the cursor advances atomically only after a verified HTTP ACK. Existing canonical cursor is behind deliberately excluded historical qualification/incomplete records. New selected cohorts must use a scoped journal and scoped cursor rather than broad backlog replay. Public payload permits approved model IDs, integer judge metrics, timing, usage and evaluation summaries, but forbids raw prompts, code, private notes and paths. Task: independently identify concrete failure modes for crash before/after ACK, partial HTTP success, timeout with uncertain acceptance, journal replacement/truncation, filtering that breaks complete cohort evidence, and cursor updates racing another publisher. Propose a minimal safe execution/recovery procedure for publishing only exact new cohort IDs and readback verification. Rank findings by impact, state assumptions, and distinguish proven guarantees from missing evidence. Do not edit files or dispatch models. This is read-only implementation analysis; no objective tests are registered or claimed.
cursor / grok-4.7 / Grok 4.7 High / high effort answer
The stated design can publish an exact new cohort safely only when that cohort is copied into a new scoped journal with its own cursor, the cursor moves only after a full-batch durable ACK, and retries reuse the same event identities. Those guarantees are stated, not verified in code. The highest-impact failures are publishing from the lagging canonical cursor, advancing a prefix cursor across a hole, and treating an uncertain ACK as success.
## 1. Findings and safe procedure
Impact order:
1. **Wrong-scope replay.** The canonical cursor sits behind excluded historical qualification and incomplete records. A publisher that resumes it will read that backlog. A fail-open filter publishes records that were meant to stay excluded. A skip-and-advance filter consumes them so they can never be reconsidered. A skip-without-advance filter stalls on the same prefix. New cohort IDs belong on a scoped journal and a scoped cursor whose line numbers are not the canonical file’s.
2. **Prefix cursor across a hole.** The cursor is a line number plus journal device/inode plus the SHA256 of the checkpoint line. It can represent only a contiguous prefix. In a batch of at most 12, a partial HTTP success, a whitelist drop, or a missing supporting-evidence event leaves a hole. Advancing past that hole makes the omitted line unrecoverable. Retrying only the rejected suffix leaves the hole behind the checkpoint. Completeness is a property of the cohort, while the checkpoint is a property of the file prefix.
3. **Uncertain acceptance.** The 30-second timeout does not distinguish “server committed, ACK lost” from “server did not commit.” Advancing the cursor on timeout, transport reset, or a body that does not name every submitted event ID drops any event the server did not retain. Minting a new event identity on retry defeats per-event idempotency and can double-count a cohort. Crash after a verified ACK and before the cursor write is the designed replay case, and it is safe only when the retry identity is unchanged and the server’s idempotency record outlives the retry.
4. **Public-field leakage.** The public payload allows approved model IDs, integer judge metrics, timing, usage, and evaluation summaries. It forbids raw prompts, code, private notes, and paths. An event-type whitelist does not enforce that field rule. Nested summaries, error strings, and supporting-evidence objects can still carry forbidden content. A scoped journal that copies raw records inherits the same requirement at projection time.
5. **Journal identity mismatch.** Device/inode detects replacement. It does not detect truncation or rewrite of the same inode. The checkpoint hash detects a change only on the checkpoint line, and only when resume hashes that line number rather than whatever line is currently last in a growing file. A shortened file whose cursor line is past EOF is a failed identity check. Inode reuse after delete and recreate is caught by a content hash mismatch except in the negligible case of a hash collision.
6. **Cursor race.** An atomic cursor write after ACK serializes one publisher’s own commit. It does not fence two publishers. Both can read the same checkpoint, and the later write can rewind the line number or skip ahead under a different filter. A scoped cursor removes the race only when the other process cannot open that same cursor.
7. **Crash windows the design already covers, if the unstated durability holds.** Crash before send, or after send and before ACK, leaves the cursor in place; the newline-terminated journal line remains to retry. Crash after a durable cursor update resumes after that line. A torn cursor write, an ACK issued before the server’s own durable commit, or an append resumed onto a partial trailing line are outside that guarantee.
**Minimal procedure for an exact cohort-ID set**
- Build a new scoped JSONL of only those cohort IDs. Keep each cohort’s evaluated outcome and supporting evidence contiguous. Project each record to the public field set and drop any cohort that is incomplete, contains a non-integer judge metric, uses an unapproved model ID, or has more than 12 public events. Seal the file before the publisher reads it.
- Create a new cursor file. Start at line 0 on this journal’s device/inode. Leave the canonical cursor untouched.
- Take an exclusive lock on the scoped cursor for the whole run. Before every batch, recheck device/inode, file length, and, once the line is greater than 0, the SHA256 of that exact checkpoint line. On mismatch, stop.
- Send at most one complete cohort per request, at most 12 events, with stable event identities. Accept only a response that ACKs every submitted identity. On timeout, partial acceptance, or any other outcome, rewrite nothing and resend the same batch.
- After a full ACK, write the new line number, device/inode, and SHA256 of that checkpoint line to a temporary file, fsync it, rename it over the scoped cursor, and fsync the directory.
- Read back each cohort ID. Require the same event identities, integer metrics, and counts, and require the absence of prompts, code, private notes, and paths. A readback miss halts the run. It does not move the cursor backward and it does not allocate new event IDs.
Confidence in these consequences, given the stated mechanics: high. Confidence that production implements those mechanics: none. No implementation was inspected.
## 2. Discarded hypotheses
- Crash before ACK does not by itself lose a journalized event. Loss requires a cursor advance without a durable server commit, or a journal line that never became a newline-terminated record.
- Idempotent ingest does not make it safe to advance past a rejected or filtered line. Idempotency protects exact retries of the same identity. The prefix cursor will not return to a hole.
- The inode check does not detect same-file truncation. The checkpoint-line hash and an EOF check do.
- A batch ceiling of 12 does not prove that a cohort fits in one request. Cohorts over that ceiling, or cohorts whose evidence was removed by the whitelist, fail the completeness preflight and stay out of the scoped journal.
- Atomic rename is not mutual exclusion against a second publisher. Exclusive lock plus compare-and-swap on the previous checkpoint is the missing fence.
## 3. Missing evidence
No source was in scope, so none of the following is established: ACK shape and whether ACK means durable server commit; idempotency key formula and retention; cursor fsync, rename, and compare-and-swap; publisher locking; consumer rule for partial cohorts; readback API and its consistency window; maximum events per cohort; whether “last-line SHA256” is the checkpoint line or the file tail; and whether filtering advances, stalls, or fails open. Until those are known, a canonical replay can publish excluded history or skip required evidence permanently.
## 4. Next useful action
Inspect the publisher’s journal read, filter, HTTP client, and cursor commit against the procedure above, and publish only a sealed scoped journal for the exact cohort IDs.
cursor / composer-2.5 / Composer 2.5 default / unknown effort answer
# BattleRanks publisher — independent failure-mode and recovery analysis
## 1. Conclusion, recommendations, and confidence
**Overall assessment:** The described design (append-only journal, cursor tied to device/inode + line + last-line hash, ACK-gated cursor advance, idempotent ingest by event identity, scoped journal/cursor for new cohorts) is a sound baseline for **at-least-once publish with safe retry** and **no advance on unverified success**. Correctness and recovery still depend on properties not fully specified in the evidence: whether ACK is tied to durable server-side commit, whether readback uses the same identity key as ingest, and whether cohort completeness is defined outside the 12-event batch whitelist.
**Ranked failure modes (by impact)**
| Rank | Failure mode | Typical outcome | Recovery lever (from evidence) |
|------|----------------|-----------------|--------------------------------|
| **P0** | **Timeout with uncertain acceptance** (30s, no definitive response) | Cursor not advanced → safe retry; **or** server accepted but client timed out → duplicate POSTs (should be OK if idempotent per event identity); **or** server still processing → ambiguous | Retry same batch; verify via readback by event identity; do not advance cursor until ACK **and** (if required) readback confirms all identities |
| **P0** | **Crash after verified HTTP ACK, before atomic cursor write** | Same lines re-published on restart | Idempotent ingest; risk only if idempotency is weaker than “same identity → no duplicate public row” |
| **P0** | **Journal replacement or truncation** (new file, rotated path, copy without preserving inode) | Cursor (device/inode + line + hash) **invalid or misleading** | Treat inode/hash mismatch as **hard stop**; re-bootstrap scoped cursor from verified export/readback, not blind line replay |
| **P1** | **Partial HTTP success** (multi-event batch, some ACKed some not—if API allows) | Cursor must not advance past last **fully** verified unit of work | Evidence says cursor advances after “verified HTTP ACK” for the export step—not whether ACK is per-batch or per-event; **assume per-batch ACK means all-or-nothing** unless proven otherwise |
| **P1** | **Filtering breaks complete cohort evidence** (whitelist drops required supporting events; historical qual/incomplete excluded; cursor “behind” by design) | **Silent under-publish**: cohort IDs marked done locally while public rank set is incomplete or inconsistent | Scoped journal must contain **closed** cohort slices; preflight checklist: for each cohort ID, count whitelisted event types expected vs journal slice |
| **P1** | **Two publishers racing on cursor update** | Lost update, double advance, or cursor skipping lines | Atomic cursor update **after** ACK helps one writer; **no evidence** of distributed lock or single-writer enforcement—second publisher is **high impact** if allowed |
| **P2** | **Crash before ACK** | No cursor advance; full batch retry | Safe by design |
| **P2** | **Duplicate lines or non-atomic journal append** (violates “immutable JSONL” assumption) | Last-line SHA256 mismatch → cursor refuse or re-read | Hash gate is the detection mechanism **if** enforced on every read |
| **P3** | **Batch cap (12 events)** splits one cohort across multiple HTTP calls | Partial cohort visible publicly between calls | Idempotency + readback per cohort ID; ordering/read consistency not specified |
**Proven guarantees (from supplied evidence only)**
- Journal commits **only** newline-terminated records (append semantics implied).
- Cursor records **line number**, **journal device/inode**, **last-line SHA256**.
- Cursor advances **atomically** only after **verified HTTP ACK**.
- HTTP ingest is **idempotent per event identity**; **30s** request timeout.
- Batches ≤ **12** whitelisted event types (evaluated-outcome + supporting evidence).
- Public payload rules reduce leakage risk; they do **not** by themselves guarantee publish correctness.
- New cohorts must use **scoped journal + scoped cursor**, not broad backlog replay.
**Not proven / missing from evidence**
- Exact ACK semantics (HTTP 200 vs body hash vs per-event ack list).
- Server-side durability at ACK time (accepted in memory vs committed).
- Readback API shape and whether it keys on same **event identity** as ingest.
- Cursor file locking, fsync order, crash between ACK log and cursor write.
- Whether multiple publisher processes are forbidden or coordinated.
- Formal cohort-closure rule (which event types must co-exist for a valid rank).
- Behavior when last-line hash matches but line content was maliciously swapped (same line number)—inode binding mitigates replace-in-place **if** journal is truly append-only on same inode.
**Minimal safe execution / recovery procedure** (new cohort IDs only)
**Assumptions:** Single active publisher per scoped cursor; event identities stable and globally unique; readback available for verification.
1. **Scope:** For each target cohort ID set, build or select a **scoped journal** containing only those cohorts’ whitelisted events (and nothing else). Initialize **scoped cursor** at start of slice (or at last known good export point for that scope)—do **not** advance canonical/global cursor via full backlog replay.
2. **Preflight:** Verify journal **device/inode** and **last-line SHA256** match cursor expectations; on mismatch, **stop** and reconcile (re-export from readback or re-slice journal).
3. **Plan batches:** Group events by cohort ID; respect 12-event cap; ensure each cohort’s required supporting + outcome events are present in the slice (filtering audit).
4. **Publish loop:** Read up to 12 events from cursor line; transform to public payload (strip forbidden fields); POST with 30s timeout.
5. **Success gate:** Advance scoped cursor **only** on **verified HTTP ACK** for that unit of work; persist cursor atomically (evidence claims atomic advance—order vs fsync unspecified).
6. **Timeout / transport error:** Do **not** advance cursor; retry same batch with backoff; optionally **readback** each event identity in the batch—if all present, treat as success and advance (only if readback is authoritative in implementation; **not proven** here).
7. **Post-cohort verification:** For each published cohort ID, readback public (or internal) store: all expected event identities present; judge metrics integers; no forbidden fields; cohort set equals **exact** target ID list (no extras).
8. **Completion:** Record scoped cursor final position + inode/hash; only then optionally link to canonical cursor policy (evidence: canonical is deliberately behind excluded history—do not “catch up” excluded records via this path).
**Confidence:** **Medium** on failure-mode taxonomy (standard distributed-ingest patterns). **Low–medium** on recovery step 6 (readback-as-ACK substitute) without implementation proof. **High** that inode/hash + no advance without ACK addresses truncation/replace and crash-before-ACK.
---
## 2. Alternatives, disagreements, discarded hypotheses
- **Discarded:** “30s timeout always means failure”—server may complete after client abort; idempotency + no cursor advance is the safe client stance; readback resolves ambiguity.
- **Discarded:** “Idempotency removes all duplicate risk”—duplicate **side effects** (e.g. billing, downstream triggers) may still exist if idempotency is only dedupe on public rank row.
- **Alternative:** Per-event HTTP posts (batch size 1) shrink partial-success ambiguity at cost of throughput; still need cursor granularity per line or per event.
- **Likely false positive:** Assuming whitelist filtering always drops only “bad” history; deliberate exclusion of qual/incomplete means **cursor behind** is correct, but scoped slices must not accidentally omit **required** supporting events for **new** cohorts.
---
## 3. Missing evidence and consequences
| Gap | Consequence |
|-----|-------------|
| ACK verification definition | Cannot prove crash-after-ACK vs cursor gap is always harmless |
| Readback contract | Cannot prove end-to-end “exact new cohort IDs only” without implementation |
| Multi-writer cursor policy | Racing publishers remain **unmitigated** in procedure |
| Cohort completeness schema | Filtering failure mode stays **operational** (needs human/tool audit) |
| Partial batch API behavior | Partial HTTP success severity unknown |
---
## 4. Next useful action
Obtain implementation-level answers (still read-only): (a) what constitutes “verified HTTP ACK”, (b) readback query by event identity and cohort ID, (c) single-writer enforcement on cursor, (d) whitelist vs minimum event set per cohort. Then dry-run one scoped cohort ID: publish → kill process after ACK before cursor write → restart → confirm idempotent readback and no cursor skip.
---
**Observation:** No material conflict within the supplied evidence packet; conflicts would arise only if live behavior diverges from the described ACK/cursor/idempotency rules (not observable in this lane).
Primary judge's stated reason
A is the forced, weak preference because its executable recovery guidance better preserves the stated ACK gate and actively addresses concurrent publishers. This is not an established material quality difference: B's exact-set verification is stronger, and A's cohort-size restriction needs correction before general use.
This reason is the judge's assessment. No independent factual-defect finding is asserted by this record.
Battle wave: 1c2a4cca-7ccd-4020-87d6-e335b0ffc385. Pair: brp1_40f3e71e809c98c12b7bfd59e72458d609fa05d37e8d166b58cebd0f3a9574cf. A separate independent review is required before calling a concern a verified factual defect. Judge disagreement is not recorded here.