From §12 of docs/superpowers/specs/2026-09-21-backtest-bar-cache-design.md (#506).
Companion to #502 — same trip to prod, different data source (the run history DB, not the
Render deploy log).
Both #501 and #506 shorten the dark window before the first bar: schema-init skipping, and
now an on-disk bar cache that removes loading_bars (~86% of that window, measured locally)
on a warm key. Neither touches the decision loop.
So the ceiling on every further change of this kind is the mix of what prod actually runs.
Read it, once, rather than guessing:
SELECT runtime_type, decision_source, COUNT(*), AVG(...)
FROM agent_runs
WHERE created_at > now() - interval '30 days'
GROUP BY 1, 2;
against AGENT_RUNS_DATABASE_URL (the ATL-runs-main Neon project — run history has its own
database, see CLAUDE.md).
Why it decides something: if most runs are decision_source='llm', wall-clock is
dominated by model latency the cache cannot touch, and further start-up work has a small
ceiling — spend the effort on the LLM lane instead. If most are rule-based, the start-up
window is a real share of total runtime and the next cache (aggregated output, the
loading_bars residual that #506 split out as fetch_seconds vs aggregate+verify) is worth
building.
Entry point: §1-C of the speed-and-trust design. Record the numbers on this issue; that
is the deliverable.
From §12 of
docs/superpowers/specs/2026-09-21-backtest-bar-cache-design.md(#506).Companion to #502 — same trip to prod, different data source (the run history DB, not the
Render deploy log).
Both #501 and #506 shorten the dark window before the first bar: schema-init skipping, and
now an on-disk bar cache that removes
loading_bars(~86% of that window, measured locally)on a warm key. Neither touches the decision loop.
So the ceiling on every further change of this kind is the mix of what prod actually runs.
Read it, once, rather than guessing:
against
AGENT_RUNS_DATABASE_URL(theATL-runs-mainNeon project — run history has its owndatabase, see CLAUDE.md).
Why it decides something: if most runs are
decision_source='llm', wall-clock isdominated by model latency the cache cannot touch, and further start-up work has a small
ceiling — spend the effort on the LLM lane instead. If most are rule-based, the start-up
window is a real share of total runtime and the next cache (aggregated output, the
loading_barsresidual that #506 split out asfetch_secondsvs aggregate+verify) is worthbuilding.
Entry point: §1-C of the speed-and-trust design. Record the numbers on this issue; that
is the deliverable.