Repository navigation
Conversation
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review in progressClawSweeper is reviewing this revision. This supersedes any previous blocked status. |
steipete
marked this pull request as ready for review
October 31, 2026 11:27
Contributor
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
steipete
deleted the
steipete/perf-micro-session-list-row-runtime-resolution-20260919
branch
October 31, 2026 11:48
Contributor
Author
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Nov 1, 2026
…penclaw#189322) * perf(gateway): reuse runtime decisions during session listing * test(perf): accept the negative runtime search fixture
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Problem This Solves
Fixes excessive CPU and allocation when session-list searches scan many cold rows with the same agent runtime choices.
User Impact
Large session lists do less repeated runtime-policy work without changing search results or worker placement. No configuration or migration is required.
Why This Change Was Made
Rejected cold rows are not materialized, so each search recomputed effective runtime and harness policy for every row. Share those decisions within each synchronous selection or materialization slice, keyed by agent, model route, runtime/harness overrides, and ownership. A new request or yielded slice rechecks live policy. ACP-owned rows bypass configured policy that their metadata would discard; CLI/auth placement remains row-specific.
Jiti also consults virtual modules before its own module cache. Retain native SDK exports in the existing loader proxy target so repeated imports stop calling native module resolution, while preserving per-plugin deprecation attribution and alias-generation isolation. Query normalization and prepared agent IDs already had upstream owners; preserve them and remove one redundant agent normalization.
The production delta is +97 lines, mainly the private, complete-key resolver and propagation into search and materialization. Keeping this state out of persistent row projections avoids stale harness decisions.
Evidence
Synthetic persisted fixtures: 10,000 rows, eight agents, bounded 100-row pages; runtime-search fixture includes one-third ACP rows. Five counterbalanced A/B pairs with fresh processes and A/A controls, separate CPU and allocation passes:
Runtime-search CPU A/A drift was +4.86%, allocation +0.13%; paired CPU reductions were 68.95–72.90%. Mixed timing is noisy and does not establish a broad sidebar latency improvement. SDK timing A/A drift was −16.21%, versus 97.33–97.63% paired reductions. Session owner and SDK loader measurements are isolated comparisons, not full Gateway latency claims. Synthetic macOS metadata fixtures do not reproduce a large transcript corpus or production filesystem I/O. All paired response digests match.
Regressions fail on the pinned base: search resolves runtime 96 times instead of eight; ACP search resolves policy 24 times instead of zero; repeated transformed SDK imports load natively 200 times instead of once. Candidate tests pass, including later config/harness changes, cold projection reuse, placement, alias replacement and per-plugin attribution. Final focused Gateway/model/placement coverage passed 45 tests; focused search/SDK coverage passed 22. Full build and the final performance-source build passed. Independent Codex review found no actionable P0–P2 findings.
pnpm check:changed --staged --timedcompleted; new lint findings were fixed and both affected files passed targeted lint. All other gates passed except inherited dead exports, independently reproduced on clean baseb7cc7ebc9b442ed7eb73a92336c2a9886b578f7b:resolveFollowupReplyAnchor,captureRepositoryClientActor, the repository-dispatchRepositoryOperationre-export, andRepositoryAuthorization. The full-tree scan matches the same baseline's first and last findings. No guard or baseline was weakened.Real isolated loopback Gateway proof passed 21
sessions.listRPCs across sidebar, general, negative runtime search, compact, involvement, owner counts, and child queries, including revision-based unchanged responses. The harness initially rejected the intentional empty search; its assertion was corrected, independently reviewed, linted, and the complete RPC proof rerun successfully.Exact-head CI run 41196962751, attempt 1 passed 59 jobs, including
security-fast; 26 were skipped. Its only failed non-aggregate job ischeck-lint-core-2: threetypescript(no-floating-promises)errors atsrc/gateway/server-methods/agent.visitor-access.test-utils.ts:350,444,700forsdkResources.close(). All three reproduce on clean main parent23dc2686a2fd00f7650823e0adb3341bf61b2cabof tested mergee758ce80b4fea2a17afaab55f22ce3d6e8cbce7b. The failing test, resource-host implementation and lint inputs are byte-identical between that parent and tested merge; the calls came from main's #189296. The scheduled-main comparison predates that change, explaining its “new” classification. Landing uses the authorized inherited-failure route and preserves the failed CI result.