Repository navigation
chore: remove redundant in-place sorting lint exceptions - #159379
Conversation
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]>
|
🦞👀 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 27, 2026, 12:00 AM ET / 04:00 UTC. ClawSweeper reviewWhat this changesThe 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 Review scores
Verification
How this fits togetherCron 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]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource -2, Tests -4. Total -6 across 5 files. View PR surface stats
Review metrics
Technical reviewBest 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. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
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]>
|
Merged via squash auto-merge.
|
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]>
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-sortdirectives 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 boundIntl.Collator.compareexception 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 incorporatingaad795bf312accc62015b533238d06c95f50c6a4. All five changed-file blobs are identical to the independently reviewed head27712e2df573503335697464af9b129c7fb7cedb; there were no conflicts or additional allowances.Fresh local validation with this candidate and its frozen dependencies:
git diff --checkpass.The inherited CI blocker is resolved: prerequisite repair merged as
634a626f5c070bc5cfdae75367566ed0a9748d2fand is included in this head. The earlier CI run 36291537378 failed on the unchanged upstream UI-test blob53d549111b19dbb1ba3a4ff60dc787adf89de309in 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.