Repository navigation
refactor(process): compose supervision and provider-client cleanup failures through the shared owner - #10905
Conversation
Codex Review Summary: ❌ FailedThis 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] This PR appears safe to merge; no actionable new issues were found. SummaryCentralizes cleanup-error composition across process, provider, application, and server code. It also gives Hopper session and launcher cleanup separate retry releases.
These changes remain absent from the target branch, so the PR is not fully superseded there. No actionable new issues were found. Validation: source review and Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Caller failures] --> B{Close completion known?}
B -->|Live cleanup records| C[Follow both failures]
B -->|Unknown close outcome| D[Keep cleanup pending]
E[Hopper session cleanup succeeds] --> F[Confirm session release]
G[Hopper launcher cleanup succeeds] --> H[Confirm launcher release]
F --> C
H --> C
C --> I[Complete only when both parts release]
Reviews (12) · Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." · Reviewed by Greptile |
…ilures through the shared owner
ed08e74 to
0e7a2b8
Compare
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
…res through the shared owner (#10908) * refactor(native): compose LLDB, native UI and signature cleanup failures through the shared owner * refactor(server): compose close, reset and session-status cleanup failures through the shared owner (#10915) * refactor(dotnet): compose managed snapshot cleanup failures through the shared owner (#10917) * refactor(dotnet): compose managed snapshot cleanup failures through the shared owner * refactor(flutter): compose build cleanup failures through the shared owner (#10918) * refactor(flutter): compose build cleanup failures through the shared owner * refactor(apple): compose asset catalog and keyed archive cleanup failures through the shared owner (#10919) * refactor(ghidra): join session cleanup failures through the shared owner (#10920) * refactor(ghidra): join session cleanup failures through the shared owner * refactor(desktop): compose build-setup cleanup failures through the shared owner (#10921) * refactor(desktop): compose build-setup cleanup failures through the shared owner * refactor(cutter): compose bridge service cleanup failures through the shared owner (#10922) * refactor(cutter): compose bridge service cleanup failures through the shared owner * refactor(electron): compose fuse and file-scope cleanup failures through the shared owner (#10923) * refactor(electron): compose fuse and file-scope cleanup failures through the shared owner * refactor(browser): compose scenario, web-bundle and capture cleanup failures through the shared owner (#10924) * refactor(application): compose uninstall, session retirement and decompile-all cleanup failures through the shared owner (#10933) * refactor(application): compose uninstall, session retirement and decompile-all cleanup failures through the shared owner * refactor(ghidra): compose Java probe, NativeAOT snapshot and provider-client cleanup failures through the shared owner (#10927) * refactor(ghidra): compose Java probe, NativeAOT snapshot and provider-client cleanup failures through the shared owner * refactor(hopper): compose provider close cleanup failures through the shared owner (#10928) * refactor(hopper): compose provider close cleanup failures through the shared owner * refactor(javascript): compose analysis worker runtime and inspection failures through the shared owner (#10929) * refactor(javascript): compose analysis worker runtime and inspection failures through the shared owner * refactor(kuna): compose project-cache and target-command cleanup failures through the shared owner (#10930) * refactor(kuna): compose project-cache and target-command cleanup failures through the shared owner * refactor(native): compose macOS provider, pwndbg and pwntools cleanup failures through the shared owner (#10931) * refactor(native): compose macOS provider, pwndbg and pwntools cleanup failures through the shared owner * refactor(wasm): compose WABT artifact cleanup failures through the shared owner (#10932) * refactor(wasm): compose WABT artifact cleanup failures through the shared owner * refactor(application): compose analysis-view cancellation and retained-content cleanup failures through the shared owner (#10941) * refactor(application): compose analysis-view cancellation and retained-content cleanup failures through the shared owner * refactor(kuna): compose span-close cancellation cleanup through the shared owner (#10942) * refactor(decompile): bind the initialization failure with its cleanup through the shared owner (#10965) * refactor(decompile): bind the initialization failure with its cleanup through the shared owner * refactor(cli): bind environment serve listener and close failures through the shared owner (#10966) * refactor(cli): bind environment serve listener and close failures through the shared owner * refactor(kuna): bind project export and span-read failures with their cleanup through the shared owner (#10967) * refactor(kuna): bind project export and span-read failures with their cleanup through the shared owner * refactor(cutter): bind descriptor read failures with their cleanup through the shared owner (#10968) * refactor(cutter): bind descriptor read failures with their cleanup through the shared owner * refactor(ida): bind workspace file failures with their cleanup through the shared owner (#10969) * refactor(ida): bind workspace file failures with their cleanup through the shared owner * refactor(rizin): bind debug finalization failures with their cleanup through the shared owner (#10970) * refactor(rizin): bind debug finalization failures with their cleanup through the shared owner * refactor(application): compose close rejections with unknown completion through one owner (#10971) * refactor(application): compose close rejections with unknown completion through one owner * refactor(hopper): compose startup and launcher close rejections through the shared owner (#10972) * refactor(hopper): compose startup and launcher close rejections through the shared owner * refactor(desktop): compose task-file close rejections through the shared owner (#10973) * fix(hopper): confirm reported close failures when a later close of the client succeeds * fix(hopper): keep owned close failures reading their own owner on retry HopperClient bound every failed close part to its client retry, so a launcher aggregate that already follows its child failures stayed pending after the launcher released them. AnalysisCleanupRelease.bindUnowned now owns the rule that a retry claims only ownerless failures; BinarySession's local copy of it is removed. * fix(hopper): release each close part's earlier failures when that part succeeds One shared retry release made the session part's earlier failures wait for the launcher part too, so a later close whose session cleanup succeeded kept reporting the session's released resources. HopperClient keeps one release per part (session, launcher), and each part confirms its own failures when it succeeds.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
@greptileai please review the latest commit: the branch was rebased on main after #11316 split the guard baselines into per-guard files, and the latest score predates that push. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
# Conflicts: # src/application/binary/BinarySession.ts # src/browser/history/CaptureFailures.ts # src/dotnet/ManagedSnapshot.ts # src/flutter/FlutterBuildProvider.ts # src/ghidra/GhidraProviderClient.ts # src/javascript/analysis/JavaScriptAnalysisWorker.ts # src/kuna/KunaProjectCache.ts # src/kuna/KunaProjectExport.ts # src/native/LldbCallTracer.ts # src/providers/OwnedCommandCleanup.ts # src/server/registerResetInvestigationTool.ts
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
# Conflicts: # src/artifacts/MachOSliceArtifactReader.ts
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
# Conflicts: # src/cutter/CutterBridgeClient.ts
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
…nup-composition # Conflicts: # scripts/verify/baselines/cleanup-dependency-binding.json
|
@greptileai review |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
…nup-composition # Conflicts: # src/artifacts/NodeSeaArtifactReader.ts
|
@greptileai review |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
…nup-composition # Conflicts: # src/artifacts/ArtifactHash.ts # src/artifacts/DotnetBundleArtifactReader.ts # src/artifacts/PyInstallerArtifactReader.ts # src/artifacts/deno/DenoVirtualFs.ts # src/artifacts/extraction/ArtifactExtraction.ts # src/artifacts/pyinstaller/PyInstallerPyzStore.ts # src/resources/StableRootArtifact.ts
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
…nup-composition # Conflicts: # src/artifacts/InesArtifactReader.ts
|
@greptileai review |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Summary
Moves 10 process-supervision and provider-client sites in 6 files onto the shared composition from #10900,
analysisErrorWithCleanupDependencies(primary, cleanup, operation). Each site composed a failure with its cleanup failure and bound exactly those two parts by hand; the shared owner now does both. None of the 6 files has a directbindCleanupDependencies()call left.Problem and expected behavior
103 production sites write
analysisErrorWithCleanupFailure(p, c, op).bindCleanupDependencies([p, c]): the composition and the rule that it completes from its parts live at every caller. The countedcleanup-dependency-bindingguard can only shrink once a shared owner exists for that rule.Expected: one owner composes the error and binds its parts; callers state only which failures they compose. Behavior is unchanged: the same dependencies are bound in the same order.
Change and scope
src/process/capture/FilesystemSnapshot.ts,ProcessCaptureLifecycle.ts,ProcessHarness.ts(2),src/process/DarwinProcessRunTokenReader.ts(2),src/providers/AnalysisClientCreation.ts(3),src/providers/OwnedCommandCleanup.ts: mechanical rewrite ofanalysisErrorWithCleanupFailure(p, c, op).bindCleanupDependencies([p, c])toanalysisErrorWithCleanupDependencies(p, c, op); imports updated.cleanup-dependency-bindingbaseline: the 6 entries are removed.Not included:
ArtifactAnalysisResources.tsandrunOwned.ts(open in #10653 and the capture-classifier stack), other families.Stacked on #10902.
Contract and boundary impact
analysisErrorCleanup.tsowns the composition; process supervision and provider clients consume it.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.
Evidence and regression coverage
node scripts/verify/architecture-guards.mjs --shrink-baselineslowered the counted baseline as listed; the guard passes.For evidence-bearing changes:
Validation performed
npm run check:fast— passed.node scripts/verify/architecture-guards.mjs— passed.npm run test:focused -- src/process/capture/FilesystemSnapshot.test.ts src/process/capture/ProcessCaptureLifecycle.test.ts src/process/capture/ProcessHarness.test.ts src/process/DarwinProcessRunTokenReader.finalization.test.ts src/process/DarwinProcessRunTokenReader.timeout.test.ts src/providers/OwnedCommandCleanup.test.ts tests/boundary/mcp/processCaptureCleanupSchema.test.ts tests/boundary/process/darwinProcessRunTokenReader.test.ts tests/boundary/process/processCaptureLifecycle.test.ts tests/boundary/providers/ownedCommandCleanup.test.ts tests/process-global/darwinCompilerCleanup.test.ts— 11 files, 163 passed, 4 skipped.npm run test:focused -- src/application/binary/DeferredAnalysisClient.test.ts(the only consumer ofAnalysisClientCreation) — 18 passed.Rebased onto main after #11316 (0e7a2b8). The earlier stack commits are already on main through #10744 and #10855. This branch now holds only this PR's commit.
AnalysisClientCreation.tskeeps main'scancelledBy/closedAnalysisClientErrorimports and importsanalysisErrorWithCleanupDependencies. The baseline removals moved intoscripts/verify/baselines/cleanup-dependency-binding.json.node scripts/verify/architecture-guards.mjs --shrink-baselinespassed. It removed the same 6 entries this PR removed before.npm run check:fastpassed.npm run test:local -- src/providers/OwnedCommandCleanup.test.ts src/application/process/ProcessScenarioPreparation.test.ts src/native/NativeCommandAnalysisError.test.tspassed 23 tests.Compatibility, safety, and release
Author readiness
Human owner:
Before merge
type(scope): outcome.