Skip to content

feat(managed)!: require managed Evidence fields that were defaulted only for historical Evidence - #10952

Merged
morluto merged 2 commits into
mainfrom
feat/managed-evidence-current-format
Nov 15, 2026
Merged

morluto merged 2 commits into
mainfrom
feat/managed-evidence-current-format

Conversation

@morluto

@morluto morluto commented Nov 15, 2026 •

Copy link
Copy Markdown
Owner

Summary

Require the managed Evidence fields that were optional or defaulted only for historical Evidence, and delete the historical bare-name comparison mode that served them.

Refs #10510. Stacked on #10861, which now carries #10946 (per-site decision row managed/* in #10861).

Problem and expected behavior

Managed member inspections, comparisons, verification results and application graphs defaulted many fields to null (or omitted them) because "Evidence recorded before this field existed" lacked them. Comparison then switched to an "explicitly limited bare-name mode" whenever either side had nesting_read: null. #10861 already refuses every REA 6.x bundle, so only current producers' records reach these readers.

Producer check (source-derived): ManagedMemberInspector, ManagedMemberInspectorCore, ManagedMemberRows, ManagedMemberRecovery, the comparison owner, managedNativeVerificationMatch and managedApplicationGraph write every field below, typed against the schema's output type.

Field Before After
nesting_read boolean | null, default null ("historical") boolean; the bare-name comparison mode and its limitation are deleted
signature_resolution type-names-v1 | type-names-v2 | null, default null type-names-v2 | null, required; null only when member decoding exceeded capacity (no members)
assembly, exported_types, user_strings, selection, method_rows default null required, still nullable (null keeps its current meaning: capacity, whole assembly, not examined)
Type name_sha256, enclosing_type_token; signature resolved_sha256; exception-clause class facts; locals signature; declaring-type names; call-edge/field-access il_offset and target_identity_sha256; member-ref parent_name default null required, still nullable (null = unresolved/absent, never "unrecorded")
Field constant exactOptional ("omission means historical Evidence") required, nullable
Comparison side resource_limits optional ("historical comparisons omit") required
Verification native_implementations.runtime_provided null default required count
Application graph counts.calls, counts.field_accesses null default ("projected before") required counts

Views: managedMemberViewSchemas.ts no longer strips defaults from page columns or re-extends il_offset.

Change and scope

  • src/domain/managed/managedArtifact.ts, managedMemberComparison.ts, managedMemberComparisonCoverage.ts, managedMemberComparisonMatch.ts (DeclaredName is only the tagged nominal digest), managedMemberSignatureIdentity.ts (wording), managedNativeVerificationSchemas.ts, managedApplicationGraph.ts; src/domain/analysisView/managedMemberViewSchemas.ts.
  • Docs: docs/guides/managed/managed-code-analysis.md (every historical-omission claim for member Evidence replaced by the current meaning of null).

Not included: comparableSides/hasSignatureResolution keep their raw-digest fallback when one side has signature_resolution: null. With current producers that side has no members, so the fallback is inert; removing it needs a schema invariant (null attestation ⇒ empty members) and is left as follow-up cleanup. Reconstruction decompiler version/executable_sha256 defaults are caller input, not historical Evidence, and are unchanged.

Contract and boundary impact

  • Semantic owner and earliest changed stage: the managed domain schemas; views, comparison and graph consume the owner's parsed facts. Superseded: the bare-name comparison mode, the type-names-v1 value, the historical view default stripping.
  • Contribution scope fit and linked maintainer decision: Phase 5 / D4 of the approved plan, tracker [Design] Version Evidence bundles and own historical format compatibility in one place #10510.
  • CLI and MCP/tool-catalog contract: output schemas of inspect_managed_members, compare_managed_members, managed/native verification, managed application graph and inspect_analysis_view (managed members) change as in the table.
  • Provider, bridge, target-format, or platform compatibility: none.
  • Evidence, artifact, provenance, or reconstruction contract: managed records missing these fields are refused as malformed.
  • Target selection, authority, upstream behavior, and cleanup details: not applicable.
  • Generated metadata, package, or installation impact: catalog digests change.

Expected effects:

  • Read existing files or captured data.
  • Launch or attach to a process.
  • Inject instrumentation or run scripts/code.
  • Change process memory, registers, files, or configuration.
  • Contact network services.
  • Recover protected code or work around protections.
  • Documentation or usability only; no target interaction.
  • Not sure yet; investigation or maintainer guidance needed.

