Skip to content

fix(ci): lint CommonJS CLI diagnostics with type-aware checks - #151385

Merged
steipete merged 1 commit into
mainfrom
upd/cli-diagnostics-lint
Sep 18, 2026
Merged

steipete merged 1 commit into
mainfrom
upd/cli-diagnostics-lint

Conversation

@steipete

@steipete steipete commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes a type-aware lint coverage gap that allowed unbound methods in CommonJS CLI test diagnostics to escape the existing core lint jobs.

Related: #151161 and #150959. This maintainer-requested tooling repair belongs to the update-reliability campaign.

User Impact

No user-visible runtime change. CommonJS source test support now receives the same unbound-method checks as TypeScript support. There are no new jobs, lint rules, dependencies, CLI options, or configuration options for users.

Why This Change Was Made

Oxlint discovers a TypeScript project for type-aware checks independently of the wrapper's explicit project setting. A bounded src/tsconfig.json discovery project includes only src/**/*.test-support.cjs; TypeScript files retain their root project and unrelated JavaScript remains excluded.

Main already contains the bound diagnostic dispatcher. The final patch adds only lint discovery, executable regression coverage, and CI documentation.

Evidence

  • Exact-head CI run 35354844001 is green at da6f403c294ecb6ff7d86f7f620bd7f261e7fc3e. The native watcher reported rollup=green github_rollup=SUCCESS pending=0 superseded=0 and GREEN. No rerun was requested.
  • The authoring lane's installed-binary regression detects deliberate unbound methods in both TypeScript and CommonJS support, excludes unrelated CommonJS controls, and passes after binding. All 14 oxlint config tests and the focused 52-test run passed.
  • The authoring lane's pnpm check:changed passed, with three pre-existing max-lines warnings in untouched files. No baselines or suppressions changed.
  • Codex review of record was scoped-clean through P1. The subsequent committed-branch review of 00e3c00c0408ce3e6cbe6d3f307da28bd6cbd3a9 was also scoped-clean. Its patch and the current head have the same stable patch ID, 93f5adf13937249d4bce1009e93f4a6efe18a884.
  • The latest ClawSweeper review covers that patch-identical predecessor, reports no correctness findings, and lists no before-merge or Rank-up actions. No actions were skipped.
  • Maintainer ruling: this tooling/lint-only repair does not require a published-driver × candidate update cell.

Final scope: production runtime +0/-0, tests +74/-0, lint configuration +8/-0, documentation +2/-0.

Release-note context: extend existing type-aware core lint coverage to CommonJS CLI test support while preserving TypeScript coverage and unrelated JavaScript exclusions.

@clawsweeper

clawsweeper Bot commented Sep 18, 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 docs Improvements or additions to documentation cli CLI command changes size: S maintainer Maintainer-authored PR labels Sep 18, 2026
@steipete
steipete marked this pull request as ready for review September 18, 2026 04:50
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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 18, 2026
@clawsweeper

clawsweeper Bot commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 18, 2026, 10:48 AM ET / 14:48 UTC (Revision 4).

ClawSweeper review

What this changes

The PR extends type-aware linting to CommonJS source test helpers and adds regression coverage and CI documentation.

Merge readiness

✅ Ready for maintainer review

The lint coverage repair remains useful and has no actionable correctness findings. Current main contains the diagnostic dispatcher fix, but not this coverage guard; exact-head CI passed.

Priority: P3
Reviewed head: da6f403c294ecb6ff7d86f7f620bd7f261e7fc3e

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused tooling repair with meaningful positive and negative controls, green exact-head CI, and no actionable findings.
Proof confidence 🌊 off-meta tidepool Not applicable: The maintainer-authored tooling repair is exempt from the external-contributor proof gate; its installed-linter regression exercises the changed discovery behavior, with exact-head CI independently verified.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The maintainer-authored tooling repair is exempt from the external-contributor proof gate; its installed-linter regression exercises the changed discovery behavior, with exact-head CI independently verified.
Evidence reviewed 7 items Bounded configuration change: The introduced project inherits root compiler settings, enables JavaScript, and includes only source CommonJS test-support files. The complete introduced diff contains no runtime, dependency, permission, or workflow changes.
Executable lint boundary coverage: The regression invokes installed Oxlint on TypeScript and CommonJS helpers, requires both unbound-method diagnostics, excludes two unrelated CommonJS controls, and expects clean output after binding. This directly depends on Oxlint project discovery; no Codex runtime contract is involved. Tests were inspected, not executed during this read-only review.
Pinned dependency supports ancestor fallback: The verified v7.0.2001 dependency searches ancestor configurations when the nearer project does not include a file, supporting continued root-project discovery for TypeScript files.
Findings None None.
Security None None.

