constitution · epochs · watch · epoch 3
commit
c_48aeaf9b52c3f3e9ae
tommy-mor · sha1:595b38509b0d0b3445234d3b9d9759a6d6a471cd
download patch · raw event
message
Fix star-topology ranking by using degree-based d_max (#146).
A pure forward star at the default `>` ratio (2:1) produced uniform 1/3
scores, and the alphabetical-fallback sort placed the unambiguous winner
last. Root cause: `compute_scores_from_edges` divided by the max sum of
pairwise-normalized weights, so every node ended up with P_ii = 0 — a
bipartite Markov chain whose power iteration oscillated and, after the
configured even iteration count, returned to the uniform initial state.
Switch the divisor to the unweighted max neighbor degree, matching the
canonical Rank Centrality definition in Negahban–Oh–Shah 2012 §3.1
(arXiv:1209.1688, eq. defP and the d_max definition in §6). This gives
every non-saturated node a positive self-loop, makes the chain aperiodic,
and converges the star to π_zebra = 1/2, π_alpha = π_beta = 1/4.
Add Rust regression test and a Clojure test that drives the sorterc
binary against four .sorter fixtures (star, inverse star, chain, cycle).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
comparisons involving this commit
comparison · c_92734e554a25 (tommy-mor) vs c_48aeaf9b52c3 (tommy-mor)
Side B fixes a real algorithmic bug (bipartite Markov chain causing incorrect ranking convergence) with a mathematically justified change grounded in cited literature, plus regression tests in both Rust and Clojure across multiple topologies. Side A merely deletes two existing tests and tweaks CI node version/npm install, providing no new functionality or bugfix and reducing test coverage.
B fixes a real correctness bug in core ranking (star topologies yielding uniform/oscillating scores) by switching to degree-based d_max per the Negahban–Oh–Shah definition, with Rust and Clojure regression coverage. A only bumps Node 22→24, drops a one-line npm upgrade step, and deletes two obsolete unit tests—useful chore work but far less lasting substance.
Side B fixes a substantive algorithmic bug in Rank Centrality by changing the normalization from summed edge weights to degree-based d_max, preventing oscillating bipartite Markov chains and restoring correct rankings for star topologies. It also adds focused Rust and end-to-end regression tests with fixtures covering star, inverse star, chain, and cycle cases. Side A mainly updates the CI Node version, removes an npm upgrade step, and deletes obsolete tests, providing comparatively limited lasting value.
comparison · c_48aeaf9b52c3 (tommy-mor) vs c_45dfa34511fe (tommy-mor)
Side A fixes a genuine, well-diagnosed algorithmic bug (bipartite Markov chain from wrong normalization divisor) with a principled, cited fix and solid regression tests across multiple topologies. Side B is a mixed bag: a URL-path refactor (dropping a '/' separator, seemingly cosmetic/risky) bundled with unrelated YouTube URL normalization and Url-as-HashMap-key documentation tests, lacking a clear unifying rationale and touching many call sites for a stylistic route change of uncertain necessity/value.
A is a precise core bugfix: it replaces the incorrect weight-sum d_max with the paper's degree-based d_max so Rank Centrality is aperiodic and star topologies converge to the right stationary distribution (π=1/2,1/4,1/4) instead of oscillating to uniform, backed by targeted Rust and end-to-end Clojure regression fixtures. B is a large but mostly structural URLs/routing refactor (concatenated room segments, helpers, YouTube normalization) whose lasting substance is secondary to the ranking correctness fix.
Side A fixes a core correctness bug in the ranking algorithm by switching Rank Centrality to the canonical degree-based d_max, eliminating oscillation in star topologies and adding focused regression tests (Rust and end-to-end fixture tests) that verify the corrected behavior. Side B is a broad URL/routing refactor that centralizes room path handling and adds URL normalization utilities, but it is largely structural and API reshaping rather than fixing a comparably fundamental algorithmic correctness issue.
comparison · c_9e1ff4fc0186 (tommy-mor) vs c_48aeaf9b52c3 (tommy-mor)
Side B fixes a real, subtle correctness bug in the ranking algorithm (wrong divisor causing bipartite oscillation on star topologies), grounds the fix in the cited paper's actual definition, and adds targeted Rust and Clojure regression tests/fixtures proving the fix. Side A is almost entirely rustfmt/whitespace churn plus a tiny CSS dedupe and toolchain pin, which is useful housekeeping but contributes no functional value and is mostly noise/formatting.
Commit B fixes a real correctness bug in the core Rank Centrality scoring (wrong d_max divisor causing bipartite oscillation and uniform scores on star topologies), aligns the math with the cited paper, and adds durable Rust + Clojure regression tests with fixtures. Commit A is almost entirely rustfmt whitespace/import churn plus minor tooling pins and a trivial CSS dedup, which adds negligible lasting product value.
Side B fixes a substantive correctness bug in `compute_scores_from_edges` by switching the Rank Centrality normalization from summed edge weights to the canonical degree-based `d_max`, preventing oscillating bipartite Markov chains and producing correct rankings for star topologies. It also adds targeted Rust and end-to-end regression tests with ranking fixtures, whereas Side A is overwhelmingly rustfmt-driven reformatting plus minor tooling changes (pinning rustfmt/clippy, VS Code settings, and a small CSS cleanup) with little lasting behavioral impact.
comparison · c_7ec67b9cef2c (tommy-mor) vs c_48aeaf9b52c3 (tommy-mor)
Side B fixes an actual algorithmic bug (bipartite/oscillating Markov chain in the ranking power-iteration) with a correct, well-justified change grounded in the cited paper, plus regression tests in both Rust and Clojure across multiple topologies. Side A is purely a planning document and a thin wrapper struct (RouteContext) that just delegates to existing ThreadNav methods without migrating any call sites, providing no functional change or real refactor yet—its value is aspirational/documentation only.
B fixes a real ranking correctness bug (star topology yielding uniform scores from bipartite oscillation) by switching to paper-correct degree-based d_max, with Rust and Clojure regression coverage. A mostly adds a forward-looking plan.md plus a thin RouteContext newtype that still delegates to ThreadNav/CanonicalItemUrl without finishing the identity refactor.
Side B fixes a real correctness bug in `server/src/ranking.rs` by switching the Rank Centrality transition matrix to use degree-based `d_max`, preventing oscillation and producing correct rankings for star topologies. It also adds focused Rust and Clojure regression tests with ranking fixtures, while Side A primarily adds a long design plan and a `RouteContext` wrapper around `ThreadNav` that introduces little functional change.
comparison · c_a896b2dc05d5 (tommy-mor) vs c_48aeaf9b52c3 (tommy-mor)
Side B fixes a real correctness bug in the rank-centrality algorithm (wrong divisor causing bipartite oscillation on star topologies), grounds the fix in the cited paper's definition, and adds substantial regression coverage (Rust unit test plus Clojure end-to-end fixtures). Side A is a data-structure swap (Deque->List/VecDeque->Vec) that changes cap semantics from write-time truncation to read-time slicing, which is reasonable cleanup but lower-impact than a genuine algorithmic bugfix with broad topology test coverage.
B fixes a real correctness bug in Rank Centrality (wrong d_max made star topologies bipartite and return uniform scores), aligning the divisor with the paper and adding Rust plus end-to-end Clojure regression coverage. A only swaps Deque/VecDeque for List/Vec and moves the recent-votes cap from write-time trim to read-time slicing—a storage simplification without comparable functional impact.
Side B fixes a substantive correctness bug in the ranking algorithm by changing Rank Centrality to use degree-based d_max instead of summed edge weights, preventing oscillation on star graphs and restoring correct stationary rankings. It also adds focused regression tests in Rust and end-to-end fixture tests covering star, inverse star, chain, and cycle cases, whereas Side A is primarily a storage representation change from deque to append-only list with query-time capping and corresponding cleanup/tests.
comparison · c_8dc1a8119370 (tommy-mor) vs c_48aeaf9b52c3 (tommy-mor)
Side B fixes a real algorithmic correctness bug (bipartite Markov chain oscillation in rank centrality) with a principled derivation tied to the cited paper, plus targeted regression tests in both Rust and Clojure across multiple topologies. Side A mostly deletes a large, over-engineered autocomplete parser and its test suite in favor of a simpler paste-and-go textarea, which is a reasonable simplification but is primarily churn/removal rather than a substantive lasting improvement, and it also strips out a Playwright race-condition test without an equivalent replacement guarantee.
B fixes a core ranking-math bug (wrong d_max made star topologies bipartite and yield uniform scores) to match Negahban–Oh–Shah, with tight Rust and fixture-driven Clojure regressions—directly correcting the product’s central output. A is a worthwhile simplification (deleting the brittle keystroke graph/parser_action/race harness for paste-and-go), but it mainly retires secondary UI machinery rather than fixing lasting algorithmic correctness.
Side B fixes a correctness bug in the core Rank Centrality implementation by replacing the normalization divisor with the canonical degree-based d_max, preventing oscillation in star-topology graphs and producing the correct stationary distribution. It also adds focused Rust and end-to-end fixture regressions for star, inverse star, chain, and cycle cases, whereas Side A primarily removes a complex autocomplete/parser system in favor of a simpler paste-and-go UI and deletes substantial functionality rather than improving the underlying ranking logic.
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_2dc96aace098 (tommy-mor) vs c_48aeaf9b52c3 (tommy-mor)
Side B is a small, well-reasoned correctness fix to the core ranking algorithm (switching to degree-based d_max per the cited Rank Centrality paper), backed by targeted regression tests and fixtures that clearly demonstrate the bug and fix. Side A vendors an entire speculative 'durable' RocksDB crate (with huge generated Cargo.lock, docs, examples, README) mostly unused by the actual integration beyond a single EntityStore wrapper, adding large maintenance surface and dependency risk for a modest gain (streaming replay), diluting its real signal-to-noise ratio despite legitimate startup-RAM improvements .
B is a precise, lasting correctness fix to Rank Centrality (degree-based d_max per Negahban–Oh–Shah) that stops bipartite oscillation on star topologies and ships targeted Rust/Clojure regression tests. A mainly adds a large vendored durable/RocksDB stack plus streaming event replay to cut RAM, which is valuable infrastructure but mostly new dependency surface and off-heap storage; B’s concentrated algorithm fix and tests outweigh A’s broader but noisier change for enduring project value.
Side A makes a substantive architectural change by introducing a RocksDB-backed `EntityStore` for raw Reddit payloads, removing large JSON blobs from the in-memory tree, and replacing full event-log loading with line-by-line replay via `EventLog::replay`, reducing startup memory usage. Side B is a high-quality targeted fix—changing the Rank Centrality normalization to degree-based `d_max` and adding regression tests for the oscillation bug—but its scope is narrower than A's persistent storage and replay redesign.
comparison · c_9bced108c8aa (tommy-mor) vs c_48aeaf9b52c3 (tommy-mor)
Side B fixes a real, well-diagnosed correctness bug in the core ranking algorithm (bipartite Markov chain non-convergence for star topologies), grounds the fix in the actual Rank Centrality paper, and adds targeted regression tests (Rust unit test plus Clojure end-to-end fixtures) that verify the fix. Side A is a large, mostly speculative new URL-canonicalization subsystem with extensive self-testing, but it's net-new architecture rather than a fix to an existing defect, making its lasting necessity less certain than B's precise, well-justified bugfix.
A adds a full URL canonicalization subsystem (DFA graph, builder with link validation, parse/normalize/tracking-strip, generic fallback) plus broad regression coverage for Reddit/YouTube equivalence and breadcrumbs. B is a critical but localized correctness fix in Rank Centrality (degree-based d_max) with solid star/cycle fixtures; high leverage, yet narrower lasting surface than A’s new architecture.
Side A introduces an entire URL canonicalization subsystem: a graph-based traversal engine, parser, graph builder with validation, generic fallback behavior, Reddit/YouTube canonicalization, breadcrumbs, and extensive unit/integration tests. Side B is a valuable correctness fix that changes the Rank Centrality implementation from weight-sum normalization to degree-based d_max and adds regressions for the oscillation bug, but its scope is a targeted algorithm correction rather than the addition of a substantial new project capability.
comparison · c_afa638171cf7 (tommy-mor) vs c_48aeaf9b52c3 (tommy-mor)
Side B fixes a real, well-diagnosed correctness bug in the core ranking algorithm (wrong divisor causing bipartite oscillation and incorrect rankings), grounded in the cited paper, with focused regression tests across multiple topologies. Side A adds a substantial new feature (Reddit OAuth linking, UUID-centric identity) with reasonable design, but is larger, more speculative in scope (privacy/trust semantics, mock harness churn), and carries more risk/noise relative to its lasting correctness value than B's precise algorithmic fix.
B fixes a core Rank Centrality correctness bug (weight-sum d_max → degree-based d_max per Negahban–Oh–Shah), restoring proper stationary scores on star graphs instead of bipartite oscillation back to uniform ties—directly fixing the product’s ranking output, with targeted Rust and fixture-driven Clojure regressions. A is a large, solid identity feature (Reddit OAuth, multi-link UUID principals, private linked-providers UI, pending-weight batch fix), but it extends auth rather than repairing the central ranking math the project is built around.
Side B fixes a correctness bug in the core ranking algorithm by replacing the normalization divisor with the canonical degree-based d_max, eliminating oscillation in star-topology graphs and restoring correct stationary rankings. It also adds focused Rust and end-to-end regression tests for star, inverse-star, chain, and cycle cases, whereas Side A is a substantial feature expansion (Reddit OAuth linking and UUID-based identity flow) with broader surface area but less direct evidence of fixing an existing correctness issue.
comparison · c_55f1cdf12e22 (tommy-mor) vs c_48aeaf9b52c3 (tommy-mor)
B fixes a genuine, well-diagnosed algorithmic bug (bipartite Markov chain oscillation in rank-centrality scoring) with a principled correction grounded in cited literature, plus targeted regression tests across multiple topologies. A adds a large, plausible-but-sprawling invite-system feature with meaningful surface area (server state, RPC, CLI, reducer, timeline) but is riskier/less proven, includes speculative unused fields (InviteMinted/InviteRedeemed events never emitted, room_timeline/ActiveInviteState seemingly unused by the new timeline.rs), and its correctness is less rigorously validated than B's mathematically justified fix.
B fixes a real core Rank Centrality bug (wrong d_max caused bipartite oscillation and uniform scores on star topologies), matching the paper and adding tight Rust/Clojure regressions—lasting correctness of the product’s ranking. A ships a large invite/audit feature with CLI and tests, but much of it is broader surface area and dual in-memory vs event-log invite state rather than a comparably foundational design fix.
Side B fixes a core ranking algorithm bug by changing Rank Centrality to use degree-based d_max instead of summed edge weights, eliminating oscillation in star-topology graphs and producing correct stable rankings. It also adds focused regression tests (Rust and Clojure fixtures) that directly reproduce and guard against the failure, whereas Side A introduces substantial invite and audit functionality but also leaves newly added invite events unused in favor of ephemeral in-memory state, making the design less durable.
comparison · c_48aeaf9b52c3 (tommy-mor) vs c_df12ba3b70a8 (tommy-mor)
Side A fixes a real, well-diagnosed algorithmic bug (bipartite Markov chain causing wrong rankings) with a principled, citation-backed correction and solid regression tests, delivering focused lasting correctness value. Side B is a larger feature/refactor (external index fix, resolver reorg, GitHub cards, CSS) that is useful but more diffuse, mixes a genuine bugfix with substantial new surface area and styling churn, making its net lasting-value density lower despite greater line count.
A fixes a core Rank Centrality correctness bug (weight-sum d_max → degree-based d_max) that left star topologies bipartite and stuck at uniform scores, aligning the Markov matrix with Negahban–Oh–Shah and adding targeted Rust/Clojure regressions. B’s lasting pieces are the external-root host listing fix and GitHub card rendering, but much of the diff is a resolvers/ move, HTML/CSS presentation, and feature polish rather than foundational algorithm repair.
Side A fixes a fundamental correctness bug in the ranking algorithm by switching Rank Centrality to the canonical degree-based d_max, eliminating oscillation in star-topology graphs and producing the correct stationary distribution. It also adds focused regression tests (Rust and end-to-end fixture tests) that lock in the behavior, whereas Side B mixes a real external index fix with a large refactor, GitHub card rendering, module moves, and UI enhancements whose lasting value is broader but less foundational.
comparison · c_48aeaf9b52c3 (tommy-mor) vs c_ef71be9831cc (tommy-mor)
Commit A fixes a genuine correctness bug (bipartite chain oscillation on star topologies) with a principled algorithmic correction grounded in the cited paper, plus solid regression tests (Rust + Clojure fixtures) proving the fix. Commit B is a substantial refactor (GroupState -> ScopeVotes, deriving edges on demand) that improves architecture and removes cached-state bugs risk, but it is churn-heavy, touches many files for a design preference, and doesn't fix a user-visible bug or add new guarantees beyond what A already established.
A fixes a real correctness bug in the core Rank Centrality math (wrong d_max caused bipartite oscillation and uniform star scores), aligns the implementation with the paper, and adds targeted regression tests. B is a worthwhile structural simplification (votes-only ScopeVotes, derive edges on demand) but is largely mechanical renames and state-hoisting across many call sites without changing ranking behavior.
Side B performs a substantial architectural refactor by replacing the cached `GroupState` with `ScopeVotes`, deriving edge weights and connected components on demand (`edges_from_scope`, `scope_components`, `item_index`) and updating persistence, ranking, pairing, UI, and tests to use the new model. Side A fixes an important correctness bug in Rank Centrality by switching to degree-based `d_max` and adds strong regression tests, but B's redesign simplifies state management, removes duplicated cached data, and establishes a more maintainable foundation across the project.
The full patch is loaded only by the download route: download patch
Metadata
commit_idc_48aeaf9b52c3f3e9ae1ba289cc91723f9f5e6400543cb66354b342ab4bc49e41
patch_sha256a3fe1ad3799611474b346b93fefabbe8740b03822bc1a377f81646b79f5adf74
patch_identitygit-patch-id-stable-v1:0018c6b557c73571f95b034fff2fdbdf41f22762
committer_timestamp_ms1779568263000