Skip to content

fix: reject missing oxlint shard selectors - #120096

Merged
vincentkoc merged 2 commits into
openclaw:mainfrom
qingminglong:fix/oxlint-shard-selector
Aug 7, 2026
Merged

vincentkoc merged 2 commits into
openclaw:mainfrom
qingminglong:fix/oxlint-shard-selector

Conversation

@qingminglong

@qingminglong qingminglong commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where malformed or misspelled oxlint shard selectors could silently run every shard or no shards while returning success.

Why This Change Was Made

The shard runner now validates both --only value and --only=value through one syntax guard, rejects every unmatched selector including mixed valid/invalid sets, and performs shard creation and filtering inside the heavy-check lock's try/finally.

User Impact

Invalid shard-runner commands fail immediately with a clear non-zero error. They do not start lint shards, prepare boundary artifacts, or leave the heavy-check lock behind.

Evidence

  • Sanitized AWS Crabbox run run_858101e2ef15 on lease cbx_699b5557ee46: pnpm test test/scripts/run-oxlint.test.ts passed 45/45.
  • Targeted selector/parser/filter/subprocess regressions passed 12/12 across three bounded repeats.
  • pnpm format:check -- scripts/run-oxlint-shards.mjs test/scripts/run-oxlint.test.ts passed.
  • git diff --check passed.
  • Scoped pnpm check:changed -- scripts/run-oxlint-shards.mjs test/scripts/run-oxlint.test.ts passed.
  • Max-P1 autoreview was clean with overall correctness confidence 0.98.
  • Exact maintainer-fix head: c623f4a314c4dcbbc36b46363ebb93954bcf90d3.

AI-assisted change; implementation and proof reviewed directly.

Punchcard-Session: clear-harbor-river-2k

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: XS labels Aug 7, 2026
@qingminglong
qingminglong marked this pull request as ready for review August 7, 2026 00:55
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. P2 Normal backlog priority with limited blast radius. labels Aug 7, 2026
@clawsweeper

clawsweeper Bot commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 6, 2026, 10:41 PM ET / August 7, 2026, 02:41 UTC.

ClawSweeper review

What this changes

The PR makes the oxlint shard runner reject missing, option-like, and unknown --only selectors before preparation or shard execution, with lock-safe cleanup on failure.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

This PR is still necessary: current main can silently turn malformed shard selectors into successful all-shard or no-shard runs. The exact head resolves the prior option-like selector finding and has no remaining blocking correctness finding.

Priority: P2
Reviewed head: c623f4a314c4dcbbc36b46363ebb93954bcf90d3

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The exact head cleanly addresses the prior finding with focused remote CLI proof and no remaining correctness finding.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (terminal): The PR body reports a sanitized AWS Crabbox run of the affected suite and repeated CLI subprocess regressions on the exact head.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): The PR body reports a sanitized AWS Crabbox run of the affected suite and repeated CLI subprocess regressions on the exact head.
Evidence reviewed 4 items Current-main behavior: Missing or empty --only values leave the selector set empty, while unmatched names filter every shard out; the runner can then reach its successful no-shard path.
Exact-head repair: The head validates missing and hyphen-prefixed selector values, rejects unmatched sets, and performs matching inside the parent lock's try/finally.
Boundary regression coverage: Tests cover missing, option-like, unknown, and mixed selectors through parser, filter, and subprocess paths, including nonzero exit, no shard-start output, and no remaining worktree lock.
Findings None None.
Security None None.

How this fits together

OpenClaw’s lint command delegates to a shard runner that parses selector flags, builds platform-aware work shards, prepares artifacts, and launches oxlint subprocesses under a local heavy-check lock. Invalid selectors must fail without starting work or retaining that lock.

flowchart LR
  A[Lint command or CI lane] --> B[Shard option parser]
  B --> C[Selector validation]
  C --> D[Heavy-check lock]
  D --> E[Shard construction and matching]
  E --> F[Artifact preparation]
  F --> G[Oxlint shard subprocesses]
  E --> H[Lock cleanup]
Loading

Before merge

  • Resolve merge risk (P1) - The head is behind current main; GitHub reports it mergeable, but required checks should remain exact-head/merge-result gated at landing.
  • Complete next step (P2) - This active maintainer-assigned PR already owns the bounded repair; the remaining action is ordinary exact-head merge gating.
Agent review details

Security

None.

PR surface

Tests +45, Other +17. Total +62 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 45 0 +45
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 36 19 +17
Total 2 81 19 +62

Review metrics

Metric Value Why it matters
Production versus test delta production +36/-19; tests +45/-0 The net production growth implements one validation path and lock-safe placement, while focused tests cover each malformed-selector class.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Retain this single parser-and-filter validation path and merge it through normal exact-head gates; refresh review only if the merge result changes.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Retain this single parser-and-filter validation path and merge it through normal exact-head gates; refresh review only if the merge result changes.

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

Yes. Current-main source shows empty selectors selecting all shards and unknown selectors selecting none; the exact-head subprocess tests encode those CLI paths, though this read-only review did not execute them.

Is this the best way to solve the issue?

Yes. Syntax validation belongs in argument parsing and name validation belongs in shard filtering, preventing the silent no-op at its producer boundaries without adding configuration or fallback behavior.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 21e9634f1084.

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The PR body reports a sanitized AWS Crabbox run of the affected suite and repeated CLI subprocess regressions on the exact head.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: Invalid internal lint selector input can currently return success without running the requested shard.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The PR body reports a sanitized AWS Crabbox run of the affected suite and repeated CLI subprocess regressions on the exact head.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body reports a sanitized AWS Crabbox run of the affected suite and repeated CLI subprocess regressions on the exact head.

Evidence

What I checked:

  • Current-main behavior: Missing or empty --only values leave the selector set empty, while unmatched names filter every shard out; the runner can then reach its successful no-shard path. (scripts/run-oxlint-shards.mjs:333, 21e9634f1084)
  • Exact-head repair: The head validates missing and hyphen-prefixed selector values, rejects unmatched sets, and performs matching inside the parent lock's try/finally. (scripts/run-oxlint-shards.mjs:253, c623f4a314c4)
  • Boundary regression coverage: Tests cover missing, option-like, unknown, and mixed selectors through parser, filter, and subprocess paths, including nonzero exit, no shard-start output, and no remaining worktree lock. (test/scripts/run-oxlint.test.ts:498, c623f4a314c4)
  • History and release status: Blame ties the current parser/filter lines to the current-main snapshot; the PR head is not contained by current main or a release tag, so this remains an unshipped active repair. (scripts/run-oxlint-shards.mjs:333, e118e607bc68)

Likely related people:

  • vincentkoc: Authored the exact-head repair and several earlier oxlint shard reliability fixes. (role: recent area contributor; confidence: high; commits: c623f4a314c4, f26f45c050cc, 054e734e53b9; files: scripts/run-oxlint-shards.mjs, test/scripts/run-oxlint.test.ts)
  • steipete: History shows repeated work on parallel oxlint execution, worktree toolchain reuse, and stable failure behavior. (role: major historical contributor; confidence: high; commits: af42fbb6f3aa, 87fbc19fe373, 5dafb136149f; files: scripts/run-oxlint-shards.mjs, scripts/run-lint.mjs)
  • Shakker: Current-main blame attributes the affected parser and filter snapshot to this commit, though the broader feature history is shared. (role: current-line contributor; confidence: low; commits: e118e607bc68; files: scripts/run-oxlint-shards.mjs)

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 (1 earlier review cycle)
  • reviewed 2026-08-07T01:41:59.494Z sha e2712c1 :: needs changes before merge. :: [P2] Reject option-like equals-form selectors

@vincentkoc vincentkoc self-assigned this Aug 7, 2026
Punchcard-Session: clear-harbor-river-2k
@vincentkoc

Copy link
Copy Markdown
Member

@clawsweeper re-review

Maintainer fix is now on exact head c623f4a314c4dcbbc36b46363ebb93954bcf90d3. It applies the existing rank-up moves and also rejects unmatched selector sets while guaranteeing heavy-check lock cleanup before any shard starts.

@clawsweeper

clawsweeper Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Command router queued. I will update this comment with the next step.

@clawsweeper clawsweeper Bot added 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. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 7, 2026
@vincentkoc
vincentkoc merged commit 1cf48f1 into openclaw:main Aug 7, 2026
116 checks passed
@vincentkoc

Copy link
Copy Markdown
Member

Merged via squash.

vincentkoc added a commit to VACInc/openclaw that referenced this pull request Aug 7, 2026
* origin/main: (58 commits)
  fix(test): restart shared gateway after migration convergence (openclaw#120089)
  fix(ui): make active-run steering reliable (openclaw#120083)
  fix(telegram): preserve voice fallback text
  test(swift): preserve queued websocket frames (openclaw#120106)
  fix: reject missing oxlint shard selectors (openclaw#120096)
  test(channels): align prerelease fallback catalog spec (openclaw#120092)
  fix(node-cli): warn when systemd user lingering is disabled after install (openclaw#118430)
  fix(diagnostics): preserve CLI turn usage totals (openclaw#120100)
  fix(gateway): derive lock and coordinator paths from the resolved state dir (openclaw#120110)
  fix(release): isolate private Telegram QA harness (openclaw#120088)
  test(agents): exercise execution attribution ingress guard
  fix(gateway): defer attribution until admission succeeds
  refactor(agents): centralize exact execution attribution
  fix(google): accept base64url provider media (openclaw#116204)
  fix(plugins): warn when registerHook uses a typed hook event name (openclaw#118601)
  fix(canvas): serve Content-Length on A2UI HEAD responses (openclaw#117961)
  fix(gateway): make doctor dreaming timestamp comparators NaN-safe (openclaw#118749)
  fix(heartbeat): explain target-none skips (openclaw#119689)
  fix(security): stop recommending retired install-policy bypasses (openclaw#120011)
  fix(plugins): preserve startup release during repair (openclaw#120085)
  ...

# Conflicts:
#	CHANGELOG.md
#	src/config/sessions/session-accessor.sqlite-transcript-write.ts
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 7, 2026
* fix: reject missing oxlint shard selectors

* fix(lint): reject invalid shard selectors

Punchcard-Session: clear-harbor-river-2k

---------

Co-authored-by: Vincent Koc <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts 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.

2 participants