|
4 | 4 | - Canonical money requires `pricing_status=priced` and trusted pricing evidence; ingress/final groupings are non-additive projections of one served-final fact and attempts make no cost claim. Trusted zero has a sample and a non-null zero; no trusted sample is null. |
5 | 5 | - Preserve row-scoped status and duration through `request_log_scope.go`; never coalesce upstream/gateway/legacy statuses. Preserve the separate stream completion and response-header duration evidence. Final-execution latency joins the finalized attempt by profile, ingress ID, and attempt number, with missing samples when request history has expired. |
6 | 6 | - `request_logs.go` and `request_logs_chain_cohort.go` own retained filters: same-key lists are OR, different keys are AND, `__null__` means unattributed, and caller `client_rule_id` remains separate from targets. Keep ingress, attempt-target, and finalized-target model filters distinct; reject retired ambiguous model keys and the `priced` alias at the HTTP boundary. |
7 | | -- `retention_source.go` is the shared cutoff/floor/epoch/purge owner for Observe, Requests, Audit, Events, and Settings. Never reconstruct floors from policy days or `MIN(created_at)`; reads fail closed while purge is running or recovery is required. |
| 7 | +- Retention reads through `retention_source.go` fail closed while purge is running or recovery is required. |
8 | 8 | - `RefreshActualCoverageProjection` and `RecordActualCoverageAppend` in `retention_source.go` own bounded refresh and the same-transaction append handoff. Preserve source/coverage revisions, hash, generation/fence, materialization cut, freshness, and gaps; consumers must not synthesize intervals or zero counts. |
9 | 9 | - `observe_query_context.go` owns opaque query-context signing. Fragments use resolved bounds instead of re-parsing presets; retention final publication revokes stale tokens with the dataset snapshot error. |
10 | 10 | - `request_logs_chain*.go` owns whole-ingress outer pages, bounded retained-row inner pages, and finalized summaries from usage events. Bind cursors to the complete normalized cohort/window, profile, order, page size, and retention generation; items, totals, and CSV apply the same cohort selectors and must select the same complete chains. The `created_at` outer page is ordered by the finalized event and merges retained-only chains; its totals and CSV stay keyed by retained rows, so a chain finalizing across the window's upper edge can differ. Metric ranking uses the same retained cohort for page, totals, availability counts and CSV; it never sums parent and attempt cost, and cost groups retain currency/epoch identity. Cursor versions bind the applicable ordering. |
11 | 11 | - `request_logs_export.go` requires one read-only repeatable-read snapshot for bounds, count, and spool. Finish typed rejection and spool verification before file bytes; the 31-day limit is export-specific and exact-ingress reads use the retained-history boundary. |
12 | 12 | - `cost_segments.go` and `classifier.go` must classify epochs and null/non-canonical currency identically in Go and SQL. Retained cost-segment/card-role/selection-state filters reuse canonical predicates; cost-segment selection alone does not change the ingress source. |
13 | 13 | - `observe_usage_summary_segments.go` derives selected-card-role cost breakdown in the same aggregate statement from trusted usage evidence. Attempt errors/series preserve replay filters and calculate Top-N/Other from the full denominator. |
14 | | -- Keep backend-derived pricing, usage, output-rate, and latency values authoritative. Preserve measured-sample counts and null gaps; frontend presentation must not recompute aggregate math or replace missing evidence with zero. |
| 14 | +- Preserve measured-sample counts and null gaps. |
15 | 15 | - Dashboard aggregate snapshots and recent activity remain separate read models. Activity uses finalized ingress events, not a reconstruction from attempt rows. |
0 commit comments