Skip to content

refactor(native): read dispatch symbol fallbacks as lenient name facts at the port - #10889

Merged
morluto merged 3 commits into
refactor/native-inventory-view-factsfrom
refactor/dispatch-metadata-name-facts
Nov 15, 2026
Merged

morluto merged 3 commits into
refactor/native-inventory-view-factsfrom
refactor/dispatch-metadata-name-facts

Conversation

@morluto

@morluto morluto commented Nov 15, 2026 •

Copy link
Copy Markdown
Owner

Summary

Fourth step of ADR docs/adr/native/typed-operation-facts.md: the native dispatch metadata symbol fallback reads list_names through executeFact with the shared lenient name contract, dropping its private .strict() row schema (ADR decision 2). Stacked on #10887.

Problem and expected behavior

  • NativeDispatchMetadataInspection parsed list_names with names.element.strict(), so a provider row carrying an extra field failed this workflow while every other reader accepted it.
  • Expected: the fallback reads the same typed fact as other readers. Unknown row fields are accepted and dropped from the fact (Evidence keeps them). Malformed rows and provider failures still fail, retaining the binary reader's refusal as a secondary failure and the observed list_names execution as partial Evidence.

Change and scope

  • src/application/native/NativeDispatchMetadataInspection.ts: the fallback calls executeFact(analysis, listNamesFact, {}, …); one error path for port and contract failures, both carrying binary_metadata_failure. dispatchNameInventorySchema is removed. The refusal reason changes from "provider returned an invalid inventory" to the shared "Provider returned an invalid name inventory" and now carries contract_issues field diagnostics.

Not included: EnhancedLiteralTracing (stacked next) and the guard against new local re-parses.

Contribution scope: not applicable (internal refactor; the strictness change is the recorded ADR decision).

Contract and boundary impact

  • Semantic owner and earliest changed stage: listNamesFact and executeFact; this reader keeps only the dispatch projection.
  • Contribution scope fit and linked maintainer decision: ADR docs(adr): accept parsing native operation facts once at the operation port #10866 (accepted), decision 2.
  • CLI and MCP/tool-catalog contract: output schema unchanged. Behavior: symbol rows with extra provider fields are now accepted instead of refused.
  • Provider, bridge, target-format, or platform compatibility: providers emitting extra name-row fields now reach the symbol-only fallback.
  • Evidence, artifact, provenance, or reconstruction contract: unchanged.
  • Target selection, authority, upstream behavior, and cleanup details (if applicable): not applicable.
  • Generated metadata (docs/public/product-catalog.json), package, or installation impact: none.

Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.

  • 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 added or updated: NativeDispatchMetadataInspection.fallback.test.ts "accepts symbol rows with provider fields the name contract does not name" (a row with provider_rank would fail the removed .strict() schema). Existing cases still cover the fallback failure with both refusals and the malformed symbol observation with partial Evidence. EnhancedNativeInvestigation.test.ts: the "undeclared field" rejection case is replaced by "accepts an inventory row with an undeclared provider field in both dispatch consumers" (inspect_native_dispatch_metadata, trace_native_ui_action); the remaining malformed-row cases assert the shared refusal reason.
  • Base reproduction or other evidence: source-derived (.strict() rejects unrecognized keys).
  • User-visible CLI/MCP output (if applicable): refusal reason wording for malformed symbol inventories, as above.
  • Remaining proof gaps: no real-provider run.

For evidence-bearing changes:

  • 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 test:focused -- src/application/native/NativeDispatchMetadataInspection.fallback.test.ts tests/boundary/providers/native/nativeDispatchFormatFailures.test.ts — 12 passed
  • npm run test:local -- src/application/native/EnhancedNativeInvestigation.test.ts — 43 passed
  • npm run check:fast — passed; pre-commit and pre-push hooks passed

Compatibility, safety, and release

  • Breaking changes or migration steps: none (accepts more input; refusal wording changes).
  • Real Hopper/Ghidra, browser, or OS coverage: not run.
  • Package or release metadata impact: none.
  • Security, privacy, process, or containment review: not applicable.

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.

Base automatically changed from refactor/function-inventory-facts to refactor/native-inventory-view-facts November 15, 2026 07:54
@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-15T08:53:12.162475Z cd2d9ce 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; no blocking issue was found.

Summary

Native inventory readers now use shared operation facts instead of their own row checks.

  • Dispatch fallback accepts name rows with extra provider fields.
  • Literal tracing checks string and procedure search rows through shared contracts.
  • Xref name lookup accepts rows with extra provider fields.
  • Enhanced native tools read inventory rows through shared contracts.
  • Directory decompilation loads procedure rows through the shared contract.
  • Retained function matching checks inventory rows through named contracts.
  • Procedure prompt completion checks rows through the shared contract.

No actionable correctness or security issues were found. This review was source-based; tests were not run. Whether another PR supersedes this one could not be confirmed because GitHub access was unavailable.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  Reader[Native inventory reader] --> Port[executeFact]
  Port --> Execute[Port execute]
  Execute --> Reply[Provider execution]
  Reply --> Contract[Named fact contract]
  Contract -->|Valid| Fact[Typed rows]
  Contract -->|Invalid| Error[Error with partial Evidence]
  Reply --> Source[Unchanged source Evidence]
  Fact --> Projection[Reader-specific result]
Loading

Reviews (4) · Last reviewed commit: "refactor(native): read literal searches ..." · Reviewed by Greptile

…ion facts (#10894)

* refactor(native): read literal searches and overview counts as operation facts

* refactor(native): read addressed inventory rows as operation facts in every reader (#10899)

* refactor(native): read addressed inventory rows as operation facts in every reader

* test(native): cover xrefs name resolution through the name fact contract

* test(server): pin procedure completion to the procedure inventory contract
@morluto
morluto force-pushed the refactor/dispatch-metadata-name-facts branch from 9fc5be1 to cd2d9ce Compare November 15, 2026 08:51
@morluto
morluto merged commit 7c6fa3f into refactor/native-inventory-view-facts Nov 15, 2026
@morluto
morluto deleted the refactor/dispatch-metadata-name-facts branch November 15, 2026 08:56
morluto added a commit that referenced this pull request Nov 15, 2026
…s at the port (#10889)

* refactor(native): read dispatch symbol fallbacks as lenient name facts at the port

* test(native): accept undeclared name-row fields in both dispatch consumers

* refactor(native): read literal searches and overview counts as operation facts (#10894)

* refactor(native): read literal searches and overview counts as operation facts

* refactor(native): read addressed inventory rows as operation facts in every reader (#10899)

* refactor(native): read addressed inventory rows as operation facts in every reader

* test(native): cover xrefs name resolution through the name fact contract

* test(server): pin procedure completion to the procedure inventory contract
morluto added a commit that referenced this pull request Nov 15, 2026
… fact contracts (#10883)

* refactor(native): read retained inventory views through the operation fact contracts

* refactor(native): read matching inventories through the operation fact contracts (#10887)

* refactor(native): read dispatch symbol fallbacks as lenient name facts at the port (#10889)

* refactor(native): read dispatch symbol fallbacks as lenient name facts at the port

* test(native): accept undeclared name-row fields in both dispatch consumers

* refactor(native): read literal searches and overview counts as operation facts (#10894)

* refactor(native): read literal searches and overview counts as operation facts

* refactor(native): read addressed inventory rows as operation facts in every reader (#10899)

* refactor(native): read addressed inventory rows as operation facts in every reader

* test(native): cover xrefs name resolution through the name fact contract

* test(server): pin procedure completion to the procedure inventory contract
@morluto morluto added the area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior label Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant