Skip to content

fix: keep Code Mode worker fixture under test helpers - #166943

Merged
shakkernerd merged 1 commit into
mainfrom
fix/code-mode-test-helper
Oct 8, 2026
Merged

shakkernerd merged 1 commit into
mainfrom
fix/code-mode-test-helper

Conversation

@shakkernerd

Copy link
Copy Markdown
Contributor

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/helpers owner 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-method and unicorn/require-post-message-target-origin directives. Source tracing confirms the fixture has one test caller and no production caller.

Remote Linux validation passed:

  • All 14 tests across the existing lint-suppression guard and Code Mode Node files. The batch took 23.26 seconds; the Code Mode file took 18.65 seconds, including worker preparation. No tests or assertions were added.
  • The Code Mode test type graph and all four root-test type partitions.
  • Changed-file formatting and lint, plus production and full-tree unused-file scans with zero entries.

Independent engineering review and the separate automated source review found no actionable defects. Required hosted CI remains the final landing check.

@clawsweeper

clawsweeper Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: XS labels Oct 8, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 8, 2026
@clawsweeper

clawsweeper Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed October 7, 2026, 11:35 PM ET / October 8, 2026, 03:35 UTC.

ClawSweeper review

What this changes

The branch moves the Code Mode timeout worker fixture into test/helpers and updates its caller and imports.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The patch is focused and source-correct; validation is reported through existing test harnesses rather than independently observed shipped-entry-point evidence.
Proof confidence 🦐 gold shrimp (3/6) Not applicable: This member-authored test-infrastructure repair is outside the external-contributor runtime-proof gate. The body reports existing lint-guard and real-worker test validation; no production behavior, persisted format, or migration contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Maintenance · Worth it: Yes · Fix scope: Complete
Reason: A test-only fixture currently causes the production lint guard to fail. Relocation restores the intended ownership boundary without changing runtime behavior or expanding exceptions.

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
Reviewed head: 766024fdf37614a517eb16f075091393302b6ddc

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: No shipped-product scenario is required for this fixture relocation; reported existing-suite validation was not independently rerun under the read-only review constraints.
Agent review details

How this fits together

Code 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]
Loading

Technical review

Best 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

  • Code Mode timeout fixture location and worker URL keeps the original intent (707e2c0: Synchronize exact-output assertions on actual publication before advancing the watchdog, retaining real interruption and recovery coverage without production hooks or wider budgets.)

Testing

Proof path: in-process harness. Added test files: 1.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 707e2c0 adds src/agents/code-mode-node.test.ts:188 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 707e2c0d4c01; files: src/agents/code-mode-node.test.ts)

PR surface

Tests +3. Total +3 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 2 6 3 +3
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 6 3 +3

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #166935
Summary: This PR implements the linked issue's requested fixture relocation and preserves its stated constraints.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Labels

Label changes:

  • add P2: The repair resolves a concrete production lint inventory failure with a narrowly scoped test-fixture relocation.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: The repair resolves a concrete production lint inventory failure with a narrowly scoped test-fixture relocation.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only; repair and merge need explicit maintainer commands such as @clawsweeper autofix or @clawsweeper automerge.

@shakkernerd shakkernerd self-assigned this Oct 8, 2026
@shakkernerd
shakkernerd merged commit dfce70a into main Oct 8, 2026
120 checks passed
@shakkernerd
shakkernerd deleted the fix/code-mode-test-helper branch October 8, 2026 03:40
@shakkernerd

Copy link
Copy Markdown
Contributor Author

Fixed: Code Mode timeout worker fixtures no longer enter the production lint-suppression inventory.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 8, 2026
Keep the Code Mode timeout worker fixture in test helpers so its test-only lint directives stay outside production policy.

Fixes openclaw#166935.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Production lint guard counts the Code Mode timeout worker fixture

1 participant