Repository navigation
chore(ci): trace Windows cold command startup - #363
vincentkoc wants to merge 11 commits into
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. Reviewed October 8, 2026, 7:27 AM ET / 11:27 UTC (Revision 7). ClawSweeper reviewWhat this changesThis PR adds bounded Windows startup receipt files and separates controller and target environments, alongside stacked plugin resource-workload reporting and scenarios. Example: A Windows fixture supplies a restricted command environment
Review scores
ProductKind: Maintenance · Worth it: Yes · Fix scope: Partial Merge readiness⛔ Blocked before merge - 4 items remain Keep this maintainer-authored diagnostic draft open. The controller-environment repair has landed separately, but independent receipt collection remains distinct; the conflicted stack and two concrete defects prevent landing this head. Priority: P2 Before merge
Findings
Tests
Agent review detailsHow this fits togetherCrabpot checks OpenClaw plugin compatibility and resource behavior. Its command supervisor starts fixture and inspector commands, enforces deadlines, and reports whether their processes and output streams closed. flowchart TD
A[Fixture or inspector command] --> B[Command supervisor]
C[Parent environment] --> D[PowerShell controller]
B --> D
E[Caller command environment] --> F[Native command in Windows Job]
D --> F
F --> G[Readiness and cleanup results]
B --> H[Bounded startup receipt files]
D --> H
F --> H
Technical reviewBest possible solution: Keep the landed controller repair and shared phase diagnostics, preserve the historical receipts, and retain additional temporary instrumentation only within the already-recorded investigation scope. Do we have a high-confidence way to reproduce the issue? No high-confidence deterministic reproduction of the intermittent cold-start failure is established; recorded Windows failures and phase receipts locate observed boundaries without proving a common cause. Is this the best way to solve the issue? Partly: independent bounded receipts served the investigation, but the environment repair and normal startup-phase diagnostics now have landed owners, and this conflicted temporary stack is not a production-ready solution. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 4ff73eb1397d. Merge-risk optionsMaintainer options:
Provenance checked
TestingProof path: shipped entry point. Added test files: 7. SecurityNone. EvidenceWhat I checked:
Likely related people:
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. 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 (6 earlier review cycles)
|
439760b to
8b8bc48
Compare
|
@clawsweeper re-review exact head 6eedbb5. Diagnostic draft plus controller-environment candidate; native Windows qualification is pending, with no merge or proven repair claim. |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
🦞👀 Re-review progress:
|
4205705 to
9697f43
Compare
|
Thanks for the diagnostic work. Closing this draft as superseded by the reviewed owner repair in #502 (9bb9880), which includes phase observations plus native admission/cleanup controls and has passing required cross-platform CI. The remaining cold-start and test-timing uncertainty stays explicitly open in #305; this closure does not claim that a passing run explains every earlier failure. |
Related: #305
What Problem This Solves
Windows fixture commands can exhaust startup and cleanup budgets before a plugin loads. This draft records bounded producer receipts and now tests a controller-environment candidate. It does not claim a proven Windows startup repair.
User Impact
The PowerShell controller now resolves SystemRoot case-insensitively from its parent environment and inherits that parent environment. The native target still receives the caller's exact serialized environment. Target PATH/COMSPEC resolution, cwd, parser, command order, startup 10s/cleanup 2s budgets, admission, and cleanup guards remain unchanged. No retry or prewarming is added.
Why This Change Was Made
Stacked on #362 at
42057057a87c84e909fb84c06c2baa4a5b941fc1; current candidate head6eedbb511a1c800e1887c9f58f5fcc49b5aebd46.The controller previously received the target's restricted environment. That crosses the ownership boundary between the trusted helper runtime and the command it admits. The candidate separates those inputs at helper launch while leaving the native target block unchanged. Whether this explains the observed Windows failures remains pending native proof.
The earlier module-free observer is retained: fixed JSON formatting and .NET file APIs avoid diagnostic cmdlet autoload before pipe connection. All product cmdlets and event sites remain intact. Separate parent, Worker, PowerShell, and native receipts preserve the earliest Inspector attempt and independent Tokenjuice archive/repository attempts outside disposable fixture roots.
Each producer is capped at 32 records, 2 KiB per record, and 64 KiB total. Records exclude arguments, environment values, command output, and arbitrary exception messages.
Evidence
950f1d8d646b04f85d545003e45f69e9d7710c47, all four Tokenjuice attempts recorded only helper-script-entered, then EOWNERSTART; helper SIGTERM closure and terminal receipts were observed with cleanupError=null. The earliest required Inspector attempt stalled after compile-begin and retained EOWNERCLEANUP. Later successful Inspector attempts do not erase that failure.02fb361e7106500e94de93e1bb11cb6fd07502c267b9fb40a277a0739731b707; advisory:730343f13c573067786ce60a16b044a74dd65b51a5c0fabdbf6242f156d6bb21.b7f6606319d8927124061f55b8ec015c0e671b4f, both required Windows and advisory Windows failed on Node v24.20.0. All four Tokenjuice attempts reached helper-entered, pipe connection, request read, and parse-begin (78–82 ms), but no parse-end, owner monitor, native admission, or READY. All ended EOWNERSTART plus EOWNERCLEANUP without terminal cleanup receipts. This locates the original parser boundary; it does not establish the cause.b449b272f49e1273b00a04c94690fbc90a4cdd424d5fca508a6b4bbfc9c878cb; advisory:cd692f85c81699425418e735120474aa18202d5139a1aba9d419c6dec6a298ad. All 20 bounded startup files were retained and individually hash-verified.node --test test/owned-command.test.mjs test/owned-command-startup-diagnostics.test.mjspassed 16 tests with 13 platform skips in 24.148s. Syntax and git diff --check passed. The new Windows regression is skipped locally; these results do not validate native Windows execution.Fixture Impact
Existing fixtures and pins are unchanged. The original restricted Tokenjuice environment builder and serial command order are unchanged. The new Windows copied-owner regression uses .NET-only synthetic comparisons in the actual helper, then runs a real native child: parent-only data must stay out of the target, and target conflicting/target-only values must survive. Receipts contain booleans, not real environment values.
Fixture Verification
The naturally triggered Default Track workflows must validate the new Windows regression and the original serial restricted Tokenjuice archive/repository path. Required evidence is parse-end, owner monitor, native admission/READY, and authoritative cleanup, with the earliest attempts preserved. Native proof is pending at publication. Any later pass does not retroactively close the earlier uninstrumented or cleanup-unconfirmed failures.
Notes
Diagnostic I/O and compilation affect timing. Missing records remain unavailable evidence; progress messages, Worker termination, and PIDs are not native cleanup receipts. This remains a diagnostic draft with a causal candidate. Fresh exact-head native autoreview and Windows evidence are required before any merge decision.