mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-05 07:48:45 +00:00
A table made by the one-start stretch (STRATA_DRAFT_COSTS_LEARN=1) had no real-size marks, so the next start held it back for 100 requests (live costs decided meanwhile) and rewrote the file at every request, which also drops a read-only mode. The stretch measured every size of its table, so mark_learned_real() marks all of them real (cost rounded to the 3 decimals the file keeps, so the learning start and the next start run the same numbers) before the file is written. The next start then logs "this machine's table is used", applies the stored CPU prompt share and PCIe share at once, and never rewrites the file. The call sits inside the learning stretch's "ready" block only; the passive path (no STRATA_DRAFT_COSTS_LEARN) does not reach it. Unit tests: the marks and costs survive the file, a marked table is neither held nor calibrated and asks for no rewrite, an unmarked table is still held.