← Model losses

Head-to-head comparison

openai / gpt-6-astra / high / high effort preferred over openai / gpt-6-luna / low / low effort · clear 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 backward-compatible migration from single-valued account tags to ordered multivalued tags across API services, asynchronous consumers and regional read replicas. Old and new clients coexist; events duplicate/reorder; rollout may halt or roll back after writes in the new format. Specify expand/migrate/contract phases, versioned semantics, authority, reconciliation, compatibility gates, rollback boundaries and measurable failure injection acceptance scenarios. No invented implementation or execution evidence.

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-astra / high / high effort answer

## 1. Recommended design

Use **one authoritative ordered list per account**, a deterministic scalar projection for legacy clients, and revisioned snapshot events for downstream systems. Do not treat the scalar and list as independent writable authorities.

This is an independent, direct design assessment. No implementation evidence was supplied; the checks below are proposed acceptance criteria, not executed results.

### Requirements and assumptions

- An account’s tags become an ordered list of distinct tag values. Order is meaningful.
- Existing valid scalar values remain valid list elements. Preserve existing equality, encoding and validation rules; do not introduce normalization during migration.
- Old clients retain the existing scalar API and response shape. New clients explicitly select the list API.
- All mutations can eventually be routed through a controlled write boundary. Unfenced direct database writers make safe migration impossible.
- The authoritative store supports atomic account updates, idempotency records and an outbox.
- Regional replicas are asynchronous and are not independent write authorities.
- An acknowledged-write, zero-data-loss failover requires authoritative commits to survive loss of the active region—for example, through synchronously replicated transactional storage. Without that capability, stop writes during an uncertain failover or explicitly accept a nonzero recovery-point objective.

The precise current meaning of omitted fields, `null`, empty strings and deletion is unknown. The concrete semantics below assume omission means “unchanged,” `null` means “clear,” and an empty string remains an ordinary value if already valid. These must be checked against the existing contract.

### Versioned API semantics

Let the canonical list be \(L\), and define the legacy projection:

\[
P(L) = \begin{cases}
null & L=[]\\
L[0] & \text{otherwise}
\end{cases}
\]

Use an explicit API version or negotiated media type. Do not change the type of an existing response field.

| Operation | Meaning |
|---|---|
| V1 read | Return `P(L)` in the existing scalar field. |
| V1 omitted tag | Leave the list unchanged. |
| V1 set tag to `x` | Replace the primary tag; preserve the remaining order, removing any duplicate occurrence of `x`. |
| V1 clear | Set the entire list to `[]`. |
| V2 read | Return the complete ordered list and account revision. |
| V2 replace | Replace the list exactly, subject to a revision precondition. |
| V2 omitted tags in PATCH | Leave the list unchanged. |

Precisely, for nonempty `L`, V1 set computes:

```text
[x] + [t for t in L[1:] if t != x]
```

For empty `L`, it produces `[x]`.

Examples:

```text
[a,b,c] + V1 set x → [x,b,c]
[a,b,c] + V1 set b → [b,c]
[a,b,c] + V1 set a → [a,b,c]
```

V2 rejects duplicate elements rather than silently changing the submitted order. Set limits so every possible primary tag remains representable to legacy clients.

**Important compatibility boundary:** V1 clear removes hidden secondary tags. That preserves the old “this account has no tag” postcondition. Preserving hidden tags while returning no scalar would require a different data model, such as a separately nullable primary selection. This behavior must be an explicit product decision before activation.

V2 mutations require `If-Match` against the account revision; a stale value fails without changing state. V1 clients need not add preconditions: concurrent unconditional legacy writes retain last-committed-writer behavior for the primary tag. Internally, apply each V1 transformation to the latest locked row, not a stale list supplied by a service.

No backward-compatible mechanism can infer whether an unkeyed legacy request is a retry or an intentional later write. Exactly-once retry protection is guaranteed only where a stable request key exists.

### Authoritative state and invariants

A conceptual account record contains:

```text
account_id             stable, non-reused identity
representation         LEGACY | CANONICAL
tags_v2                nullable only while LEGACY
legacy_tag             compatibility projection
revision               monotonically increasing per account
```

Representation version, API version, event schema version and account revision are separate concepts.

Required invariants:

1. Once `CANONICAL`, the list is authoritative; scalar fallback is forbidden.
2. `tags_v2=[]` means explicitly empty. It is never confused with “not migrated.”
3. For canonical rows, `legacy_tag == P(tags_v2)`.
4. Every committed mutation receives a greater revision; revisions are never reset by deployment rollback.
5. Every mutation and its outbox snapshot commit atomically.
6. A revision identifies exactly one state. Two payloads with the same account identity and revision but different contents are corruption.
7. Only the fenced current writer may commit. Old processes cannot bypass the boundary.
8. Regional and consumer state never moves to a lower revision.

