Skip to content

bug: propose_claim swallows I/O and parse errors in evidence validation — misleading ProposalError raised #48

Description

@Tet-9

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

  1. Register a source so its id is valid
  2. Corrupt its meta.yaml (write invalid YAML to the file)
  3. Call kb_propose_claim citing that source id
  4. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions