Repository navigation
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. What this changesThis PR gives isolated test resources explicit ownership and waits for database, worker, and child-process cleanup before removing temporary state. Example: An isolated Linux test opens a temporary state database and finishes.
Review scores
ProductKind: Bug fix · Worth it: Needs a maintainer decision · Fix scope: Complete Merge readiness⛔ Blocked before merge - 3 items remain Keep this PR open: it contains meaningful cleanup work, has active maintainer involvement, and remains paired with an unresolved issue; its conflicting branch still needs reconciliation with main’s replacement SQLite owners. Priority: P2 Decision needed
Before merge
FindingsNone. Provenance
Agent review detailsHow this fits togetherThe managed test launcher creates temporary namespaces, propagates ownership into Node children and workers, and consumes close or native-exit receipts before deleting those namespaces. flowchart TD
A[Managed test launcher] --> B[Owned temporary namespace]
A --> C[Validated resource context]
C --> D[Node children and workers]
D --> E[SQLite resource owners]
E --> F[Close and native exit receipts]
F --> G[Verified namespace cleanup]
B --> G
Technical reviewBest possible solution: Retain the useful cleanup changes through current ownership APIs and omit machinery whose responsibility main has retired. Do we have a high-confidence way to reproduce the issue? The original defect has recorded real-SQLite before/after proof and matching base source; no current-main reproduction was run, and main has since removed its original coordinator producer. Is this the best way to solve the issue? Owned cleanup respects the established retention invariant, but the best current implementation must reuse main’s replacement owners rather than carry forward obsolete coordination. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 1507c89eaa51. Merge-risk optionsMaintainer options:
Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfacePR surface statistics unavailable: the file list is incomplete. LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (23 earlier review cycles; latest 8 shown)
Reviewed October 18, 2026, 7:57 AM ET / 11:57 UTC (Revision 24). |
Preserve the original PR ancestry while integrating current main. Record explicitly joined native-worker exits separately from graceful close, retain failed receipt publication for retry, unwind default CLI failures through shared-state cleanup, and close a terminal Gateway outcome handle only when that operation opened it. Preserve distinct crash regressions. Complete the standalone PR-wrapper runtime dependency inventory and observe child-local claim admissions without racing parallel workers. Keep terminal Gateway bookkeeping fail-open while preserving native cleanup retry custody.
|
@fuller-stack-dev, are you still owning the integration of this takeover, or would you prefer a coordinated handoff of a narrowly scoped part? I rechecked: head remains I have not edited your branch or started a competing repair. Please keep this out of automatic stale closure while ownership and those remaining gates are decided. |
|
This assigned pull request has been automatically marked as stale after being open for 27 days. |
|
October 21 relevance check: please keep this open, with @fuller-stack-dev's existing ownership intact. Current-main This is a fresh source-level relevance check, not a fresh reproduction or approval of the old coordinator patch. The current review's conflict/CI and SDK-surface decision remain outstanding. I have not overwritten the assigned repair lane or duplicated its work; the earlier ownership/handoff question remains open. |
|
Closing this as superseded by #157413. I'll close #136552 as fixed by the same change. I rechecked the original defect against current main
This is a source-level check, not a fresh Vitest reproduction. It also revises my October 21 note. Main's @fuller-stack-dev, thanks for all the repair work here. If the receipt piece is still wanted, a narrow PR against current main would be easier than reconciling this branch. I'm happy to reopen if you see something I've missed. |
Closes #136552
What Problem This Solves
Fixes isolated state tests leaving SQLite lifecycle locks in the shared temporary directory after repeated runs.
User Impact
Developers and CI get task-owned cleanup without unlinking active coordination locks. Real-home and external databases keep the stable production lock root. The follow-up fixes also retire shared-state handles when CLI commands fail and when Gateway shutdown records its final outcome.
Why This Change Was Made
Owned test launchers propagate a validated temporary resource context through repository-owned workers and child processes. Cleanup closes admission and verifies descendants and claims before removing the namespace. Indeterminate cleanup retains its evidence.
Deliberately terminated native workers use a distinct, exact-owner exit receipt; it is not a successful JavaScript close receipt and cannot settle unrelated claims. CLI error handling now unwinds through cleanup, and a final Gateway boot-outcome write closes only the handle it opened.
Preserves Grynn's contribution and commit ancestry. Managed-update handoff databases still require explicit task-private injection in every executor; this namespace does not replace it.
Compatibility
This repair adds no user-facing configuration or application database schema. Only databases inside validated test-owned roots use the owned coordination namespace; production and external databases retain stable coordination. Ownership/exit receipts are disposable test metadata, not stored application data or a migration. The Docker helper retains the same metadata format and validation while consuming stdin asynchronously. Existing Doctor success, refusal and rollback contracts remain covered; the managed-case timing failures below are still unresolved.
Latest fixture cleanup correction
Published signed head:
9d9481f947631925cf20c02ac4fb81870da0e053.The follow-up changes only four test/support files. The placement read-view fixture now supplies its required policy configuration. Restored-session delivery waits for actual announcement entry, then drains the existing root work; the wait uses Vitest's abort signal so a missing announcement still reaches cleanup. The intentional schema-reader cancellation fixture observes and joins its actual child processes before releasing private state. Production behavior, assertions, deadlines, general claims, and descendant-process exclusions are unchanged.
Verification retained for this correction:
Compatibility review: the hosted review's generic config/data-model checklist is not a new migration requirement. Its own inspected compatibility boundary confirms that external databases keep their stable production coordination root, while the changed receipts are disposable launcher-owned test metadata. There is no operator setting, application schema, retention policy, or upgrade-format change in this follow-up. Existing production-boundary and external-path contention proof is retained.
The preceding published head's CI run 35883476151 completed with failures (146 successful jobs, 11 failed, 15 skipped). Doctor exit timeouts/descendant claims, CLI and Gateway cleanup failures, Windows native shutdown failure, and publication/startup/RPC timing failures remain disclosed; this correction is not a claimed repair for those. The local original-order Gateway replay had 3,525 passed, 15 failed, 7 skipped and no retained claims. The original-order chat-history replay reported 3,161 passed, one failed assertion, one existing skip, and one unhandled worker error (1,357.25 s, 38,517 private SQLite opens, 0 retained claims). The original history request passed in 3.46 s, so its hosted timeout remains unexplained, not fixed. The replay instead failed the unchanged full-mode media-containment assertion and a cron-delivery fork exhausted its roughly 4 GiB V8 heap; it is not a whole-shard pass. No assertions, deadlines, heap limits, or skip rules were relaxed. Required CI and review gates must pass on the actual published head before landing.
Earlier integration verification (56f6ef8)
The signed candidate
56f6ef87af(tree0c748d2ddd) integrates pinned main11867abe45and preserves Grynn's contribution and the preceding repair commits. Of 645 incoming main paths, 13 overlap this PR. Both manual conflicts were additive: the worker cancellation-authority import now coexists with agent/shared database cleanup, and the sparse-checkout helper coexists with the upstream release-retry test. Every non-overlapping blob is preserved exactly. Existing PR deltas also survive on the overlapping files; the package-fixture environment line now exists in main itself.The earlier failed/interrupted CLI, Doctor, chat and other diagnostics below remain disclosed; these narrower successes do not turn them into passing runs. Required exact-head CI/security/review, supported retained-outcome recovery, verified landing and cleanup are still required. No live handoff store, Odin/Mac update or service restart was used.
Earlier correction verification (39d5320)
The previous head
7b7789cf97completed CI with 148 successful and 15 skipped jobs, seven failing test jobs and the failed aggregate gate. It is not landed. The published correction39d5320beeintegrates the exact tested main31dd34ff19without conflicts; all 40 incoming blobs match that pinned main..mjsownership preload. Original-order shard 3/4 passes 1,067 tests; shard 1/4 records 1,368 passed, one failed, one skipped. Both corrected assertions pass. The remaining local auth-profile fixture returned its SQLite-contention failure; that is not represented as a passing shard. Both runs have private stores and zero retained claims. Static checks and independent API-direct review of the two-line change are clean.client.watchdog.test.tscreates the real default device-identity database and omitted shared-store closure. The unchanged standalone test reproduced the same wrapper failure (31.94 s, eight private opens). Awaiting the existing shared-database close inafterAllrepairs it without changing real proxy/IPv6 behavior, assertions or deadlines. The standalone case passes including cleanup (55.19 s, nine private opens); the complete original 46 files / 663 tests then pass including cleanup (115.14 s, 1,136 private opens, zero retained claims). Typed lint, its canonical type graph and independent API review are clean.The original chat job plan was replayed without source changes: its first 305-test group passed, and 1,427 test bodies were observed passing overall with no assertion failures. All seven formerly failing cases passed, but the outer command ended with SIGTERM near 30 minutes while the final effort-scopes fixture was active. There is no complete Gateway-group or wrapper pass. All 40,429 observed SQLite opens were private; the six claims retained at interruption were preserved as interruption evidence, not attributed as a natural-exit leak. The root was removed only after no process/open-file consumers remained. The hosted failures remain unexplained, not claimed fixed.
Native publication verified signed head
39d5320bee(treee2c0d40611). Required exact-head CI/review, supported retained-outcome recovery, verified landing and cleanup remain pending.Previous candidate validation
The signed head
7b7789cf97(treeb244d4c668) integrates main4f43e47518to resolve the verified worker-pool import conflict. Native publication verified the same remote head and tree. Exact-head CI, security/review gates and native merge recovery remain required; this is not a landing claim.The latest repairs drain agent databases before shared state in the standalone migrated-update finalizer, register fixture teardown before fallible native ownership capture, and give owned Doctor children their CLI startup flags before launch. Startup respawn checks, exact-process settlement, unrelated-claim exclusions and existing deadlines remain intact.
Earlier candidate validation
The signed candidate
5824fb426d(treef5e258df44) preserves the reviewed7a4c801c76ancestry and integrated main5e5f9c2755. The superseded exact-head CI run failed; it is not claimed as a hosted pass. The previous run failed eleven jobs plus its aggregate. Their recorded failures drove the following repairs rather than blind reruns:Prior applicable integration, native lifecycle, QA packaging and failure-path proof is retained below and in the review record. Required exact-head CI, applicable security/review gates, native preparation and retained-outcome recovery remain mandatory. Earlier runs deferred handoff-consumer subsets that lacked explicit isolation. The current task-only runner supplies and verifies private resolution in every executor; historical failed or interrupted runs are not reclassified as passes.
Evidence
The last uninstrumented four-case worker run passed three cases but missed the anchor-crash capacity deadline (155.92 s); all 747 native claims still settled. One bounded same-order diagnostic run passed all four (83.76 s) and observed dead runtime/command identities before capacity release; all 2,048 claims settled. The diagnostic did not establish the original failure's root cause. Its temporary logging was removed exactly, and no deadline or assertion changed. This remains a disclosed local uncertainty, not a claimed fix.
Remaining local uncertainties include unchanged macOS native-supervisor and Doctor service-definition failures, filesystem-watch snapshot observation and triage admission cases, interrupted broad replays, and fixtures refused by genuine disk-capacity guards. No assertions, timeouts or capacity thresholds were weakened. These are documented limits of the local evidence, not claims of repaired behavior. Required CI and reviews must pass on the actual published candidate before landing.
Earlier runs deferred the mutable-signals/lifecycle subset until explicit handoff-store injection was available. Every helper executed by the current diagnostic runner uses an explicitly private handoff resolver with resolved-path verification; incomplete replays do not establish complete-subset coverage. No live handoff store or Odin/Mac update was used as a fixture.
Inspectable original lock-leak reproduction and follow-up output
Recorded before the later cleanup fixes; this is the original regression proof, not a claim of final-head hosted CI. Both runs resolved their coordinator path inside a private fixture before acquiring real SQLite coordination. A Node child loaded the lifecycle preload, acquired and released the coordinator, and the parent closed claim admission and removed the owned namespace. Paths below replace host/user identifiers with fixture labels.
Latest uninstrumented local follow-up output:
The standalone-inventory finding was reproduced by the existing extracted-wrapper regressions and repaired by including the complete executable ownership/preload dependency list. The receipt format is ephemeral, launcher-owned test metadata, not an application database migration. Existing schema-17 Doctor success, refusal and rollback assertions remain intact and passed in the commands shard.