A list can carry an account-level revision or a dedicated tag revision; choose one consistently. If account-level revisions are used, unrelated account edits may cause additional V2 conflicts.

### Mutation transaction

Within one authoritative transaction:

1. Verify current write authority and request authorization.
2. Look up the request key, scoped to caller/account/operation. The same key with different input is rejected.
3. Lock the account or perform an equivalent compare-and-swap.
4. Check V2’s revision precondition.
5. If still legacy, interpret the scalar as `[]` or `[value]`.
6. Apply the requested operation and validation.
7. Write the canonical list, scalar projection, marker and next revision.
8. Insert an outbox record containing the complete resulting list, projection, revision and event schema version.
9. Persist the keyed request result and commit.

Persist idempotency results for a documented retry window; do not promise deduplication after expiry. After a committed response is lost, a keyed retry returns the original result even if subsequent writes occurred.

The outbox publisher may duplicate delivery. Correctness does not require atomicity between database commit and broker publication.

### Consumers, events and regional reads

Use explicitly versioned events, for example:

```text
account.tags.snapshot.v2
{ account_id, revision, tags, legacy_projection, schema_version, event_id }
```

Publish a separate legacy-compatible representation where needed. Do not silently replace a scalar field with an array inside an existing event schema.

For snapshot materializations, atomically compare and apply:

- Incoming revision greater than stored: replace state.
- Equal revision and equal payload: duplicate; no effect.
- Lower revision: obsolete; no effect.
- Equal revision and different payload: reject, quarantine and alert.

The revision check and sink write must be atomic. Checking in memory before an unconditional database write is insufficient.

An unchanged primary tag does not mean an unchanged list. New consumers must receive revisions that modify only secondary tags or their order.

Legacy consumers that cannot compare revisions must sit behind an adapter that materializes revision-fenced state and provides an ordered, deduplicated application boundary. If the final consumer performs non-idempotent effects without transactional deduplication, that adapter alone cannot guarantee exactly-once effects; activation is blocked until the effect boundary is fixed.

Snapshot consumers may skip missing intermediate revisions. Consumers that need **every transition**, such as notification workflows, instead require contiguous revision processing, gap recovery and effect deduplication. Do not use snapshot convergence as proof of transition delivery.

Regional reads:

- Default reads may be stale, with a documented freshness contract.
- A write returns a revision token.
- A read carrying that token must wait for a replica at least that current, route to authority, or return a retryable freshness failure within a bounded timeout.
- A session may carry its highest observed revision to prevent read regression across regions.
- Responses expose enough revision information for new clients to detect staleness.

Failover must fence the former authority and recover every acknowledged commit before accepting writes. An arbitrary asynchronous read replica is not a valid promotion source.

### Reconciliation

Run continuous, checkpointed anti-entropy in addition to event delivery:

- Compare canonical state, scalar projection and sink revisions using authoritative snapshots.
- Repair a stale sink with the latest authoritative snapshot through its normal revision-checked apply path.
- Recompute an incorrect scalar projection from the canonical list.
- Investigate a sink ahead of authority; never “repair” by silently copying it backward.
- Detect missing outbox records using an authoritative change log or a periodic complete scan. Broker offsets alone cannot prove source completeness.
- Preserve revisions in deletion tombstones, or retain sufficient deletion history to prevent delayed events from resurrecting accounts.

Never reconcile two representations by timestamps or by picking whichever scalar was written most recently. The representation marker and authority rules decide the winner.

## 2. Expand, migrate and contract

### Expand

1. Inventory API writers, direct database writers, consumer effects, caches, replica readers and rollback artifacts.
2. Add nullable list storage, representation markers, revisions, outbox and idempotency support.
3. Deploy readers that understand both representations and distinguish unmigrated from empty.
4. Deploy the unified transactional writer everywhere, initially allowing only singleton lists.
5. Fence obsolete write paths using database permissions, versioned procedures or an equivalent enforceable mechanism.
6. Deploy event version routing, revision-aware consumers and replica schema support.
7. Exercise the supported rollback deployment before enabling multivalued writes.

**Gate:** No uncontrolled writer remains; all consumers receiving V2 are capable; all serving replicas can read the expanded schema; supported rollback artifacts preserve canonical state.

Traffic observations alone do not prove dormant writers are gone. Combine registration/capability evidence with access enforcement.

