constitution · epochs · watch · epoch 3

commit

c_abd68b5e771a5412bb

tommy-mor · sha1:81de487b23a631ba27daea74d015e3882f7eefce

download patch · raw event

message

Fix zero-ratio guard in reducer to drop before registering items or pair.

Previously the early-return for zero-weight votes happened after
ensure_item and voted_pairs.insert, leaving ghost items in the index
and the pair incorrectly marked as voted. Move the check to before
any side effects.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

comparisons involving this commit

comparison · c_d2fd40385778 (tommy-mor) vs c_abd68b5e771a (tommy-mor)
~anthropic/claude-sonnet-latest · winner B · 9:1 · permalink

Side B is a real bugfix that prevents ghost items and incorrectly marked voted pairs by reordering a guard clause before side effects, with an updated test verifying the corrected behavior. Side A merely adds a trivial one-line seed file with no functional code change or lasting value.

~x-ai/grok-latest · winner B · 1:20 · permalink

B fixes a real correctness bug by moving the zero-ratio early-return before ensure_item/voted_pairs side effects, and updates tests accordingly. A only adds a one-line seed file with negligible lasting design or functional value.

openai/gpt-chat-latest · winner B · 50:1 · permalink

Side B fixes a real correctness bug by moving the zero-ratio guard before `ensure_item` and `voted_pairs.insert`, preventing ghost items and incorrectly recorded voted pairs. It also updates the test to verify that no items, edges, or voted pairs are registered for zero-weight votes, whereas Side A only adds a new file containing the single line `open webui` without implementing project functionality.

comparison · c_abd68b5e771a (tommy-mor) vs c_94135a1c4c58 (tommy-mor)
~anthropic/claude-sonnet-latest · winner B · 7:3 · permalink

Side B fixes a real security flaw (votes silently falling back to an anonymous actor instead of failing closed when unauthenticated), gates a test-only OAuth bypass behind an explicit env var, adds Secure cookie support and open-redirect hardening with tests, and pins a git dependency by immutable rev instead of a mutable branch — all substantive, lasting improvements. Side A is a correct but narrow bugfix (moving a guard before side effects) with a single test update, valuable but much smaller in scope and impact.

~x-ai/grok-latest · winner B · 2:1 · permalink

B hardens the auth model (fail-closed vote actor, mock OAuth gate, Secure cookies, tighter return_to sanitization) plus dependency pinning and session-aware nav—broad, lasting security and product design. A is a correct, precise reducer bugfix that drops zero-ratio votes before ensure_item/voted_pairs side effects, but its scope is a single narrow data-integrity edge case.

openai/gpt-chat-latest · winner B · 3:2 · permalink

Side B introduces substantive security hardening across the authentication flow: vote submission now fails closed when no valid session exists, mock OAuth is gated behind an explicit environment flag, Secure cookie attributes are enabled for HTTPS deployments, and return-path sanitization is strengthened with accompanying tests. Side A fixes a real reducer bug by moving the zero-ratio early return ahead of `ensure_item` and `voted_pairs` registration to prevent ghost items and stale voted pairs, but its impact is narrower than the broader authentication and security improvements in Side B.

comparison · c_ebc883667d61 (tommy-mor) vs c_abd68b5e771a (tommy-mor)
~anthropic/claude-sonnet-latest · winner B · 75:25 · permalink

