Repository navigation
test(helpers): move runtime-image and ci-logging temp dirs onto temporaryDirectory - #3204
Conversation
…raryDirectory Cluster 1 of the test-dry survey for the Docker suites: nine per-test directories in the runtime image startup and model probe files and the ci-logging fixture now come from temporaryDirectory(t, prefix). The ci-logging helper's private 30 s waitFor goes too; its one caller uses waitUntil with the same timeout and interval. The helper's unused imports and their lint suppression are removed.
|
🦞👀 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: needs maintainer review before merge. What this changesThis PR replaces repeated temporary-directory setup and a private Collector polling loop with existing test helpers. Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it is a useful, focused test cleanup with no concrete correctness finding, and collaborator-authored work remains subject to maintainer triage. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherRuntime-image tests and the CI logging fixture create temporary configuration files, exercise containers, and remove their files through test cleanup hooks. flowchart LR
A[Integration tests] --> B[Shared test helpers]
B --> C[Temporary configuration files]
C --> D[Runtime and Collector containers]
A --> E[Test cleanup hooks]
E --> C
Technical reviewBest possible solution: Retain this focused consolidation around the existing cleanup and polling helpers. Do we have a high-confidence way to reproduce the issue? No product bug is claimed; source inspection confirms the repeated setup and private polling loop being consolidated. Is this the best way to solve the issue? The patch uses existing owners, removes duplicate code, and preserves the relevant cleanup and polling contracts. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 6b8082e69047. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
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 October 22, 2026, 8:19 AM ET / 12:19 UTC. |
Problem
The runtime image test files, two of their helpers and the ci-logging fixture each create a per-test directory with
mkdtemp(join(tmpdir(), prefix))plus their ownt.after(() => rm(...)).temporaryDirectory(t, prefix)intests/helpers/temporary-directory.mjsdoes exactly that (test DRY survey, cluster 1). The ci-logging helper also kept a private 30 s poll loop thatwaitUntilalready covers.Change
temporaryDirectory(t, prefix): runtime-image-gateway-workspace (1), runtime-image-gateway-peer (2), runtime-image-native-listener (2), runtime-image-startup.test (2, through the identical helper it already imports), and the helperstemporaryGatewayConfiguration(runtime-image-startup.mjs),createProbeMaterial(runtime-image-model-probe.mjs) andcreateStartupProbeMaterial(runtime-image-startup-probe.mjs).tests/helpers/ci-logging.mjs:fixture(t)usestemporaryDirectory; the privatewaitForexport is removed and its one caller (ci-logging-collector) useswaitUntilwith the same 30 s timeout, 250 ms interval and message. The file's five unused imports go too, with theireslint-suppressions.jsonentry.Verification
All local runs compare this branch with a main worktree at 5227270, using a runtime image built from 5227270 with podman. "routes sandboxed Git through stock Codex and the repository broker" was skipped: podman networking breaks it here, on main too.
requiredProfilechanged: "validates the configuration dedicated native OpenClaw renders" fails on both;OPENCLAW_LOG_LEVELkept: "publishes dedicated assets with the Kubernetes gateway entrypoint" fails on both;docker run --rmexit after correct output).stoppedinstead ofexited.TMPDIR; the only leftovers came from runs I stopped mid-way.git merge-treeagainst main and against this branch give the same conflicted files and hunks).Risks
Test-only. Timeout and cleanup behaviour are unchanged. A file that aborts before its after hooks run leaves the directory behind, as before.