comparison · c_597d3f736194 (tommy-mor) vs c_4772ee88dbe3 (tommy-mor)
Commit B makes a substantially broader architectural change. It removes the demo counter feature, introduces a new settlement worker with asynchronous batching and ranking-cache updates, separates cached ranking reads from recomputation, updates application state management, adjusts UI handling to use read locks, exposes new ranking functionality, adds a new module, and updates tests accordingly. These changes affect core request processing, persistence, and performance. Commit A is a valuable bug-fix focused on restoring OAuth end-to-end tests by correcting mock OAuth server behavior, query/form parsing, redirects, null handling, and Playwright test helpers, but its scope is limited to the test infrastructure. Overall, B contributes significantly more functionality and structural improvement than A.
Commit B introduces a substantial architectural change: async settlement worker, batched vote processing, ranking cache, API adjustments, and removal of demo-only features. It improves performance, concurrency, and system design across multiple modules. Commit A is valuable but सीमित to fixing test mocks and OAuth flow bugs; it’s primarily a correctness and reliability fix rather than a structural improvement.
Side B introduces a substantial architectural change: removing the demo counter feature across the stack, adding a new asynchronous settlement worker with batching, introducing cached ranking computation, refactoring state management to use a SettlementClient, adjusting locking strategy (write → read where possible), updating ranking APIs, and modifying multiple integration tests. It adds a new module and significantly changes core request handling and persistence flow. In contrast, Side A focuses on fixing and hardening OAuth test mocks and related E2E test utilities, which, while valuable, are limited to test infrastructure and bug fixes. The scope and impact of Side B are considerably larger.
comparison · c_4772ee88dbe3 (tommy-mor) vs c_11ce057e37af (tommy-mor)
Commit A makes a substantial architectural change to the server. It removes the temporary demo counter feature, introduces a dedicated asynchronous settlement worker that batches vote processing, separates ranking computation from cached ranking reads, warms the ranking cache at startup, changes locking from write to read on rendering paths, and updates state management and tests accordingly. These changes improve performance, concurrency, and the overall design of the application rather than just removing dead code.
Commit B is also significant, adding deterministic typed block tokens, prose item-reference tokenization, support for linkifying raw URL references while avoiding code fences, stricter DSL parsing for braced item bodies, breadcrumb fixes, and extensive tests. It meaningfully improves parsing correctness and user-facing linkification.
Both commits are valuable, but A has broader impact on core runtime behavior and application architecture, whereas B is primarily focused on DSL parsing and rendering correctness.
Side A introduces a substantial architectural change: removing the demo counter feature, adding an asynchronous settlement worker with batching, decoupling write/read access to shared state, and introducing cached ranking computation. This affects core request handling, persistence, and performance characteristics across the system. Side B is also significant, with improved DSL parsing, tokenization, and linkification plus strong test coverage, but it is more localized to parsing and rendering logic. Overall, A has broader system-level impact.
Side A introduces a substantial architectural change: removing the demo counter feature and adding a new asynchronous settlement worker with batching, cached ranking computation, startup cache warming, API/state refactors, and corresponding test updates. This meaningfully impacts core state management, performance, and concurrency. Side B improves DSL parsing and linkification with deterministic block masking, prose tokenization, stricter parsing rules, and solid tests—valuable but more localized to parsing/rendering. Overall, Side A delivers broader systemic impact.
comparison · c_597d3f736194 (tommy-mor) vs c_4772ee88dbe3 (tommy-mor)
Side B introduces a substantial architectural improvement by removing the demo counter, adding a dedicated settlement worker that batches vote persistence and ranking recomputation, separating cached ranking reads from recomputation (`ranked_items_cached`), and updating state management to use this flow. Side A is a valuable test infrastructure bugfix—repairing OAuth mock request handling (`getRequestBody`, query parsing, null checks, redirect/state handling, exception handling) and stabilizing Playwright auth tests—but its impact is primarily confined to test reliability rather than the project's core runtime design.
Side A fixes several concrete test/mock issues (e.g., correct query splitting with regex, using getRequestBody instead of getInputStream, guarding null tokens, and preventing handler crashes with try/catch), restoring E2E auth flows. Side B introduces a substantial architectural improvement: a new async settlement worker with batching, cached ranking computation (ranked_items_cached), and removal of write-lock recomputation, which meaningfully improves performance and design beyond a simple fix.
Side B introduces a substantial architectural improvement: a new asynchronous settlement worker with batching (`settlement.rs`), cached ranking via `ranked_items_cached`, and refactors `AppState::record_vote` to decouple disk I/O and score recomputation from request handling. It also removes the demo counter feature and switches to read locks for rendering, improving performance and concurrency. Side A meaningfully fixes OAuth test mocks (e.g., correct request body reading, safer token parsing, try/catch in handlers), but its impact is limited to test stability rather than core runtime design.
B removes dead demo-counter code and introduces a real architectural improvement (async settlement worker with batching, cached ranking scores, warm-cache on startup) that affects core server behavior and performance, backed by updated tests. A fixes genuine bugs in test-only mock OAuth/HTTP helpers (regex split, getRequestBody vs getInputStream, nil-safe state encoding, exception handling) which is valuable for reliable E2E testing but scoped only to test infrastructure, not production code.
B removes scaffold demo-counter surface area and adds a lasting settlement worker (batched vote apply, event-log append, ranking cache warm/read path, read locks on ranking panel)—core production design. A correctly fixes test OAuth mocks (regex split, getRequestBody, null-safe state/token, handler try/catch) and login selectors, but value is confined to E2E test recovery rather than product architecture.
comparison · c_4772ee88dbe3 (tommy-mor) vs c_11ce057e37af (tommy-mor)
Side A introduces a substantial architectural improvement by moving vote persistence and ranking recomputation into a dedicated settlement worker, adding cached ranking reads (`ranked_items_cached`) so HTTP handlers can use read locks instead of recomputing under write locks. It also removes an obsolete demo counter and simplifies the UI around the real ranking workflow. Side B adds useful DSL parsing and linkification improvements (typed block masking, prose item reference tokenization, braced body enforcement, and URL linkification), but these are more feature-focused and narrower in long-term impact than the concurrency and performance redesign in Side A.
A introduces a new async settlement pipeline (mpsc worker, batching, and cached score computation) and shifts ranking reads to a cached, read-only path, improving correctness and performance under concurrency; it also removes unused demo-counter code. B adds richer DSL parsing/tokenization and linkification rules, but these are more feature-level enhancements rather than core architectural improvements.
Side B adds substantive DSL and linkification improvements: deterministic, typed BlockMasker tokens (removing random IDs), a new prose tokenizer that correctly stops raw URLs at punctuation/newlines and skips code fences, enforces braced item bodies, and updates HTML linkification to use these tokens with extensive tests. Side A mainly removes the demo counter and refactors ranking to use cached reads plus a settlement worker, which is valuable but narrower in scope than B’s parser, linking, and correctness enhancements.
B fixes concrete, verifiable bugs in URL/DSL parsing (code-fence contamination of link tokenization, missing trailing-punctuation trimming, ambiguous item-body syntax) and backs each fix with new unit tests, plus swaps a fragile random-token masker for a deterministic one. A's core change (an async settlement worker with score caching) is a reasonable architectural idea but ships with no new tests for the worker/batching/error paths, and much of the diff is just removing demo-counter scaffolding rather than adding tested, lasting functionality.
A introduces a real settlement worker (batched disk append + vote apply + ranking recompute) and a cached read path so HTTP ranking no longer needs write locks or on-the-fly score iteration, while deleting the whole demo-counter feature surface. B is solid parser/UX work (deterministic typed block masks, prose item-ref tokenization, braced bodies, garden linkify for URLs/dash refs), but it extends presentation/DSL edges rather than core vote/ranking durability.
comparison · c_9bced108c8aa (tommy-mor) vs c_4772ee88dbe3 (tommy-mor)
Side A introduces a complete, well-architected URL canonicalization subsystem (DFA-based graph, builder with build-time link validation, parser, generic fallback) backed by an extensive, meaningful test suite covering edge cases, equivalence classes, and regressions—this is substantial, reusable, correctly designed functionality. Side B is a smaller, more mixed change: it removes dead demo-counter code (good cleanup) and adds an async settlement/caching layer for votes, which is a reasonable concurrency improvement but narrower in scope and less self-contained than A's new subsystem.
A adds a full semantic URL DFA (graph + builder + parse + extensive tests) that correctly canonicalizes Reddit/YouTube aliases, strips tracking, encodes safely, and supplies breadcrumbs—foundational lasting design. B removes demo-counter scaffolding and adds a useful settlement worker/cache, but that is narrower architectural cleanup on an existing path rather than comparable new capability.
Side A introduces a substantial new URL canonicalization subsystem: a semantic graph/DFA with a declarative graph builder, URL parsing and normalization, generic fallback logic, breadcrumb generation, and extensive tests covering Reddit, YouTube, and generic URLs. Side B makes useful architectural cleanup by removing the demo counter, adding an asynchronous settlement worker and cached ranking path, but much of the patch is refactoring and feature removal, whereas Side A adds a lasting core capability with validation and broad test coverage.
comparison · c_4772ee88dbe3 (tommy-mor) vs c_bc8c17a00ed7 (tommy-mor)
Side A introduces a real architectural improvement (a settlement worker that batches vote writes, caches scores, and avoids recomputing ranking on every read) alongside removal of dead demo-counter code, which is a meaningful lasting design change despite some churn. Side B is a small, well-tested but narrow bugfix (skip pinned Reddit posts) that is useful but far more limited in scope and impact.
A adds a real settlement worker with batched vote apply/persist, ranking score caching, and read-only HTTP ranking paths, plus removes demo-counter scaffolding—lasting architecture for the core product. B is a correct, tested one-line filter to skip stickied/pinned Reddit children, valuable but narrow next to A’s design change.
Side A replaces synchronous vote handling with a dedicated settlement worker that batches event logging and ranking recomputation, introduces cached ranking reads (`ranked_items_cached`), warms the cache at startup, and switches UI rendering from write locks to read locks, while also removing the temporary demo-counter feature. Side B is a correct, targeted bug fix that skips stickied/pinned Reddit posts during subreddit import and adds a regression test, but its scope and architectural impact are much smaller.
comparison · c_4772ee88dbe3 (tommy-mor) vs c_b00c261f06c2 (tommy-mor)
Side A performs a genuine architectural improvement: it introduces a batching settlement worker that decouples vote persistence/ranking computation from the request path, adds a cached-scores fast path (`ranked_items_cached`), and cleans out an entire unused demo-counter feature (code, events, tests) that was cluttering the codebase. Side B is a more narrowly scoped UI bugfix (slider/winner highlighting) with good test coverage, but it only affects presentation correctness rather than the core system design, making A's contribution more structurally significant and longer-lasting.
A adds lasting core architecture: a settlement worker that batches vote disk writes and ranking recomputes, a cached-score read path (`ranked_items_cached` / `warm_ranking_cache`), and lock downgrades so ranking panels need only read locks—plus removal of the throwaway demo-counter path. B is a real, well-tested UX fix (per-group rank gradients, center-anchored winner highlighting, polarity/slider mapping), but it is localized UI/CSS polish versus A’s foundational concurrency and ranking design.
Side A introduces a substantial architectural improvement by adding a settlement worker that batches vote persistence and ranking recomputation, separates cached ranking reads (`ranked_items_cached`) from recomputation, and switches UI rendering to read locks instead of write locks. It also removes the temporary demo-counter feature and updates state initialization to warm the ranking cache, whereas Side B is primarily a UI correctness and presentation fix (vote highlighting, slider/history rendering, per-group gradients) with accompanying tests.
comparison · c_4772ee88dbe3 (tommy-mor) vs c_2dc96aace098 (tommy-mor)
Side B delivers a substantive architectural change (offloading Reddit JSON payloads to a RocksDB-backed entity store, streaming event log replay to cut startup RAM) with tests validating persistence and replay correctness, despite noisy vendored Cargo.lock churn. Side A mostly removes a demo feature and adds a settlement worker/cache that duplicates ranking logic without clear necessity, offering less lasting architectural value relative to its complexity.
Side A delivers lasting core design: a settlement worker that batches vote appends + ranking recompute off the request path, plus a ranked_items_cached fast path that lets ranking_panel/home use read locks instead of write locks, while cleanly excising the demo-counter scaffolding. Side B’s entity offload and streaming replay are real scalability wins, but most of the patch is a large newly-vendored durable crate (docs, examples, proptests, lockfile noise) whose full surface is only lightly used by EntityStore.
Side A introduces substantive architectural improvements to the running server: it adds a settlement worker that batches vote persistence and ranking recomputation, introduces cached ranking reads (`ranked_items_cached`) so HTTP handlers can use read locks instead of write locks, and removes an obsolete demo counter feature. Side B adds a large new `durable` workspace crate and streams event-log replay while moving raw entity payloads into RocksDB, but much of the patch is dependency, documentation, examples, and vendored infrastructure, making the immediately integrated project impact less concentrated than A's core runtime and concurrency improvements.
comparison · c_4772ee88dbe3 (tommy-mor) vs c_66eb04076a98 (tommy-mor)
Side A removes dead demo-counter scaffolding and, more importantly, introduces a real architectural improvement: an async settlement worker (settlement.rs) that batches vote writes and caches ranking scores, decoupling expensive Bradley-Terry recomputation from the request path and switching ranking_panel to a read lock. Side B is a much smaller, purely cosmetic fix (rank row color gradient using score-based min-max normalization instead of list position) that improves UI polish but has far less lasting architectural or correctness impact.
A adds a real settlement worker (batched vote apply, JSONL append, score recompute), ranking cache + read-lock fast path, and deletes the demo-counter scaffold—structural correctness for persistence and HTTP latency. B only retunes rank-row colors from list ordinal to min–max score within a group, a small UI polish with local tests and no core data-path change.
Side A makes substantial architectural improvements: it removes the temporary demo-counter feature, introduces a dedicated settlement worker that batches vote persistence and ranking recomputation, adds cached ranking access (`ranked_items_cached`), warms the cache at startup, and switches UI reads from write locks to read locks. Side B is a focused UI enhancement that changes row coloring to use per-group score normalization with good supporting tests, but it is limited to presentation rather than core project behavior or performance.
comparison · c_4772ee88dbe3 (tommy-mor) vs c_97611919bf0b (tommy-mor)
Side A ships a coherent, working improvement: it removes dead demo scaffolding and introduces a real settlement-worker architecture (batched writes, cached ranking scores, warm cache on boot) that fixes a genuine performance/correctness concern (recomputing ranking on every read), with matching test updates. Side B is a large structural refactor (CanonicalItemUrl -> ItemId) that touches many files but is mostly mechanical renaming/type-swapping with fallback `unwrap_or_else(ItemId::opaque(...))` hacks scattered around, indicating an incomplete/risky migration, and it deletes a large unexecuted plan.md rather than completing the plan it describes.
A adds a real settlement worker (batched votes, disk append, then ranking recompute into cached_scores), a warm-cache/hot-path split (ranked_items_cached + read locks), and deletes the demo-counter scaffold—lasting concurrency and HTTP design. B is mostly a CanonicalItemUrl→ItemId mechanical migration (plus plan.md deletion); the enum is useful, but internals stay string-backed and behavior largely unchanged, so less net product value per change than A.
Side A delivers substantial architectural improvements: it introduces a background settlement worker that batches vote persistence and ranking recomputation, adds cached ranking reads (`ranked_items_cached`) to avoid recomputing on every HTTP request, and switches ranking rendering from write locks to read locks. It also removes the temporary demo counter and related event/UI code, whereas Side B is primarily a broad type migration from `CanonicalItemUrl` to `ItemId` with widespread mechanical call-site updates and limited new behavior beyond the new identity type.
comparison · c_77729db919ab (tommy-mor) vs c_4772ee88dbe3 (tommy-mor)
Side A introduces a genuinely new, well-tested subsystem (composable url_rules engine with per-domain canonicalization, breadcrumb/parent logic, alias detection) that fixes real bugs (e.g. phantom 'comments' breadcrumbs) and is directly tied to the documented ItemId-as-canonical-URL design, with dozens of unit tests validating behavior. Side B mixes useful dead-code removal (demo counter) with a non-trivial async settlement/batching architecture and ranking cache, but adds no tests for the new concurrency-sensitive worker, making its correctness and lasting value less certain despite the performance intent.
A redesigns core identity around full canonical URLs and adds a lasting, composable url_rules engine (parent/breadcrumb hierarchy, Reddit/YouTube normalization) wired through storage, projection, and Reddit mapping. B’s lasting piece is a useful settlement worker plus ranking cache/read-lock cleanup, but much of the diff is removing demo-counter scaffolding rather than foundational model work.
Side A introduces a durable URL identity and canonicalization subsystem (`url_rules` with composable normalization, breadcrumb/parent logic, `ItemId` integration, replay parsing, and widespread migration to canonical `https://` IDs), improving how entities are identified and stored across the project. Side B makes meaningful architectural improvements by removing demo-only code and adding a settlement worker plus cached ranking computation, but its main impact is performance and cleanup, whereas Side A establishes a broader foundational data model that affects persistence, replay, parsing, and navigation.
comparison · c_4772ee88dbe3 (tommy-mor) vs c_7a129e904906 (tommy-mor)
Side A is a reasonable internal refactor (async settlement worker, cache separation, removal of demo scaffolding) but touches a relatively contained area with modest complexity risk (e.g., worker batching without careful backpressure/error semantics). Side B ships substantial production infrastructure (Dockerfile, fly.toml, CI/CD deploy workflow), fixes real correctness issues (duplicate-ref commit hashing, single-contributor ranking shortcut, missing OPENROUTER_API_KEY guard), and adds a genuinely useful live-audit /watch UI with corresponding tests, representing broader lasting value to the deployed system.
B lands production authority (Fly Dockerfile/fly.toml, main-branch test-and-deploy CI), multi-repo/contributor roots, and a real auditable /watch+SSE/status pipeline with epoch-loop retry and ranking guards—core operational value. A’s lasting piece is the settlement worker plus cached read-path rankings and demo-counter removal, but that is a narrower sorter2 refactor versus making the constitution process deployable and observable.
Side A makes substantive architectural changes to the server: it removes the demo-only counter and related event type, introduces a settlement worker that batches vote persistence and ranking recomputation, adds cached ranking reads (`ranked_items_cached`) to avoid unnecessary recomputation, and switches UI paths from write locks to read locks for rendering. Side B adds valuable deployment infrastructure, a live audit dashboard, SSE status reporting, Docker/Fly configuration, and CI, but much of its patch is operational/UI surface rather than improving the project's core behavior, so A provides the stronger lasting technical foundation.
comparison · c_4772ee88dbe3 (tommy-mor) vs c_afa638171cf7 (tommy-mor)
Side B implements a substantial, coherent feature (Reddit OAuth linking with UUID-canonical identity, conflict handling, private linked-provider display) with corresponding storage schema changes, projection logic, and extensive mock-server test infrastructure updates. Side A mostly removes an unused demo counter feature and introduces a settlement-worker/caching refactor for ranking that adds real architectural value (batched async vote processing with cached scores), but is smaller in scope and partly consists of deleting demo scaffolding rather than building new lasting functionality.
B lands lasting identity architecture (UUID-only principals, multi-provider OAuth linking with conflict handling, private linked-provider UI, Reddit OAuth end-to-end, and projection/trust-weight fixes) that the product depends on. A is solid systems work—deleting the demo counter and adding a settlement worker plus ranking cache/read paths—but it is mostly internal cleanup and optimization versus B’s foundational auth model.
Side B introduces substantial new identity infrastructure by adding Reddit OAuth alongside GitHub, changing the account model so UUIDs are the canonical identity with provider linking, updating login/account flows, storage, projection logic, routes, and OAuth implementations. Side A mainly removes the demo counter, switches ranking rendering to use cached scores with read locks, and adds a settlement worker/cache path, which is useful performance and cleanup work but has a narrower long-term impact than the new authentication and identity capabilities.
comparison · c_4772ee88dbe3 (tommy-mor) vs c_3f420a1f5aa1 (tommy-mor)
B delivers a substantial, coherent feature (server-rendered theme cookie/select replacing JS localStorage switcher, applied consistently across every page handler) plus real room-aware URL fixes (item_path_for_api_in_room, forum_thread_web_url) with new tests, all preserving working functionality. A mostly rips out a working demo-counter feature (net code reduction, arguably a regression in test coverage) and adds a settlement/batching worker for votes that, while a reasonable design, is unproven and less broadly impactful than B's cross-cutting fix.
Commit A removes disposable demo-counter scaffolding and introduces a real settlement worker (batched vote append + ranking recompute, warm cache, read-path ranked_items_cached, write→read lock narrowing)—lasting core architecture for the vote/rank loop. Commit B mainly wires theme cookies through layout/auth and room-scoped API URL helpers; useful correctness and UX, but more surface plumbing than A’s concurrency and ranking design.
Side A makes a substantive architectural improvement by introducing a settlement worker that batches vote persistence and ranking recomputation, adds cached ranking reads (`ranked_items_cached`) to avoid unnecessary recomputation and write locks on HTTP requests, and removes the temporary demo-counter feature and its related event/UI code. Side B is largely a UI and routing enhancement for persistent themes plus correct room-specific URL generation in RPC responses, which is useful but less foundational than the concurrency, caching, and cleanup changes in Side A.
comparison · c_4772ee88dbe3 (tommy-mor) vs c_af08bd851e49 (tommy-mor)
Side B adds substantive, tested functionality: a pair-selection algorithm (bridge/within component prioritization in pair.rs), a real vote-compare UI with edge history morphing, ItemId normalization fixes for storage/import correctness, and new integration/e2e tests plus refactored mock-reddit test support. Side A mostly removes dead demo-counter code (fine cleanup) and adds a settlement worker/caching layer for ranking, which is useful but narrower and less validated by new tests than B's changes.
B delivers core product domain work: intelligent bridge/unvoted pair selection (`pair.rs`), a full `/vote` compare UI with in-place edge-history morphing, and lasting ID normalization via `ItemId::from_storage`. A is valuable (demo removal + settlement worker/ranking cache) but is narrower infrastructure cleanup relative to B’s ranking-UX and pair-graph design.
Side A introduces a substantial architectural improvement by moving vote recording into a dedicated settlement worker that batches event-log writes, recomputes cached rankings asynchronously, adds cached ranking reads, and switches UI paths from write locks to read locks. It also removes the temporary demo counter feature and simplifies the main UI, whereas Side B mainly adds a new vote-comparison UI flow, pair-selection logic, and ID normalization, which are valuable features but less foundational than the concurrency and caching changes in Side A.
comparison · c_4772ee88dbe3 (tommy-mor) vs c_48aeaf9b52c3 (tommy-mor)
Side B fixes an actual correctness bug in the core ranking algorithm (wrong divisor causing bipartite oscillation and incorrect rankings on star topologies), grounds the fix in a cited paper, and adds thorough regression tests (Rust unit test plus Clojure fixtures covering star/inverse-star/chain/cycle topologies). Side A is mostly a demo-counter removal/refactor plus introduction of an async settlement worker with caching, which is reasonable housekeeping but doesn't fix a bug and carries more churn/deleted test coverage without a comparably rigorous justification.
B fixes a core correctness bug in compute_scores_from_edges (weight-sum d_max → unweighted degree d_max per Negahban–Oh–Shah), so star topologies converge instead of oscillating to uniform scores, with Rust and Clojure fixture regression coverage. A is strong lasting design—demo-counter removal plus a batched SettlementClient and read-only ranked_items_cached path—but it mainly restructures how votes are applied and ranked, whereas B makes the ranking results themselves trustworthy.
Side B fixes a correctness bug in the core ranking algorithm by changing the Rank Centrality transition matrix to use degree-based d_max instead of summed edge weights, preventing oscillation on star topologies and producing the expected stationary distribution. It also adds targeted Rust and end-to-end regression tests with ranking fixtures, whereas Side A is largely a refactor that removes the demo counter and introduces cached ranking/settlement infrastructure without an equally clear correctness improvement.
comparison · c_4772ee88dbe3 (tommy-mor) vs c_2722a3195825 (tommy-mor)
Side B implements a substantive, well-tested algorithmic improvement to pair selection (established-component merging, isolate attachment, rank-adjacency zipping) with several new unit tests validating the logic. Side A mostly removes an unrelated demo-counter feature and adds a settlement-worker/caching refactor, which is reasonable plumbing but is dwarfed by dead demo-code removal churn and lacks the depth of new behavior or test coverage seen in B.
A lands lasting architecture: a settlement worker that batches vote append/apply, warms and serves a ranking cache, and turns ranking/UI paths to read locks—plus full removal of the demo-counter event/UI surface. B only refines pair-suggestion heuristics (bridge sub-priorities and adjacent-rank zip) with good tests; valuable product logic, but narrower than A’s design and concurrency changes.
Side A introduces a substantial architectural improvement by moving vote persistence and ranking recomputation into a dedicated settlement worker, adding cached ranking reads (`ranked_items_cached`), warming the cache at startup, and switching HTTP paths from write locks to read locks. It also removes obsolete demo-counter code and event types, simplifying the application, whereas Side B improves the pair-selection heuristic with more nuanced bridge and rank-based prioritization plus tests, but its impact is limited to recommendation quality rather than core system architecture and performance.
comparison · c_4772ee88dbe3 (tommy-mor) vs c_e57094c6229a (tommy-mor)
B adds a genuine feature (explicit 'fetch from Reddit' action replacing implicit auto-fetch), refactors reddit.rs to persist the full raw payload and derive views from it (supporting event replay and future domains), adds config flexibility (dotenv, configurable API base) and includes fixture-backed unit and integration tests. A mainly deletes dead demo-counter scaffolding and introduces a settlement worker/caching layer for ranking, which is a reasonable perf improvement but narrower in scope and less tested than B's addition.
A introduces a lasting settlement worker that batches votes, persists them, and refreshes ranking scores off the request path, plus a cached read-only ranking fast path—core correctness for the pairwise product—while also deleting the throwaway demo counter. B’s explicit fetch UI, EntityImported full-payload replay, and mockable Reddit config are valuable domain work, but more peripheral polish than A’s ranking/write-path architecture.
Side A introduces a substantial architectural improvement by moving vote settlement into a dedicated asynchronous worker, precomputing and caching ranking scores, switching ranking reads to shared locks, and removing an obsolete demo counter feature. This reduces request-path work and cleanly separates persistence, score computation, and rendering, whereas Side B mainly adds Reddit entity import, explicit fetch UI, payload persistence, and configuration support, which is useful but more feature-specific and less foundational to the project's core behavior.
comparison · c_94135a1c4c58 (tommy-mor) vs c_4772ee88dbe3 (tommy-mor)
Side A fixes a genuine security bug (votes silently falling back to an anonymous actor instead of failing closed), gates the mock-OAuth test backdoor behind an explicit env flag, adds Secure-cookie support and stronger open-redirect sanitization, and backs these with new unit tests plus doc/Cargo.lock pinning improvements. Side B is a reasonable performance refactor (async settlement worker, cached ranking scores) and dead-code removal, but it adds no new tests for the concurrency/caching logic it introduces and its commit message ('nice') reflects low documentation effort, making its lasting correctness harder to verify compared to A's targeted, well-tested security hardening.
A hardens production auth (fail-closed vote actors instead of silent anon fallback, mock OAuth gated by env, Secure cookies, tighter return_to sanitization) and adds durable session UX/tests, which is lasting security and correctness. B’s settlement worker and ranking cache are solid core design and demo-counter removal is good cleanup, but they improve an earlier scaffold path rather than matching A’s multi-point security/ownership guarantees.
Side A makes several lasting security and correctness improvements: voting now fails closed by requiring a valid authenticated session instead of silently falling back to an anonymous actor, auth cookies gain the Secure flag when appropriate, OAuth mock login is gated behind an environment flag, and return URL sanitization is strengthened with tests to block additional open-redirect forms. Side B contains useful architectural cleanup (removing the demo counter, introducing cached rankings and a settlement worker), but much of it is refactoring/performance-oriented, whereas Side A directly fixes security and authorization behavior with concrete user-facing correctness benefits.
comparison · c_4772ee88dbe3 (tommy-mor) vs c_ca9169f732b8 (tommy-mor)
Side B fixes a real production bug (Reddit blocking cloud IPs via public API fallback) with a robust auth-rejection/retry mechanism, better error messages, and a config pin, backed by a new test. Side A is mostly a refactor/removal of demo scaffolding plus a settlement-worker rewrite for ranking caching, which is reasonable engineering but less impactful and riskier (async batching complexity) without clear bug motivation.
A introduces a real settlement worker (batched votes, disk append, off-request ranking recompute), a cached ranked_items fast path with read locks, and deletes the demo-counter scaffold end-to-end—core architecture for the ranking product. B is a solid, narrower production fix (force OAuth when creds exist, refresh on 401/403, error truncation, fly base URL) but does not reshape the system the way A does.
Side A introduces a substantial architectural improvement by separating ranking recomputation from read paths via cached rankings, adding a settlement worker that batches vote persistence and score recomputation, warming the cache at startup, and converting ranking reads to shared locks. It also removes the temporary demo counter feature and associated UI/tests, reducing dead functionality. Side B fixes an important Reddit OAuth reliability issue by requiring OAuth when configured, refreshing tokens on 401/403, and improving error handling, but its impact is confined to one subsystem and is less broadly foundational than the state-management and performance changes in Side A.
comparison · c_e2ee16c7ada5 (tommy-mor) vs c_4772ee88dbe3 (tommy-mor)
Side A performs a substantial, well-scoped identity/API refactor (new canonical_path.rs and identity.rs modules, strict wire-format validation without '@', reducer no longer rewrites identity, delegate becomes optional) with matching test and CLI updates across many call sites, fixing real correctness/design issues. Side B is a smaller mixed change: it removes a 'demo counter' feature and adds an async settlement worker with cached ranking scores, which is a reasonable perf/architecture improvement but is narrower in scope and partly consists of deleting throwaway demo code rather than fixing core design flaws.
A delivers a lasting identity/API design: split path vs identity modules, strict naked wire forms, optional delegate, and stop rewriting identities in the reducer—foundational across CLI, events, APIs, and HTML. B’s settlement worker and cached ranking reads are real systems improvements, but much of the patch is demo-counter deletion and local UI plumbing with narrower product impact.
Side A introduces a substantial architectural separation by moving path normalization into `canonical_path.rs` and identity parsing into `identity.rs`, removes identity rewriting from the reducer, enforces strict stored-form usernames/agent IDs across APIs, and makes delegate handling optional, with corresponding updates throughout server, CLI, types, and tests. Side B improves performance and design by removing the demo counter, adding a settlement worker with cached ranking computation (`settlement.rs` and `ranked_items_cached`), but its scope is narrower than A's project-wide normalization and API consistency changes.
comparison · c_abd68b5e771a (tommy-mor) vs c_4772ee88dbe3 (tommy-mor)
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.
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.
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_4772ee88dbe3 (tommy-mor)
A fixes a real security vulnerability (unsanitized Reddit HTML enabling XSS) with a focused, well-tested sanitize module, which is high-value and low-risk. B is a larger architectural refactor (async settlement worker, cached ranking, dead demo-counter removal) that's plausible but riskier, untested for the new worker's concurrency correctness, and its commit message ('nice') signals less deliberate documentation of intent despite the code volume.
B removes demo-counter scaffolding and introduces a lasting settlement worker that batches votes, persists events, and warms/serves cached ranking scores under read locks—core product architecture. A is a correct, necessary XSS fix (ammonia at render + tests) but a localized hardening of existing PreEscaped paths, not a comparable structural contribution.
Side A fixes a concrete security vulnerability by introducing HTML sanitization with the `ammonia` library, routing all `body_html` rendering through `entity_body_html`, and adding tests that verify scripts and event handlers are stripped while preserving safe markup. Side B mostly removes the demo counter and refactors ranking updates into a settlement worker with cached reads, which is a useful architectural change but does not address as fundamental or broadly lasting a correctness issue as preventing XSS from untrusted Reddit HTML.
comparison · c_25172cf8caa0 (tommy-mor) vs c_4772ee88dbe3 (tommy-mor)
Side A fixes a concrete, high-impact bug (shared sentinel delegate blocking all but the first human voter) with a clean design change (Option<String> instead of sentinel constants) and adds a targeted integration test proving multi-user voting now works. Side B is a broader refactor (async settlement worker, score caching, removing demo-counter code) that is plausible but riskier, less clearly motivated ('nice' commit message), and not tied to a demonstrated user-facing bug.
A fixes a real multi-user correctness bug by replacing shared WEB_BROWSER_AGENT/INVITE_BROWSER_AGENT sentinels with Option<String> agent=None for browser posts, so votes no longer hit shared AgentBound; it includes a focused integration test that two humans can both vote without delegates. B mixes useful settlement/ranking-cache infrastructure with largely non-lasting demo-counter scaffold removal, so less of the diff is durable product correctness.
Side A fixes a substantive correctness issue by replacing shared browser sentinel delegates with an optional delegate, preventing browser users from sharing a single agent identity that blocked subsequent human votes. It updates session types, authentication flow, UI attribution, CLI polling, and adds an integration test verifying two different browser users can both vote successfully without creating agent bindings. Side B contains useful cleanup and architectural work (removing the demo counter and introducing cached ranking/settlement infrastructure), but much of it is refactoring and optimization without demonstrating a comparable user-facing bug fix.
comparison · c_c124c217f89c (tommy-mor) vs c_4772ee88dbe3 (tommy-mor)
Side A delivers a complete, testable feature (Reddit fetch worker with OAuth, rate-limiting, backoff, JSON parsing, and unit tests) that adds real product capability, whereas Side B is mainly an internal refactor (removing demo-counter cruft, adding a settlement worker for batched vote persistence and cached ranking). B's correctness fix (persist event before mutating state) and caching are valuable, but A's scope and lasting functional value to the project's core purpose (importing Reddit items) is larger and more concrete.
Commit A replaces a stub with a complete RedditBroker background worker (OAuth, rate-limit backoff, dedup/TTL, URL mapping, JSON parsers for subreddits/posts, and request-path integration), delivering a real lasting feature. Commit B mainly deletes the demo-counter scaffold and adds a settlement worker plus score cache for votes—valuable concurrency hygiene, but smaller in scope and largely refining existing ranking paths rather than adding new capability.
Side A replaces a Reddit placeholder with a functional background import system: it adds a broker/worker, OAuth support, rate-limit handling, request deduplication, JSON parsing into EntityData, automatic fetch triggering from page views and item creation, plus tests for URL mapping and parsing. Side B contains worthwhile architectural cleanup by removing demo code and introducing a settlement worker with cached ranking computation, but much of the patch is refactoring and performance-oriented, whereas Side A delivers a substantial new capability that is likely to provide more lasting project value.
comparison · c_4772ee88dbe3 (tommy-mor) vs c_b0194743d156 (tommy-mor)
Side B fixes a real bug (inconsistent canonical URL forms for the tilde ontology root causing sibling-rank/child-lookup mismatches), adds targeted unit and integration tests plus a browser regression test, and documents the invariant clearly. Side A mostly removes an unrelated demo feature and adds a settlement-worker/caching refactor that is reasonable but riskier and less obviously validated (no new tests for correctness of the batching/caching logic), making B's fix more clearly a lasting correctness improvement.
A introduces lasting core infrastructure: a batched settlement worker for votes, ranking score caching with warm-on-boot, and read-only ranking panel paths, while stripping demo-counter scaffolding end-to-end. B is a real, well-tested canonicalization bugfix for tilde ontology root keys (normalized storage, garden root children/rankings), but it is narrower than A’s settlement/cache redesign of the vote and ranking hot path.
Side A replaces synchronous vote handling with a dedicated settlement worker that batches event logging and ranking recomputation, introduces cached ranking reads (`ranked_items_cached`) to avoid recomputing on every HTTP render, and removes obsolete demo-counter code and locking. Side B fixes canonical ontology root/path normalization and related garden rendering bugs with strong regression tests, but its impact is narrower than A's broader performance and architecture improvements.
comparison · c_4772ee88dbe3 (tommy-mor) vs c_45dfa34511fe (tommy-mor)
Side A removes a small demo feature and adds a real, non-trivial improvement (async settlement worker + cached ranking scores) that fixes a legitimate concurrency/performance concern, but is scoped narrowly. Side B is a broader, more substantial refactor introducing shared, tested room-route encoding logic (room_route_segment/room_id_from_route_segment) that fixes duplicated/error-prone split_once logic across many call sites, plus adds URL normalization (YouTube canonicalization, query sorting) with extensive test coverage, providing more consistent, reusable, and better-tested infrastructure across the codebase.
Commit A removes the throwaway demo-counter path and replaces synchronous vote apply+log with a batched SettlementClient worker plus ranked_items_cached / warm_ranking_cache, so HTTP reads take read locks only and ranking is computed off the request path—a lasting concurrency and core-domain design. Commit B mainly pulls room short+slug into one path segment, centralizes room_route helpers, and adds YouTube/query URL normalization; useful but largely routing/identity polish versus A’s architectural write-path redesign.
Side A makes a substantial architectural improvement by introducing a settlement worker that batches vote persistence and ranking recomputation, adds cached ranking reads (`ranked_items_cached`), warms the cache at startup, and switches HTTP rendering from write locks to read locks. It also removes the temporary demo counter and related event/UI code, whereas Side B is primarily a URL refactor that centralizes private-room route encoding/decoding and adds URL normalization helpers, which is useful but narrower in long-term impact.
comparison · c_4772ee88dbe3 (tommy-mor) vs c_55666fe32c48 (tommy-mor)
Side B fixes a real correctness/validation gap (rejecting invalid 0-sided and >100 vote ratios) consistently across parser, HTTP handler, and reducer, with matching test coverage, closing a genuine bug where 0:0 silently became 1:1. Side A is a mixed refactor that removes demo scaffolding (fine) but also introduces an async settlement-worker architecture with caching that changes vote-application semantics and concurrency behavior without clear justification or equivalent test rigor, making it riskier and less clearly a net positive.
A delivers lasting architecture: a settlement worker that batches votes, persists events, and recomputes ranking scores off the request path, plus read-only cached ranking and removal of the throwaway demo-counter path. B is a sound multi-layer validation fix (ratios ≥1 and ≤100 in DSL, UI, and reducer) with solid tests, but it is a narrower correctness guard than A’s design change.
Side A delivers a substantial architectural improvement: it removes the temporary demo counter feature, introduces a dedicated settlement worker that batches vote persistence and ranking recomputation, adds cached ranking reads (`ranked_items_cached`), warms the cache on startup, and switches HTTP paths from write locks to read locks for ranking display. Side B is a solid correctness change that consistently enforces vote ratio bounds (1–100) across the UI, DSL parser, reducer, and tests, but it is a narrower validation fix compared with A's broader, lasting simplification and performance-oriented redesign.
comparison · c_4772ee88dbe3 (tommy-mor) vs c_5e9a63e9d276 (tommy-mor)
B performs a substantive refactor: moves path/URL logic into a shared `slug-types::paths` module, introduces well-typed newtypes (GardenItemUrl, ForumThreadUrl, TildeOntologyPath) that are correct-by-construction and used consistently across RPC/validation code, improving type safety and removing duplicated string-based helpers. A's commit removes an unrelated demo-counter feature and adds a plausible but half-baked async settlement/batching worker with caching, which is useful but smaller in scope, less tested, and mixes unrelated concerns (feature removal + new architecture) in one commit.
A delivers a real architectural step: a settlement worker that batches votes, appends events, recomputes scores once, and serves rankings from a cache under read locks, while deleting the demo-counter path end-to-end. B mostly relocates existing canonicalization/URL helpers into slug-types and thin newtypes (GardenItemUrl, ForumThreadUrl), improving structure without comparable new runtime behavior.
Side A makes substantive architectural improvements by introducing a settlement worker that batches vote persistence and ranking recomputation, adds cached ranking reads (`ranked_items_cached`) to avoid unnecessary recomputation under read locks, and warms the cache at startup. Although it also removes the demo counter UI, the lasting value comes from improving concurrency, performance, and vote processing, whereas Side B is primarily a refactor that relocates path and URL types into a shared `slug_types` module and updates call sites without substantially changing behavior.
comparison · c_4772ee88dbe3 (tommy-mor) vs c_2f5d9e0370f8 (tommy-mor)
Side B implements a substantive, deliberate DSL redesign (block-first explanations/items) with corresponding parser rewrite, extensive test/fixture updates, and documentation changes across the whole codebase, representing real, lasting feature work. Side A is largely cleanup/removal of a demo feature plus an async settlement worker refactor for ranking caching, which is useful but smaller in scope and partly removes rather than adds durable functionality.
B permanently reshapes the core user-facing sorter DSL (explanation-first votes, stricter block-vs-item parsing) with real parser work in dsl.rs and consistent product/docs/test updates. A’s settlement worker and ranking cache are solid systems improvements plus demo-counter cleanup, but they are internal scaffolding compared with B’s lasting language/design change.
Side A makes substantive architectural improvements by introducing a settlement worker that batches vote persistence and ranking recomputation, adds cached ranking reads (`ranked_items_cached`) to avoid recomputing on every HTTP request, switches ranking access from write to read locks, and removes the obsolete demo-counter feature. Side B consistently migrates the DSL to a new explanation-first vote syntax and updates the parser, UI emission, documentation, and tests, but much of the patch is a project-wide syntax conversion rather than adding new runtime capability.
comparison · c_4772ee88dbe3 (tommy-mor) vs c_c6f5afec1d36 (tommy-mor)
Side A removes dead demo-counter code/tests and reworks the core vote pipeline into a real architectural improvement: votes are now committed and rescored via a dedicated async settlement worker with cached scores, and ranking_panel/home no longer take a write lock and recompute PageRank on every request. Side B adds a useful but narrower feature (pool-scoped vote pairs) that is well-contained but doesn't touch core state/performance design, making Side A's change more foundational and higher-leverage for the codebase.
A removes throwaway demo-counter scaffolding and adds a lasting settlement worker (batched append + ranking recompute, warm cache, read-only HTTP ranking path via ranked_items_cached), which hardens the core vote/ranking data path. B is a solid product slice (pool-scoped /vote and UI plumbing) but is incremental feature threading atop existing compare flow, not foundational architecture.
Side A introduces a substantial architectural improvement by separating ranking computation from cached reads, adding a settlement worker that batches vote persistence and score recomputation, warming the cache at startup, and switching UI rendering to read-only access for faster requests. Although it also removes the demo counter, the enduring value comes from the new cached ranking and asynchronous settlement design, whereas Side B primarily adds a useful but feature-specific pool-scoped voting workflow by threading an optional pool parameter through routing, navigation, and pair selection.
comparison · c_4772ee88dbe3 (tommy-mor) vs c_cd965c070df3 (tommy-mor)
Side A removes dead demo-counter code and introduces a real architectural improvement: a batched settlement worker that persists votes, recomputes rankings once per batch, and caches scores instead of recomputing on every request (read lock instead of write lock in the hot path), which is a lasting design/performance improvement. Side B fixes a legitimate bug in Reddit child import and unranked labels, which is valuable but narrower in scope and specific to one integration quirk rather than a structural change.
A adds a lasting settlement worker (batched vote append + score recompute), ranking cache/read-path APIs, and drops disposable demo-counter surface area—structural concurrency and hot-path design. B is valuable but narrower: Reddit children attach via apply_entity_under_parent and unranked rows use child titles, plus test wiring. A’s design/cache/cleanup outlasts B’s localized import/label fixes.
Side A replaces synchronous vote handling with a dedicated settlement worker that batches event-log writes, computes and caches rankings once, adds startup cache warming, and switches ranking reads to use cached data with read locks instead of recomputation under a write lock. It also removes the temporary demo-counter feature and related code, while Side B is a focused functional fix that correctly attaches imported Reddit children under the parent and displays child titles in the unranked list, improving import behavior but with a narrower impact.