v0.5.2 — Fix stale verdicts in long-lived server mode
v0.5.2 — Fix stale verdicts in long-lived server mode
A one-bug correctness patch (thanks to a user field report).
The bug
In long-lived MCP-server mode, a repeated command kept its first verdict even after the working tree changed. git reset --hard scored LOW on a clean tree; dirty the tree in the same process and it stayed LOW — a stale verdict. The dangerous direction (stale-low-after-danger) is exactly what bites, because agents repeat commands as the world changes around them.
The PreToolUse hook was never affected — it runs a fresh process per command. Only the persistent MCP server served stale results.
Cause & fix
recoverability._repo_state_cache is keyed by repo path with no world-state component, and assess() didn't invalidate it between calls. Each assess() now reads fresh git/working-tree state (clears the cache at the start) while still caching within a single assessment — so a chain scoring the same repo reads git once. Cost is one git status per assess, the same the hook already paid.
A regression test pins it in the long-lived-process shape: assess → mutate the tree → assess again in the same process, and the verdict must move (and back).
Notes
No scoring or calibration change: 452 tests, calibration corpus 58/58 exact, SABER unchanged (0.58% FPR, 82.4% data-destruction).
Apache-2.0. Install: uvx blast-scope@0.5.2.