Repository navigation
chore(lint): make max-lines a warning - #149805
Conversation
Peter decided on 2026-09-16 that max-lines should warn in CI rather than block main. The chat-pane-render.ts failure exposed unnecessary lint burden after #149697. Change all six max-lines scopes to warn while preserving every threshold and all other rules. Document warning behavior and the retained suppression ratchet. The runners and CI already preserve warning output and exit codes. Proof: check-changed, formatting, and git diff --check pass. The current chat-pane-render.ts passes single-file core lint; the exact 702-line revision from failed main run 35060497703 prints one max-lines warning and exits 0 through run-oxlint with CI-style output. The sample UI tsconfig command hit the existing nested-checkout declaration boundary, so proof uses CI's source-only core tsconfig.
|
🦞👀 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. |
Align the existing config-policy test with Peter’s 2026-09-16 decision. Preserve all six budgets and exclusions. The prior PR run correctly exposed the stale error expectations. Proof: all 13 oxlint config tests, check-changed, and git diff --check pass. Fresh independent review found no actionable P0/P1 findings.
|
Codex review: needs maintainer review before merge. Reviewed September 16, 2026, 2:45 AM ET / 06:45 UTC. ClawSweeper reviewWhat this changesChanges file-length lint violations from errors to warnings while preserving existing limits, updating the policy test, and documenting the CI behavior. Merge readiness✅ Ready for maintainer review Keep open: this is a focused, maintainer-sponsored policy change that current main still needs. No actionable correctness or security findings remain. Priority: P3 Review scores
Verification
How this fits togetherOpenClaw’s lint configuration controls diagnostics emitted by local checks and CI. The existing lint runners forward those diagnostics and their exit status, while a separate check prevents growth in lint suppressions. flowchart TD
A[Source files] --> B[Scoped lint configuration]
B --> C[Lint runner]
C --> D[Visible file-length warnings]
C --> E[Errors still fail checks]
F[Suppression baseline] --> G[Required suppression check]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests 0, Docs +4, Other 0. Total +4 across 3 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep file-length guidance in the existing lint configuration, with visible warnings and independently enforced suppression limits. Do we have a high-confidence way to reproduce the issue? Not applicable as a product defect: this intentionally changes lint policy, and the supplied real-wrapper replay demonstrates the over-budget warning case. Is this the best way to solve the issue? Yes. Changing severity at the existing configuration owner is narrower than altering runner exit handling, and preserves unrelated errors and suppression checks. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 3d400039f86f. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
* chore(lint): make max-lines a warning Peter decided on 2026-09-16 that max-lines should warn in CI rather than block main. The chat-pane-render.ts failure exposed unnecessary lint burden after openclaw#149697. Change all six max-lines scopes to warn while preserving every threshold and all other rules. Document warning behavior and the retained suppression ratchet. The runners and CI already preserve warning output and exit codes. Proof: check-changed, formatting, and git diff --check pass. The current chat-pane-render.ts passes single-file core lint; the exact 702-line revision from failed main run 35060497703 prints one max-lines warning and exits 0 through run-oxlint with CI-style output. The sample UI tsconfig command hit the existing nested-checkout declaration boundary, so proof uses CI's source-only core tsconfig. * test(lint): expect max-lines warnings Align the existing config-policy test with Peter’s 2026-09-16 decision. Preserve all six budgets and exclusions. The prior PR run correctly exposed the stale error expectations. Proof: all 13 oxlint config tests, check-changed, and git diff --check pass. Fresh independent review found no actionable P0/P1 findings.
What Problem This Solves
Unblocks main: chat-pane-render.ts max-lines. Peter decided on 2026-09-16 that file-length lint findings should be CI warnings instead of errors. Related: #149697.
User Impact
Files exceeding their configured line budget produce visible lint warnings without failing CI. There is no application behavior change; other lint severities and the required suppression-baseline ratchet remain unchanged.
Why This Change Was Made
Change all six
max-linesoverrides towarn, preserving the 700/700/800/1000/950/1200 thresholds, scope patterns, and blank-line/comment exclusions. The existing single-file, sharded, changed-check, and CI entry points already forward diagnostics and preserve oxlint's exit status; none adds warning escalation. Update the existing config-policy test expectations and document the policy in the testing guide.Evidence
node scripts/check-changed.mjs, formatting, andgit diff --checkpassed. Verified the config differs only in the six severity values.node scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.core.json ui/src/pages/chat/chat-pane-render.tsexited 0. This checkout already contains formatting reductions since the failed main run, so its current file no longer exceeds the counted budget.29ed7e3b810a3b62fd9e5b5778e1db02fc8266a3as a temporary sibling through the same wrapper and core config withGITHUB_ACTIONS=true:File has too many lines (702). eslint(max-lines);0 errors, 1 warning; exit 0. Removed the temporary file afterward. The UI-tsconfig sample command hit the existing nested-checkout declaration guard; the source-only core config is the one CI uses.check-lint-core-2on this 702-line diagnostic andchecks-node-compact-small-8on the unrelatedsrc/config/sessions/goals-operations.test.ts:157assertion (expected 4 to be less than or equal to 3). This PR does not change that test.test/scripts/oxlint-config.test.tspassed, including installed-binary checks that unrelated violations remain errors. The first PR run exposed the olderrorexpectations in this existing test; the follow-up updates all six towarnand received a fresh clean review.6ff2872e9837f6aadb58e2fa3607575c22e6b134, including all three lint jobs and the startup corpus. ClawSweeper also completed its review of this head with no actionable findings.