Discovered during Wave 3g (#199).
`temporal.db` is never populated by the CLI. `TemporalDb::sync` / `store_*` are defined but only ever called from tests; `heatmap` only prints metrics and never persists. As a result the search `--hot` / `--cold` / `--risky` / `--blast-radius` flags read a database that nothing writes — they have silently no-op'd on real repositories since #257.
Goal: build the missing temporal writer and join it to the unified auto-refresh authority shipped in #199.
Plan:
- Implement `rebuild_temporal(root, cache_dir, head)`: `parse_history` → `compute_file_risk_scores` + `compute_file_temporal_stats` + co-change matrix → `TemporalDb::sync(.., head)`.
- Call it from the clearly-marked, ticket-referenced hook point left in `ensure_indexes_fresh` (`crates/rskim/src/cmd/search/staleness.rs`), after the lexical+AST rebuild, under the same `.skim-build.lock`, reusing the already-read HEAD (one call, no rework).
- Include an incremental walk (`parse_history` `lookback_days`) so refreshes stay cheap.
Outcome: temporal search works for the first time; all three indexes (lexical, AST, temporal) refresh through one freshness authority.
Relates to #199 (Wave 3g), #257 (temporal CLI flags), #202 (full compound CLI).
Discovered during Wave 3g (#199).
`temporal.db` is never populated by the CLI. `TemporalDb::sync` / `store_*` are defined but only ever called from tests; `heatmap` only prints metrics and never persists. As a result the search `--hot` / `--cold` / `--risky` / `--blast-radius` flags read a database that nothing writes — they have silently no-op'd on real repositories since #257.
Goal: build the missing temporal writer and join it to the unified auto-refresh authority shipped in #199.
Plan:
Outcome: temporal search works for the first time; all three indexes (lexical, AST, temporal) refresh through one freshness authority.
Relates to #199 (Wave 3g), #257 (temporal CLI flags), #202 (full compound CLI).