Skip to content

chore: remove redundant in-place sorting lint exceptions - #159379

Merged
roboclaw-bot merged 2 commits into
mainfrom
openclaw/reduce-sort-expression-suppressions
Sep 27, 2026
Merged

roboclaw-bot merged 2 commits into
mainfrom
openclaw/reduce-sort-expression-suppressions

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Five intentional in-place sorts suppress a lint rule even though the rule already permits explicit sorting statements.

User Impact

No user-visible change. Cron pagination, model-catalog ordering, and plugin method inventories retain the same ordering and allocation behavior. No migration or configuration change.

Why This Change Was Made

Separate mutation from returned or assigned expressions, then remove the five unicorn/no-array-sort directives and their four suppression-inventory entries. Comparators and array ownership stay unchanged; this does not add copies, casts, helpers, or weaker lint settings. The separate bound Intl.Collator.compare exception remains justified and unchanged.

Requested by @steipete as part of the autonomous lint-suppression reduction.

Work sessions

Evidence

Refreshed head: 0ed442a2f139baa1c2aa0d3254276715cf1a607a, a history-preserving main merge incorporating aad795bf312accc62015b533238d06c95f50c6a4. All five changed-file blobs are identical to the independently reviewed head 27712e2df573503335697464af9b129c7fb7cedb; there were no conflicts or additional allowances.

Fresh local validation with this candidate and its frozen dependencies:

  • Type-aware lint: four production modules and the inventory test pass with zero diagnostics (23.8 s and 12.9 s).
  • Cron pagination/sort guards and model-catalog planner: 34 tests pass (87.97 s command wall, including worker compilation).
  • Plugin load-cache context: 17 pass, 16 unrelated tests filtered (86.88 s command wall, including compilation).
  • Suppression inventory: all 3 tests pass (18.71 s command wall, 10.41 s Vitest duration, 331 ms tests). No tests were added.
  • Formatting and git diff --check pass.
  • Independent autoreview through P2 found no actionable findings; reused only after confirming the five-file cleanup is source-identical. ClawSweeper completed its clean review at 04:00 UTC on the preceding source-equivalent head; native freshness and ordinary exact-head CI gates still apply.

The inherited CI blocker is resolved: prerequisite repair merged as 634a626f5c070bc5cfdae75367566ed0a9748d2f and is included in this head. The earlier CI run 36291537378 failed on the unchanged upstream UI-test blob 53d549111b19dbb1ba3a4ff60dc787adf89de309 in both its merge tree and main parent. That failed run was not rerun; the fresh push requests normal CI on the repaired main context.

Local limitation: the earlier broader plugin-loader “hidden core methods” scenario stopped before tests because this host denies access to the managed-service environment file. No credentials or service settings were changed, and that blocked scenario was not retried. Full suites/build were not run locally. Exact-head CI run 36295157096 subsequently passed with 130 successful jobs, 21 intentional skips, and a successful enforced openclaw/ci-gate. The guarded auto-merge landed this exact source head as ea7bbd7 at 05:02:48 UTC on September 27, 2026. The landed five-file delta matches the reviewed patch; native merge receipt and ownership-scoped closeout are complete.

Use explicit in-place sort statements for owned cron, model-catalog, and plugin arrays. Keep comparators and allocations unchanged and remove the five corresponding directives from the production suppression ratchet.

Co-authored-by: steipete <[email protected]>
@clawsweeper

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

@clawsweeper

clawsweeper Bot commented Sep 27, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 27, 2026, 12:00 AM ET / 04:00 UTC.

ClawSweeper review

What this changes

The branch separates five in-place sorts from their return or assignment expressions and removes the matching lint directives and suppression-inventory entries.

Merge readiness

✅ Ready for maintainer review

Keep this PR open. Current main and the latest release still contain the targeted lint exceptions, and source review found no behavior change in the proposed cleanup. The related open CI repair addresses a separate, inherited test failure.

Priority: P3
Reviewed head: 27712e2df573503335697464af9b129c7fb7cedb

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The narrow patch preserves the inspected behavior and has focused reported validation, with no actionable introduced defect found.
Proof confidence 🌊 off-meta tidepool Not applicable: The bot-authored PR's changed production paths keep the same in-place sorts, and its body reports focused lint and test runs; the contributor proof gate does not apply. No stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The bot-authored PR's changed production paths keep the same in-place sorts, and its body reports focused lint and test runs; the contributor proof gate does not apply. No stored-data contract changes.
Evidence reviewed 6 items Introduced change: The pinned merge-base-to-head diff changes five sort expressions to statements while retaining their arrays and comparators, and removes four inventory entries covering five directives.
Current-main necessity: The fetched main revision still contains the targeted sort suppressions; its touched files have no changes relative to the PR base.
Shipped-version check: The latest identified release still uses the suppressed sort expression in the cron path.
Findings None None.
Security None None.

How this fits together

Cron lists, plugin model declarations, and Gateway method names enter separate OpenClaw sorting paths. Their sorted arrays feed cron results, model catalogs, and plugin method inventories; a test tracks intentional production lint exceptions.

flowchart LR
A[Cron job lists] --> D[In-place sorting]
B[Plugin model declarations] --> D
C[Gateway method names] --> D
D --> E[Sorted cron results]
D --> F[Ordered model catalog]
D --> G[Plugin method inventory]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source -2, Tests -4. Total -6 across 5 files.

View PR surface stats
Area Files Added Removed Net
Source 4 18 20 -2
Tests 1 0 4 -4
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 5 18 24 -6

Review metrics

Metric Value Why it matters
Lint exceptions 5 directives and 4 inventory entries removed The production suppressions and their tracked allowance shrink together.

Technical review

Best possible solution:

Keep one explicit in-place sort at each existing owner and retain only lint exceptions that remain necessary.

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

Not applicable: this PR addresses redundant lint exceptions rather than a reported runtime defect; the directives are visible in current source.

Is this the best way to solve the issue?

Yes: separating each sort from its expression preserves the owned array, comparator, and returned ordering without weakening the lint rule.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 4c88390c72d7.

Labels

Label changes:

  • add P3: This is a bounded lint cleanup with no intended user-visible behavior change.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.

Label justifications:

  • P3: This is a bounded lint cleanup with no intended user-visible behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.

Evidence

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Ayaan Zaidi: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; 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.

Merge current main aad795b after prerequisite #159394 landed. The five-file sorting cleanup is source-identical to the reviewed candidate.

Co-authored-by: steipete <[email protected]>
@roboclaw-bot
roboclaw-bot enabled auto-merge (squash) September 27, 2026 04:46
@roboclaw-bot
roboclaw-bot merged commit ea7bbd7 into main Sep 27, 2026
206 of 207 checks passed
@roboclaw-bot
roboclaw-bot deleted the openclaw/reduce-sort-expression-suppressions branch September 27, 2026 05:02
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Merged via squash auto-merge.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 28, 2026
Use explicit in-place sort statements for owned cron, model-catalog, and plugin arrays. Keep comparators and allocations unchanged and remove the five corresponding directives from the production suppression ratchet.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant