Skip to content

Fix jev_verify handling of evidence IDs named none - #38

Merged
jkudish merged 1 commit into
jkudish:mainfrom
xujiantop-crypto:fix/verify-none-evidence-id
Sep 26, 2026
Merged

jkudish merged 1 commit into
jkudish:mainfrom
xujiantop-crypto:fix/verify-none-evidence-id

Conversation

@xujiantop-crypto

Copy link
Copy Markdown
Contributor

Summary

jev_verify uses none as an internal no-source option when multiple evidence items are supplied. If a caller provides a real evidence item whose ID is also none, the internal option overwrites that evidence entry in the choice criteria. A model response selecting the real evidence is then incorrectly returned as supporting_evidence: null.

This change:

  • allocates a collision-free internal key for the no-source option
  • preserves caller-provided evidence IDs, including none
  • validates source answers against the generated internal key
  • adds an end-to-end mock regression test for the collision

Reproduction

Call jev_verify with multiple evidence items, including { id: "none", ... }, and have Jev select that evidence as the claim source. Before this fix, the request criteria replace the real none entry with the no-source description and the result loses the selected evidence ID.

Verification

  • npm test — 225/225 passing
  • npm run typecheck
  • npm run build
  • git diff --check

jkudish commented Sep 26, 2026

Copy link
Copy Markdown
Owner
  • Thanks for this — a real bug: jev_verify's internal no-source option collided with evidence literally named "none".
  • The fix looks good as sent: collision-free internal key, same pattern jev_classify uses.
  • Merged with one small test addition (also covering the none_1 suffix case).
  • Shipping in the next patch release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants