constitution · epochs · watch · epoch 3

commit

c_8337e9dd0f87f2fb1e

tommy-mor · sha1:d91e94317d770c3d71116c3685fb60107439c257

download patch · raw event

message

fix(server): drop reduced read lock before room page layout

Precompute room_members_section_markup under the guard, then release
before layout/html stringify. Tokio RwLock queues new readers behind a
waiting writer; holding the read guard across rendering could stall
navigations when ingests take the write lock.

Made-with: Cursor

comparisons involving this commit

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

Side B is a small, targeted concurrency fix that prevents readers from stalling behind pending writers on a hot page render path, a real correctness/performance bug with clear rationale. Side A is a larger refactor unifying DOM ids/actions across public/room forms, which improves clarity but is mostly renaming/restructuring churn with no bugfix, and carries more risk of regressions across multiple files and tests.

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

B fixes a real concurrency hazard by precomputing room_members_section_markup and dropping the Tokio RwLock read guard before layout/HTML stringify, avoiding reader stall behind writers during ingest. A is a worthwhile DOM/action unify of public vs room new-thread forms, but mostly structural dedup and selector renames without the same correctness impact.

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

Side B fixes a concrete concurrency issue by precomputing `room_members_section_markup`, dropping the `tokio::sync::RwLock` read guard before expensive page layout/stringification, and avoiding reader stalls when a writer is waiting. Side A is primarily a broad refactor that unifies public and room new-thread UI IDs, actions, and markup; while it reduces duplication and standardizes behavior, it is mostly structural and also changes UI behavior rather than addressing a clear correctness or performance problem.

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

B is a substantive algorithmic refactor that replaces an O(n²) sort-based pairing scheme with a simpler linear-scan approach, preserving behavior (tests kept, semantics documented) while improving performance and reducing complex enum/sort-key machinery. A is a small, valid concurrency fix (releasing a read lock earlier to avoid writer starvation) but is narrower in scope and impact compared to B's broader design simplification with performance benefits.

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

B replaces an O(n²) candidate-sort that re-derived rank-centrality keys per pair with linear attach/bridge growth plus a single zip pass after one RC order, which is a lasting core-algorithm and scalability fix. A correctly drops the Tokio read guard before layout so writers are not blocked, but that is a localized locking hygiene fix on one handler versus B’s broader complexity and performance win.

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

Side B substantially redesigns the pair-selection algorithm by replacing per-candidate priority/key computation with a staged approach: linear graph-growth scans (`suggest_grow_pair`), a single rank-centrality pass with adjacent-rank zipping (`zip_adjacent_pair`), and simplified fallback logic. This removes the previous O(n²)-style ranking work while preserving behavior through targeted helper functions, whereas Side A is a focused concurrency improvement that simply precomputes `room_members_section_markup` and drops an `RwLock` read guard before expensive HTML rendering to reduce lock contention.

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

Metadata
commit_idc_8337e9dd0f87f2fb1e0398079d6b1d805c7f585e1bc575094288ece5b1d853a0
patch_sha2568d9eaeff757fceab79c60086cb9dbeb7e99ba305dfa2ace1aa91f690961779dc
patch_identitygit-patch-id-stable-v1:e9d8e7407bff780d454ab3587fd167f9891f87c7
committer_timestamp_ms1776017751000