Views: republish only the call-graph rows whose inputs changed

Merged
AF
8d ago
+1995-286

View republication used to decode every file's call-graph blob and re-resolve the whole checkout, so a one-file edit took about 125 s on the AFT repository. Dispatch now decodes only changed blobs and re-resolves only files whose recorded inputs changed, using per-file facts and dependency keys in new derived tables. Rust type targets are replayed from per-file traces.

  • One-file republication: 125 s down to 5.3-7.0 s on the build server. The remaining time is the existing surface replay through the Rust module domain.
  • The new tables add about 11.7% to the derived call-graph database.
  • Verification: a differential test compares incremental republication with a cold build over random and scripted walks that cover every method-call edit kind, with full dispatch forced off. Four mutation controls go red.
  • The views_work counters gain dispatch fields for the measurement harness.

Summary by cubic

Makes call-graph republication incremental so a one-file edit no longer re-resolves the whole checkout, and fixes a Go binding staleness the new tests uncovered.

  • One-file republication on the AFT repository drops from about 125 s to 5.3–7.0 s on the build server; the remaining time is the existing surface replay through the Rust module domain.
  • The new tables add about 11.7% to the derived call-graph database.
  • A differential test compares incremental republication with a cold build over random and scripted walks covering every method-call edit kind, with full dispatch forced off; four mutation controls go red. The walks now also cover Go, Java, and C#, and the Go walk exposed a staleness bug: package-directory listings were read without being recorded, so adding or removing a sibling .go file left unchanged callers with stale bindings.
  • The views_work counters gain dispatch fields for the measurement harness, and a search-quality harness descriptor marks the change non_ranking.

Migration

  • Views databases whose Go bindings predate recorded package listings rebuild cold once; the materialization version bump forces it.

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; no new blocking issue was found.

Summary

Makes call-graph refreshes reuse unchanged files instead of resolving the whole checkout.

  • Small edits refresh only the method-call rows that depend on them.

No new actionable issues were found. Tests were inspected but not run.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Manifest changes] --> B[Join changed files and replay saved lookups]
    B --> C[Update per-file resolver facts]
    C --> D[Find callers whose recorded inputs changed]
    D --> E[Resolve selected method calls]
    E --> F[Write changed rows and save dependencies]

Reviews (2) · Last reviewed commit: "mason: rebuild view generations whose Go..." · Reviewed by Greptile