Repository navigation
feat(native): retry failed directory decompiles independently - #8811
Conversation
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. |
[Medium impact] The reviewed changes appear safe to merge; no new actionable defect was confirmed. SummaryAdds an opt-in independent retry for directory exports after Kuna explicitly reports a function failure.
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Read project pseudocode] --> B{Null with reported function failure?}
B -- No --> C[Keep normal outcome]
B -- Yes --> D{Independent retry selected?}
D -- No --> E[Record failure with retry guidance]
D -- Yes --> F[Append and sync original failure]
F --> G[Run independent decompile]
G --> H[Record retry outcome separately]
G --> I[Cancellation or incomplete cleanup]
I --> J[Keep original journal entry and cleanup owner]
Reviews (5) · Last reviewed commit: "chore: reconcile merged independent retr..." · Reviewed by Greptile |
Fresh independent decompiles stay uncached, and one-shot pseudocode can still replay. Failed-export limitations keep both the fresh-run fact and main's export-state checks.
A failed export still reports that per-function records are not exposed, and an explicit fresh decompile remains a separate single-function run.
(cherry picked from commit ac30fbd)
Comments Outside DiffThese findings could not be posted inline.
|
# Conflicts: # src/application/binary/AnalysisSnapshotCache.ts
Summary
When a Kuna project export reports a function decompilation failure, a direct independent retry can succeed but
decompile_allstill records only the project failure. Allow an explicit directory retry and preserve both observations. Related: #8167.#8793 merged into main as
81c09888and #8805 asb97023809f. GitHub retargeted this PR to main after #8793 merged; the current head reconciles the squash history without changing the tested result tree.Problem and expected behavior
An analyst exporting pseudocode can opt into
retry_failed: "independent_fresh"(CLI--retry-failed independent_fresh). When a project failure is reported without the opt-in, the affected failure row explains how to resume with it. REA appends the project failure before independently retrying, records the new attempt and its actual source, and leaves the project observation unchanged. Independent analysis can have different context. Errors and missing export blocks without an explicit function-failure observation do not trigger this retry.Change and scope
Kuna's project reader owns the distinction between a reported failure and an absent export block. The directory workflow uses that typed observation, not error-message matching. Missing facts remain unknown; a missing export block does not prove that a function lacks a body. Retry failure, cancellation and incomplete cleanup preserve the first journal entry. Contribution scope decision: not applicable; this uses the existing local static analysis capability and output directory authority.
Contract and boundary impact
procedure_pseudo_codemay exposeraw_result.pseudocode_absence. Directory records can include the same fact.Expected effects:
Evidence and regression coverage
not-in-exportrather than claiming a body is absent. This does not classify other omissions.For evidence-bearing changes:
Validation performed
On the reconciled tree built from #8793 head
b44fd0aa26and Node 24.22.1,npm run build:cachedpassed (2 tasks executed, 1 cached), andnpm run check:fastpassed with typecheck and lint both executed. Four focused directory retry, Kuna MCP and workflow Evidence suites passed 95 tests; targeted formatting on all 14 changed files andgit diff --checkpassed. The #8793 squash tree at81c09888is byte-identical tob44fd0aa26, and this PR head has the same tree that passed those checks. No real Kuna or other-provider run was repeated on the reconciled head. The older validation below applies to the earlier temporary-base branch.npm run test:focused -- tests/boundary/providers/kuna/kunaDirectoryIndependentRetryMcp.test.ts tests/boundary/providers/kuna/kunaBatchDecompileMcp.test.ts src/application/decompileDirectory/decompileAll.test.ts src/application/WorkflowEvidence.test.ts— 89 passed.npm run check:ci:fast— passed, with existing lint warnings.npm run docs:check— passed.Compatibility, safety, and release
pseudocode_absencefield. New code accepts earlier records with the fact unknown; no backwards-reader compatibility is claimed. This is in addition to the source fields introduced by feat(native): retain decompile export source facts #8805.Author readiness
Human owner:
Before merge
type(scope): outcome.