How this fits together

OpenClaw’s core lint jobs feed source files into Oxlint, which discovers TypeScript projects to resolve types. This change includes CommonJS test helpers in that discovery so existing lint rules can catch unsafe method references.

flowchart TD
  A[Core lint jobs] --> B[Source files]
  B --> C[TypeScript project discovery]
  C --> D[CommonJS helper project]
  C --> E[Existing root project]
  D --> F[Type-aware lint rules]
  E --> F
  F --> G[Diagnostics and CI result]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +74, Docs +2, Config +8. Total +84 across 3 files.

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

Review metrics

Metric Value Why it matters
Lint coverage controls 2 checked file types; 2 exclusion controls The executable regression checks preserved TypeScript coverage and bounded CommonJS inclusion together.

Technical review

Best possible solution:

Retain the bounded discovery project and executable coverage controls within the existing core lint pipeline.

Do we have a high-confidence way to reproduce the issue?

Yes, source establishes the coverage gap: current main lacks a JavaScript-enabled discovery project for these helpers, and the regression supplies an unbound-method fixture. This review did not execute tests.

Is this the best way to solve the issue?

Yes. The small discovery project uses the existing linter’s ancestor-search behavior and preserves unrelated-file exclusions without adding rules or another lint pipeline.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against c610d6327edf.

Labels

Label justifications:

  • P3: This is a bounded developer-tooling coverage repair with no user-visible runtime change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The maintainer-authored tooling repair is exempt from the external-contributor proof gate; its installed-linter regression exercises the changed discovery behavior, with exact-head CI independently verified.

Evidence

What I checked:

  • Bounded configuration change: The introduced project inherits root compiler settings, enables JavaScript, and includes only source CommonJS test-support files. The complete introduced diff contains no runtime, dependency, permission, or workflow changes. (src/tsconfig.json:1, da6f403c294e)
  • Executable lint boundary coverage: The regression invokes installed Oxlint on TypeScript and CommonJS helpers, requires both unbound-method diagnostics, excludes two unrelated CommonJS controls, and expects clean output after binding. This directly depends on Oxlint project discovery; no Codex runtime contract is involved. Tests were inspected, not executed during this read-only review. (test/scripts/oxlint-config.test.ts:365, da6f403c294e)
  • Pinned dependency supports ancestor fallback: The verified v7.0.2001 dependency searches ancestor configurations when the nearer project does not include a file, supporting continued root-project discovery for TypeScript files. (internal/utils/find_tsconfig.go:185, 482dcf70bffc)
  • Current-main and release necessity check: Neither fetched main nor v2026.9.4 contains src/tsconfig.json. Current-main configuration searches found no equivalent test-support.cjs inclusion. The merged dispatcher repair at test: bind CLI diagnostic emitter #151356 addresses the method binding itself, not this remaining lint coverage. (config/tsconfig/oxlint.core.json:1, c610d6327edf)
  • Exact-head CI: GitHub reports completed/success for https://github.com/openclaw/openclaw/actions/runs/35354844001 at the reviewed head. The supplied body additionally records installed-binary regression and focused-check passes. (da6f403c294e)
  • Review continuity: The prior completed review listed no findings. GitHub’s predecessor patch matches the introduced changes, and the regression-test blob matches HEAD exactly: fd2938cd8d9d912aeba06021465a104a8c60b11f. Local predecessor comparison was unavailable, so GitHub source reads supplied this verification. (test/scripts/oxlint-config.test.ts:365, da6f403c294e)

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.

