Views: idle reaper releases views; semantic and parent-folder view failures counted in health

Merged
AF
1d ago
+9677-837

Stacked on #1212 (views import + batch); after #1212 merges this shows only its own three commits.

Idle reaper releases views. When the daemon's idle reaper evicts a project's artifacts, it now also drops the project's lexical and call-graph views. Before, a reaped project kept its views open, so it kept protecting their stored members and retention could never reclaim that space.

View failures counted in health (Ufuk's ruling: with views on, every view failure shows in AFT's health report, not only in a reply). Checkout text and call-graph loads were already counted; three paths were not:

  • A built semantic view whose index can't be served, or whose search fails, now records a semantic view load failure (counted, last error kept, project degraded, error log throttled) alongside the reply's existing gap. Reply text is unchanged.
  • The semantic worker no longer discards index build failures at load and after each fill; it logs them, and the next query counts them.
  • A parent folder's worker records child view open/read failures (lexical, call graph, semantic, inspect) under the parent root, and the parent root's health reports them as parent_<plane>:<cause>.

Contention (a busy or locked store, a checkout changed mid-read) clears by itself and is never counted. Unpublished views are normal coverage and aren't counted either.

Tests. A semantic view that can't serve reaches health with its full error and marks the project degraded; parent child failures reach the parent root's health while a locked store doesn't count. On the build server: 232 view, health, parent, semantic-runtime and eviction lib tests, formatting, and the Windows check passed.

Views are off by default, so no user-visible change today.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

The land/views-default-prep landing unit bundles approved views-on changes (views import, Python cross-file callers, cold call-graph index with bounded workspace walks, runon reattach, pinned task image, inspect freshness, Plexus wait and pre-read, token skip, lease heartbeat cadence, bash admission and subc startup diagnostics, and test-only flake fixes), plus two views-on adjustments.

Idle reaper releases views — When the daemon's idle reaper evicts a project's artifacts, it now also drops the project's lexical and call-graph views. Previously a reaped project kept its views open, so their stored members stayed protected and retention could not reclaim that space.

View failures counted in health — With views on, every view failure now shows in AFT's health report, not only in a reply:

  • A built semantic view whose index can't be served or whose search fails now records a semantic load failure (counted, last error kept, project degraded, log throttled); reply text is unchanged.
  • The semantic worker logs index build failures at load and after fills; the next query counts them.
  • A parent folder's worker records child view open/read failures under the parent root as parent_<plane>:<cause>.
  • Contention (busy or locked store, mid-read checkout change) clears by itself and is never counted; unpublished views are normal coverage and aren't counted either.

Views are off by default, so no user-visible behavior change today.