### Migrate

Backfill only rows marked `LEGACY`:

```text
legacy null  → canonical []
legacy value → canonical [value]
```

Lock each row, or condition the update on its observed marker and revision. Convert the marker, list, projection, revision and outbox atomically.

A concurrent foreground write either precedes conversion or observes its result. A stale backfill attempt cannot overwrite that write. Backfill is resumable and skips canonical rows; it must never reconstruct a populated list from its scalar projection.

Enable V2 multivalued writes gradually by account or tenant. Keep the gate at the authoritative writer. Monitor migration counts, projection mismatches, rejected stale events, conflicts, publication lag, replica freshness and reconciliation lag.

**Gate:** Complete required cohort backfill, zero unexplained invariant violations, and pass the proposed fault checks below before expanding eligibility.

A rollout halt stops new cohort activation. It does not stop compatibility writes, event publication or reconciliation for existing multivalued accounts.

### Contract

After every row is canonical and every executable deployment uses canonical-aware access:

- Remove legacy-row fallback and migration machinery.
- Remove obsolete writer permissions permanently.
- Retire old event formats only after their consumers are explicitly retired.
- Drop the physical scalar column when all readers derive the projection from the list.
- Retain the V1 scalar API for as long as old clients are supported.

Storage contraction does not require retiring V1 clients. The API projection can remain indefinitely.

Retain backups, event decoding capability and rollback artifacts for the agreed recovery window. A long period of no old-client traffic is not sufficient proof that dormant clients cannot return.

### Rollback boundaries

| Point reached | Supported rollback |
|---|---|
| Expanded schema, singleton-only data | Roll back within the canonical-aware compatibility release set. |
| First multivalued commit | Disable new feature activation and roll application/UI releases back only to list-preserving builds. Keep canonical storage and adapters. |
| Legacy storage/event contracts removed | Roll back only within the contracted-compatible release set, or perform an explicit forward restoration of compatibility infrastructure. |

After multivalued writes, returning an original scalar-only writer to service is unsafe. A feature flag does not change that fact.

A true data downgrade requires stopping writes, exporting complete lists, obtaining an explicit lossy mapping decision, transforming data and establishing a new recovery boundary. Restoring an old backup alone loses later acknowledged writes and is not a compatible rollback.

## 3. Proposed measurable acceptance checks

These are design targets for a controlled fault environment, not observed performance claims. Suggested recovery targets are **60 seconds after transport recovery** for normal replication and **10 minutes after reconciliation starts** for missed-delivery repair. Confirm those targets against actual capacity before making them contractual.

Use a reference state machine driven by authoritative commit order.

| Injection | Pass condition |
|---|---|
| Race backfill against V1 set/clear and V2 replacement across 1,000 accounts | Every result equals a valid transaction order; zero tail truncations attributable to backfill; every canonical projection matches. |
| Deliver every snapshot 10 times in random order, including revision `r+2` before `r` | Sink revisions never decrease; final lists exactly match authority; no duplicate keyed effect. |
| Crash before commit, after commit before response, and after broker publication before acknowledgment | Precommit cases change nothing; committed cases eventually publish; keyed retries create no extra mutation. |
| Concurrent V2 edits using one starting revision | Exactly one incompatible replacement succeeds; others receive precondition failures; no partial update. |
| Mix V1 and V2 mutations | Results match the specified primary replacement and clear rules; stale V2 writes fail; V1 scalar responses remain compatible. |
| Lose selected broker deliveries, then run reconciliation | All affected snapshot sinks converge within 10 minutes; zero authoritative data copied backward from a sink. |
| Submit equal-revision, different-payload events | Zero corrupt applies; every conflict is surfaced and quarantined. |
| Pause a regional replica, write at authority, then issue a token-bearing read there | No successful read returns a revision below the token; bounded routing/wait/failure behavior matches the contract. |
| Partition the old writer during authority failover | Zero commits from the fenced writer; zero missing acknowledged commits; revisions remain monotonic. If durability cannot be established, writes remain unavailable. |
| Halt activation after multivalued writes; deploy the designated rollback release | Lists survive byte-for-byte and order-for-order except for subsequently authorized operations; V1 remains functional; propagation continues. |
| Attempt writes from an original scalar-only binary | Every direct write is blocked or passes through the canonical-aware boundary; zero silent list truncation. |
| Replay an event older than a deletion, including after recreation | No resurrection or mutation of a new account incarnation. |
| Restore backup plus retained log/outbox to a declared recovery point | Every committed revision through that point is recovered, with projection and downstream convergence invariants satisfied. |

