verify_source correctly reports external_status="missing" when a type=file locator is gone or unreadable. vouch source verify already marks that as !. But the library paths that agents and health checks use disagree:
| Path |
Missing treated as? |
CLI vouch source verify |
failure (!) |
verify_all audit failed list |
ignored (only drift) |
health.doctor |
silent (only emits source_drift) |
where
src/vouch/verify.py — verify_all builds failed with only not stored_ok or external_status == "drift"
src/vouch/health.py — doctor only appends findings for source_drift
why it matters
vouch doctor can report ok: true while vouch source verify --fail-on-issue exits non-zero for the same KB. Agents that trust doctor / the verify audit miss disappeared upstream files.
repro
put_source with source_type="file" and a real locator under the project root.
- Delete the external file.
verify_source → external_status == "missing", stored_ok == True.
verify_all audit object_ids / data.failed omit that source.
doctor has no source_missing finding; report.ok stays true.
expected — missing is counted like drift in verify_all's failed set, and doctor emits a warning source_missing (stored blob may still be fine; same severity as drift).
suggested fix — include "missing" in the verify_all failed predicate; add a source_missing warning branch next to source_drift in doctor. Leave CLI alone (already correct).
verify_sourcecorrectly reportsexternal_status="missing"when atype=filelocator is gone or unreadable.vouch source verifyalready marks that as!. But the library paths that agents and health checks use disagree:vouch source verify!)verify_allauditfailedlistdrift)health.doctorsource_drift)where
src/vouch/verify.py—verify_allbuildsfailedwith onlynot stored_ok or external_status == "drift"src/vouch/health.py—doctoronly appends findings forsource_driftwhy it matters
vouch doctorcan reportok: truewhilevouch source verify --fail-on-issueexits non-zero for the same KB. Agents that trustdoctor/ the verify audit miss disappeared upstream files.repro
put_sourcewithsource_type="file"and a real locator under the project root.verify_source→external_status == "missing",stored_ok == True.verify_allauditobject_ids/data.failedomit that source.doctorhas nosource_missingfinding;report.okstays true.expected — missing is counted like drift in
verify_all's failed set, anddoctoremits a warningsource_missing(stored blob may still be fine; same severity as drift).suggested fix — include
"missing"in theverify_allfailed predicate; add asource_missingwarning branch next tosource_driftindoctor. Leave CLI alone (already correct).