Skip to content

refactor(routing): remove resolver and test size exceptions - #159382

Merged
roboclaw-bot merged 4 commits into
mainfrom
openclaw/reduce-lint-suppressions-and-land-prs
Sep 27, 2026
Merged

roboclaw-bot merged 4 commits into
mainfrom
openclaw/reduce-lint-suppressions-and-land-prs

Conversation

@roboclaw-bot

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

Copy link
Copy Markdown
Collaborator

Closes #159305

What Problem This Solves

The routing resolver and its regression tests need file-size suppressions even though binding indexing and cache tests form independent, coherent units.

User Impact

No user-visible change. Routing precedence, session keys, configured ownership, and cache lifetime stay unchanged; developers regain normal size checks on these files. No migration or configuration change.

Why This Change Was Made

Move the existing binding normalization, source-order index, and its cache together into an internal routing module. Keep route selection and all public exports in the resolver. Move the existing cache regression tests into a focused test file without dropping assertions. Remove both max-lines comments and their shrink-only baseline entries; do not relax any rule.

This is part of the lint-suppression reduction explicitly requested by @steipete.

Evidence

  • Refreshed onto repaired main aad795b, which contains the prerequisite CI and roster repair. The four routing source/test files are byte-identical to the previously reviewed candidate; the feature diff remains exactly five files, +567/-568.
  • Fresh type-aware lint: four routing files, 263 rules, zero warnings/errors (29.3 s). Core typecheck and max-lines ratchet pass; exactly two baseline entries are removed.
  • Fresh routing regression run: all 203 tests in ten files pass across three projects, 56.84 s command wall including cold compilation. Route-selection file duration 0.919 s; the cache/session-key project passed 89 tests in 2.31 s. All original 61 resolver tests remain present as 55 selection tests plus 6 cache tests.
  • Independent autoreview through P2 had zero actionable findings. Its source proof is retained across this history-preserving main merge; all eight extracted production function bodies are unchanged.
  • Published marker commit ba86139 has the exact tested candidate tree; author credit and the merge commit trailer were verified.
  • Earlier core and all 25 core-test typecheck shards, script/production/full-tree dead-export scans, runtime import-cycle check (zero cycles), and formatting/whitespace checks passed.

Earlier broad local validation stopped on unrelated 701-line size drift in src/state/openclaw-state-worker-runtime.ts and src/gateway/session-row-projection.ts on the original base; it was not a passing full-wrapper run. Full repository validation was not repeated locally after refresh. Exact-head hosted CI and the enforced CI gate passed. Completed ClawSweeper review for the refreshed head reported no findings. Landed as 6f736dd; native closeout is complete.

Worked on by

Work sessions


View the OpenClaw team session

roboclaw-bot and others added 2 commits September 27, 2026 03:35
Keep normalized binding indexing and its cache in one internal module and move existing cache regression tests into their own file. Preserve routing logic, public exports, source order and cache lifetime while restoring normal file-size checks.

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

Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: c5219f0e-87b0-4d0d-bcae-5f027231bcf8
@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:55 AM ET / 04:55 UTC (Revision 2).

ClawSweeper review

What this changes

The branch moves binding indexing and caching into an internal routing module, separates cache regression tests, and removes two file-size exceptions.

Merge readiness

✅ Ready for maintainer review

Current main and the latest release still carry the two routing size exceptions. This PR remains the active implementation for the linked cleanup issue; the introduced changes show no actionable routing defect.

Priority: P3
Reviewed head: ba861393ddf69bf9de6be3d4e62de598e19e836e

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused extraction preserves the reviewed routing contract and existing assertions, with no actionable finding.
Proof confidence 🌊 off-meta tidepool Not applicable: The bot-authored internal refactor retains the production resolver entrypoint and moves its cache regressions; the PR reports focused routing tests, which this read-only review did not execute. 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 internal refactor retains the production resolver entrypoint and moves its cache regressions; the PR reports focused routing tests, which this read-only review did not execute. No stored-data contract changes.
Evidence reviewed 8 items Current main still needs the cleanup: The current main baseline retains both routing size exceptions.
Latest release still has the exceptions: The v2026.9.6 release baseline lists both routing files.
Introduced routing change: The pinned introduced diff relocates binding preparation into the new module while the resolver continues to consume its index and retains the documented selection tiers.
Findings None None.
Security None None.

How this fits together

Incoming channel messages and configured bindings feed the route resolver, which selects an agent and session key. The binding index prepares and caches candidates for that decision.

flowchart LR
  A[Incoming channel message] --> D[Route resolver]
  B[Configured bindings] --> C[Binding index and cache]
  C --> D
  D --> E[Selected agent]
  E --> F[Session key]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +9, Tests -8, Other -2. Total -1 across 5 files.

View PR surface stats
Area Files Added Removed Net
Source 2 273 264 +9
Tests 2 294 302 -8
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 0 2 -2
Total 5 567 568 -1

Review metrics

Metric Value Why it matters
File-size exceptions 2 removed, 0 added Both routing files return to normal file-size enforcement.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #159305
Summary: This PR is the implementation candidate for the linked routing cleanup; the merged UI repair addressed a separate CI prerequisite.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Technical review

Best possible solution:

Keep binding preparation and its cache together under routing, preserve the resolver’s public selection behavior, and retire both size exceptions.

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

Not applicable: this is cleanup rather than a behavior bug. Both exceptions are directly visible on current main and in the latest release.

Is this the best way to solve the issue?

Yes. The extraction keeps binding indexing and its cache together while the existing resolver retains route selection and public exports.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P3: This is bounded developer maintenance 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.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The bot-authored internal refactor retains the production resolver entrypoint and moves its cache regressions; the PR reports focused routing tests, which this read-only review did not execute. No stored-data contract changes.

Label justifications:

  • P3: This is bounded developer maintenance 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.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The bot-authored internal refactor retains the production resolver entrypoint and moves its cache regressions; the PR reports focused routing tests, which this read-only review did not execute. No stored-data contract changes.

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)
  • Teddy Tennant: 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.

History

Review history (1 earlier review cycle)
  • reviewed 2026-09-27T04:01:03.055Z sha 774c005 :: needs maintainer review before merge. :: none

roboclaw-bot and others added 2 commits September 27, 2026 04:39
Preserve the reviewed routing source unchanged while incorporating the landed roster fixture and publication repairs from #159394 for fresh CI.

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

Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: 5857d0f0-8906-48ac-aa97-8f242c4a09e3
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@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 27, 2026
@roboclaw-bot
roboclaw-bot merged commit 6f736dd into main Sep 27, 2026
215 checks passed
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Merged via squash.

@roboclaw-bot
roboclaw-bot deleted the openclaw/reduce-lint-suppressions-and-land-prs branch September 27, 2026 05:08
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 28, 2026
…#159382)

* refactor(routing): remove resolver and test size exceptions

Keep normalized binding indexing and its cache in one internal module and move existing cache regression tests into their own file. Preserve routing logic, public exports, source order and cache lifetime while restoring normal file-size checks.

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

* refactor(routing): remove resolver and test size exceptions

Worked on by:
- @steipete

Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: c5219f0e-87b0-4d0d-bcae-5f027231bcf8

* refactor(routing): remove resolver and test size exceptions

Worked on by:
- @steipete

Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: 5857d0f0-8906-48ac-aa97-8f242c4a09e3

---------

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

P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XL 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.

chore(routing): retire oversized resolver and test exceptions

1 participant