Skip to content

feat(spec): EvidenceSummaryV1 -- evidence read model with explicit enums (product section 7, item 4) - #347

Draft
LamaSu wants to merge 1 commit into
feat/evidence-levelsfrom
feat/evidence-summary-dto
Draft

LamaSu wants to merge 1 commit into
feat/evidence-levelsfrom
feat/evidence-summary-dto

Conversation

@LamaSu

@LamaSu LamaSu commented Sep 24, 2026

Copy link
Copy Markdown
Owner

summarizeEvidence(jobId, bundles) returns EvidenceSummaryV1: one explicit-enum evidence summary per job for product surfaces. No UI should read "verified" from "evidence exists", or "done" from "the device accepted it".

Consumer: the product read-model lane builds the gateway route. It passes stored bundles, their events and the per-bundle check result. This PR ships no route of its own.

Tests: 14 new; spec 831/831; tsc clean. Six mutants each turn a test red. Stacked on #345.

🤖 Generated with Claude Code

https://claude.ai/code/session_0117ows6894R3n6YQXBCRahS

…t enums

Product surfaces need one evidence summary per job (product pack section 7,
item 4) that ordinary users can read and that never lets a UI infer
"verified" from "evidence exists" or "done" from "the device accepted it".

summarizeEvidence(jobId, bundles) returns explicit enums, derived once:
- authentication: verified only for a device-signed bundle whose signature and
  subject binding the caller checked (LO-EV-1, LO-EV-9); unverified when
  unchecked or failed, with reasons; gateway_record; none.
- verifiedStrength: the evidence level shown by verified evidence only.
- outcome (completed / failed / accepted / none), read from verified events
  once any exist, else from what was claimed; outcomeBasis says which.
  Failure outranks completion; fabricated events are ignored.
- simulated: any fabricated event in the job's evidence.
It also returns one plain-language sentence per state, the source timestamp
(lastRecordedAt), and raw inspect refs (bundle id, hash, signer class,
per-bundle verified).

Tests: 14 new; spec 831/831; tsc clean. Six mutants (existence-as-verified,
gateway verification, strength from unverified events, failure precedence,
simulated counted, outcome from claims) each turn a test red.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117ows6894R3n6YQXBCRahS

This branch has not been deployed

No deployments
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.

1 participant