Repository navigation
fix(qa): clean leaked Gateway and plugin roots after startup failures - #119494
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 5, 2026, 1:35 AM ET / 05:35 UTC. ClawSweeper reviewWhat this changesThe PR starts QA Gateway cleanup immediately after workspace allocation and records the staged bundled-plugin root before fallible staging so startup failures remove both temporary locations. Merge readinessKeep open: current main still leaks QA temporary roots on pre-startup and partial-staging failures, while this PR repairs the lifecycle owner coherently. No actionable patch defect was found; the protected Priority: P2 Review scores
Verification
How this fits togetherQA Lab launches an isolated Gateway in a temporary workspace and sometimes stages bundled plugins in a repository artifact directory. Startup preparation feeds Gateway launch and RPC readiness, and failure handling must remove every root allocated by that lifecycle. flowchart LR
A[QA scenario] --> B[Allocate workspace]
B --> C[Register startup cleanup]
C --> D[Stage bundled plugins]
D --> E[Resolve runtime and start Gateway]
E --> F[Gateway RPC ready]
D --> G[Startup failure]
E --> G
G --> H[Remove workspace and staged root]
Decision needed
Why: The Before merge
Agent review detailsSecurityNone. PR surfaceSource +4, Tests +52. Total +56 across 3 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain the single QA Gateway lifecycle owner, refresh the branch against main if needed, and land once exact-head checks confirm the targeted cleanup regressions. Do we have a high-confidence way to reproduce the issue? Yes—current main has a source-defined path: invoke the repository-CLI mode with no CLI entry, or fail bundled-plugin staging after its external root is created. This read-only review did not execute the path. Is this the best way to solve the issue? Yes—the PR expands the existing Gateway lifecycle cleanup boundary and derives the same staged-root path before fallible work; a second cleanup wrapper would duplicate ownership and miss early exits. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against dc93ea6d699a. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
What Problem This Solves
Resolves a problem where an early QA Gateway startup failure left its temporary workspace on disk, and a failure while staging bundled plugins also leaked a separate runtime directory outside that workspace.
Why This Change Was Made
Start the existing Gateway startup cleanup scope immediately after allocating its workspace, and register the canonical bundled-plugin staging root before any fallible staging or host-version lookup. The same lifecycle owner now cleans early, partial, and post-staging failures without adding a fallback, changing packaged-plugin behavior, or altering runtime configuration.
User Impact
Repeated QA Gateway startup failures no longer accumulate abandoned temporary workspaces or bundled-plugin staging directories.
Evidence