Repository navigation
feat(spec): EvidenceSummaryV1 -- evidence read model with explicit enums (product section 7, item 4) - #347
Draft
LamaSu wants to merge 1 commit into
Draft
feat(spec): EvidenceSummaryV1 -- evidence read model with explicit enums (product section 7, item 4)#347LamaSu wants to merge 1 commit into
LamaSu wants to merge 1 commit into
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
summarizeEvidence(jobId, bundles)returnsEvidenceSummaryV1: 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".authentication:verified|unverified|gateway_record|none. It isverifiedonly for a device-signed bundle whose signature and subject binding the caller checked (LO-EV-1 feat(spec): LO-EV-1 canonical signing byte contract + cross-language goldens #338, LO-EV-9 feat(evidence): LO-EV-9 bind device evidence to the accepted job and kernel before settlement #341). Unchecked or failed bundles giveunverifiedwithreasons.verifiedStrength: the evidence level (feat(spec): evidence levels -- submitted / device_reported / inspected_output (must-close 5) #345) shown by verified evidence only.outcome:completed|failed|accepted|none, plusoutcomeBasis(verified|claimed|none). Failure outranks completion; fabricated events are ignored.simulated, oneplainLanguagesentence, thelastRecordedAtsource timestamp, andinspectraw refs (bundle id, hash, signer class, per-bundle verified).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;
tscclean. Six mutants each turn a test red. Stacked on #345.🤖 Generated with Claude Code
https://claude.ai/code/session_0117ows6894R3n6YQXBCRahS