Skip to content

Temporal populate path + join unified auto-refresh (latent #257 gap) #289

Description

@dean0x

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).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    searchCode search featuretech-debtTechnical debt backlog itemwave-4Wave 4: Compound queries

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions