{"id":"write-correctness-scales-from-routing-to-matching","text":"Write-path structural correctness spans a range of mutation complexity without requiring distributed coordination: social domains achieve complete, coordination-free routing through graph symmetry and deterministic identity derivation, while the stock exchange achieves correct price-time priority matching with partial fills through structural discipline (FIFO deques, sorted price levels) — both rely on local structural properties rather than distributed coordination, differing primarily in the compositional complexity of their write operations.","truth_value":"IN","source":"","source_url":"","source_hash":"","justifications":[{"type":"SL","antecedents":["social-writes-are-complete-and-coordination-free","stock-exchange-validates-complex-write-correctness"],"outlist":[],"label":"two unused depth-4 beliefs at opposite ends of write complexity; combining shows structural correctness handles complexity scaling without coordination overhead"}],"dependents":["write-path-validity-spans-the-full-complexity-spectrum"],"metadata":{"last_reviewed":"2026-06-06T06:26:57","review_result":"invalid"},"created_at":"","updated_at":"","reviewed_at":"","verified_at":"","retracted_at":"","explanation":{"steps":[{"node":"write-correctness-scales-from-routing-to-matching","truth_value":"IN","reason":"SL justification valid","antecedents":["social-writes-are-complete-and-coordination-free","stock-exchange-validates-complex-write-correctness"],"label":"two unused depth-4 beliefs at opposite ends of write complexity; combining shows structural correctness handles complexity scaling without coordination overhead"},{"node":"social-writes-are-complete-and-coordination-free","truth_value":"IN","reason":"SL justification valid","antecedents":["symmetric-graphs-enable-complete-lightweight-routing","write-path-eliminates-coordination-across-identity-and-routing"],"label":"Symmetry provides routing completeness, identity derivation provides coordination freedom — together they fully streamline social writes"},{"node":"symmetric-graphs-enable-complete-lightweight-routing","truth_value":"IN","reason":"SL justification valid","antecedents":["social-systems-combine-symmetric-graphs-and-lightweight-fanout","write-time-decisions-are-lightweight-but-binding"],"label":"Social symmetry (d2) guarantees routing completeness; lightweight-but-binding writes (d2) guarantee routing finality — together they mean no read-time correction is needed"},{"node":"social-systems-combine-symmetric-graphs-and-lightweight-fanout","truth_value":"IN","reason":"SL justification valid","antecedents":["symmetric-social-graphs-simplify-visibility","fan-out-write-pushes-references-not-data"],"label":"Symmetric graphs eliminate one-way edge complexity; reference-based fan-out avoids data duplication — together they simplify both the model and the delivery"},{"node":"symmetric-social-graphs-simplify-visibility","truth_value":"IN","reason":"SL justification valid","antecedents":["chat-contacts-always-bidirectional","nearby-friends-friendship-always-symmetric"],"label":"Symmetric graphs eliminate directional visibility checks but prevent asymmetric social models"},{"node":"chat-contacts-always-bidirectional","truth_value":"IN","reason":"premise"},{"node":"nearby-friends-friendship-always-symmetric","truth_value":"IN","reason":"premise"},{"node":"fan-out-write-pushes-references-not-data","truth_value":"IN","reason":"SL justification valid","antecedents":["chat-fanout-on-write","news-feed-fan-out-write-pushes-ids"],"label":"Reference-based fanout limits write amplification to pointer-sized payloads"},{"node":"chat-fanout-on-write","truth_value":"IN","reason":"premise"},{"node":"news-feed-fan-out-write-pushes-ids","truth_value":"IN","reason":"premise"},{"node":"write-time-decisions-are-lightweight-but-binding","truth_value":"IN","reason":"SL justification valid","antecedents":["fan-out-write-pushes-references-not-data","write-time-routing-is-irrevocable"],"label":"Fan-out pushes references (lightweight) and routing decisions are permanent (binding) — the write path optimizes for speed at the cost of flexibility"},{"node":"write-time-routing-is-irrevocable","truth_value":"IN","reason":"SL justification valid","antecedents":["news-feed-celebrity-threshold-at-write-time","chat-fanout-on-write"],"label":"news feed selects fan-out-on-write vs fan-out-on-read based on follower count at publish time; chat routes to inbox or offline queue based on presence at send time — both decisions are baked in at write time and not revisited"},{"node":"news-feed-celebrity-threshold-at-write-time","truth_value":"IN","reason":"premise"},{"node":"write-path-eliminates-coordination-across-identity-and-routing","truth_value":"IN","reason":"SL justification valid","antecedents":["identity-derivation-trades-validation-for-simplicity","write-time-decisions-are-lightweight-but-binding"],"label":"Two independent coordination-elimination strategies (identity derivation, reference routing) jointly make writes coordination-free"},{"node":"identity-derivation-trades-validation-for-simplicity","truth_value":"IN","reason":"SL justification valid","antecedents":["deterministic-ids-eliminate-coordination","idempotency-keys-ignore-payload-content"],"label":"Deterministic IDs and payload-ignoring idempotency keys both trade validation for simplicity — same tradeoff, different domains"},{"node":"deterministic-ids-eliminate-coordination","truth_value":"IN","reason":"SL justification valid","antecedents":["chat-dm-conversation-dedup","email-service-thread-id-is-first-msg"],"label":"deriving IDs from content eliminates the need for a coordination service or sequence generator"},{"node":"chat-dm-conversation-dedup","truth_value":"IN","reason":"premise"},{"node":"email-service-thread-id-is-first-msg","truth_value":"IN","reason":"premise"},{"node":"idempotency-keys-ignore-payload-content","truth_value":"IN","reason":"SL justification valid","antecedents":["hotel-idempotency-ignores-params","payment-idempotency-is-key-based","ad-click-dedup-global-not-per-ad"],"label":"hotel returns cached reservation ignoring guest/dates/room, payment maps key→payment ID without param check, ad-click dedup keys on event_id alone — all three trade payload-awareness for implementation simplicity"},{"node":"hotel-idempotency-ignores-params","truth_value":"IN","reason":"premise"},{"node":"payment-idempotency-is-key-based","truth_value":"IN","reason":"premise"},{"node":"ad-click-dedup-global-not-per-ad","truth_value":"IN","reason":"premise"},{"node":"stock-exchange-validates-complex-write-correctness","truth_value":"IN","reason":"SL justification valid","antecedents":["stock-exchange-matching-produces-valid-trades","write-path-is-self-consistent-by-design"],"label":"Stock exchange proves write-path structural correctness scales to composite multi-step operations"},{"node":"stock-exchange-matching-produces-valid-trades","truth_value":"IN","reason":"SL justification valid","antecedents":["stock-exchange-price-time-priority"],"label":"price-time priority is correctly implemented but assumes valid quantity, price, and side; a negative quantity or missing price would propagate through matching and produce nonsensical trades","outlist":["stock-exchange-no-input-validation"]},{"node":"stock-exchange-price-time-priority","truth_value":"IN","reason":"SL justification valid","antecedents":["stock-exchange-aggressive-then-rest","stock-exchange-fifo-matching","stock-exchange-resting-price-execution"],"label":"Three beliefs compose into the canonical exchange matching semantic — aggressive-first + price-level FIFO + maker-price execution"},{"node":"stock-exchange-aggressive-then-rest","truth_value":"IN","reason":"premise"},{"node":"stock-exchange-fifo-matching","truth_value":"IN","reason":"premise"},{"node":"stock-exchange-resting-price-execution","truth_value":"IN","reason":"premise"},{"node":"write-path-is-self-consistent-by-design","truth_value":"IN","reason":"SL justification valid","antecedents":["structural-discipline-prevents-consistency-bugs","write-time-decisions-are-lightweight-but-binding"],"label":"Data-level structural invariants and control-level routing simplicity jointly eliminate write-path consistency bugs"},{"node":"structural-discipline-prevents-consistency-bugs","truth_value":"IN","reason":"SL justification valid","antecedents":["immutable-values-prevent-aliasing-bugs","multi-structure-sync-invariant"],"label":"immutability (KV vector clocks, leaderboard reinsert) prevents mutation aliasing; multi-structure sync (consistent hashing, leaderboard) prevents index divergence — leaderboard uses BOTH, showing these disciplines are complementary"},{"node":"immutable-values-prevent-aliasing-bugs","truth_value":"IN","reason":"SL justification valid","antecedents":["kv-vector-clock-immutable","leaderboard-update-by-remove-reinsert"],"label":"Immutable-value semantics eliminate shared-reference aliasing at the cost of allocation overhead"},{"node":"kv-vector-clock-immutable","truth_value":"IN","reason":"premise"},{"node":"leaderboard-update-by-remove-reinsert","truth_value":"IN","reason":"premise"},{"node":"multi-structure-sync-invariant","truth_value":"IN","reason":"SL justification valid","antecedents":["ch-triple-bookkeeping","leaderboard-dual-index-consistency"],"label":"Multi-structure sync is a recurring correctness burden where the failure mode is silent divergence"},{"node":"ch-triple-bookkeeping","truth_value":"IN","reason":"premise"},{"node":"leaderboard-dual-index-consistency","truth_value":"IN","reason":"premise"}]}}