Run transition-consuming workflows separately: withholding one revision must block or explicitly recover the gap, and releasing duplicates must not duplicate external effects.

## 4. Alternatives, dependencies and next action

**Rejected defaults**

- **Independent scalar/list dual writes:** partial failure creates competing authorities.
- **Timestamp last-write-wins:** clock skew and delayed delivery can overwrite newer state.
- **V1 set replaces the entire list:** simpler, but every ordinary legacy edit destroys unseen secondary tags.
- **Active-active CRDT lists:** viable for a different availability requirement, but require explicit conflict semantics for ordering, replacement and clearing.
- **Automatic rollback to scalar storage:** cannot preserve information that the scalar format cannot represent.

**Confidence and missing evidence**

Confidence is high in the single-authority, revision-fencing and transactional-outbox approach. Feasibility remains conditional on existing API semantics, transactional capabilities, direct-writer control, consumer side effects, replica topology and recovery guarantees. No source locations or execution results were supplied.

**Next useful action:** approve the V1 mutation/clear truth table and inventory every write/effect boundary. Those determine whether the compatibility contract is achievable before implementation begins.

openai / gpt-6-luna / low / low effort answer

## Recommended design

Use a **versioned, ordered list as the canonical tag state**, with one designated write authority per account at a time. Preserve the legacy single-valued field as a compatibility projection—not as a second independently writable truth. During coexistence, old clients can read and write through an adapter that maps the scalar to a documented list operation. New clients use the versioned list API. Do not infer source-level behavior: no repository or system evidence was supplied.

### Semantics and invariants

Define and publish these semantics before enabling writes:

- `tags_v2` is an ordered list. Specify whether duplicates are allowed, how equality and normalization work, and whether an empty list differs from absent/null. A reasonable default is unique normalized values, stable order, and empty meaning “no tags.”
- Each account has a monotonically increasing `tag_revision` and a schema/representation version. Every successful mutation advances the revision exactly once.
- Define legacy scalar projection explicitly—for example, the first list element, with empty list projected as null. Legacy writes replace the list with zero or one element. They cannot preserve multiple values.
- Require conditional writes using an expected revision (or equivalent compare-and-set). Stale writes fail with a conflict; clients must reread and retry according to documented rules.
- A mutation transaction updates canonical state and writes an outbox record containing account ID, revision, operation or full resulting state, and representation version. Outbox publication may be at-least-once.
- Consumers and replicas apply only newer revisions. Duplicate delivery is a no-op; older revisions are ignored. If events carry deltas, detect revision gaps and fetch a snapshot before applying further deltas. Full-state events simplify recovery.
- A replica must not serve a result newer than its applied revision while omitting an earlier required update. Expose applied revision/lag, and define whether reads require a minimum revision or wait/fail when the replica is behind.
- No bidirectional conflict resolution by arrival time. During migration, designate one write authority and treat replicas and compatibility projections as derived state.

If legacy clients cannot send revisions, the API adapter must serialize writes per account or use a server-side conditional update against the current canonical revision. Otherwise concurrent legacy writes can silently overwrite newer list state.

### Phases and gates

1. **Expand:** Add the list representation, revision/version metadata, outbox/event support, and compatibility projection without changing client behavior. Deploy readers and consumers that understand both representations. Confirm old consumers safely ignore or tolerate new fields and event versions; gate any incompatible event format behind negotiated versions.
2. **Backfill:** Snapshot existing scalar values into zero-or-one-element lists. Use a consistent snapshot or record a watermark, and apply concurrent writes by revision so backfill cannot overwrite newer data. Make the process resumable and idempotent. Reconcile counts and per-account content/revisions before proceeding.
3. **Shadow:** Read both representations and compare their defined projection. Record mismatches and lag; do not silently repair ambiguous conflicts. Establish an explicit rule for resolving pre-existing divergence, preferably using the designated authority and revision/watermark evidence.
4. **Enable v2 writes:** Enable for a small, reversible cohort. Canonical list state is authoritative; legacy writes go through the adapter. Monitor conflict rates, event gaps/duplicates, replica lag, projection mismatches, and consumer errors. Expand only when predeclared thresholds hold for a stated observation window.
5. **Migrate clients and consumers:** Move readers to v2 semantics and upgrade consumers/replicas. Maintain the scalar projection for legacy clients. Reconcile continuously, including after retries and replay.
6. **Contract:** Only after evidence shows no legacy reads/writes or old consumers for the agreed retention window, disable legacy writes, then remove the projection and old event/schema support in a separately gated release. Keep backups/audit history sufficient for the recovery policy.

