Repository navigation
chore: split four over-cap files that fail changed lint on unrelated PRs - #178874
Conversation
Move native tool deny predicates and Code Mode wait-run resolution into sibling modules, the terminal-preparation run-stats tests into their own file, and repeated Telegram ingress test preludes into fixture helpers.
|
🦞👀 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 changes before merge. What this changesThis PR extracts existing agent helpers and reorganizes tests to bring four files under their lint limits. Example: An unrelated PR triggers linting of src/agents/code-mode-execution.ts.
Review scores
ProductKind: Maintenance · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 1 item remains Keep open: this PR provides a focused repair for existing lint failures on main and merits completion. Priority: P2 Before merge
Findings
Agent review detailsHow this fits togetherCI lints agent runtime modules and Telegram tests; the extracted helpers retain the same policy inputs, ownership checks, results, and errors. flowchart TD
A[Changed PR files] --> B[CI lint selection]
B --> C[File line limits]
D[Agent execution] --> E[Extracted policy and wait helpers]
F[Existing test scenarios] --> G[Sibling suites and fixtures]
G --> B
Technical reviewBest possible solution: Keep the mechanical extractions and make the new payload mock comply with the existing export-isolation contract. Do we have a high-confidence way to reproduce the issue? Source inspection establishes that the new closed mock is rejected by the existing scanner, and exact-head CI reports the matching mock-export failure; no target code was executed. Is this the best way to solve the issue? The extractions follow existing responsibility boundaries, remove the replaced implementations, and preserve distinct test scenarios without adding competing state or policy owners. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against f5f3ed438533. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceAcceptance criteria:
What I checked:
Likely related people:
PR surfaceSource +20, Tests +17. Total +37 across 8 files. Added test files: 1. View PR surface stats
Review metrics
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 20, 2026, 8:11 PM ET / October 21, 2026, 00:11 UTC. |
|
Merged via squash auto-merge.
|
…PRs (openclaw#178874) * chore: split four over-cap files so changed lint passes Move native tool deny predicates and Code Mode wait-run resolution into sibling modules, the terminal-preparation run-stats tests into their own file, and repeated Telegram ingress test preludes into fixture helpers. * test: keep the real payloads module in the split run-stats mock
What Problem This Solves
Resolves a problem where PRs fail the
check-lint-core-2CI job withmax-lineserrors in files they never touched. Four files onmainare over their cap:src/agents/harness/execution-environment.ts: 723 counted lines, cap 700src/agents/code-mode-execution.ts: 701, cap 700src/agents/embedded-agent-runner/run/terminal-preparation.test.ts: 1007, cap 1000extensions/telegram/src/telegram-ingress-coalescing.e2e.test.ts: 1020, cap 1000The job only fails when a PR's changes make CI lint a whole stripe, so roughly half of open PRs are red on it (for example #177698, #178850, #178849, #178846, #178845, #178843).
Why This Change Was Made
Each file is split along an existing seam, following the line-cap rule (extract a coherent sibling, never trim coverage or disable
max-lines):collectHarnessSafeDeniedToolNames,toolPolicyRestrictsHarnessNativeTools,policyDeniesAllTools) move fromexecution-environment.tsto a newharness/native-tool-deny-policy.ts.runWaitintoresolveCodeModeWaitRunincode-mode-wait-errors.ts, which already owns those wait errors.run statsdescribe block moves toterminal-preparation.run-stats.test.ts. It had been passing only because an earlier describe left the shared payloads mock returning[]; the new file mocks payloads explicitly.spoolBehindPausedPump,expectOnlyPending) replace three repeated test preludes and three repeated queue assertions.No behavior or assertion changes.
User Impact
None for users. PR CI no longer fails lint on these four pre-existing files.
Evidence
node scripts/run-oxlint.mjson all eight touched files: 0 errors. Onmainthe same four files report the fourmax-lineserrors above.src/agents/harnessand Code Mode suites (681 tests).tsconfig.core.jsonandtsconfig.extensions.jsontypecheck clean.