{"results":[{"id":"callers-trusted-at-internal-boundaries","text":"Multiple systems omit input validation entirely at internal module boundaries — the stock exchange accepts any order fields without checking quantity or price, and proximity search accepts any coordinates without range validation — reflecting a convention of trusting callers within the module perimeter rather than validating defensively.","truth_value":"OUT","justification_count":1,"dependent_count":2,"challenges":[],"last_reviewed":"2026-06-05T18:21:49","review_result":"pass","source_type":""},{"id":"default-to-permissive-across-security-dimensions","text":"The codebase defaults to permissive behavior across independent security dimensions — authorization (S3 default-allow, GDrive owner bypass) and input validation (stock exchange accepts any order fields, proximity accepts any coordinates) — prioritizing availability and simplicity over defense-in-depth.","truth_value":"OUT","justification_count":1,"dependent_count":2,"challenges":[],"last_reviewed":"2026-06-05T18:21:49","review_result":"pass","source_type":""},{"id":"dmq-reused-by-stock-exchange","text":"The message queue is imported by `stock-exchange/test_exchange.py` as an event bus for order matching, demonstrating cross-module reuse across SDI implementations.","truth_value":"OUT","justification_count":0,"dependent_count":4,"challenges":[],"last_reviewed":null,"review_result":null,"source_type":""},{"id":"id-generators-preserve-monotonic-order","text":"Stateful ID generators maintain monotonic ordering within their time granularity through distinct sub-millisecond strategies: Snowflake uses a bounded sequence counter (4096/ms), ULID increments the random component, and the stock exchange uses a global counter — all thread-safe via locks to prevent ID collision under concurrency.","truth_value":"IN","justification_count":1,"dependent_count":1,"challenges":[],"last_reviewed":"2026-06-05T18:21:49","review_result":"pass","source_type":""},{"id":"modules-are-independently-runnable","text":"Each SDI module is independently runnable with only stdlib dependencies, in-process simulation, and no shared code — unless the stock exchange's cross-module import of the message queue is considered, which introduces a runtime dependency that breaks strict module independence.","truth_value":"IN","justification_count":1,"dependent_count":0,"challenges":[],"last_reviewed":"2026-06-06T06:26:57","review_result":"pass","source_type":""},{"id":"stock-exchange-aggressive-then-rest","text":"`place_order` first attempts to match the incoming order against the opposite side (`_match_order`), then adds any unfilled remainder to the book — the standard aggressor/resting model.","truth_value":"IN","justification_count":0,"dependent_count":1,"challenges":[],"last_reviewed":null,"review_result":null,"source_type":""},{"id":"stock-exchange-fifo-matching","text":"Orders at the same price level are matched in FIFO order, enforced by `deque` append/popleft semantics — this is the price-time priority algorithm.","truth_value":"IN","justification_count":0,"dependent_count":1,"challenges":[],"last_reviewed":null,"review_result":null,"source_type":""},{"id":"stock-exchange-market-orders-never-rest","text":"Market orders that can't be fully filled have their remainder cancelled; they are never added to the order book.","truth_value":"IN","justification_count":0,"dependent_count":0,"challenges":[],"last_reviewed":null,"review_result":null,"source_type":""},{"id":"stock-exchange-matching-produces-valid-trades","text":"The stock exchange correctly implements price-time priority matching (best price first, FIFO within price, execute at resting price), producing valid trades — but only when callers provide valid order fields, since the engine performs no input validation.","truth_value":"IN","justification_count":1,"dependent_count":1,"challenges":[],"last_reviewed":"2026-06-06T06:26:57","review_result":"pass","source_type":""},{"id":"stock-exchange-no-input-validation","text":"The matching engine performs no validation on order fields (quantity, price, side); callers are trusted to provide valid inputs.","truth_value":"OUT","justification_count":0,"dependent_count":2,"challenges":[],"last_reviewed":null,"review_result":null,"source_type":""},{"id":"stock-exchange-price-sort-is-full-resort","text":"`_add_to_book` re-sorts the entire price list on every insertion (O(n log n)) rather than using `bisect.insort` — acceptable for interview scope but not production-grade.","truth_value":"IN","justification_count":0,"dependent_count":1,"challenges":[],"last_reviewed":null,"review_result":null,"source_type":""},{"id":"stock-exchange-price-time-priority","text":"The stock exchange implements standard price-time priority matching: incoming orders match aggressively against the best resting price, FIFO within each price level via deque ordering, with trades always executing at the resting order's price.","truth_value":"IN","justification_count":1,"dependent_count":1,"challenges":[],"last_reviewed":"2026-06-06T06:26:57","review_result":"pass","source_type":""},{"id":"stock-exchange-resting-price-execution","text":"Trades always execute at the resting (maker) order's price, not the incoming (taker) order's price — standard exchange behavior.","truth_value":"IN","justification_count":0,"dependent_count":1,"challenges":[],"last_reviewed":null,"review_result":null,"source_type":""},{"id":"stock-exchange-trade-counter-global","text":"`Trade._counter` is a class-level counter that monotonically increases across all symbols and never resets, making trade IDs globally sequential but test-order-dependent.","truth_value":"IN","justification_count":0,"dependent_count":1,"challenges":[],"last_reviewed":null,"review_result":null,"source_type":""},{"id":"stock-exchange-validates-complex-write-correctness","text":"The stock exchange demonstrates that write-path structural correctness scales to complex multi-step mutations: price-time priority matching is a composite write operation (match against book, fill partial orders, cancel or rest the remainder) where structural discipline (FIFO deques, sorted price levels) ensures each step is valid — write correctness handles compositional complexity, not just single-step simplicity.","truth_value":"IN","justification_count":1,"dependent_count":1,"challenges":[],"last_reviewed":"2026-06-06T06:26:57","review_result":"pass","source_type":""},{"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","justification_count":1,"dependent_count":1,"challenges":[],"last_reviewed":"2026-06-06T06:26:57","review_result":"invalid","source_type":""},{"id":"write-path-validity-spans-the-full-complexity-spectrum","text":"The write path supports valid forward progress across a range of complexity: structural correctness scales from simple fan-out routing (social domains) to complex multi-step matching (stock exchange) without adding distributed coordination, and forward-only design — the architecture's most load-bearing constraint — acts as a primary correctness mechanism that contains temporal gaps and prevents regression. Together these properties provide strong architectural support for writes producing irreversible state advancement, though the absolute guarantee of no invalid or reversible state is an architectural intent rather than a formally proven invariant.","truth_value":"IN","justification_count":1,"dependent_count":0,"challenges":[],"last_reviewed":"2026-06-06T06:26:57","review_result":"invalid","source_type":""}],"count":17,"limit":20,"offset":0}