Fixes a race where a transient database lock during callgraph readiness probing could leave a stale graph unrepaired after a restart. Previously, an inconclusive probe was treated as ready; now it defers publication, schedules revalidation, and keeps queries returning callgraph_building until the retry completes.
Discloses the deferred readiness reason (callgraph_readiness_deferred) in view health snapshots.
Adds a test that holds a real SQLite exclusive lock and verifies the graph is reused after unlock, replacing the old busy-readiness assertion.
Adds a test-timing-hooks entry-budget override so configure's bounded background replay can be verified to resume across maintenance passes, observing the completion queue rather than the first drain.
Confidence Score: 5/5
The PR appears safe to merge; no actionable issues were found.
Summary
Configure now retries call graph readiness checks that cannot finish instead of treating an unknown result as ready.
Configure rechecks callgraphs when their readiness is unknown.
Replay tests cover disk-only completions found in later scan passes.
No actionable new issues were found. Tests were not run during this review.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Configure checks call graph] --> B{Result}
B -->|Ready| C[Serve graph]
B -->|Outdated| D[Schedule publication]
B -->|Cannot check| E[Record pending reason]
E --> F[Queries return callgraph_building]
E --> D
D --> G{Publication checks graph}
G -->|Still blocked| H[Wait and retry]
H --> G
G -->|Healthy| I[Reuse graph]
G -->|Outdated| J[Rebuild graph]
I --> K[Install snapshot and clear pending reason]
J --> K
K --> C