Skip to content

v1.108.170 - the file and symbol tools can see a rebuild too

Choose a tag to compare

@jgravelle jgravelle released this 25 Jul 12:59

The file and symbol tools can see a rebuild too.

Third and last instance of the class fixed this week. v1.108.168 added the 5th absence-refusal rule to build_verdict; v1.108.169 wired the last search tool into it. But the file and symbol tools never call build_verdict.

get_file_content, get_file_outline, and get_symbol_source route through symbol_verdict_for_index / file_verdict_for_index, which accept a live index and then delegate to build_symbol_verdict / build_file_verdict -- neither of which had an index_changed parameter at all. Both reach state: "absent", and the absence chokepoint is generic (it fires on any _meta.verdict dict), so both were minting citable absent:<sha> refs with the rebuilding rule structurally unable to fire.

A rebuild deletes and reinserts rows, so a genuinely-present file reads as missing for the duration. This is the likeliest way to observe a false absence, not the rarest.

Both builders now take index_changed and downgrade an absence to degraded + channels.index: "rebuilding"; both wrappers pass index_changed_since_load. Two judgment calls worth naming: did_you_mean is suppressed on the degraded path, because offering near-miss names for a scan that could not see the index is worse than saying nothing; and the empty_symbols case degrades too, because its note claims "re-requesting the outline will not change this", which is actively wrong mid-rewrite.

The guard. New tests/test_absence_wiring_guard.py encodes the invariant rather than the instances: every build_verdict call in tools/ must pass index_changed=, the scan is alias-aware (each tool imports it renamed) and fails if it ever finds no calls, and the index-aware wrappers sit in a ratchet that fails when a listed wrapper turns out to be wired. That set is now empty and kept as the declaration point for any future gap.

Known limit, stated plainly: the guard covers build_verdict call sites and the two wrappers. A future tool that invents a third way to emit _meta.verdict would still be served by the chokepoint unchecked. Enforcing at the chokepoint itself is the larger fix.

No schema, tool-count, or INDEX_VERSION change.