Description
In proposals.py, the evidence validation loop catches bare Exception
on store.get_source(). Any real error — YAML parse failure, permission
error, disk I/O — is silently swallowed and falls through to
store.get_evidence(), which also fails, producing a misleading
ProposalError("unknown source/evidence id: <eid>") even when the source
exists but is corrupt or unreadable.
Steps to Reproduce
- Register a source so its id is valid
- Corrupt its
meta.yaml (write invalid YAML to the file)
- Call
kb_propose_claim citing that source id
- Observe:
ProposalError("unknown source/evidence id") — source appears
missing when it isn't
Actual Behavior
Corrupt or unreadable sources are indistinguishable from missing ones.
The real error is hidden behind a misleading message.
Expected Behavior
Only ArtifactNotFoundError should be caught. All other exceptions
should propagate with their original type and message intact.
Environment
- Python 3.11+
- vouch pre-1.0
Description
In
proposals.py, the evidence validation loop catches bareExceptionon
store.get_source(). Any real error — YAML parse failure, permissionerror, disk I/O — is silently swallowed and falls through to
store.get_evidence(), which also fails, producing a misleadingProposalError("unknown source/evidence id: <eid>")even when the sourceexists but is corrupt or unreadable.
Steps to Reproduce
meta.yaml(write invalid YAML to the file)kb_propose_claimciting that source idProposalError("unknown source/evidence id")— source appearsmissing when it isn't
Actual Behavior
Corrupt or unreadable sources are indistinguishable from missing ones.
The real error is hidden behind a misleading message.
Expected Behavior
Only
ArtifactNotFoundErrorshould be caught. All other exceptionsshould propagate with their original type and message intact.
Environment