Repository navigation
fix(test): create private Gateway artifact fixtures - #201763
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
@clawsweeper review Please review exact head ad5cd4f. Both Gateway artifact fixtures now request private directories at creation; production guards, assertions, timeouts, and cleanup remain unchanged. Exact-head proof passed 30 tests (Node and Bun caption, Node canonical-publication, and 27 temp-directory guards) under an isolated permissive creation policy, plus targeted formatting, type-aware lint, and the core-test-gateway-server type graph. The committed-range local fallback review was P0-only with zero findings; broader independent source review is separate. The PR body records proof scope and the cancelled one-shot carrier; required CI and final native gates remain independent. |
|
🦞👀 Re-review progress:
|
|
Codex review: needs maintainer review before merge. What this changesThis PR creates both Gateway artifact tests’ state and workspace directories with mode 0700. Example: Run either artifact integration test on Linux with umask 000.
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR is a focused, useful fixture repair with no actionable findings; current main still needs the change, and exact-head CI remains pending. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe integration fixtures supply isolated storage and synthetic provider responses to a real Gateway, then verify message history and authorized artifact downloads. flowchart LR
A[Test fixture] --> B[Private state and workspace]
B --> C[Gateway storage admission]
D[Synthetic provider] --> E[Message execution]
C --> E
E --> F[History and artifact assertions]
Technical reviewBest possible solution: Retain the two explicit directory modes and land through the existing exact-head gates. Do we have a high-confidence way to reproduce the issue? Source establishes that an unqualified mkdir under umask 000 can create writable fixture directories; no tests were executed during this read-only review, and the original failure’s exact mode remains unknown. Is this the best way to solve the issue? Explicit modes at the two creation sites are the smallest complete repair using the existing fixture owners, with no new helper, global umask change, or weakened runtime check. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against dbf41b9173f6. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests 0. Total 0 across 2 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. 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 Reviewed November 19, 2026, 5:13 AM ET / 10:13 UTC. |
|
Merged via squash.
|
What Problem This Solves
Gateway artifact integration tests can fail during startup when the ambient file-creation policy permits group or other users to write their fixture directories. The runtime correctly refuses the unsafe state directory before the tests can exercise message publication.
Related prerequisite for #200486; this change does not close that PR.
User Impact
No production behavior changes. Developers can exercise the existing artifact-publication assertions with fixture directories that satisfy the runtime's private-storage contract.
Why This Change Was Made
Both callers of the Gateway artifact fixture now request mode
0700when creating their state and workspace directories. The runtime safety guard, test assertions, timeouts, internal scenarios and cleanup remain unchanged. The change is two test lines (+2/-2), with no production changes.The observed failure identified an unsafe state directory; it did not record that directory's exact mode or the original process umask. This fix does not attribute the failure to a particular runner or numeric umask.
Evidence
Current signed source:
ad5cd4fc02f2220275fc7826e246e3b510818095. Independent source review accepted the exact two-line change.The bounded native run completed all 30 cases with no failures or skips: caption on Node and Bun, canonical-publication on Node, and all 27 existing temp-root tests on Node. Each test child recorded an isolated
umask 000; the parent process and runtime safety checks were unchanged. The real unsafe-ancestor rejection passed. Runtime pins were Node 24.22.1, Bun 1.4.4-canary.1+191755ec1, pnpm 12.15.0 and Vitest 5.0.5 on Linux.Targeted formatting and type-aware lint passed for both changed files, as did the canonical
core-test-gateway-servertype graph. The source/tree remained unchanged; child processes and output streams joined, and native resource settlement completed.Carrier: https://github.com/openclaw/openclaw/actions/runs/44499535745. Its cancelled Actions conclusion records normal one-shot Testbox closure after the native workload exited 0; it is not a green whole-workflow CI result. The actual carrier checkout and all 931 reviewed workflow inputs matched. Independent workload and custody reviews accepted these receipts.
The complete committed range
4a7ee1f66aec5c8e27c7291a83c47ecc20a5169c→ad5cd4fc02f2220275fc7826e246e3b510818095passed local autoreview with P0-only coverage and zero findings, including final source verification. This used the documented fallback because the local ClawSweeper runner checkout was divergent. Independent broader source review is separate from that severity-limited result. Exact-head PR CI, hosted ClawSweeper review, Security and native landing gates remain pending. No inherited-CI exception is requested. Parent PR #200486 remains unqualified.