Repository navigation
feat(native)!: require native Evidence fields that were optional only for historical Evidence - #10946
Merged
morluto merged 1 commit intoNov 15, 2026
Conversation
… for historical Evidence Mach-O encryption, slice malformed cause, symbol runtime names and import facts; ELF export encoding facts and visibility; value-flow limits; load-image permissions and relocation symbols; Swift type-reference kind and GPU AMD target metadata are required. Legacy enum values (unrecorded, unknown visibility, undecodable, modinfo_field_exceeds_limit) and the retained schemas, view defaults and reinterpretations that served historical Evidence are deleted. BREAKING CHANGE: native records missing these fields are refused as malformed; recreate the observation.
Codex Review Summary: ✅ CompletedThis 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. |
19 tasks
Contributor
[Medium impact] The PR appears safe to merge with its stated dependency on #10861. SummaryRequires current native Evidence fields at their owning schemas and removes the historical defaults and reinterpretations from views and consumers.
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart LR
P[Current native producers] --> S[Owning result schemas]
S -->|Required facts present| E[Evidence]
S -->|Required facts missing| R[Reject malformed result]
E --> V[Views and consumers]
V --> O[Selected facts without historical defaults]
Reviews (2) · Last reviewed commit: "feat(native)!: require native Evidence f..." · Reviewed by Greptile |
22 tasks
morluto
added a commit
that referenced
this pull request
Nov 15, 2026
… for historical Evidence (#10946) Mach-O encryption, slice malformed cause, symbol runtime names and import facts; ELF export encoding facts and visibility; value-flow limits; load-image permissions and relocation symbols; Swift type-reference kind and GPU AMD target metadata are required. Legacy enum values (unrecorded, unknown visibility, undecodable, modinfo_field_exceeds_limit) and the retained schemas, view defaults and reinterpretations that served historical Evidence are deleted. BREAKING CHANGE: native records missing these fields are refused as malformed; recreate the observation.
morluto
added a commit
that referenced
this pull request
Nov 15, 2026
… module (#10861) * feat(evidence)!: give Evidence bundles a format revision owned by one module `src/domain/evidenceFormat.ts` owns Evidence format evolution. Bundles now carry `evidence_format: 1`; every bundle reader admits only the current revision and refuses an unmarked or other-revision bundle once, with the single recreate-observations guidance, instead of admitting earlier shapes one optional field at a time. The 6.7-era artifact inventory summary identities are no longer rebuilt: compare_artifacts checks the current projection only and reports a mismatch with the owner's guidance. The pre-6.6 identity diagnosis uses the same guidance. SQLite `worker_timeout_ms` and Dart AOT `string_pool.policy`, optional only for historical Evidence, are now required. BREAKING CHANGE: Evidence bundles written by REA 6.x (no `evidence_format`) are refused by import, comparison, reconstruction and analysis-snapshot readers as an integrity mismatch telling the caller to recreate the observations; re-exporting an earlier bundle does not update its format or identities. Bundles constructed by hand must include `"evidence_format": 1`. 6.7-era artifact summaries are refused by compare_artifacts, and SQLite and Dart AOT Evidence without the newly required fields fails validation. * fix(evidence): let the ledger application admit its bundle's format build_reconstruction_obligation_ledger registered the full bundle schema with the SDK, so an unmarked or other-revision bundle was refused as invalid_request before the format owner ran. Register it like coverage: the application parses the request envelope and admits the bundle. * feat(pcap)!: read capture Evidence through the current result schema only (#10879) Delete the pcap read-compatibility schema that defaulted executable identity for historical capture Evidence, and require query_labels_hex (null when unknown) now that every producer writes it. Evidence from an earlier format is refused at the bundle format owner; a record that omits these fields is reported as malformed instead of defaulted. BREAKING CHANGE: inspect_pcap_capture results always carry query_labels_hex, and analysis views no longer default missing tshark/capinfos identity fields. * feat(desktop)!: require the effective view policy in desktop state Evidence (#10886) inspect_desktop_application_state always records the complete policy it used, including sqlite_view_bytes. Drop the optional historical shape and the task draft's absent-policy branch. BREAKING CHANGE: desktop application state results without effective_view_policy, or with a policy missing sqlite_view_bytes, are refused as malformed. * feat(android)!: require component declaration facets and reference aggregates in Android Evidence (#10904) * feat(android)!: require component declaration facets and reference aggregates in Android Evidence The JADX producers always write the manifest component projection with every declaration facet, target_definition and direct_invokes_coverage. Require them, delete the duplicate observed component schema, drop the unknown declaration coverage that only described historical omission, and give manifest view results their explicit facet. BREAKING CHANGE: Android package, component and reference results missing these fields are refused as malformed; component declaration_coverage and its summary counts no longer include unknown; manifest view results always carry facet manifest. * refactor(android): parse package results with the domain schema directly * feat(browser)!: require the DOM length unit and redirect-scoped prior-hop facts (#10897) * feat(browser)!: require the DOM length unit and redirect-scoped prior-hop facts Both CDP producers always declare node_value_length_unit, and the observation session writes redirect_response on every redirect event and no other. Require the unit, drop the diff's absent-unit branch, and admit redirect_response exactly on redirect rows. BREAKING CHANGE: DOM snapshots without node_value_length_unit and redirect timeline rows without redirect_response are refused as malformed, including inline inspections passed to compare_web_captures. * docs(browser): drop the historical redirect_response omission note * feat(native)!: require native Evidence fields that were optional only for historical Evidence (#10946) Mach-O encryption, slice malformed cause, symbol runtime names and import facts; ELF export encoding facts and visibility; value-flow limits; load-image permissions and relocation symbols; Swift type-reference kind and GPU AMD target metadata are required. Legacy enum values (unrecorded, unknown visibility, undecodable, modinfo_field_exceeds_limit) and the retained schemas, view defaults and reinterpretations that served historical Evidence are deleted. BREAKING CHANGE: native records missing these fields are refused as malformed; recreate the observation.
Merged
22 tasks
morluto
added a commit
that referenced
this pull request
Nov 15, 2026
…ved undecodable status (#11092) verify-real-ghidra-com asserted that an unlisted-address record relabelled with the legacy undecodable status still parsed. #10946 removed that value with the other historical native enum values, so the lane failed on main after a correct not-in-listing result. The verifier now checks that the producer's record parses and that the relabelled record is refused.
This was referenced Nov 15, 2026
Closed
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.
Summary
Require the native Evidence fields that were optional only for historical Evidence, and delete the view defaults and reinterpretations that existed for it: Mach-O inspection, native exports, kernel modules, value flow, instructions, Objective-C/Swift metadata and native load images, plus the GPU, native-exports and load-image view defaults.
Refs #10510. Stacked on #10861 (per-site decision rows
native/*andanalysisView/gpuCodeObjectsView.ts,nativeExportsView.ts,nativeLoadImageView.tsin #10861).Problem and expected behavior
Each site below accepted a missing field because "older Evidence may omit it", then defaulted, normalized or reported an unknown for it. #10861 already refuses every REA 6.x bundle, so these branches only served Evidence that can no longer be read. Producer check per site (source-derived):
inspect_machoencryptionretainedInspectMachoSchemafilled an empty "predates encryption reporting" inventoryNativeMachoInspectionalways writes itretainedInspectMachoSchemadeleted (Mach-O view, managed/native verification useinspectMachoSchema)malformed_kind"unrecorded"machoSliceEncryptionSchemarequires itretainedMachoSliceEncryptionSchemaand the"unrecorded"view value deletedruntime_name; importraw_name,name_status,addendnullwithRuntimeName,parseDyldImportsalways write themname_statusisexactorambiguous, nonull)*_bytes_hex(4 sites)name_bytes_base64,name_utf8_decodable,visibility; version-name encodingnull/"unknown"; view added "lack retained encoding facts" unknownsNativeExportParseralways writes them; visibility isdefaultorprotectedvisibilityloses"unknown"; the schema now checks that a nullname_bytes_base64means an ASCII name and that an unresolved version name has no encoding facts; the view's historical unknown and default stripping are deletedmodinfo_field_exceeds_limitlimits,limits_reached; metadata omission countsReaGhidraBridgealways writes themunknown)undecodablecontaining_*,decoder_context,flow.classification_evidenceobjcImplementationClassNamere-split symbol-onlyClass(Category)namesclass_nameandcategoryseparatelyclass_nametype_reference_kindAppleSwiftDispatchFacetsalways writes itreadable/writable/executable; relocationsymbolblock_permissions_measured; relocation pages reported "symbol was not recorded"ReaGhidraBridgealways writes them (symbolis null when Ghidra has none)amd_target_metadatanull; the view removed the defaultGpuInventory/GpuObjectalways write itChange and scope
src/domain/native/{nativeInspection,nativeExports,kernelModule,nativeValueFlow,nativeInstruction,objcSwiftMetadata,nativeLoadImage}.ts,src/domain/apple/machoEncryption.ts,src/domain/gpu/gpuCodeObjects.ts,src/domain/evidenceRecordSummary.ts.machoView.ts,nativeExportsView.ts,nativeLoadImageView.ts(RELOCATION_SYMBOL_UNRECORDEDdeleted),gpuCodeObjectsView.ts.managedNativeVerificationSource.ts,nativeInvestigationGraph.ts,GhidraDolLoadImage.ts,GhidraLoadImageValues.ts.docs/guides/native/binary-diagnostics.md,docs/guides/native/native-investigation.md,docs/providers/ghidra-provider.md.Not included: managed, JavaScript/Electron and process rows of #10861 (separate slices); firmware
analysis_timeout_ms(kept optional by decision); golimits_reached(not a historical omission); the instructionincoming_referencesomission (conditional on the request, not historical).Contract and boundary impact
retainedInspectMachoSchema,retainedMachoSliceEncryptionSchema, the"unrecorded"encryption cause,objcImplementationClassName,RELOCATION_SYMBOL_UNRECORDED, the DOLblock_permissions_measuredcheck, and the view-level default removals.inspect_macho,inspect_native_exports,inspect_kernel_module,analyze_function,inspect_native_instruction,inspect_native_dispatch_metadata,inspect_native_load_image, GPU code-object inspection,inspect_analysis_viewand the Evidence bundle summary change as in the table.Expected effects:
Evidence and regression coverage
Tests replaced (historical admission → refusal):
machoView.test.ts(symbol withoutruntime_name, slice withoutmalformed_kind, report withoutencryptionare refused by the schema and the view),managedNativeVerificationSource.test.ts(inspect_macho without encryption is an integrity error),NativeExportsView.test.ts,NativeExportParser.test.ts,tests/boundary/filesystem/nativeExports.test.ts(rows without encoding facts or visibility, and non-ASCII names without bytes, are refused),NativeLoadImageViews.test.ts(relocation withoutsymbolrefused),GhidraDosComLoadImage.test.ts(observation without permissions or relocation symbol refused at the field path),evidenceRecordSummary.test.ts,objcSwiftMetadata.test.ts/nativeInvestigationGraph.test.ts(category ownership comes from the producer split).Added:
nativeInstruction.test.ts(undecodablerefused), shape checks foramd_target_metadata,type_reference_kindand the modinfo reason enum.Fixtures updated to what producers write (value-flow limits, load-image permissions and relocation symbols, Mach-O import fields, export runtime names).
Base reproduction or other evidence: source-derived — on the base, the replaced tests asserted that each omission parsed with a default, so the new refusal assertions fail there.
Remaining proof gaps: real Ghidra not run.
Observed, derived, and inferred claims remain distinguishable.
Artifact identity, source provenance, and failed attempts remain preserved.
Unsupported, incomplete, unavailable, or uncertain outcomes remain visible.
Validation performed
npm run check:fast(typecheck + lint) — passes.npm run docs:check— passes.npm run test:focusedover every test file referencing the changed producers, views or fixtures (213 files: 141 by schema/operation name plus 72 by field/fixture name), in batches; failures were fixed and the 21 affected files rerun — 870 passed. Final runs of the edited files (Mach-O view, analysis view MCP, load-image views, value trace, GPU, ObjC/Swift, instruction, kernel module, DOL/DOS load image) — passed.tests/conformance/contracts/mcpOutputSchemaProfile.test.tsandmcpResponseBudget.test.ts— 15 passed.Compatibility, safety, and release
invalid_request/evidence_integrity_mismatchat the field path). They come only from REA 6.x bundles, which feat(evidence)!: give Evidence bundles a format revision owned by one module #10861 already refuses; recreate the observation.malformed_kindloses"unrecorded"; ELF exportvisibilityloses"unknown"; instructionstatusloses"undecodable"; kernel modinfo entry reasons lose"modinfo_field_exceeds_limit"; Mach-O importname_statusis no longer nullable. Each removed value was written only for historical Evidence.native_dossier.value_flowobserved counts are no longer nullable.Author readiness
Human owner:
Before merge
type(scope): outcome.