Evidence and regression coverage

  • Tests replaced (historical admission → refusal or current meaning): ManagedMemberInspector.test.ts (rows without parent_name, inspections without exported_types refused), ManagedFieldConstants.test.ts (field without constant refused), ManagedSignatureResolution.test.ts (type-names-v1 refused), managedMemberComparison.test.ts (bare-name historical tests removed; comparison without resource_limits refused), managedMemberComparisonFromMetadata.test.ts (unscoped/unresolved/absent cases use explicit null, the selected-identity case uses nesting_read: false), managedApplicationGraph.test.ts (graph without relation counters refused; pre-selection test removed), managedMemberView.test.ts (summary refuses a parent without nesting_read; edge rows require il_offset), managedMemberSummaryMcp.test.ts (unexamined collections as explicit null).

  • Producer fix found by the stricter schema: ManagedMemberInspector's unavailable-metadata result relied on the assembly default; it now writes assembly: null.

  • Base reproduction or other evidence: source-derived — on the base, the replaced tests asserted that each omission parsed with a default, so the refusal assertions fail there.

  • Remaining proof gaps: no real .NET toolchain beyond the existing fixtures.

  • 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:focused over every test file referencing managed/.NET/IL2CPP inspections, comparisons, verification, graphs or examples (80 files), in two batches — 1,525 passed, 1 skipped. The 20 files that failed on the first run (historical-admission tests and the assembly producer gap) were fixed and rerun — 703 passed — before the final full run.
  • Pre-push hook (typecheck + lint).
  • After the guide follow-up and the ReconstructionObligationCandidates.test.ts graph-counter fixture fix: npm run check:fast and npm run docs:check pass; npm run test:focused over that file and 10 other files referencing managed graph/member fields — 255 passed.

Compatibility, safety, and release

  • Breaking changes or migration steps:
    • Managed records missing any field in the table are refused as malformed. 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.
    • Enum and type narrowing for callers: nesting_read is never null; signature_resolution loses "type-names-v1"; comparison resource_limits, verification runtime_provided and graph calls/field_accesses counts are always present.
    • Comparisons no longer fall back to bare declaring-type names; the "predates enclosing-name identity" limitation is gone.
  • Real Hopper/Ghidra, browser, or OS coverage: none.
  • Package or release metadata impact: breaking marker on the commit.
  • Security, privacy, process, or containment review: none.

Author readiness

Human owner:

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-15T09:36:14.605837Z fb9458a New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@greptile-apps

greptile-apps Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5 Tier: plus

[Medium impact] The reviewed changes appear safe to merge.

Summary

Requires current managed Evidence fields and removes historical bare-name comparison.

  • Managed inspections require fields that current Evidence producers write.
  • Member comparisons match declaring types by nominal identity, not bare names.
  • Application graph summaries always include call and field-access counts.
  • Native verification results always include the runtime-provided method count.

Reviews (3) · Last reviewed commit: "docs(managed): drop the remaining histor..." · Reviewed by Greptile

…nly for historical Evidence

Member inspections, comparisons, verification results and application graphs
require every field their producers write. nesting_read is boolean and the
bare-name comparison mode for historical observations is deleted;
signature_resolution loses type-names-v1. The unavailable-metadata member
result now writes assembly: null instead of relying on a default.

BREAKING CHANGE: managed records missing these fields are refused as
malformed; recreate the observation.
@morluto
morluto force-pushed the feat/managed-evidence-current-format branch from c8632ff to fb9458a Compare November 15, 2026 09:34
@morluto
morluto merged commit c36649a into main Nov 15, 2026
6 checks passed
@morluto
morluto deleted the feat/managed-evidence-current-format branch November 15, 2026 09:42
Davmunrey added a commit to Davmunrey/rea that referenced this pull request Nov 15, 2026
morluto#10952 made managed Evidence fields required where they were defaulted
only for historical Evidence. parameter_defaults follows the same rule:
it is required and nullable, the historical-omission sentence is gone
from the schema and the guide, the member-comparison disclosure reads
the field directly, the workflow example writes an empty list, and the
historical-omission test now checks that a member record without the
field is refused.
@morluto morluto added area: evidence Evidence, artifacts, and reconstruction enhancement New feature or request labels Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: evidence Evidence, artifacts, and reconstruction enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant