Skip to content

chore(lore-0167): activate; link the originating I-usd-rate-table note both ways - #190

Merged
karczuRF merged 1 commit into
developfrom
feat/0167_usd-rate-table-lineage
Aug 10, 2026
Merged

chore(lore-0167): activate; link the originating I-usd-rate-table note both ways#190
karczuRF merged 1 commit into
developfrom
feat/0167_usd-rate-table-lineage

Conversation

@karczuRF

Copy link
Copy Markdown
Collaborator

Activates 0167 (prices.usd_rate + peg-rate population) and repairs the lineage to the note the idea came from.

Why this jumps the queue

0167 is the only open task whose input data expires.

oracle_prices is pruned by monthly partition drop at INTERVAL 13 MONTH (cleanup-worker/src/lib.rs:24), and coverage starts ~2025-09 — so 202509 ages out around 2026-10/11. Every month this waits, a month of depeg-aware history is lost permanently and cannot be reconstructed.

Everything else on the board (0170, 0171, 0172, 0142) is static — those defects will be exactly as fixable next month.

And it can't be shortcut at the view layer: joining oracle_prices directly would make the published series mutate, with a bucket reading 0.9993 silently reverting to 1.0000 as rows age out. That's why views.sql:47 forbids the join. The rate must be snapshotted into a forever-retained table.

Downstream is ready

0165 shipped to prod today and is publishing 891 daily USDC buckets at a hardcoded $1 with method = 'peg'. Its three forward-compat requirements all landed — fallback semantics in the test rather than the literal 1, the method provenance column, the header naming 0168 by ID — so 0168 is a one-expression change against this table rather than a rewrite.

Worth restating the actual argument for it: not hypothetical depegs, but that two of our own surfaces already disagree. The oracle enrichment tier prices a TF/USDC candle at close × 0.9993 while price_usd_series publishes USDC = 1.0000 for the same bucket.

The lineage fix

The reasoning record lives in I-usd-rate-table.md under archived task 0144. It had spawns: [], and 0167 never cited it — so the note, including why the schema-wide refactor was rejected, was reachable only by knowing it existed in an archived task's notes directory. That is how a settled decision gets accidentally relitigated.

Now linked both ways: spawns: ["0167", "0168"] on the note, and the note in 0167's links.

Scope guard restated

The schema-wide refactor stays rejected per 0151. close_usd untouched, nothing published becomes NULL, and the key is natural identity, not quote_asset_id — 0139 is confirmed genuine collisions, measured today at 3,281 asset_ids across 6,568 identities, which a quote_asset_id-keyed table would have inherited wholesale.

…e both ways

Pulled ahead of the queue on one argument: 0167 is the only open task whose
INPUT DATA EXPIRES. oracle_prices is pruned by monthly partition drop at
INTERVAL 13 MONTH (cleanup-worker/src/lib.rs:24) and coverage starts ~2025-09,
so 202509 ages out ~2026-10/11. Every month it waits, a month of depeg-aware
history is lost permanently. Everything else on the board - 0170, 0171, 0172,
0142 - is static and just as fixable next month.

Downstream is ready: 0165 shipped to prod today and is publishing 891 daily USDC
buckets at a hardcoded $1 with method='peg'. Its three forward-compat
requirements landed, so 0168 is a one-expression change against this table.

Lineage fixed in both directions. The reasoning record lives in the
I-usd-rate-table note under ARCHIVED task 0144, which had spawns: [] while 0167
never cited it - so the note, including why the schema-wide refactor was
REJECTED, was reachable only by knowing it existed in an archived task's notes
directory. That is how a settled decision gets accidentally relitigated.

Scope guard restated on the task: the schema-wide refactor stays rejected per
0151. close_usd untouched, nothing published becomes NULL, key is natural
identity not quote_asset_id - 0139 is confirmed genuine collisions, measured
today at 3,281 asset_ids across 6,568 identities, which a quote_asset_id-keyed
table would have inherited.
@karczuRF
karczuRF merged commit 0fa5916 into develop Aug 10, 2026
3 checks passed
@karczuRF
karczuRF deleted the feat/0167_usd-rate-table-lineage branch August 10, 2026 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant