Repository navigation
perf(codex): bound progressive local catalog waits - #154362
Conversation
Return pending local hosts after a 250 ms page-wait budget and retain background publication through waitUntil. Preserve resident reads and complete-response callers. Synthetic two-second native page latency fell from 2100.76 ms to 251.49 ms; 82 focused tests and changed-file checks passed on Blacksmith Testbox.
|
🦞👀 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 20, 2026, 11:35 PM ET / September 21, 2026, 03:35 UTC. ClawSweeper reviewWhat this changesThe Codex session catalog now returns pending local hosts after a 250 ms progressive wait, publishes their results asynchronously, and adds regression coverage and documentation. Merge readiness✅ Ready for maintainer review This remains useful work: current main still waits for the local page. No actionable correctness or security findings were identified in the introduced changes. Priority: P2 Review scores
Verification
How this fits togetherThe Codex plugin turns native session pages into OpenClaw’s session catalog. The Gateway delivers these results to clients, retaining background publications when a progressive list returns early. flowchart LR
A[Catalog request] --> B[Gateway selects response mode]
B --> C[Codex local catalog]
D[Resident rows or native page] --> C
C --> E{Ready within wait budget?}
E -->|Yes| F[Completed host response]
E -->|No| G[Pending host response]
G --> H[Owned background publication]
D --> H
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +38, Tests +164, Docs +5. Total +207 across 3 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep local progressive responses bounded while the existing publication lifetime owns completion and complete-response callers retain their deadlines. Do we have a high-confidence way to reproduce the issue? Yes, from source: a cold local page holds the current-main list open until it settles. The supplied regression reports that the original code remains unsettled at 250 ms; this review did not execute it. Is this the best way to solve the issue? Yes. Reusing the existing partial-response contract and publication owner avoids adding another cache or changing native pagination. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 051563c9b242. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
* commit 'f76d38a4ac5e5f4e6c5a5320436db169e33d5c8a': (49 commits) fix(ci): remove duplicate database worker test entry fix(voice): keep audio flowing while the Gateway is busy (openclaw#154119) docs: reserve Team live updates for Night Watch (openclaw#154425) test(meeting-bot): control browser retry fixture clocks (openclaw#149174) fix(ui): use remote defaults for manual worktree creation (openclaw#154364) fix(proxy): keep WebChat and Codex loopback calls direct (openclaw#154013) fix(pr): revalidate head reads and reuse repository locators (openclaw#154212) fix(browser): start control when the Gateway has activated the plugin (openclaw#154255) improve: publish CI dependencies promptly and warm hosted JavaScript caches (openclaw#154156) improve: speed up streaming text with inline brackets (openclaw#154398) test: isolate historical Node runner policy from CI fix: refresh stale Gateway shutdown budgets during updates and Doctor (openclaw#153636) ci: use four Windows workers on the 16 class (openclaw#154261) feat: verify GitHub credit from trusted OIDC claims (openclaw#153940) feat(sessions): support explicit local placement for child sessions (openclaw#153912) fix(ui): prevent stale copies after text changes (openclaw#154259) perf(gateway): reuse session list candidates across viewers (openclaw#154003) perf(codex): bound progressive local catalog waits (openclaw#154362) docs: keep update requests owned through acceptance (openclaw#154111) perf(state): reduce main-thread coordinator waits (openclaw#154244) ...
* commit 'f76d38a4ac5e5f4e6c5a5320436db169e33d5c8a': (58 commits) fix(ci): remove duplicate database worker test entry fix(voice): keep audio flowing while the Gateway is busy (#154119) docs: reserve Team live updates for Night Watch (#154425) test(meeting-bot): control browser retry fixture clocks (#149174) fix(ui): use remote defaults for manual worktree creation (#154364) fix(proxy): keep WebChat and Codex loopback calls direct (#154013) fix(pr): revalidate head reads and reuse repository locators (#154212) fix(browser): start control when the Gateway has activated the plugin (#154255) improve: publish CI dependencies promptly and warm hosted JavaScript caches (#154156) improve: speed up streaming text with inline brackets (#154398) test: isolate historical Node runner policy from CI fix: refresh stale Gateway shutdown budgets during updates and Doctor (#153636) ci: use four Windows workers on the 16 class (#154261) feat: verify GitHub credit from trusted OIDC claims (#153940) feat(sessions): support explicit local placement for child sessions (#153912) fix(ui): prevent stale copies after text changes (#154259) perf(gateway): reuse session list candidates across viewers (#154003) perf(codex): bound progressive local catalog waits (#154362) docs: keep update requests owned through acceptance (#154111) perf(state): reduce main-thread coordinator waits (#154244) ...
* commit 'f76d38a4ac5e5f4e6c5a5320436db169e33d5c8a': (58 commits) fix(ci): remove duplicate database worker test entry fix(voice): keep audio flowing while the Gateway is busy (#154119) docs: reserve Team live updates for Night Watch (#154425) test(meeting-bot): control browser retry fixture clocks (#149174) fix(ui): use remote defaults for manual worktree creation (#154364) fix(proxy): keep WebChat and Codex loopback calls direct (#154013) fix(pr): revalidate head reads and reuse repository locators (#154212) fix(browser): start control when the Gateway has activated the plugin (#154255) improve: publish CI dependencies promptly and warm hosted JavaScript caches (#154156) improve: speed up streaming text with inline brackets (#154398) test: isolate historical Node runner policy from CI fix: refresh stale Gateway shutdown budgets during updates and Doctor (#153636) ci: use four Windows workers on the 16 class (#154261) feat: verify GitHub credit from trusted OIDC claims (#153940) feat(sessions): support explicit local placement for child sessions (#153912) fix(ui): prevent stale copies after text changes (#154259) perf(gateway): reuse session list candidates across viewers (#154003) perf(codex): bound progressive local catalog waits (#154362) docs: keep update requests owned through acceptance (#154111) perf(state): reduce main-thread coordinator waits (#154244) ...
* commit 'f76d38a4ac5e5f4e6c5a5320436db169e33d5c8a': (44 commits) fix(ci): remove duplicate database worker test entry fix(voice): keep audio flowing while the Gateway is busy (openclaw#154119) docs: reserve Team live updates for Night Watch (openclaw#154425) test(meeting-bot): control browser retry fixture clocks (openclaw#149174) fix(ui): use remote defaults for manual worktree creation (openclaw#154364) fix(proxy): keep WebChat and Codex loopback calls direct (openclaw#154013) fix(pr): revalidate head reads and reuse repository locators (openclaw#154212) fix(browser): start control when the Gateway has activated the plugin (openclaw#154255) improve: publish CI dependencies promptly and warm hosted JavaScript caches (openclaw#154156) improve: speed up streaming text with inline brackets (openclaw#154398) test: isolate historical Node runner policy from CI fix: refresh stale Gateway shutdown budgets during updates and Doctor (openclaw#153636) ci: use four Windows workers on the 16 class (openclaw#154261) feat: verify GitHub credit from trusted OIDC claims (openclaw#153940) feat(sessions): support explicit local placement for child sessions (openclaw#153912) fix(ui): prevent stale copies after text changes (openclaw#154259) perf(gateway): reuse session list candidates across viewers (openclaw#154003) perf(codex): bound progressive local catalog waits (openclaw#154362) docs: keep update requests owned through acceptance (openclaw#154111) perf(state): reduce main-thread coordinator waits (openclaw#154244) ...
Return pending local hosts after a 250 ms page-wait budget and retain background publication through waitUntil. Preserve resident reads and complete-response callers. Synthetic two-second native page latency fell from 2100.76 ms to 251.49 ms; 82 focused tests and changed-file checks passed on Blacksmith Testbox.
What Problem This Solves
A cold local Codex catalog can hold
sessions.catalog.listopen for seconds while the app-server produces its firstthread/listpage. Progressive local lists still took that complete-response path after paired-node lists gained bounded progress handling in #153614.User Impact
Progressive lists now return warm resident rows immediately, or a pending local host after at most 250 ms of page waiting. Pending hosts preserve existing displayed rows, and the existing
onHostcallback publishes the page or error when ready. One-shot lists, host-specific requests, and pagination retain their existing deadline and complete-response behavior.Why This Change Was Made
Reuse the paired-node wait bound and the existing
waitUntilpublication lifetime. The local visible-page operation finishes and closes under that lifetime after the foreground driver closes. The resident index still owns shared hydration, incremental reconciliation, and the 15-minute safety walk. No new cache, configuration, schema, protocol, migration, or updater behavior; net production change is +38 lines.Evidence
Registered-provider benchmark with a fake 2-second app-server page, using the real resident index:
Cold response latency fell 88%. These are single synthetic samples, not production p50/p99 claims. Fake-clock regression proves the 250 ms page-wait bound; the measured wall time also includes provider overhead. No live deployment was performed.
All heavy validation used provider
blacksmith-testbox, profileopenclaw-check, initially on leasetbx_01m30y9jgnpakky4xxfem28a4c(Testbox workflow) and then its replacement listed below. No local tests, typechecks, or builds ran.Final result: all 82 focused regression/sibling tests passed, plus the complete changed-file gate (extension production/test typechecks, lint, formatting, ratchets, boundary checks, and import-cycle checks). The pinned-base gate finished successfully in 8m11s including sync. Both task-owned leases were stopped. Full builds and live app-server/deployment testing were outside this lane; PR CI is pending at publication.
Remote commands and recovery history
Every validation command below ran through
crabbox run --id <lease> --timing-json -- ..., with normal sync enabled and only one active command. Both leases usedblacksmith-testbox/openclaw-check.On
tbx_01m30y9jgnpakky4xxfem28a4c:env OPENCLAW_CATALOG_LOCAL_BENCH=1 node scripts/run-vitest.mjs extensions/codex/src/session-catalog-local-progress.test.ts --maxWorkers=1: first attempt stopped before tests because dependencies were missing. Afterpnpm install --frozen-lockfilepassed, baseline run reproduced the intended cold-progress failure; complete-response and benchmark cases passed.env OPENCLAW_CATALOG_LOCAL_BENCH=1 node scripts/run-vitest.mjs extensions/codex/src/session-catalog-local-progress.test.ts extensions/codex/src/session-catalog-list-operation.test.ts --maxWorkers=1: measured the after result; 32 passed, two new error-message assertions failed. The assertions were corrected to the existing sanitized public error contract; no production change was needed.node scripts/run-vitest.mjs extensions/codex/src/session-catalog-cold-start.test.ts extensions/codex/src/session-catalog-request-lifetime.test.ts src/gateway/server-methods/session-catalog-progress.test.ts: 49 passed, runner wall 36.70 s.pnpm test extensions/codex/src/session-catalog-local-progress.test.ts --maxWorkers=1: two attempts, second with sync diagnostics, stopped before command execution at Blacksmith's two-minute full-sync deadline. Stopped this lease and acquired its replacement; no concurrent leases or sync bypass.On replacement
tbx_01m30z5j5ckdd53te0ca6x8jbs(workflow):pnpm test extensions/codex/src/session-catalog-local-progress.test.ts --maxWorkers=1, then rannode scripts/check-changed.mjs -- <the three changed files>with the remote-child/raw-sync environment. The test passed: four regressions, one opt-in benchmark skipped; test-case time 323 ms, Vitest wall 26.00 s, runner wall 27.37 s including cold compilation.git rev-parse HEAD origin/main,git status --short,git diff --stat origin/main, andgit log -3 --onelineproved the checkout was the exact candidate base46e56ca97d44d304337014674965b047507ecfa1with only these three files changed, while the hydratedorigin/mainpointed elsewhere. The gate passed with--base 46e56ca97d44d304337014674965b047507ecfa1and the same three explicit paths; no guard was disabled.