Repository navigation
fix: keep Code Mode worker fixture under test helpers - #166943
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: needs maintainer review before merge. Reviewed October 7, 2026, 11:35 PM ET / October 8, 2026, 03:35 UTC. ClawSweeper reviewWhat this changesThe branch moves the Code Mode timeout worker fixture into test/helpers and updates its caller and imports. Review scores
ProductKind: Maintenance · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this is a focused repair for a current-main lint inventory failure, with no actionable patch defects found. The maintainer-authored keep-open guard also applies. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherCode Mode executes agent-written code in a worker and preserves published output when execution times out. Its test fixture synchronizes output assertions, while a separate lint guard inventories exceptions in production source. flowchart TD
A[Timeout output test] --> B[Test worker fixture]
B --> C[Code Mode production worker]
C --> D[Published output buffer]
D --> E[Timeout and output assertions]
F[Production source inventory] --> G[Lint exception guard]
B --> H[Test helpers outside production inventory]
Technical reviewBest possible solution: Keep the worker fixture under its test owner while preserving the existing production lint policy and timeout-output coverage. Do we have a high-confidence way to reproduce the issue? Yes, source establishes the failure: current main places two unallowlisted directives in a fixture classified as production by the lint inventory. No failing execution was performed during this read-only review. Is this the best way to solve the issue? Yes, moving the test-only fixture to the existing test tree is the narrowest repair and preserves both the lint contract and worker assertions. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 9658ea8d8af2. Provenance checked
TestingProof path: in-process harness. Added test files: 1. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests +3. Total +3 across 2 files. View PR surface stats
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 |
|
Fixed: Code Mode timeout worker fixtures no longer enter the production lint-suppression inventory. |
Keep the Code Mode timeout worker fixture in test helpers so its test-only lint directives stay outside production policy. Fixes openclaw#166935.
Fixes #166935
What Problem This Solves
Production lint checks fail after the Code Mode timeout-output tests added a worker-only fixture under
src/agents. The production suppression inventory includes that location, so the fixture's two existing lint directives appear as unexpected production exceptions.User Impact
The production lint policy can remain strict while Code Mode keeps its real worker timeout and output-preservation coverage. Runtime behavior, timeout values, test assertions, and the production suppression allowlist are unchanged.
Why This Change Was Made
Move the fixture to the existing
test/helpersowner and update its single worker URL caller and two relative imports. The helper still loads the same progress class and production worker, observes actual output publication, and runs only in the test-created worker.The old path is removed. No filename exception, ignore rule, new fixture, or production test seam is added.
Evidence
The original CI failure names exactly the helper's
typescript/unbound-methodandunicorn/require-post-message-target-origindirectives. Source tracing confirms the fixture has one test caller and no production caller.Remote Linux validation passed:
Independent engineering review and the separate automated source review found no actionable defects. Required hosted CI remains the final landing check.