{"results":[{"id":"ledger-interpretation-is-consistently-safe","text":"The financial ledger's dual interpretation (full balance from complete scan, spending limits from outflows only) provides both audit completeness and focused business metrics from a single data source — unless the non-atomic balance check allows concurrent mutations between balance reads and spending limit enforcement, enabling over-spending that neither interpretation would detect in isolation.","truth_value":"IN","justification_count":1,"dependent_count":0,"challenges":[],"last_reviewed":null,"review_result":null,"source_type":""},{"id":"metrics-alert-state-machine-four-states","text":"Alert evaluation follows a four-state machine (OK → PENDING → ALERTING → RESOLVED) where PENDING requires `duration_seconds` to elapse before transitioning to ALERTING; PENDING resets to OK (not RESOLVED) if the condition clears early","truth_value":"IN","justification_count":0,"dependent_count":1,"challenges":[],"last_reviewed":null,"review_result":null,"source_type":""},{"id":"metrics-condition-uses-window-average","text":"Threshold alert conditions (`gt`, `lt`, `gte`, `lte`) compare against the average of all points in the lookback window (sized `max(duration_seconds, 60)`), not the most recent value","truth_value":"IN","justification_count":0,"dependent_count":0,"challenges":[],"last_reviewed":null,"review_result":null,"source_type":""},{"id":"metrics-downsample-two-tier","text":"Downsampling uses two age-based tiers: 1–7 days old → 5-minute buckets, >7 days old → 1-hour buckets, both using averaging which loses min/max/percentile fidelity","truth_value":"IN","justification_count":0,"dependent_count":1,"challenges":[],"last_reviewed":null,"review_result":null,"source_type":""},{"id":"metrics-indexing-separates-write-key-from-read-matching","text":"Metrics separates write-path identity (frozen tag sets as immutable hash-safe keys) from read-path flexibility (subset matching enables partial-tag queries without key enumeration).","truth_value":"IN","justification_count":1,"dependent_count":2,"challenges":[],"last_reviewed":"2026-06-06T06:26:57","review_result":"pass","source_type":""},{"id":"metrics-instantiates-write-read-cost-pattern","text":"Metrics is a concrete instantiation of the codebase's per-use-case write-read cost allocation: frozen tag sets and sorted insertion keep the write path structurally simple (O(log n) per point), while subset matching and multi-tier downsampling absorb read-path flexibility and cost — the module explicitly allocates complexity to reads for query expressiveness.","truth_value":"IN","justification_count":1,"dependent_count":1,"challenges":[],"last_reviewed":"2026-06-06T06:26:57","review_result":"pass","source_type":""},{"id":"metrics-is-complete-write-read-exemplar","text":"Metrics combines both structural write-read separation (frozen tags for write identity, subset matching for read flexibility) and per-use-case cost optimization (eager sorted insertion on writes, deferred matching on reads) within a single module — suggesting that structural and economic separation can be two facets of the same design.","truth_value":"IN","justification_count":1,"dependent_count":0,"challenges":[],"last_reviewed":"2026-06-06T06:26:57","review_result":"invalid","source_type":""},{"id":"metrics-series-keyed-by-frozen-tags","text":"Series are stored keyed by `(metric_name, frozenset(tags.items()))`, so each unique tag combination creates a distinct time series — the standard cardinality model","truth_value":"IN","justification_count":0,"dependent_count":1,"challenges":[],"last_reviewed":null,"review_result":null,"source_type":""},{"id":"metrics-series-sorted-invariant","text":"Every time series in `_data` is maintained in sorted timestamp order; `ingest` (bisect insertion), `downsample` (re-sort), and `apply_retention` (bisect truncation) all preserve this invariant","truth_value":"IN","justification_count":0,"dependent_count":1,"challenges":[],"last_reviewed":null,"review_result":null,"source_type":""},{"id":"metrics-sorted-invariant-survives-downsampling","text":"Metrics maintains its sorted timestamp invariant through both ingestion (bisect insertion for O(log n) per-point insert) and two-tier downsampling (re-sort after age-based aggregation), ensuring temporal queries are correct across all retention tiers.","truth_value":"IN","justification_count":1,"dependent_count":2,"challenges":[],"last_reviewed":"2026-06-06T06:26:57","review_result":"pass","source_type":""},{"id":"metrics-tag-matching-is-subset","text":"`_matching_keys` performs subset matching: a query with `tags_filter={\"a\": 1}` matches any series whose tags include `a=1`, regardless of additional tags present","truth_value":"IN","justification_count":0,"dependent_count":1,"challenges":[],"last_reviewed":null,"review_result":null,"source_type":""},{"id":"metrics-write-read-separation-is-structurally-complete","text":"Metrics achieves complete write-read structural separation: the write path uses frozen tag sets as immutable hash-safe keys with bisect insertion maintaining sorted temporal order, while the read path provides flexible subset matching for partial-tag queries and two-tier downsampling for bounded historical access — neither path compromises the other's invariants.","truth_value":"IN","justification_count":1,"dependent_count":1,"challenges":[],"last_reviewed":"2026-06-06T06:26:57","review_result":"pass","source_type":""},{"id":"news-feed-fan-out-write-pushes-ids","text":"Fan-out-on-write pushes post IDs (not full post objects) into followers' deques at write time, deferring hydration to read time so engagement metrics are always current","truth_value":"IN","justification_count":0,"dependent_count":1,"challenges":[],"last_reviewed":null,"review_result":null,"source_type":""},{"id":"one-directional-state-machines-span-domains","text":"One-directional state machines appear across unrelated domains: stream processing windows (OPEN→CLOSED→FINALIZED) use irreversible state progression to control event acceptance at each stage, and metrics alerting (OK→PENDING→ALERTING→RESOLVED) uses ordered states to gate alert firing through a duration threshold. Both employ forward-progressing state to reduce complexity, though the alerting machine allows a partial regression (PENDING→OK) when conditions clear early, making it not strictly one-directional.","truth_value":"IN","justification_count":1,"dependent_count":1,"challenges":[],"last_reviewed":"2026-06-06T06:26:57","review_result":"pass","source_type":""}],"count":14,"limit":20,"offset":0}