History

Review history (3 earlier review cycles)
  • reviewed 2026-09-18T04:57:46.946Z sha da09896b1923d54910710ef04846bcc155160ddd :: needs maintainer review before merge. :: none
  • reviewed 2026-09-18T05:16:33.347Z sha d755af8 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-18T13:15:19.791Z sha 00e3c00 :: needs maintainer review before merge. :: none

@steipete
steipete force-pushed the upd/cli-diagnostics-lint branch from da09896 to d755af8 Compare September 18, 2026 05:08
@steipete
steipete force-pushed the upd/cli-diagnostics-lint branch from d755af8 to 00e3c00 Compare September 18, 2026 13:01
@openclaw-barnacle openclaw-barnacle Bot removed the cli CLI command changes label Sep 18, 2026
Bind the diagnostic preload dispatcher to process and add a discovery project limited to source CommonJS test support. Exercise the installed linter to prove both TypeScript and CommonJS support report unbound methods while unrelated JavaScript remains outside the project.

Related: #151161, #150959.
@steipete
steipete force-pushed the upd/cli-diagnostics-lint branch from 00e3c00 to da6f403 Compare September 18, 2026 14:12
@steipete
steipete merged commit ac7c393 into main Sep 18, 2026
154 checks passed
@steipete
steipete deleted the upd/cli-diagnostics-lint branch September 18, 2026 15:08
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

steipete added a commit that referenced this pull request Sep 18, 2026
…152069)

Fix PR worktree provisioning that could write allocation leases into the operator's Gateway database and leave unusable checkout directories after interruption.

Keep allocation leases and template records in repository-owned PR state. Scale checkout deadlines and bounded Git cleanup grace to measured tree size, and remove only unchanged, exclusively reserved partial checkouts while current allocation and PR-lock authority still hold. Preserve foreign or registered worktrees and uncertain cleanup; failed operations still require exact-lock recovery.

Tooling release note: interrupted native PR checkouts can recover without manual directory deletion, and allocation state stays separate from Gateway state. No Gateway restart, operator-state migration, schema change, dependency change, or new option.

Related sightings: #151459, #151470, #151385, #151370, #151568.

Validation: 359 focused Testbox tests passed with one APFS-only skip; check:changed passed. Exact-head CI run 35382721022 succeeded, and all 293 check runs for the reviewed head completed without failures. Codex autoreview and ClawSweeper found no actionable findings.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 19, 2026
…aw#151385)

Extend the existing type-aware core lint checks to CommonJS CLI test support through a bounded discovery project. Preserve TypeScript coverage and exclude unrelated JavaScript, with installed-linter regression coverage and CI documentation.

Main already contains the diagnostic dispatcher binding; this change closes the remaining lint discovery gap. No user-visible runtime behavior changes.

Related: openclaw#151161, openclaw#150959.

Validation: exact-head CI run 35354844001 was green with zero pending jobs; scoped Codex review and the latest ClawSweeper review found no actionable correctness issues.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 19, 2026
…penclaw#152069)

Fix PR worktree provisioning that could write allocation leases into the operator's Gateway database and leave unusable checkout directories after interruption.

Keep allocation leases and template records in repository-owned PR state. Scale checkout deadlines and bounded Git cleanup grace to measured tree size, and remove only unchanged, exclusively reserved partial checkouts while current allocation and PR-lock authority still hold. Preserve foreign or registered worktrees and uncertain cleanup; failed operations still require exact-lock recovery.

Tooling release note: interrupted native PR checkouts can recover without manual directory deletion, and allocation state stays separate from Gateway state. No Gateway restart, operator-state migration, schema change, dependency change, or new option.

Related sightings: openclaw#151459, openclaw#151470, openclaw#151385, openclaw#151370, openclaw#151568.

Validation: 359 focused Testbox tests passed with one APFS-only skip; check:changed passed. Exact-head CI run 35382721022 succeeded, and all 293 check runs for the reviewed head completed without failures. Codex autoreview and ClawSweeper found no actionable 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. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S 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