Repository navigation
refactor(ghidra): let Ghidra cleanup errors read the client's and checkpoint's release - #10802
Merged
morluto merged 1 commit intoNov 15, 2026
Conversation
…ckpoint's release GhidraClient and GhidraCheckpoint bind each cleanup failure to an AnalysisCleanupRelease and confirm it when a later close or retry releases everything, instead of keeping a set of failures and pushing resolveCleanup() to each. Removes two resolveCleanup() calls; the counted baseline shrinks.
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. |
22 tasks
Contributor
[Low impact] The PR appears safe to merge; no actionable failures were found. SummaryReplaces Ghidra cleanup-failure sets with shared release objects. Existing errors read completion from their owner instead of receiving a completion update.
Reviews (1) · Last reviewed commit: "refactor(ghidra): let Ghidra cleanup err..." · Reviewed by Greptile |
morluto
merged commit Nov 15, 2026
c820d43
into
refactor/darwin-helper-release-claims
1 check passed
morluto
added a commit
that referenced
this pull request
Nov 15, 2026
…s release (#10801) * refactor(errors): read cleanup completion from dependencies instead of pushing it to dependents AnalysisError.cleanupIncomplete becomes a getter over the error's own unresolved state and its bound dependencies. The WeakRef dependents graph and resolveCleanup's push propagation are removed, and subclasses mark their initial state through markCleanupIncomplete instead of overriding a public mutable field. * fix(errors): settle bound dependencies before binding more A composite whose dependencies had released but whose status was never read stayed incomplete when a later dependency was bound. * refactor(errors): let errors read a lease group's release instead of resolving them (#10759) AnalysisCleanupLeaseGroup no longer calls resolveCleanup() on its error. The error holds the group as a release claim and reads cleanupReleased when asked, so completion follows the lease owner without a push. * chore(verify): count resolveCleanup and bindCleanupDependencies calls so they only shrink (#10763) * refactor(errors): let errors read a lease group's release instead of resolving them AnalysisCleanupLeaseGroup no longer calls resolveCleanup() on its error. The error holds the group as a release claim and reads cleanupReleased when asked, so completion follows the lease owner without a push. * chore(verify): count resolveCleanup and bindCleanupDependencies calls so they only shrink * refactor(process): let worker cleanup errors read their root epoch's release OwnedWorkerRuntime's root epoch is now an AnalysisCleanupReleaseClaim. Errors bound to it read its release when asked instead of the epoch pushing resolveCleanup() through weak references, and a runtime without a retained root binds an already-released owner. Removes the OwnedWorkerCleanupFailure structural type and four resolveCleanup() pushes; the counted baseline shrinks accordingly. * refactor(pcap): let pcap cleanup errors read command and snapshot release (#10792) Retained pcap commands, retained snapshot failures and snapshot completion descriptors now own their release and errors read it: commands and snapshot failures implement AnalysisCleanupReleaseClaim, and a failed completion-descriptor close is retried through an AnalysisCleanupLease bound to its error. Removes four resolveCleanup() pushes; the counted baseline shrinks accordingly. * refactor(process): let Darwin helper cleanup errors read their owner's release Darwin helper cache and run-token reader root cleanup now record an AnalysisCleanupRelease that every failure reports; a successful retry confirms it. Replaces the first-failure anchor that later failures depended on and the resolveCleanup() push. Removes two resolveCleanup() and two bindCleanupDependencies() calls; both counted baselines shrink. * refactor(ghidra): let Ghidra cleanup errors read the client's and checkpoint's release (#10802) GhidraClient and GhidraCheckpoint bind each cleanup failure to an AnalysisCleanupRelease and confirm it when a later close or retry releases everything, instead of keeping a set of failures and pushing resolveCleanup() to each. Removes two resolveCleanup() calls; the counted baseline shrinks.
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
Moves Ghidra's client and checkpoint cleanup completion onto the read-side model from #10744: each cleanup failure is bound to an
AnalysisCleanupReleasethat the owner confirms when a later close or retry releases everything, instead of the owner keeping a set of failures and pushingresolveCleanup()to each. Fourth owner-family slice of #10763's baseline.Problem and expected behavior
GhidraClientcollected every cleanup failure in#cleanupFailuresand calledresolveCleanup()on each after a successful close;GhidraCheckpoint.retryCleanup()did the same for checkpoint file removal failures. Expected behaviour is unchanged: those errors report incomplete cleanup until the owner releases everything, then complete; failures from a later cycle report against a fresh release.Change and scope
GhidraClientandGhidraCheckpointeach hold oneAnalysisCleanupRelease(from refactor(process): let Darwin helper cleanup errors read their owner's release #10801) per unreleased cleanup cycle; failures are bound to it, success confirms it and starts a new one.resolveCleanup()calls;cleanup-resolve-pushbaseline shrinks.Stacked on #10801 (Darwin helper slice, which adds
AnalysisCleanupRelease), on #10789, on #10744.Contribution scope: not applicable (internal refactor within existing boundaries).
Follow the contribution scope.
Unresolved scope, authority, side effects, or required verification block
integration. Link the required maintainer scope decision for new providers or
capabilities involving target execution, injection, mutation, or protection
recovery; ordinary fixes within existing boundaries may state "not applicable".
Draft PRs may leave the scope decision pending and the readiness and merge checklists
unchecked. Maintainers can help resolve open questions.
Contract and boundary impact
AnalysisError.cleanupIncompletereads it.docs/public/product-catalog.json), package, or installation impact (CI generates and validates ignored catalogs andskills/; edit authored instructions in.agents/skills/reverse-engineer-anything/and never commit build outputs):Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.
Evidence and regression coverage
tests/boundary/providers/ghidra/ghidraClient.test.tsalready requires retained cleanup failures to become complete after a later close or retry (for example lines 408-820 assertcleanupIncompletefalse after release).For boundary fixes, identify the applicable boundary regressions
and lifecycle regressions
covered by the evidence above, and explain relevant gaps.
For evidence-bearing changes:
Validation performed
npm run check:fast— passed.node scripts/verify/architecture-guards.mjs --shrink-baselines— passed (baseline lowered).npm run test:local -- src/ghidra/GhidraCheckpoint.test.ts src/ghidra/GhidraProvider.behavior.test.ts src/ghidra/GhidraSessionError.test.ts src/ghidra/GhidraRequestQueue.test.ts— 353 passed.npm run test:focused -- tests/boundary/providers/ghidra/ghidraClient.test.ts tests/boundary/providers/ghidra/ghidraFileFailure.test.ts tests/boundary/providers/ghidra/ghidraLaunchOutcome.test.ts— 123 passed.command— resultCompatibility, safety, and release
Author readiness
Human owner:
Before merge
type(scope): outcome.