Skip to content

fix(native)!: preserve value-flow absence semantics - #8785

Merged
morluto merged 4 commits into
mainfrom
codex/native-value-flow-absence
Nov 4, 2026
Merged

morluto merged 4 commits into
mainfrom
codex/native-value-flow-absence

Conversation

@morluto

@morluto morluto commented Nov 3, 2026 •

Copy link
Copy Markdown
Owner

Problem and change

analyze_function represented Kuna value flow as unrecorded, while trace_native_values turned any unrecorded facet into a provider-wide claim that the provider has no model. Record the actual REA Kuna integration's unavailability at the provider boundary and propagate that reason through the existing dossier, retained view and trace. For an unrecorded facet from any provider, the trace now says the observation was not recorded for that procedure. Fixes #8783.

This does not claim that upstream Kuna lacks all def-use capabilities, change target execution, or add a provider operation.

Snapshot impact

The Kuna analysis profile changes, so older Kuna snapshots are refused regardless of which operations they contain. Open without the old snapshot and save a fresh one. Native-value-trace workflow profiles also change for all providers, so older trace entries are not replayed as new results. The semantic marker is independent of the value-trace revision in #8384 so both commitments can coexist. Historical Evidence remains importable. This is a profile-wide breaking change, not an automatic migration.

Validation

  • Real Kuna 1.989 stdio MCP on one unexecuted arm64 Mach-O in compact and full input/output profiles: dossier, value_flow_parameters view and trace all returned the same explicit REA-provider reason. Target SHA-256 c244f7d7d9fa9b7f4cfcb1f69d69cc1f83ad98fe38b0293b223b3ca7d9076363 was unchanged.
  • Real earlier Kuna snapshot was refused with a profile mismatch; its extracted historical Evidence bundle imported successfully into a target-free session, and the snapshot was unchanged. Extraction was a manual control, not an advertised migration command.
  • Real Ghidra 12.1.4 one-shot value trace on a separate unchanged, unexecuted fixture retained its 10-node, 10-edge graph and no unknowns.
  • 159 focused provider, snapshot, view, trace and MCP tests passed; check:ci:fast, docs:check, and git diff --check passed. Other providers and real cleanup failure were not exercised.

Source-retention integration control

In an isolated, uncommitted combination of this head 465e8b1e0 and #8384 a20c186eb, one fixed-adapter test conflict was resolved to preserve #8384's refusal when source Evidence cannot be retained. The focused trace, snapshot, MCP and Kuna provider files passed (119 tests). Real Kuna 1.989 and Ghidra 12.1.4 stdio MCP in compact and full profiles returned resolvable linked trace sources in exported bundles; Kuna's trace kept its provider-specific unavailability, and Ghidra returned nine nodes for the tested function. The unexecuted target digest stayed c244f7d7d9fa9b7f4cfcb1f69d69cc1f83ad98fe38b0293b223b3ca7d9076363.

A compiled profile control checked four distinct digests for the old workflow, either individual semantic change, and their combination. The combined profile contained both #8384's revision 2 and this PR's absence marker. This is a combined-checkout control, not standalone PR CI or proof of cleanup/failure behavior.

Offline and fresh-snapshot controls

Real Kuna 1.989 MCP sessions in compact and full profiles exported the dossier and trace, then fresh target-free servers imported the bundles. Both records round-tripped exactly, and the bounded parameter view returned the same explicit unavailability reason as the dossier and trace. Fresh Kuna snapshots reopened successfully and a subsequent trace returned the same reason; those snapshots had no cached workflow entry and no replay limitation, so this is a live re-analysis control, not evidence of Kuna replay.

With real Ghidra 12.1.4 on the same target and both profiles, fresh snapshots included a workflow entry; reopening and tracing retained the same node count and reported a snapshot-loaded function observation. This does not establish whole-workflow replay or source-closure correctness (covered separately by #8384). The snapshots and unexecuted target remained unchanged during the second sessions.

Function-specific Ghidra unavailability

With real Ghidra 12.1.4 MCP on a separate unexecuted arm64 Mach-O, analyze_function(EXTERNAL:0x1) reported that the selected procedure had no HighFunction p-code model. In both compact and full profiles, the retained value_flow_parameters view and trace_native_values preserved that exact function-specific reason. The target SHA-256 remained aeed1f352785fd14c9cfcc0e9cf9958354e22ca5c8b979d2f6047585c45ed4d8. This is one external-function control, not a provider-wide Ghidra capability claim.

Retained-Evidence summary control

Fresh target-free MCP sessions imported the earlier extracted Kuna Evidence bundle and the new live-session bundle separately. get_evidence_bundle(detail: summary, filters: {operation: "analyze_function"}) reported not-recorded for both old dossiers and unavailable with the REA Kuna reason for the new dossier, in both schema profiles. This verifies that historical nulls are not rewritten into the newer provider claim at the retained-record boundary.

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.

@greptile-apps

greptile-apps Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5 Tier: apex

[Medium impact] The PR appears safe to merge; no actionable correctness or security issues remain.

Summary

Kuna now records native value flow as explicitly unavailable. Traces distinguish an unrecorded observation from a provider’s stated reason.

  • Native value traces distinguish missing observations from reported unavailability.

Reviews (4) · Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." · Reviewed by Greptile

@chatgpt-codex-connector

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

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-11-04T17:52:24.205567Z
We couldn’t complete this review. Comment @codex review to try again.
1e0be56 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.

Keep the fixed-adapter trace refusal as capability_unavailable when source
Evidence cannot be retained, and keep the recorded-absence reason for traces
that do run.
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

Stop freezing the unrecorded and Kuna unavailable sentences. Assert the
procedure-scoped unknown and that an explicit provider reason is preserved.
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@morluto
morluto merged commit 1ff5a65 into main Nov 4, 2026
49 checks passed
@morluto
morluto deleted the codex/native-value-flow-absence branch November 4, 2026 18:32
@greptile-apps greptile-apps Bot mentioned this pull request Nov 4, 2026
3 tasks done
@morluto morluto added area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior bug Something isn't working labels 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 bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Native value-flow absence changes meaning between dossier and trace

2 participants