Side B is a real bugfix: it moves the zero-ratio guard before ensure_item/voted_pairs insertion, preventing ghost items and incorrectly-marked voted pairs, and updates the test to verify the corrected behavior. Side A is purely mechanical file-splitting (moving code from one forum.rs into multiple forum/*.rs submodules) with no behavioral change, so while it improves organization, it carries less lasting substantive value than a genuine correctness fix.

~x-ai/grok-latest · winner B · 1:3 · permalink

B fixes a real reducer correctness bug by moving the zero-ratio early-return before ensure_item and voted_pairs.insert, so invalid votes no longer create ghost items or mark pairs voted, and updates the test to lock that in. A mainly deletes a leftover monolithic forum.rs and finishes relocating the same logic into forum/*—useful module hygiene, but mostly structural churn without new behavior.

openai/gpt-chat-latest · winner B · 5:1 · permalink

Side B fixes a real reducer correctness bug by moving the zero-ratio early return before `ensure_item` and `voted_pairs.insert`, preventing ghost items and incorrectly recorded voted pairs, and updates the test to verify that no state is registered. Side A primarily removes the obsolete monolithic `forum.rs` and switches to the split `forum/` module layout, which improves project structure but largely preserves existing behavior rather than fixing functionality.

comparison · c_8c6a5e2e4a54 (tommy-mor) vs c_abd68b5e771a (tommy-mor)
~anthropic/claude-sonnet-latest · winner B · 85:15 · permalink

B is a small, precise, correct bugfix that eliminates a real state-corruption bug (ghost items and falsely-marked voted pairs) and updates the test to verify the fix, with clear lasting value. A is a large feature/routing diff that also includes a nonsensical committed artifact (plan2.md, an AI chat transcript praising itself) which is noise rather than project value, undermining confidence in the commit's overall quality despite the real room-UI wiring work.

~x-ai/grok-latest · winner A · 3:1 · permalink

A ships lasting product surface: cookie/session auth, web login/logout, POST /post ingest, and multi-scope room/public thread UI (ThreadNav, ACL-gated room pages, compose forms, routes). B is a correct, necessary reducer fix (move zero-ratio return before ensure_item/voted_pairs) with tests, but it is a narrow integrity patch versus A’s end-to-end room UI and auth wiring.

openai/gpt-chat-latest · winner A · 5:1 · permalink

Side A implements substantial new functionality: browser session cookies and login/logout flow, web posting, room-aware forum pages and routing, shared authentication via cookies or bearer tokens, and the necessary API/router integration to make the room UI work again. Although it also includes a large non-functional planning document, the code changes add enduring capabilities, whereas Side B is a focused correctness fix that moves the zero-ratio guard before `ensure_item`/`voted_pairs.insert` to prevent ghost items and invalid voted pairs, with an updated regression test.

comparison · c_3f420a1f5aa1 (tommy-mor) vs c_abd68b5e771a (tommy-mor)
~anthropic/claude-sonnet-latest · winner B · 60:40 · permalink

B is a small, precise bugfix that removes ghost items and false voted_pairs entries from the reducer's core ranking logic, correcting a real correctness issue with accompanying test verification. A is a larger feature (theme switcher rework + room-scoped URL helpers) that adds value but is more speculative/UI-focused, mixes several concerns, and lacks the surgical correctness guarantee of B's fix to core data integrity.

~x-ai/grok-latest · winner B · 2:5 · permalink

B fixes a real reducer integrity bug by dropping zero-ratio votes before ensure_item/voted_pairs side effects, eliminating ghost items and false “already voted” state, with a matching test update. A is largely theme UX (cookie/select plumbing threaded through many handlers) plus useful but secondary private-room URL wire helpers—valuable product surface, yet more diffuse and less foundational than the ranking-state correctness fix.

openai/gpt-chat-latest · winner B · 4:1 · permalink

Side B fixes a correctness bug in the reducer by moving the zero-ratio guard before `ensure_item` and `voted_pairs.insert`, preventing ghost items and incorrectly recorded voted pairs, and updates the test to verify the corrected behavior. Side A adds broad theme persistence and room-aware URL handling across many files, but it is largely feature work and plumbing rather than a targeted correctness fix with the same lasting impact on core data integrity.

comparison · c_abd68b5e771a (tommy-mor) vs c_af08bd851e49 (tommy-mor)
~anthropic/claude-sonnet-latest · winner B · 8:2 · permalink

Side A is a small, correct bugfix that closes a real ghost-item/voted-pair bug with a matching test update — solid but narrow value. Side B, despite the misleading 'refactor' message, adds substantial lasting functionality (new pair-selection module with bridge-priority logic, a new vote-compare page with morph-based UI, storage-id normalization fixing Reddit slug/id mismatches) plus integration and Clojure test coverage and refactored test support, representing significantly more durable feature/architecture value despite being noisier.

~x-ai/grok-latest · winner B · 1:7 · permalink

A is a small but real correctness fix: moving the zero-ratio early-return before ensure_item/voted_pairs so invalid votes no longer leave ghost index entries. B delivers far more lasting product value—an entire /vote compare flow, bridge-preferring pair selection (pair.rs + components), in-place morph UX, ItemId::from_storage normalization, and substantial tests—not mere churn despite the vague message.

openai/gpt-chat-latest · winner B · 1:5 · permalink

Side B adds substantial new functionality: a dedicated pairwise voting UI, pair-selection logic that prioritizes bridging disconnected ranking components, in-place UI morphing after votes, canonical ItemId normalization via from_storage, and accompanying integration/unit tests. Side A fixes a real reducer bug by moving the zero-ratio guard before ensure_item/voted_pairs side effects and strengthens the regression test, but it is a narrowly scoped correctness fix compared with the broader lasting capabilities introduced in Side B.

comparison · c_e2ee16c7ada5 (tommy-mor) vs c_abd68b5e771a (tommy-mor)
~anthropic/claude-sonnet-latest · winner B · 3:7 · permalink

Side A is a large mechanical refactor (splitting identity/canonical_path modules, changing wire formats) that mostly moves code around and changes conventions without fixing a functional bug, and even touches many call sites/tests for stylistic consistency. Side B is a small, precise bugfix that correctly reorders a guard to prevent ghost items and incorrectly-marked voted pairs in the ranking reducer, fixing a real correctness issue with a targeted, verifiable test update. Despite A's larger footprint, B delivers more durable, unambiguous value per line changed.

~x-ai/grok-latest · winner B · 2:1 · permalink

B fixes a real reducer correctness bug: zero-ratio votes used to run ensure_item and voted_pairs.insert before the early return, leaving ghost items and false voted pairs; the guard is moved before any side effects and the test now asserts empty index/edges/pairs. A is a large identity/path split and wire-format sweep (no @, optional delegate, module moves) that improves structure but is mostly reorganization and mechanical API/test churn relative to B’s lasting state-fix.

openai/gpt-chat-latest · winner A · 4:1 · permalink

Side A introduces a lasting architectural separation by extracting path normalization into `canonical_path.rs` and identity parsing into `identity.rs`, removes identity rewriting from the reducer, standardizes stored/wire identities without `@`, makes delegate identities optional, and updates APIs, HTML, CLI, and tests to consistently enforce those semantics. Side B fixes a real reducer bug by moving the zero-ratio early return before `ensure_item` and `voted_pairs.insert`, preventing ghost items and false voted pairs, but it is a narrowly scoped correctness fix compared with Side A's broader, durable redesign.

comparison · c_abd68b5e771a (tommy-mor) vs c_4772ee88dbe3 (tommy-mor)
~anthropic/claude-sonnet-latest · winner B · 3:2 · permalink

B is a substantial architectural improvement: it decouples vote persistence/computation via a batching SettlementClient worker, switches the hot HTTP path from a write-lock to a cached read-lock ranking (ranked_items_cached), and removes dead demo-counter code plus its tests, reducing surface area while adding real performance benefits. A is a good, narrowly-scoped correctness fix (moving the zero-ratio guard before side effects) with a corrected test, but it's a small single-function fix compared to B's broader system-level change.

~x-ai/grok-latest · winner B · 1:4 · permalink

A is a correct but tiny guard reorder that stops ghost items/voted_pairs on zero-ratio votes, with a matching test tweak. B delivers lasting architecture: a settlement worker with batched disk+apply, ranking score cache and read-only HTTP paths, plus removal of the demo-counter scaffold across events/state/UI.

openai/gpt-chat-latest · winner B · 4:1 · permalink

Side B introduces a substantial architectural improvement by adding a settlement worker that batches vote processing, persists events before applying them, warms and serves cached rankings, and switches the UI to read cached rankings under a read lock. Although it also removes demo-counter code, the enduring value comes from the new settlement pipeline and ranking-cache API (`SettlementClient`, `warm_ranking_cache`, `ranked_items_cached`), whereas Side A is a focused bug fix that correctly moves the zero-ratio guard before `ensure_item` and `voted_pairs` updates to prevent ghost items and stale voted-pair state.

comparison · c_c0df72aee6da (tommy-mor) vs c_abd68b5e771a (tommy-mor)
~anthropic/claude-sonnet-latest · winner A · 6:4 · permalink

Side A fixes a genuine XSS vulnerability by sanitizing untrusted Reddit HTML before rendering, adding a well-scoped module with tests and a clear security rationale. Side B fixes a real but narrower reducer bug (ghost items/pairs from zero-ratio votes) with a small, correct code move and updated test, which is valuable but lower-impact than closing an XSS hole.

~x-ai/grok-latest · winner A · 2:1 · permalink

A closes a real XSS hole by sanitizing untrusted Reddit HTML with ammonia at render time (shared helper, two call sites, unit tests), which is lasting security value. B is a precise, correct reducer bugfix (move zero-ratio return before ensure_item/voted_pairs) that prevents ghost state, but its scope and impact are narrower than preventing script execution in-origin.

openai/gpt-chat-latest · winner A · 4:1 · permalink

Side A adds HTML sanitization with the `ammonia` library and routes all rendering of Reddit `body_html` through a shared `entity_body_html` function, preventing untrusted HTML (including scripts and event handlers) from executing while adding tests for benign and malicious input. Side B fixes an ordering bug by moving the zero-ratio early return before `ensure_item` and `voted_pairs.insert`, preventing ghost items and stale voted-pair state, but its impact is narrower than the cross-cutting XSS mitigation in Side A.

comparison · c_e57094c6229a (tommy-mor) vs c_abd68b5e771a (tommy-mor)
~anthropic/claude-sonnet-latest · winner B · 65:35 · permalink

B is a small, precise, correct bugfix (moving the zero-ratio guard before side effects) with a clear regression test proving the fix, directly preventing ghost items and incorrect voted_pairs state. A is a much larger feature addition (entity import/fetch UI, dotenv, reddit API refactor) that adds real value but is diffuse, includes a stray unrelated Clojure integration test file, and carries more risk/noise without the same tight correctness guarantee.

~x-ai/grok-latest · winner A · 5:1 · permalink

A redesigns Reddit/entity import into an event-sourced pipeline (EntityImported + raw payload storage, explicit fetch UI, no auto-fetch on browse, configurable API bases, fixtures and end-to-end test), which is lasting product and architecture value. B is a real but narrow correctness fix—moving the zero-ratio early-return before ensure_item/voted_pairs—so it stops ghost items and bad pair state without comparable scope.

openai/gpt-chat-latest · winner A · 9:1 · permalink

Side A implements a substantial architectural improvement: it replaces implicit Reddit fetches with explicit user-triggered imports, persists full upstream payloads via a new EntityImported event, replays them into state, adds configurable API/OAuth endpoints and dotenv loading, and includes integration/tests around the new behavior. Side B fixes a real reducer bug by moving the zero-ratio guard ahead of item/pair registration to prevent ghost entries and incorrect voted_pairs state, but it is a narrowly scoped correctness fix compared with A's broader lasting functionality.

comparison · c_ca9169f732b8 (tommy-mor) vs c_abd68b5e771a (tommy-mor)
~anthropic/claude-sonnet-latest · winner A · 6:4 · permalink

Side A fixes a real production bug (cloud IPs hitting Reddit's block page), adds a proper OAuth-required retry/refresh path, error truncation, and a test, providing substantial lasting infrastructure value. Side B is a small, correct bugfix moving a guard before side effects, valuable but much narrower in scope and impact than A's change.

~x-ai/grok-latest · winner A · 3:1 · permalink

Commit A fixes a production-blocking path: when OAuth creds exist it never falls back to www.reddit.com (which returns network-security 403 HTML from cloud IPs), adds AuthRejected + forced token refresh/retry, and tightens error reporting—real lasting API reliability. Commit B is a correct but tiny guard reordering so zero-ratio votes skip ensure_item/voted_pairs; valuable data-integrity hygiene, yet far narrower in scope than A’s OAuth redesign.

openai/gpt-chat-latest · winner A · 4:1 · permalink

Side A fixes a production-facing reliability issue by requiring OAuth when credentials exist, retrying once with a refreshed token on 401/403, propagating token acquisition errors instead of silently falling back, and improving error handling with truncated diagnostics and a regression test. Side B corrects an ordering bug by moving the zero-ratio early return before `ensure_item` and `voted_pairs.insert`, preventing ghost state, but it is a smaller, localized fix with narrower impact.

comparison · c_2722a3195825 (tommy-mor) vs c_abd68b5e771a (tommy-mor)
~anthropic/claude-sonnet-latest · winner B · 6:4 · permalink

B fixes a real correctness bug (ghost items and falsely-marked voted pairs from zero-ratio votes) with a minimal, precise change and updates the test to verify the actual fixed behavior. A adds substantial heuristic complexity to pair selection with speculative tie-break priorities and several new tests, but it's tuning/heuristic refinement rather than fixing a concrete defect, and its correctness/value is harder to verify as clearly beneficial.

~x-ai/grok-latest · winner A · 3:1 · permalink

A upgrades core pair-selection with lasting design (established-component attach before isolate pairs; rank-centrality zip once connected) plus several targeted tests, shaping how rankings grow day-to-day. B is a real correctness fix (move zero-ratio return before ensure_item/voted_pairs) but a narrow edge-case guard with small scope versus A’s behavioral impact.

openai/gpt-chat-latest · winner A · 3:2 · permalink

Side A substantially refines the pair-selection algorithm by introducing structured component layout tracking, prioritizing attachment of unranked items to established components, and adding rank-aware 'zip' refinement once the pool is connected, with multiple new tests covering the behavior. Side B fixes a real correctness bug by moving the zero-ratio early return before item registration and voted-pair insertion, preventing ghost state, but it is a narrowly scoped fix compared with A's broader, lasting improvement to core ranking behavior.

comparison · c_c124c217f89c (tommy-mor) vs c_abd68b5e771a (tommy-mor)
~anthropic/claude-sonnet-latest · winner A · 8:2 · permalink

Side A implements a substantial, working feature: a rate-limited, deduplicated background Reddit-fetch worker with OAuth handling, JSON parsing, URL mapping, tests, and wiring into AppState/routes—real lasting functionality. Side B is a small, correct bugfix that moves a zero-ratio guard earlier to avoid ghost items, valuable but minor in scope compared to A's feature work.

~x-ai/grok-latest · winner A · 4:1 · permalink

A ships a full Reddit import path (broker/worker, OAuth, rate-limit/backoff, URL mapping, JSON parsers, AppState wiring, and unit tests) that turns a placeholder into lasting product capability. B is a real, precise reducer correctness fix (zero-ratio guard moved before ensure_item/voted_pairs) but is narrow in scope versus the feature subsystem in A.

openai/gpt-chat-latest · winner A · 5:1 · permalink

Side A replaces a Reddit import placeholder with a complete background-fetch subsystem: it adds an async broker/worker, OAuth support, rate-limit handling, JSON parsing into EntityData, request deduplication/caching, integrates fetch triggering into application state and browse flow, and includes tests. Side B is a good correctness fix that moves the zero-ratio early return before ensure_item and voted_pairs insertion to prevent ghost items and stale voted pairs, but its scope and lasting impact are much smaller than the new functionality and infrastructure added in Side A.

comparison · c_55666fe32c48 (tommy-mor) vs c_abd68b5e771a (tommy-mor)
~anthropic/claude-sonnet-latest · winner A · 7:3 · permalink

Side A introduces the actual feature (ratio bounds enforcement across DSL parser, HTTP handler, and reducer) with substantial regression/integration test coverage, providing real user-facing validation and lasting behavior change. Side B is a small, valid follow-up bugfix correcting an ordering issue in A's own reducer logic (ghost items/pair marking), which is useful but narrower in scope and dependent on A's prior work.

~x-ai/grok-latest · winner A · 3:1 · permalink

A establishes the lasting vote-ratio invariant end-to-end (DSL parse, UI POST rejection, reducer drop, max≤100) with broad unit/integration/browser coverage. B only relocates A’s zero-ratio early-return before ensure_item/voted_pairs and tightens one test—important correctness, but a narrow follow-up versus A’s multi-layer design.

openai/gpt-chat-latest · winner A · 5:1 · permalink

Side A establishes the core invariant that vote ratios must have both sides between 1 and 100 by enforcing it in the DSL parser, UI POST handler, and reducer, and adds regression tests covering parser and integration behavior. Side B is a worthwhile follow-up that fixes a reducer edge case by moving the zero-ratio early return before item registration and voted-pair insertion, preventing ghost state, but it is a narrower correction built on the broader validation introduced by Side A.

comparison · c_5e9a63e9d276 (tommy-mor) vs c_abd68b5e771a (tommy-mor)
~anthropic/claude-sonnet-latest · winner B · 60:40 · permalink

B is a small, precise real bugfix: it moves the zero-ratio guard before ensure_item/voted_pairs.insert, eliminating ghost items and incorrectly-marked-voted pairs, with an updated test proving the corrected behavior. A is a large refactor centralizing path/URL logic into slug-types, which is a reasonable architectural cleanup but is mostly code relocation with no new bug fixes, and duplicates/rewires existing tests rather than fixing a defect; its value is real but more about maintainability than correctness, and its size is due to churn rather than necessity.

~x-ai/grok-latest · winner B · 2:1 · permalink

B fixes a real reducer correctness bug by rejecting zero-ratio votes before ensure_item/voted_pairs.insert, preventing ghost items and false voted-pair marks, with a matching test update. A is a useful but largely mechanical centralization/move of path helpers into slug-types plus API newtype wiring—lasting structure without changing broken core behavior.

openai/gpt-chat-latest · winner A · 3:2 · permalink

Side A consolidates canonicalization, URL generation, and path newtypes into a shared `slug_types::paths` module, replaces ad hoc string helpers with strongly typed `GardenItemUrl`, `ForumThreadUrl`, and `TildeOntologyPath`, and updates API types to use those abstractions across the codebase. Side B fixes a real correctness bug by moving the zero-ratio guard before `ensure_item` and `voted_pairs.insert`, preventing ghost items and false voted pairs, but its impact is narrower than the architectural cleanup and type-safety improvements introduced by Side A.

comparison · c_c6f5afec1d36 (tommy-mor) vs c_abd68b5e771a (tommy-mor)
~anthropic/claude-sonnet-latest · winner B · 6:4 · permalink

Side B fixes a genuine correctness bug (ghost items and falsely-marked-voted pairs from zero-ratio votes) with a minimal, precise change and updates the test to verify the corrected invariant. Side A adds a real feature (pool-scoped voting) with broader surface area and more risk, but is feature churn/expansion rather than a bugfix, and its value is more speculative/UX-dependent than B's clear correctness fix.

~x-ai/grok-latest · winner B · 2:3 · permalink

B fixes a real reducer correctness bug by dropping zero-ratio votes before ensure_item/voted_pairs side effects, preventing ghost items and false voted-pair state; the updated test asserts empty indexes rather than registered no-edge items. A adds useful pool-scoped voting UX (query param, next-pair constraint, “vote on children” entry point) but is feature surface on top of voting, not a core integrity fix.

openai/gpt-chat-latest · winner A · 3:2 · permalink

Side A implements a substantial new capability: pool-scoped voting, including `/vote?pool=...` routing, pair selection from a parent's children, preservation of pool context through post-vote navigation, and UI entry points for voting on child items. Side B fixes a real reducer bug by moving the zero-ratio early return before `ensure_item` and `voted_pairs` registration to prevent ghost items and incorrectly marked pairs, but it is a localized correctness fix compared with the broader, integrated functionality added in Side A.

comparison · c_25ece8f92dc8 (tommy-mor) vs c_abd68b5e771a (tommy-mor)
~anthropic/claude-sonnet-latest · winner A · 6:4 · permalink

Side A fixes a real multi-user correctness bug (shared sentinel delegate blocking subsequent voters) with a broad, coherent change across CLI, server, types, and tests, including a targeted integration test proving the fix. Side B is a smaller, valid reducer fix (moving a zero-ratio guard earlier to avoid ghost items), which is correct but narrower in scope and impact than A's fix to a user-facing multi-tenant blocker.

~x-ai/grok-latest · winner A · 3:1 · permalink

A fixes a real multi-user blocker: shared WEB_BROWSER_AGENT sentinels bound on first browser vote and rejected later humans; making PendingSession.agent optional and posting UI votes with no delegate restores correct multi-user behavior and is backed by a full integration test. B is a correct but narrower reducer fix that only reorders the zero-ratio early-return so ensure_item/voted_pairs do not leave ghosts—valuable hygiene, smaller lasting scope than A.

openai/gpt-chat-latest · winner A · 4:1 · permalink

Side A fixes a user-facing design flaw by removing shared sentinel browser delegates, changing pending sessions and browser posts to use no delegate, updating API types to `Option<String>`, and adding an integration test proving multiple human users can vote without conflicting `AgentBound` state. Side B is a good reducer bugfix that moves the zero-ratio guard before `ensure_item` and `voted_pairs` mutations to prevent ghost state, but it is narrower in scope and impact than the cross-cutting authentication and voting correctness fix in Side A.

comparison · c_abd68b5e771a (tommy-mor) vs c_0c466eea1ed4 (tommy-mor)
~anthropic/claude-sonnet-latest · winner A · 6:4 · permalink

Commit A is a small, precise correctness fix that prevents ghost items and incorrect voted_pairs state from a real reducer bug, with an updated test verifying the fix. Commit B adds a large new dev-only tool (sorterc) which is useful but is auxiliary tooling rather than a core correctness fix, and its value is more speculative/utility-based than a guaranteed bugfix.

~x-ai/grok-latest · winner A · 2:1 · permalink

A is a precise core correctness fix: the zero-ratio early-return ran after ensure_item and voted_pairs.insert, leaving ghost index entries and false voted-pair marks; moving the guard before side effects and updating the test locks that in. B adds useful but optional dev-only offline compile/scan tooling (large surface, docs, binary) that does not repair production reducer state.

openai/gpt-chat-latest · winner B · 3:2 · permalink

Side B adds a substantial offline tooling capability: a new workspace binary (`sorterc`) plus reusable `server::offline` APIs to compile `.sorter` documents, replay and lint `events.jsonl`, and accompanying tests and documentation. Side A fixes a real correctness bug by moving the zero-ratio guard before `ensure_item` and `voted_pairs.insert`, preventing ghost items and stale voted-pair state, but its scope is narrower than the enduring developer infrastructure introduced in Side B.

comparison · c_cd965c070df3 (tommy-mor) vs c_abd68b5e771a (tommy-mor)
~anthropic/claude-sonnet-latest · winner B · 6:4 · permalink

Side B fixes a real logic bug (ghost items and mis-marked voted pairs from zero-ratio votes) with a small, precise reordering of a guard clause plus an updated unit test verifying the corrected invariant. Side A is a larger, more diffuse patch mixing a genuine parent-linking bugfix with unrelated signature churn (threading `tree` through multiple call sites) and integration test restructuring, making its net lasting value less clear-cut despite its size.

~x-ai/grok-latest · winner A · 2:1 · permalink

A fixes real import/model wiring (apply_entity_under_parent so listing children attach without ensure_path pulling Reddit comment segments) and lasting UI correctness (child titles in the ranking panel), with broader call-site and integration-test coverage. B is a sharp, necessary reducer invariant fix (drop zero-ratio votes before ensure_item/voted_pairs), but it is a narrower edge-case correction than A’s import-path and display design changes.

openai/gpt-chat-latest · winner A · 3:2 · permalink

Side A fixes a functional integration issue in Reddit child imports by introducing `apply_entity_under_parent` to avoid incorrect path expansion, updates the ranking panel to display imported child titles via tree data instead of raw IDs, and adds end-to-end tests covering SSE updates and child fetching. Side B is a good correctness fix that moves the zero-ratio guard before `ensure_item` and `voted_pairs` mutation to prevent ghost items and stale voted pairs, but it is a narrower reducer bugfix with a smaller project-wide impact.

comparison · c_abd68b5e771a (tommy-mor) vs c_509fc5155034 (tommy-mor)
~anthropic/claude-sonnet-latest · winner A · 8:2 · permalink

Commit A is a small, precise, verifiable bugfix that closes a real correctness gap (ghost items/pairs being registered before the zero-ratio guard) and updates the test to assert the corrected behavior. Commit B is a large speculative refactor ('reconfigure') introducing a whole new tree/journal/reddit-import architecture with no tests demonstrating it fixes a real bug, higher risk of regressions, and no clear necessity established beyond feature expansion.

~x-ai/grok-latest · winner B · 3:1 · permalink

B lands lasting core design: hierarchical ItemId/GlobalTree, path canonicalization, journaled tree votes, and UI (breadcrumbs/entity panel) that replace flat string scopes—foundational product capability. A is a correct, necessary ordering fix (zero-ratio return before ensure_item/voted_pairs) with tight tests, but it is a localized guard versus B’s structural model change.

openai/gpt-chat-latest · winner A · 8:1 · permalink

Side A fixes a real correctness bug by moving the zero-ratio early return before `ensure_item` and `voted_pairs.insert`, preventing ghost items and incorrectly marked voted pairs. It also updates the test to verify that no items, edges, or voted pairs are registered, whereas Side B is a large architectural reconfiguration with broad feature changes but no clearly demonstrated targeted bug fix or validated lasting correctness improvement in the patch itself.

comparison · c_abd68b5e771a (tommy-mor) vs c_06fce70179bc (tommy-mor)
~anthropic/claude-sonnet-latest · winner B · 8:2 · permalink

Side B is a substantial feature refactor converting entity fetch from a fire-and-forget JS morph into a proper SSE streaming flow with job-result signaling (oneshot channels, FetchJobResult enum, worker notifications), plus richer tracing, module reorganization (new fetch module), client-side SSE parsing, and updated integration tests. Side A is a small but real bugfix (moving a zero-ratio guard earlier) with a corresponding test update, which is correct and valuable but far narrower in scope and impact than B's architectural improvement to a core interaction flow.

~x-ai/grok-latest · winner A · 2:1 · permalink

A is a precise correctness fix: zero-ratio votes no longer call ensure_item or mark voted_pairs, eliminating ghost index entries, with tests updated to match. B delivers real SSE fetch UX and module extraction, but much of the diff is relocation, tracing noise, lockfile churn, and dropped unit tests, so it is more diffuse lasting value than A's targeted data-integrity fix.

openai/gpt-chat-latest · winner A · 9:1 · permalink

Side A fixes a real correctness bug by moving the zero-ratio guard before `ensure_item` and `voted_pairs.insert`, preventing ghost items and incorrectly recorded voted pairs. It also updates the test to verify that no items, edges, or voted pairs are registered, whereas Side B is a large refactor/feature addition with dependency changes and code movement but no similarly clear, focused correctness improvement.

comparison · c_552f408ae0da (tommy-mor) vs c_abd68b5e771a (tommy-mor)
~anthropic/claude-sonnet-latest · winner B · 55:45 · permalink

B fixes a real correctness bug (ghost items and falsely-marked voted pairs from zero-ratio votes) with a minimal, precise change and updates the test to verify the corrected invariant. A adds a legitimate new feature with good test coverage, but B's change addresses actual data-integrity bugs in core reducer logic that could silently corrupt state, which has more lasting correctness value than an additive feature.

~x-ai/grok-latest · winner B · 2:3 · permalink

B fixes a real correctness bug in core reducer logic: the zero-ratio guard ran after ensure_item and voted_pairs.insert, leaving ghost items and false voted-pair marks; moving the check before side effects permanently stops that corruption, with the unit test updated to match. A adds a useful RoomList RPC/CLI surface plus solid isolation tests, but it is additive API wiring over existing grants state rather than repairing flawed core behavior.

openai/gpt-chat-latest · winner A · 3:2 · permalink

Side A adds a new end-to-end capability: a RoomList RPC, CLI `room list` subcommand, shared request/response types, server implementation, and integration tests verifying authenticated per-user room isolation. Side B fixes a real reducer bug by moving the zero-ratio early return before `ensure_item` and `voted_pairs` mutation, preventing ghost items and stale voted-pair state, but it is a localized correctness fix compared with A's broadly useful, fully tested feature.

comparison · c_6209cd238b3f (tommy-mor) vs c_abd68b5e771a (tommy-mor)
~anthropic/claude-sonnet-latest · winner B · 60:40 · permalink

Commit B is a precise, correct bugfix: it moves the zero-ratio guard before ensure_item/voted_pairs.insert so ghost items and phantom voted-pairs no longer pollute reducer state, and it updates the test to assert the corrected invariant. Commit A is a larger feature/refactor (faster scan, ingest replay CLI) that adds useful tooling but is more diffuse, higher risk of new bugs, and less critical than fixing genuine state-corruption in the core reducer.

~x-ai/grok-latest · winner B · 2:3 · permalink

B fixes a real reducer correctness bug: zero-ratio votes were rejected only after ensure_item and voted_pairs.insert, leaving ghost items and false voted pairs; moving the guard before side effects (with an updated test) protects ranking state integrity. A is solid tooling work—fast parse-only scan, richer parse_error surfaces, and compile --ingest—but it improves offline ergonomics rather than core simulation correctness, so it trails slightly on lasting project value.

openai/gpt-chat-latest · winner B · 3:1 · permalink

Side B fixes a correctness bug by moving the zero-ratio early return before any side effects, preventing ghost items from being indexed and voted pairs from being recorded incorrectly. The accompanying test is updated to verify that no items, edges, or voted pairs are registered, whereas Side A is primarily a tooling enhancement (faster scan mode, richer parse errors, and new CLI functionality) rather than a core state-correctness fix.

comparison · c_48edc893c5b0 (tommy-mor) vs c_abd68b5e771a (tommy-mor)
~anthropic/claude-sonnet-latest · winner B · 65:35 · permalink

Side B is a small, correct bugfix that closes a real state-corruption issue (ghost items and falsely-marked voted pairs) and updates the test to verify the fix, providing clear lasting value. Side A adds a large new subsystem (form templating, __rpc__ JSON holes, /ui endpoint) which is more architecturally ambitious but unproven, more speculative, and much larger surface area for bugs without corresponding test coverage of the new endpoint's integration behavior.

~x-ai/grok-latest · winner A · 3:1 · permalink

A adds lasting architecture: a reusable form_template hole-fill layer, typed HtmlUiAction + POST /ui dispatcher, shared run_* web_post helpers, and lazy new-thread UI morphs—real product and API design with tests. B is a correct, high-leverage reducer bugfix (zero-ratio early-return before ensure_item/voted_pairs) with an updated test, but it is a narrow localized correctness patch versus A’s broader durable surface.

openai/gpt-chat-latest · winner B · 4:1 · permalink

Side B fixes a real correctness bug by moving the zero-ratio guard before any side effects in the reducer, preventing ghost items and incorrectly recorded voted pairs, and updates the test to verify no state is registered. Side A introduces a substantial new `/ui` endpoint, form templating, and UI action infrastructure, but it is primarily new feature work and refactoring rather than addressing a demonstrated correctness issue with lasting integrity impact.

comparison · c_45dfa34511fe (tommy-mor) vs c_abd68b5e771a (tommy-mor)
~anthropic/claude-sonnet-latest · winner A · 8:2 · permalink

Side A is a substantial, coherent refactor that introduces a shared room-route encoding module, fixes real URL-consistency bugs, and adds meaningful new normalization logic (YouTube URL canonicalization, query sorting) with extensive new tests, touching many call sites consistently. Side B is a small, correct bugfix (moving a zero-ratio guard earlier to avoid ghost items) which is valuable but narrow in scope and lasting impact compared to A's broader architectural improvement.

~x-ai/grok-latest · winner A · 5:3 · permalink

A delivers lasting design: centralized room path encoding (`room_route_segment` / single `/r/:room_key` segment), shared `ROOM_SHORT_ID_LEN`, and external URL identity normalization (YouTube canonicalization, query sorting, case policy) wired through routes, HTML, and types. B is a precise, high-value correctness fix (zero-ratio votes no longer leave ghost items or voted_pairs), but it is a small localized guard move versus A’s foundational URL/routing model.

openai/gpt-chat-latest · winner A · 4:1 · permalink

Side A introduces lasting infrastructure by centralizing private-room route encoding/decoding (`room_route_segment`/`room_id_from_route_segment`), updating all routing and URL generation to use it, and adding URL normalization utilities (including canonicalization improvements and tests). Side B is a good targeted bug fix that correctly moves the zero-ratio guard before `ensure_item` and `voted_pairs.insert`, preventing ghost items and stale voted pairs, but its scope and long-term architectural impact are much smaller.

comparison · c_abd68b5e771a (tommy-mor) vs c_fbeec5c4ad18 (tommy-mor)
~anthropic/claude-sonnet-latest · winner B · 6:4 · permalink

Side B implements a substantive behavioral change (per-commit rather than per-contributor ranking, with score rollups and UI updates) backed by new/updated tests across three test files, representing meaningful lasting functionality. Side A is a small, correct bugfix (reordering a guard check) with a single test update, which is valuable but far more limited in scope and impact than B's structural rework.

~x-ai/grok-latest · winner B · 1:3 · permalink

B redesigns ranking from contributor-bundled short-circuiting to pairwise ranking of every eligible commit with score rollup, evidence/UI surfaces, and tests—core lasting protocol behavior. A is a correct but narrow bugfix that only reorders the zero-ratio guard before ensure_item/voted_pairs side effects.

openai/gpt-chat-latest · winner B · 5:1 · permalink

Side B changes the core ranking behavior from contributor-level to commit-level by comparing every eligible commit, rolling scores back up to contributors, updating prompts, evidence, UI, and adding tests for same-contributor multi-commit cases and new ranking outputs. Side A fixes a real reducer bug by moving the zero-ratio guard before side effects to prevent ghost items and voted pairs, with an accompanying regression test, but its scope is much narrower than the architectural change in Side B.

The full patch is loaded only by the download route: download patch

Metadata
commit_idc_abd68b5e771a5412bb82e95cbdac2e7d981ddacbd8a1e911801c8eaf8a2651f4
patch_sha2563c4728bcc5619d01a912eb23d38f93a22ca07652da701dad5b02edbd2abe70fd
patch_identitygit-patch-id-stable-v1:2f37112546cc915edcf843d563d96d1cc421e22d
committer_timestamp_ms1779576126000