Thresholds and windows must be set by the service owner before rollout; do not invent numeric values without workload and SLO evidence.

### Rollback boundary

Before any multi-valued write, rollback may return to the old implementation after verifying no v2 data or events exist. **After the first multi-valued write, rollback to a scalar-only writer is unsafe and prohibited**: it would discard information or create conflicting authority.

A halt or rollback after that boundary must use a compatibility release that understands v2, keeps v2 canonical, and disables or restricts new v2 writes if necessary. Legacy writes may continue only through the adapter, with the documented lossy replace semantics and explicit client warning/acceptance. If preserving multi-valued data is required, do not allow legacy replacement writes while halted. Before any rollback, drain or fence writers, record the highest committed revision, and ensure consumers/replicas can replay or resnapshot to that revision.

### Reconciliation and recovery

Run resumable reconciliation over canonical records, projections, outbox/event revisions, and regional replica checkpoints. Compare account IDs, normalized ordered values, revisions, and versions. Classify discrepancies as stale projection, stale replica, event gap, conflicting authority, or invalid data. Automatically repair only cases with an unambiguous canonical winner; quarantine conflicts for explicit resolution. Reconciliation must be safe to rerun and emit auditable repair records.

### Measurable failure-injection acceptance checks

Before rollout, define numeric limits for lag, error rate, mismatch rate, and recovery time from service SLOs. Pass only if all checks meet those limits:

- **Duplicate event:** Deliver the same revision repeatedly. Canonical state and each consumer’s applied result remain unchanged after the first application; no duplicate side effect occurs.
- **Reordered events:** Deliver a higher revision before a lower one. Final state equals the highest committed revision; the older event cannot regress it.
- **Gap:** Omit an intermediate revision. A delta consumer detects the gap and fetches a snapshot or pauses; it must not report itself current until repaired.
- **Concurrent writes:** Race two writes with the same expected revision. Exactly one succeeds; the other gets a conflict and cannot silently overwrite the winner.
- **Backfill race:** Update an account while its backfill row is pending. After backfill and replay, the list and projection reflect the newer committed revision.
- **Replica lag/failover:** Delay or disconnect a regional replica, then restore it. It reports its lag, does not serve a read claiming a revision it has not applied, and converges to the authoritative revision within the declared recovery objective.
- **Partial regional outage:** Block event delivery to one region while writes continue. The region detects lag/gaps and recovers by replay or snapshot without losing or reordering committed state.
- **Halt after v2 write:** Stop rollout after a multi-valued write. The rollback procedure preserves every value and revision; scalar-only code is prevented from becoming write authority.
- **Legacy write after v2 write:** Submit a legacy scalar update. The adapter applies the documented replace semantics atomically, advances revision, and updates projection/events consistently; if that loss is disallowed, the write is rejected.
- **Reconciliation repair:** Inject stale projection and stale replica state. Repeated reconciliation converges idempotently, records repairs, and does not overwrite newer canonical state.
- **Contract gate:** Simulate an old client or consumer still active. Contracting is blocked until telemetry/compatibility evidence satisfies the predeclared retirement criteria.

### Alternatives and missing dependencies

A dual-write design in which old and new representations are independently writable is rejected: retries, reordering, and rollback make authority ambiguous. A lossy scalar-only rollback is also rejected after multi-valued data exists. A temporary “v2 read, v1 write” mode is viable only if every write is adapted to canonical v2 state.

Important dependencies not supplied are storage transaction capabilities, client concurrency support, event delivery guarantees, replica consistency model, retention/replay limits, legacy-client inventory, and service SLOs. These determine the exact adapter, snapshot strategy, thresholds, and contract window; validate them before choosing implementation details.

**Next useful action:** document the semantic contract and rollback boundary, then verify the listed storage, client, event, replica, and SLO dependencies before approving rollout gates.

Primary judge's stated reason

B provides stronger actionable assurance for the asynchronous-consumer portion of the assignment: implementers can identify the required atomic boundary and know when unsafe consumers must block activation. Its additional separation of snapshot convergence from delivery of every transition reinforces that advantage. This supports a clear preference in design completeness, not a claim of demonstrated implementation success or measured superiority.

This reason is the judge's assessment. No independent factual-defect finding is asserted by this record.

Battle wave: e827becb-f131-4c91-b3c5-1ed5c885e725. Pair: brp1_5e2fe8ec461b0abe3b7230a588958352149a246e17ba64e5fa92b828ae64a6e5. A separate independent review is required before calling a concern a verified factual defect. Judge disagreement is not recorded here.