Repository navigation
feat(evidence)!: name the Evidence subject by its target identity (format revision 2) - #11416
Conversation
…rmat revision 2) The Evidence subject carries subject.identity (kind, sha256, format, architecture, selection) and the Evidence ID commits to it, so raw/DOL entry points and ESP flash offsets of the same bytes are different subjects. Every record declares evidence_format: 2; revision 1 bundles, standalone records and snapshots are refused with the recreate guidance. binaryTargetIdentity is the one projection of an open target, used by Evidence and snapshot comparison. BREAKING CHANGE: Evidence format revision 2. Evidence IDs commit to the subject's target identity (subject.identity, including the raw/DOL entry point or ESP flash offsets), and every record declares evidence_format: 2. Evidence bundles, records and analysis snapshots from earlier releases are refused; recreate the observations with this release.
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
[High impact] The reviewed follow-up appears safe to merge under the stated release hold. SummaryEvidence revision 2 commits each record to
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart LR
T[Selected target] --> I[Target identity and selection]
I --> S[Evidence subject]
U[Explicit unknown reason] --> S
S --> H[Evidence ID]
R[Record or bundle] --> F{Format revision 2?}
F -->|No| X[Refuse with recreate guidance]
F -->|Yes| A[Check shape and Evidence ID]
Reviews (11) · Last reviewed commit: "test(evidence): expect the Evidence subj..." · Reviewed by Greptile |
…entity accessors (#11423) Analysis views compare their parent's file identity (evidenceFileTarget) and take path and digest from evidenceSubjectTarget instead of reading the subject's digest, format and architecture members, which duplicate subject.identity until they are removed. A counted guard (evidence-subject-declaration-read) keeps new direct reads out and records the 20 remaining files.
…d target selections - safeParseEvidence/safeParseImmutableEvidence return the format refusal as an expected failure; every consumer maps it to the one integrity refusal with the recreate guidance. An unmarked object is an earlier record only when it has every member records have always carried. - ArtifactProvider inventory roots and provider subjects that name the target's own bytes carry the target's selection (ESP flash offsets). - Snapshot rows bind only Evidence whose identity, selection included, matches the snapshot target. - Entry-point selections use the raw-binary entry point form.
…ad of reading them as absent - recognizeEvidence (evidenceValidation) replaces tryParseEvidence: input without an evidence_id is not Evidence (ok(undefined)); a record that names one but fails authentication or is from another format revision is an EvidenceIntegrityError carrying the recreate guidance, never undefined. - Direct analysis retains that refusal as a secondary failure instead of silently skipping source capture; cleanup projection, source-closure annotation and the flutter, debugger and release-exposure recoveries use the same owner (the last three previously read the unauthenticated schema). - A desktop capture.json from an earlier format is refused with the recreate guidance instead of "not desktop application capture Evidence".
|
Follow-up on the 4/5 summary ("finish preserving older-format refusals in the remaining readers"), fixed in 3dc4323. Root cause. Fix at the owner.
Readers checked that already refuse explicitly: In-process only, no change: Validation. New tests: @greptileai review |
… omissions by serialized size - The obligation ledger and reconstruction coverage examples named evidence_format 1, which revision 2 refuses; they now use EVIDENCE_FORMAT_REVISION. - MCP delivery chose which unretained recovery to omit by a parsed-storage lower bound clipped at the response budget. Once revision 2 subjects made the source record's estimate cross the budget, both candidates tied at the clip and the smaller source was omitted ahead of the larger completed observation. Candidates are now ranked by serialized size, which is what the budget counts.
… identity (#11450) Function snapshots carry the subject's file target identity instead of the duplicated subject declaration. Call paths and function comparisons compare targets through sameTargetIdentity, so the same bytes opened at a different raw entry point or ESP flash offset no longer count as one coordinate space: build_call_path refuses the mix, and compare_functions no longer matches entries by address across selections. Structural candidates and native function matching read the architecture and digest through evidenceFileTarget. Refs #11417
…dence target identity (#11461) Artifact comparison authenticates a summary against its retained inventory through sameTargetIdentity and rebinds the alias with the whole target, selection included, so a flash-selected inventory summary taken under an alias path is no longer refused. WASM comparison, the analysis view artifact projection and the inventory root check read the digest, format and display path through the Evidence identity accessors. Refs #11417
…-target-identity # Conflicts: # src/application/desktop/DesktopApplicationState.test.ts
|
@greptileai review — latest head d3711de (main merged; delivery ranking now uses the encoder's errorTextWireBytes per the resolved thread). |
…rs in JS, managed, ledger and bundle readers (#11470) JavaScript application graphs, runtime reconciliation, managed inspection and native verification sources, the record summary filter, the ledger's residual-unknown target and bundle scope selection read the subject digest, format and display path through evidenceFileTarget and evidenceSubjectDisplay. No comparison changes: each reader matches one record's facts against its own payload or a caller filter. Refs #11417
# Conflicts: # src/artifacts/ArtifactHash.ts # src/artifacts/DotnetBundleArtifactReader.ts # src/artifacts/MachOSliceArtifactReader.ts # src/artifacts/NodeSeaArtifactReader.ts # src/artifacts/PyInstallerArtifactReader.ts # src/artifacts/deno/DenoVirtualFs.ts # src/artifacts/extraction/ArtifactExtraction.ts # src/artifacts/pyinstaller/PyInstallerPyzStore.ts # src/resources/StableRootArtifact.ts
…ntity (#11497) * refactor(evidence)!: name the Evidence subject only by its target identity The subject keeps `identity` and the display facts `name` and `local_path`. The duplicated `digest`, `format` and `architecture` members are removed; the format-owned declaration now validates the identity itself. Readers the type checker found move to the owner accessors; untyped reads in verify scripts, the efficiency harness and test matchers move to `subject.identity`. The `evidence-subject-declaration-read` text guard and its baseline are deleted. Fixes #11473 Refs #11417 BREAKING CHANGE: the Evidence subject no longer has `digest`, `format` or `architecture`; read `subject.identity.sha256`, `subject.identity.format` and `subject.identity.architecture`. A record that still carries them is refused. * test(evidence): give the Flutter verifier fixture the identity subject and check the DOL declaration without the ID
|
@greptileai review — latest head b548afe: #11497 (the Evidence subject keeps only |
… matrix and tamper fixtures
|
@greptileai review — latest head 0b136c9 (fixes the subject fixture finding). |
…-target-identity # Conflicts: # src/application/DirectAnalysisCleanup.ts # src/artifacts/InesArtifactReader.ts
|
@greptileai review |
…ity (#11536) * feat(evidence)!: give every Evidence record an explicit subject identity A producer that cannot name a file passes an `unknown` target identity with a closed reason (derived-from-linked-evidence, not-observed, unsupported-subject) instead of no subject. The subject is non-null; unknown subjects have no display facts. The generic missing-subject limitation and `subjectUnavailableReason` are removed; producer-specific explanations are ordinary limitations. Comparison identity requires the derived unknown, and null-subject consumers ask the owner accessors. Refs #11417 BREAKING CHANGE: every Evidence record has a subject. A record without a file target names `subject.identity` `{ "kind": "unknown", "reason": … }` with `name` and `local_path` null, instead of `subject: null` and the limitation "Artifact identity is unavailable for this observation.". Their Evidence IDs change. * fix(evidence): name explicit unknown subjects in JavaScript callers and keep a managed graph's file subject The verification scripts are not type-checked, so five createEvidence callers still passed undefined (or a missing first target) after the subject became required. They now pass unknownTarget("not-observed"). A managed application graph chose the first present input subject. Every subject is now present, so an unknown artifact subject hid a file subject on the member or boundary Evidence. The graph now takes the first input subject that names a file. * test(evidence): assert the subject kind instead of a presence the type now guarantees Every Evidence record has a subject after this change, so test guards and assertions that checked it for null always passed. Each now checks that the fixture subject names a file, or is removed where a later fileIdentity, fileSubjectTarget or fileSubjectDisplay call already requires that. Non-null assertions on Evidence subjects are removed; analysis-view inputs, whose subject is optional, keep an undefined check.
Two boundary tests still matched subject.format, which slice 2e moved into subject.identity. toMatchObject is not type-checked against the Evidence shape, so they failed only when run (the signature test on macOS).
…mp command records (#11613) Since #11416 every Evidence record has a subject; one without a file target names identity {kind: unknown, reason: not-observed} with null name and local_path. Four tests that #11416's run did not select still expected subject: null and fail on main: the keyless bundle resource CLI, provider composition and acceptance tests, and the objdump command identity test.
… kernel config tests (#11650) #11551 made a snapshot entry's subject the Evidence subject schema and #11416 moved the subject's format under identity. Two tests that merged alongside them still asserted the old shapes and fail on main: - evidenceSubject.test.ts parsed the snapshot subject with the retired {format, architecture, path, sha256} projection and expected it to strip extra fields. It now asserts the snapshot subject is the Evidence subject schema, whose admission and strictness the rest of the test covers. - KernelBuildConfigService.test.ts matched subject.format; it now matches subject.identity.format.
- Move PeRichHeaderPort to src/ports/binaryDiagnostics (morluto#11208). The provider now implements it, like the other PE providers. - Import the artifact toolkit from src/resources, BinaryContainer from src/domain/binaryContainer and readPeHeaders from src/domain/pe. - List PeRichHeaderProvider among native's entry files. - Map failures with projectPeBinaryFailure, as PeImportsProvider and PeLoadConfigProvider do. The new guards forbid a hand-built resource-constraint refusal and an inline error message; the shared PE projection already owns both, so the provider adds neither. The structural allowance's recovery now carries its ceiling (morluto#11651). - Tests: the Evidence subject names its target identity (morluto#11416), and readPeHeaders now throws a malformed ParseFailureError (morluto#11550). - Re-record the advertised schema summary: the output hash now matches inspect_pe_imports after Evidence format revision 2.
…command owner Main now requires every verifier to allocate its root through VerifierFixture, validate tools against the canonical output schemas, and refuse a host without its fixture toolchain before allocating. The Xtensa lane now does all three: readelf is declared as the xtensa lane's toolchain (REA_XTENSA_READELF still selects it), its commands run through the shared owner with SIGINT/SIGTERM interruption, and a failed run retains its workspace. Main also removed the -vN suffix from runtime-selected profile values, so the Xtensa profile records language_selection provider-pinned/configured and lane elf32-le-exec-windowed-generic. The .xtensa.info refusal test now uses an ET_EXEC header so it reaches the ABI check rather than the e_type refusal. Main also names the Evidence subject and snapshot target by their identity (morluto#11416), so the lane reads subject.identity and target.identity.
…#11416 moved it Evidence subjects and snapshot targets now carry their digest under identity, as the rest of the RISC-V verifier reads it.
…ce (#8464) * fix(ghidra)!: load ESP-IDF flash code in Ghidra's default address space ESP-IDF's linker script reserves the addresses of .flash.text with the NOBITS section .flash_rodata_dummy. Ghidra 12.1.4's ELF loader gives the default address space to the later section, so .flash.text lands in an overlay that its DWARF import, call-frame processing and default-space references do not reach. Flash functions lose their DWARF signatures, locals and no-return flags, each gets a one-byte shadow function in the reservation, and pseudocode runs past calls such as esp_restart(). The ELF reader now records allocated ranges that an executable section shares with another section, through one section-table visitor that the RISC-V ISA reader also uses. When a NOBITS section starts with one executable section and covers it, the RISC-V lanes commit both sections to the analysis profile. ReaGhidraPrepareElfLoad.java then gives the code the default address space before auto-analysis and keeps the reservation as an uninitialized overlay; bytes, file offsets, symbols, functions and entry points are kept. The session reports the outcome, and any memory map that differs from the committed plan is refused. Images without such an overlap keep their analysis profiles byte for byte. BREAKING CHANGE: RISC-V images with this layout, such as ESP-IDF ESP32-C6, H2 and H21 builds, report flash code at its ELF address (0x42...) instead of .flash.text:0x42..., and their analysis profiles change. RISC-V images with any other section overlap that involves executable code are now refused with the overlapping sections named. These include ESP-IDF v5.5.2 ESP32-C5 and C61 builds, whose second reservation, .ext_ram.dummy, also covers .flash.text. See docs/ghidra-riscv.md. * fix(ghidra): bound the overlap sweep and check the load preparation Domain: - Find section overlaps with one sort and sweep that stops at the second overlap involving executable code, and read the ISA and the overlap in one section-table pass. - Record the two sections that cause a refusal as witnesses. The Ghidra lane owns the refusal text and names them with their ranges. Ghidra lane: - Check the preparation report before the first lazily started analysis call, as for the calling-convention report. - The pre-analysis script removes the code's overlay entry points, checks that no symbol or reference remains in the old overlay range, and reports the counts of the result. Its report echoes the blocks it left, which the client compares with the committed sections. A failed move refuses and rethrows. Reservation labels mark no entry points. - Session limitations no longer state a planned move after a canonical outcome. Verification: - The ESP fixture defines ESP-IDF's absolute text bounds and the reservation's label. The lane checks their addresses, the entry points, file-offset uniqueness and snapshot replay, a reservation-first build, a pre-analysis refusal through analyzeHeadless and a truncated double-float section table. - Boundary tests cover the refusal witnesses, a 10,000-section table and an ELF64 table. * fix(ghidra): retarget references into the moved ESP-IDF flash code The move takes the references from the code's range but not the references into it. Besides the entry points, Ghidra 12.1.4's loader records one data reference from the .flash.text section header to the code, which the new post-condition refused in the RISC-V lane. Retarget plain memory references and entry points into the old range to the moved code; any other kind stays behind and is refused. Removing the reservation block keeps the references into its range, so the pinned symbols' entry points need no re-add. * fix(ghidra): move labels past the ESP-IDF flash code's end with it Ghidra 12.1.4 places a section-relative symbol at the section's end, such as ESP-IDF's _etext, in the code's overlay space one byte past the block. The move covers the block only, so the label stayed in the overlay and ended up in the reservation. Everything in the code's overlay space now follows the code: references are retargeted, labels outside the block are created again in the default space, and the post-condition checks the whole space. The script refuses when another block shares that space. The ESP fixture defines _etext, and the lane checks its address. * fix(ghidra): check prepared blocks by coordinates and address spaces The client compared the pre-script's echoed block names with the ELF section names, although section names are display only: an unnamed section's empty name never matches the name Ghidra gives its block, so that preparation was refused. It also accepted any reported address spaces. The check now compares addresses, sizes and the code's file offset, and requires moved code to go from an overlay into the program's default space while its reservation leaves it, and canonical code to stay there. An unnamed section is labelled by its index. The docs and the pre-script now state that a failure during the move may be refused without its reason, and that an entry mark on a reservation label stays at its default-space address. The docs give the llvm-objcopy route for the refused C5 and C61 builds. The lane checks that no other block maps any of the code's file bytes, and the overlap tests add the C5 and C61 section shape. * fix(ghidra): bound the sections the overlap check keeps The overlap check kept one record per allocated, non-empty section, and only the file size limited their number. NOBITS headers take no file bytes, so a crafted 1 GB ELF32 table holds about 27 million of them. The check now keeps at most 65,280 (SHN_LORESERVE, from which ELF counts sections through section zero) and reports the overlap as unavailable beyond that, which the RISC-V lanes refuse as they refuse a table that cannot be read. * fix(ghidra): check RISC-V handshake reports before any analysis call A RISC-V session that committed neither a calling-convention policy nor a load preparation started its bridge lazily on the first query other than `health`. An `elf_load_preparation` or calling-convention report that the profile did not commit was then never checked, and the query returned its result. Every RISC-V session now starts through the checked handshake, so such a report closes the session before any analysis call, whatever the first query is. A double-float session that reports a preparation, and one that reports a calling-convention policy, are now tested with `list_procedures`; both fail without the fix. Admission, profile parameters and profile digests do not change. If Ghidra exits during the first query of a double-float session, the error now tells the caller to reopen the session, as other checked sessions do. * fix(ghidra): skip analysis after a refused ELF load preparation A refused memory map only wrote the refusal, so headless Ghidra still ran seeds, auto-analysis and post-script analysis on a program that REA then discarded. The preparation now turns off headless auto-analysis when it refuses; later pre-scripts and the bridge still run, so the session reports the reason. The swap also renamed the reservation's overlay space to the section's raw name, so a reservation named like another address space, such as the RISC-V default space ram, or containing characters Ghidra rejects, failed after the move. The space now takes the name Ghidra's memory map derives for an overlay block: ':' and whitespace become '_', and a name in use gains .1, .2 and so on. verify:ghidra:riscv drops -noanalysis from the refusal run and checks that Ghidra analyzed nothing, and a seventh fixture names the reservation ram and checks that it moves into the overlay space ram.1. * test(ghidra): read the load preparation report before Ghidra's log suffix * test(ghidra): pin unchanged RISC-V profiles at main's revisions main's byte-search (#8840), data-type (#8602) and reference revisions change every Ghidra profile. With those revisions reversed, the old pins hold. * fix(ghidra): name the moved RISC-V guide in load-layout diagnostics The overlap refusal, the load-layout limitation and the bridge comments named docs/ghidra-riscv.md, which main moved to docs/providers/. * test(ghidra): check load-preparation facts instead of sentences The refusal, report-check and handshake tests compared whole messages. They now check the sections, coordinates, spaces and counts each message must state, and the handshake compares the session's limitations with ghidraRiscvLoadPreparationLimitations. Rewording the messages passes; dropping a count fails. * fix(ghidra): give the ESP-IDF load preparation unused temporary names The preparation created its temporary blocks as <name>.rea, so a disjoint section already named that refused an otherwise admitted image. It now takes the first unused <name>.rea[.N]. verify:ghidra:riscv gains an esp-edge-names fixture with such a section. * fix(ghidra): keep both final block names free during the ESP-IDF swap The code's temporary block could take the removed reservation's name, such as a reservation named <code>.rea, and the reservation's rename back then collided. The picker now skips both final names. verify:ghidra:riscv's esp-edge-names fixture names its reservation .flash.text.rea beside a disjoint .flash.text.rea.1. * test(ghidra): repin the overlap-free RISC-V digests for main's #8340 main's #8340 bumps call_relationship_coverage from v5 to v7, which changes every Ghidra profile digest. With the revision reverted in place, the old pins hold (79 of 79). * test(ghidra): repin unchanged RISC-V digests for main's value-flow budgets main's #9706 adds native_value_flow_projection to the shared analysis semantics, which changes the profiles of images without a section overlap. With that one revision removed, the previous pins hold (79 of 79). * fix(ghidra): inspect RISC-V PIE section overlaps and refuse an unverified PIE reservation Main admits RISC-V PIE, but this lane requires a section-overlap read that the resolver made only for ET_EXEC, so every PIE was refused. A PIE's section addresses are fixed offsets from its load base, so overlaps do not depend on the base: read them for ET_DYN too. The NOBITS reservation preparation is verified for ET_EXEC only, so a PIE that needs it is refused. Main's producer identity now digests the bridge sources, so the test that compared profile digests with main's is replaced by checking that images without an overlap commit no load preparation. * fix(ghidra): find an ESP-IDF reservation that Ghidra 12.2 marks executable Ghidra 12.2 gives each section block the permissions of the first PT_LOAD that contains its address, so a NOBITS reservation that shares the code's addresses comes out executable and the preparation refused every ESP-IDF image. Tell the reservation from the code by its missing bytes alone; the displaced reservation is still made non-executable. The PIE refusal test now uses the ELF64 lane, which admits PIE. * fix(verify): read the ESP-IDF fixtures' identity where main's #11416 moved it Evidence subjects and snapshot targets now carry their digest under identity, as the rest of the RISC-V verifier reads it. * docs(ghidra): describe the ESP-IDF load layout as verified on Ghidra 12.2 The real RISC-V lane now passes on Ghidra 12.2, whose ELF loader still puts the code in an overlay when its reservation follows it. Name 12.2 where the lane exercised that behaviour, and note that 12.2 can mark the reservation executable. Measurements of Ghidra APIs the lane did not re-check keep their 12.1.4 attribution. * docs(domain): align RISC-V section-overlap JSDoc with ET_DYN inspection --------- Co-authored-by: morluto <[email protected]>
Summary
Refs #11417 (remaining slices), #10510.
Slice 2a of the accepted target identity decision (
docs/adr/evidence/target-identity.md). The Evidence subject now carries its target identity,subject.identity(kind: "file",sha256,format,architecture,selection), and the Evidence ID commits to that identity instead of the subject's digest, format and architecture. This is Evidence format revision 2: every record also carriesevidence_format: 2, and revision 1 bundles, records and snapshots are refused with the recreate guidance. Breaking: every Evidence ID changes.Problem and expected behavior
parameters. The same was true for ESP flash images read at different flash offsets. The snapshot target already kept them apart, so the two identities disagreed.Expected: one projection of an open target into its identity, used by Evidence and snapshot comparison. Two observations that differ only in their selection are different subjects. Every record names the format revision it was written in.
Change and scope
src/domain/targetIdentity.ts:fileTargetIdentitySchemaandfileTargetSelectionSchema(the persisted forms), andbinaryTargetIdentity/binaryTargetSelection, the single projection of aBinaryTarget(raw/DOL entry point, ESP flash offsets).snapshotMatchesTargetnow compares against this projection instead of round-tripping throughsnapshotTarget.src/domain/evidenceFormat.ts:EVIDENCE_FORMAT_REVISION = 2, with a revision note that names the subject change.admitEvidenceRecordFormatrefuses a standalone record from another format with the same single decision as a bundle.admitEvidenceBundleFormatalso checks each record a current bundle carries.src/domain/evidence.ts:identity. The existingdigest,formatandarchitecturemembers stay, refined to agree with the identity, so current readers keep compiling. Later slices remove them (see the plan below).evidenceSemanticContentcommitssubject.identity.evidenceSubject(target)is the one builder of a persisted subject.EvidenceSubjectTargetgains an optionalselection, whichevidenceSubjectTargetround-trips.sameTargetIdentity. The localsameEvidenceSubjectTargetIdentityis deleted.evidenceTargetIdentity,evidenceFileTarget,evidenceSubjectDisplay.evidenceSubjectIdentity, and the pre-6.6 null-coverage diagnosis. Records withoutevidence_formatare now refused before their ID is checked, so the diagnosis can no longer be reached.BinarySessionExecution.bindExecutionTargetrecords the target's selection. Snapshot replay restores the selection from the matched target: the query ID already commits to it, and snapshot subjects do not persist it yet (slice 2d).evidenceBundle.ts: when a refused bundle is a standalone record from an earlier format, the bundle-schema message (which carries the recreate guidance) is kept instead of an unexpected throw.mcp-contracts.mddescribes revision 2 andsubject.identity. The ESP, IL2CPP and process-capture guides no longer promise that earlier standalone records stay readable. The ledger example uses revision 2.subject.digest|format|architecture|name|local_pathto the accessors, family by family, behind a shrinking guard;url/process/session/unknownkinds, a non-null subject for the 50 subject-less sites, and removal ofMISSING_EVIDENCE_SUBJECT_LIMITATION;universal-sliceselection for universal Mach-O;digest/format/architecturesubject members and the bundle artifact manifest's copy.Contract and boundary impact
src/domain/targetIdentity.ts(projection of a target into its identity) andsrc/domain/evidence.ts(subject builder and ID commitment);src/domain/evidenceFormat.tsowns the revision. Superseded and deleted:evidenceSubjectIdentity,sameEvidenceSubjectTargetIdentity, the null-coverage legacy diagnosis.docs/adr/evidence/target-identity.md, Accepted 2026-11-15 (docs(adr): accept the target identity decision #11340), slice 2.evidence_formatandsubject.identity; the advertised schema summaries are updated.Expected effects:
Evidence and regression coverage
src/domain/evidence.test.ts: two raw targets at different entry points get different Evidence IDs, and the identity carries the selection. A display-only rebind keeps the ID, and a different selection is not rebound. A forged identity (digest disagreement, or a selection that does not fit the format) is refused. A pre-revision record is refused with the recreate guidance.src/domain/evidenceFormat.test.ts: an unmarked or revision 1 record is refused, both alone and inside a current bundle (evidence-record,evidence_format).tests/boundary/cli/evidenceBundleCommands.test.ts: CLI and MCP import of a current bundle carrying a pre-revision record reportevidence_integrity_mismatchwith the recreate guidance (previously the null-coverage diagnosis).nativeArchitectureIdentity.test.tsnow tampers with both architecture members, so it still reaches the ID check. Fixtures inevidenceSubject.test.tsand three analysis-view tests build subjects withevidenceSubject. Two CLI tests useEVIDENCE_FORMAT_REVISIONinstead of a literal1.evidenceSubjectIdentityomitted the entry point, so two raw targets that differed only in entry point and returned the same result had equal IDs.For evidence-bearing changes:
Validation performed
npm run check:fast: passed (typecheck, lint, architecture guards across 2813 files)npx oxfmt --check .: passednpm run docs:check: passednpm run verify:advertised-schemas -- --update-summary: passed. Rust jsonschema engines are not installed locally ("not verified").npm run test:focused --: 113 files selected for Evidence IDs, subject fixtures, format markers, snapshots and the published examples, in three batches. Final runs passed after fixing the published example digests and the null-coverage test.npm run test:focused --: 172 further files that build subjects, bundles or snapshots, in four batches. All passed after theevidenceBundleFilesandnativeArchitectureIdentityfixes, which were rerun alone.Review fixes (55eaa21), each regression shown failing on the unfixed code first:
Result. All consumers map it to one integrity refusal with the recreate guidance.rawBinaryEntryPointSchema.briefs/local-gate.sh 11416on 559077f passed (60 affected files, 1124 passed).Review follow-up (3dc4323):
recognizeEvidencereplacestryParseEvidence. A partial observation that names anevidence_idbut fails authentication or the format check is now a refusal, not "no Evidence". The flutter, debugger and release-exposure recoveries use the authenticated owner. An earlier-format desktopcapture.jsonis refused with the recreate guidance; that regression failed on the unfixed reader. 37 affected test files passed (606 tests).npm run check:fast,npx oxfmt --check .and the architecture guards passed.Base fix (189081e), found while validating the stacked refactor(native): compare function snapshots by their Evidence target identity #11450:
build_reconstruction_obligation_ledgerand reconstruction coverage examples still namedevidence_format: 1. They now useEVIDENCE_FORMAT_REVISION.sourcePublicationComposed.test.ts). Delivery now ranks by serialized size.toolSchemaValidity.test.tscases and the composed-publication test failed on 55eaa21 and pass now. 74 delivery/contract files passed (884 tests) and 56 example-bearing CLI/MCP boundary files passed (1492 tests).check:fast,oxfmt --check .andverify:advertised-schemas(summary unchanged) passed.Carried from #11423 (collapsed into this PR, not breaking)
Slice 2b, first family. Analysis views (19 files in
src/domain/analysisView/) read their parent's subject throughevidenceFileTarget/evidenceSubjectTarget/evidenceSubjectDisplayinstead of the duplicateddigest/format/architecturemembers. A counted guard,evidence-subject-declaration-read(baseline inscripts/verify/baselines/, shrink-only), keeps new direct reads out.tests/fixtures/evidenceSubject.tschangedEvidenceSubjectlets tests change a subject's declaration together with its identity. Validation: all 80 analysis-view test files passed (1746 tests).Carried from #11450 and #11461 (collapsed into this PR, not breaking)
target: FileTargetIdentity.build_call_pathrefuses functions from the same bytes opened at different selections, andcompare_functionsmatches entries by address only within one target (sameTargetIdentity). Regressions incallPath.test.tsandfunctionComparison.test.tsfailed on the unfixed readers.errorTextWireBytes, the encoder's escaped UTF-8 measure.evidence-subject-declaration-read: 12 files / 26 reads remain.Carried from #11536 (slice 2c, collapsed into this PR, breaking)
{ kind: "unknown", reason }with null display facts.MISSING_EVIDENCE_SUBJECT_LIMITATIONandsubjectUnavailableReasonare deleted; producer explanations are ordinary limitations. gdb, Rizin and Cutter usenot-observeduntil their slice-3 session identities.unknownTarget("not-observed"); follow-up [Design] Type-check the JavaScript verification scripts that import domain modules #11545 proposes type-checking them.subject.formatfrom before slice 2e; they now matchsubject.identity.format(3e040c6).npm run test:focused -- tests/boundary/mcp/nativeSignatureTargetBindingMcp.test.ts tests/boundary/providers/native/artifactProvider.archiveSafety.test.ts: 7 passed (the signature test failed before on macOS).Compatibility, safety, and release
evidence_format: 2andsubject.identity. Evidence bundles, standalone records and analysis snapshots written by earlier releases are refused asevidence_integrity_mismatch. Migration: recreate the observations with this release; re-exporting an earlier bundle does not update its format or identities. Stored Evidence is not migrated, because an Evidence ID is a content commitment (ADR decision 5).evidence_format.local_pathandnameremain display facts outside the ID.BREAKING CHANGE: Evidence format revision 2. Evidence IDs commit to the subject's target identity (
subject.identity, including the raw/DOL entry point or ESP flash offsets), and every record declaresevidence_format: 2. Evidence bundles, records and analysis snapshots from earlier releases are refused; recreate the observations with this release.BREAKING CHANGE (from #11497, folded into this PR): the Evidence subject no longer has
digest,formatorarchitecture; readsubject.identity.sha256,subject.identity.formatandsubject.identity.architecture. A record that still carries them is refused.Author readiness
Human owner:
Before merge
type(scope): outcome.BREAKING CHANGE (from #11536, folded into this PR): every Evidence record has a subject. A record without a file target names
subject.identity{ "kind": "unknown", "reason": "derived-from-linked-evidence" | "not-observed" | "unsupported-subject" }withnameandlocal_pathnull, instead ofsubject: nulland the limitation "Artifact identity is unavailable for this observation.". Their Evidence IDs change.BREAKING CHANGE (from stacked #11551, once folded into this PR): analysis snapshot files change shape:
targetis{ kind, identity: { kind: "file", sha256, format, architecture, selection } }and entryexecution.subjectis the Evidence subject ({ identity, name, local_path }, never null). Snapshot binding-mismatch details reporttarget.snapshot/target.selectedin the same shape. Evidence IDs of universal Mach-O targets change because their subject identity now carries the selected slice (universal-slice:offset,size,cpu_type,cpu_subtype). Recreate saved snapshots and Evidence bundles of universal Mach-O targets.