Skip to content

chore(lint): make max-lines a warning - #149805

Merged
steipete merged 2 commits into
mainfrom
chore/lint-max-lines-warn
Sep 16, 2026
Merged

steipete merged 2 commits into
mainfrom
chore/lint-max-lines-warn

Conversation

@steipete

@steipete steipete commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

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-lines overrides to warn, 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, and git diff --check passed. 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.ts exited 0. This checkout already contains formatting reductions since the failed main run, so its current file no longer exceeds the counted budget.
  • Replayed the exact offending file from main commit 29ed7e3b810a3b62fd9e5b5778e1db02fc8266a3 as a temporary sibling through the same wrapper and core config with GITHUB_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.
  • Main run 35060497703 failed both check-lint-core-2 on this 702-line diagnostic and checks-node-compact-small-8 on the unrelated src/config/sessions/goals-operations.test.ts:157 assertion (expected 4 to be less than or equal to 3). This PR does not change that test.
  • Independent autoreview completed with no actionable P0/P1 findings.
  • All 13 tests in test/scripts/oxlint-config.test.ts passed, including installed-binary checks that unrelated violations remain errors. The first PR run exposed the old error expectations in this existing test; the follow-up updates all six to warn and received a fresh clean review.
  • Final exact-head CI run 35064720478 passed on 6ff2872e9837f6aadb58e2fa3607575c22e6b134, including all three lint jobs and the startup corpus. ClawSweeper also completed its review of this head with no actionable findings.

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.
@clawsweeper

clawsweeper Bot commented Sep 16, 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.

@steipete
steipete marked this pull request as ready for review September 16, 2026 06:26
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation size: XS maintainer Maintainer-authored PR labels Sep 16, 2026
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.
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 16, 2026
@clawsweeper

clawsweeper Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 16, 2026, 2:45 AM ET / 06:45 UTC.

ClawSweeper review

What this changes

Changes 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
Reviewed head: 6ff2872e9837f6aadb58e2fa3607575c22e6b134

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused policy change with relevant real-wrapper evidence, aligned existing tests, and no actionable findings.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (terminal): The captured PR body reports the real run-oxlint entrypoint processing the original 702-line offender with CI-style settings and emitting one warning with exit 0, directly exercising the changed configuration.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): The captured PR body reports the real run-oxlint entrypoint processing the original 702-line offender with CI-style settings and emitting one warning with exit 0, directly exercising the changed configuration.
Evidence reviewed 7 items Verified introduced change: The merge-base-to-head diff changes only six max-lines severity values, the matching existing test expectations, and explanatory documentation; thresholds and exclusions are preserved.
Still necessary on main and latest release: Fetched main retains error severity for all six max-lines overrides. The v2026.9.4 configuration also retains those errors. The related merged PR #149697 shortened two callbacks but did not implement this lint-policy change.
Real lint output supplied: The complete captured PR body, sourceRevision 343b5fad431d340caf282237664902886b97feb5850d4e225358796f9f1c1bf8, records replaying the offending 702-line source through run-oxlint with the core tsconfig and GITHUB_ACTIONS=true: zero errors, one max-lines warning, exit 0. It separately reports all 13 config tests passing after the follow-up commit. These are contributor-reported observations, not commands executed during this review.
Findings None None.
Security None None.

How this fits together

OpenClaw’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]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests 0, Docs +4, Other 0. Total +4 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 7 7 0
Docs 1 4 0 +4
Config 0 0 0 0
Generated 0 0 0 0
Other 1 6 6 0
Total 3 17 13 +4

Review metrics

Metric Value Why it matters
Lint policy 6 severity changes; 0 threshold or exclusion changes The change consistently makes file-length guidance nonblocking without broadening lint exclusions.

Technical review

Best 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.

Labels

Label changes:

  • add P3: This is a bounded developer-tooling policy adjustment with no application behavior change.
  • add proof: sufficient: Contributor real behavior proof is sufficient. The captured PR body reports the real run-oxlint entrypoint processing the original 702-line offender with CI-style settings and emitting one warning with exit 0, directly exercising the changed configuration.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The captured PR body reports the real run-oxlint entrypoint processing the original 702-line offender with CI-style settings and emitting one warning with exit 0, directly exercising the changed configuration.

Label justifications:

  • P3: This is a bounded developer-tooling policy adjustment with no application behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The captured PR body reports the real run-oxlint entrypoint processing the original 702-line offender with CI-style settings and emitting one warning with exit 0, directly exercising the changed configuration.
  • proof: sufficient: Contributor real behavior proof is sufficient. The captured PR body reports the real run-oxlint entrypoint processing the original 702-line offender with CI-style settings and emitting one warning with exit 0, directly exercising the changed configuration.

Evidence

What I checked:

  • Verified introduced change: The merge-base-to-head diff changes only six max-lines severity values, the matching existing test expectations, and explanatory documentation; thresholds and exclusions are preserved. (.oxlintrc.json:320, 6ff2872e9837)
  • Still necessary on main and latest release: Fetched main retains error severity for all six max-lines overrides. The v2026.9.4 configuration also retains those errors. The related merged PR fix(cron): suppress control tokens and retain retry usage #149697 shortened two callbacks but did not implement this lint-policy change. (.oxlintrc.json, 3d400039f86f)
  • Real lint output supplied: The complete captured PR body, sourceRevision 343b5fad431d340caf282237664902886b97feb5850d4e225358796f9f1c1bf8, records replaying the offending 702-line source through run-oxlint with the core tsconfig and GITHUB_ACTIONS=true: zero errors, one max-lines warning, exit 0. It separately reports all 13 config tests passing after the follow-up commit. These are contributor-reported observations, not commands executed during this review. (6ff2872e9837)
  • Runner and CI contract: The wrapper returns the managed lint process status; local policy adds type-aware checking and unused-disable errors without escalating warnings. Sharded execution forwards stdout/stderr. CI continues invoking check:max-lines-ratchet, which independently rejects new suppressions and baseline expansion. (scripts/run-oxlint.mts:316, 6ff2872e9837)
  • Existing policy coverage updated: The existing test now expects warnings for all four scoped budgets and both file-specific exceptions, retaining generated-file exclusions. Existing installed-binary coverage still asserts that unrelated violations remain errors. (test/scripts/oxlint-config.test.ts:482, 6ff2872e9837)
  • Area history and routing: Current-main history includes several prior lint-policy changes by Peter Steinberger. GitHub identifies steipete as the author of commit 568b920 and shows its import-rule policy changes. Some older local history objects were unavailable, so no claim is made about who originally introduced max-lines. (.oxlintrc.json:66, 568b920b210a)

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete
steipete merged commit 759bdc4 into main Sep 16, 2026
88 of 89 checks passed
@steipete
steipete deleted the chore/lint-max-lines-warn branch September 16, 2026 07:04
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 17, 2026
* 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. 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.

1 participant