Repository navigation
feat(native): retain decompile export source facts - #8805
Merged
Merged
Conversation
Contributor
[Medium impact] The PR appears safe to merge; the added recovery checks agree with how resume preserves the original written record. SummaryAdds provider-reported source facts to decompile journal records and the derived index.
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Provider observation] --> B[Check target and profile]
B --> C[Record attempt outcome and source facts]
C --> D[Append-only journal]
D --> E[Derived index]
D --> F[Resume and check saved output]
F --> G{Bytes still match?}
G -->|Yes| H[Reuse original written record]
G -->|No| I[Keep file and record conflict]
Reviews (2) · Last reviewed commit: "test(native): retain source after export..." · Reviewed by Greptile |
This was referenced Nov 3, 2026
morluto
marked this pull request as ready for review
November 4, 2026 16:53
Codex Review SummaryThis 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. |
3 tasks done
3 tasks done
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
A resumed
decompile_alldirectory can contain functions from different provider exports while recording only each output file's digest. This adds per-attempt source facts when the provider can supply them, without retaining every pseudocode body in the session ledger. Related: #8260.Problem and expected behavior
When one Kuna function succeeds in a partial project and another is recovered from a separately built project with the same profile, the existing index cannot identify either producing project file. A written or failed pseudocode observation now records a provider-reported file digest and byte range, a single-function method, or an explicit unknown. A matching pre-existing file is adopted with its original producer unknown.
Change and scope
The provider reports a compact typed descriptor with the observation. The directory workflow records it only after target/profile checks and pairs it with that attempt's journal outcome. A failed pseudocode observation retains its source in the append-only journal; resume preserves earlier successful records. Snapshot replay does not restore this transient descriptor, so its absence stays unknown. A file range reports source facts; it does not retain or authenticate the source file, and a single-function method is not a unique run identity. This does not produce retrievable per-function Evidence records or establish a Ghidra session-edit revision.
Contract and boundary impact
provider_source. Older records may omit it and are unknown. Older REA versions that reject unknown journal fields cannot resume a newly written journal; retain the directory and use a current version or a new output directory.Expected effects:
Evidence and regression coverage
{"status":"reported","source":{"kind":"single-function-decompile"}}.source_not_available; a matching unjournaled file remainedexisting_file_origin_unknown. In separate real Kuna and Ghidra controls, a deliberately modified output was left untouched and restoring its prior bytes recovered its prior source record. These controls used one unexecuted, unchanged test target.Validation performed
npm run check:ci:fast— passed.npm run docs:check— passed.Compatibility, safety, and release
Author readiness
Human owner:
Before merge
type(scope): outcome.