docs(0286): re-price the coarse history after the 1m drain - #353
Merged
Merged
Conversation
Enrichment prices only price_ohlcv_1m and the coarse sweep looks back two months, so after phase 3 every coarse row older than that kept close_usd = 0. Add step 7b-2: a full-range plain coarse-repair over all six coarse tables once the 1m drain is finished, with a dry run first and a per-tier after-check that splits the remaining zeros by cause.
karczuRF
added a commit
that referenced
this pull request
Sep 25, 2026
Runbook §7b-2 (PR #353) re-prices all six coarse tiers after the 1m drain. 0286 gains the per-tier criterion; 0148 is archived as completed.
Steps 3 and 5 and the drill-down ran as the CH host's default user over ssh and docker exec, with full write access on a host shared with BE. They now run from fishuser-hero through a chadmin curl helper as prices_admin. The FREEZE rationale is replaced: the tool's snapshot lands in shadow/, which no mTLS identity can restore from, so --skip-snapshot stays and the sole-copy exception uses a backup table instead.
The frontier gauge reads 0 while re-ingested months are still marked exhausted, so gate the start on every 1m month being confirmed after the last re-ingest too, with the frontier rewind to skip the 7-day wait. The enriched-0 STOP now skips 1w/1M months the daily MVs already re-rolled from a priced 1d, and re-runs. The cutoff is fixed in step 1 so a run crossing a month boundary still checks the same range. The un-re-ingested backup moves after chadmin is defined and fails loudly. The rollback states per table what it rebuilds.
karczuRF
added a commit
that referenced
this pull request
Sep 25, 2026
The drain-finished criterion now needs the frontier-table check as well as the gauge, matching runbook §7b-2 as merged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds step 7b-2 to
docs/runbooks/0286-reingest-history.md. It re-prices the coarse history after the phase-3 re-ingest.Why
After phase 3, every re-ingested row has
close_usd = 0. The enrichment worker re-pricesprice_ohlcv_1monly. The coarse sweep covers only the last two months. That means every 15m/1h/4h/1d/1w/1M row older than two months would stay at zero for good.How
The step runs the existing
coarse-repairtool in its normal fill-the-zeros mode, with no reset flags, over the whole history on all six coarse tables. The runbook orders it like this:reachable_leftmust be ~0, and every other column is an explained residue.It also updates acceptance item 5 in §8 to cover the coarse tiers.
Docs only. No code changes.