Repository navigation
fix(ci): lint CommonJS CLI diagnostics with type-aware checks - #151385
Conversation
|
🦞👀 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 maintainer review before merge. Reviewed September 18, 2026, 10:48 AM ET / 14:48 UTC (Revision 4). ClawSweeper reviewWhat this changesThe 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 Review scores
Verification
How this fits togetherOpenClaw’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]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +74, Docs +2, Config +8. Total +84 across 3 files. View PR surface stats
Review metrics
Technical reviewBest 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. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles)
|
da09896 to
d755af8
Compare
d755af8 to
00e3c00
Compare
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.
00e3c00 to
da6f403
Compare
|
Merged via squash.
|
…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.
…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.
…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.
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.jsondiscovery project includes onlysrc/**/*.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
da6f403c294ecb6ff7d86f7f620bd7f261e7fc3e. The native watcher reportedrollup=green github_rollup=SUCCESS pending=0 superseded=0andGREEN. No rerun was requested.pnpm check:changedpassed, with three pre-existing max-lines warnings in untouched files. No baselines or suppressions changed.00e3c00c0408ce3e6cbe6d3f307da28bd6cbd3a9was also scoped-clean. Its patch and the current head have the same stable patch ID,93f5adf13937249d4bce1009e93f4a6efe18a884.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.