Repository navigation
fix(gateway): prevent cold plugin loads in session resolution tests - #151945
Conversation
Install the session-conversation registry before each case so opaque Matrix room IDs do not trigger cold bundled plugin activation during row preparation. Guard the existing casing assertions against accidental facade loading. Related: #151204 Reproduced main CI run 35309177026.
|
🦞👀 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 18, 2026, 12:22 PM ET / 16:22 UTC. ClawSweeper reviewWhat this changesThe PR installs the existing channel test registry before session-resolution tests and guards the Matrix casing cases against loading bundled plugins. Merge readiness✅ Ready for maintainer review Keep open: current main still needs this focused fixture repair. The patch preserves the existing assertions, addresses the plugin-loading trigger, and introduces no actionable correctness defects. Priority: P3 Review scores
Verification
How this fits togetherGateway session resolution turns session references into matching session records. Its tests prepare synthetic session rows, whose parent-model lookup can consult channel plugins. flowchart TD
A[Synthetic session reference] --> B[Session row preparation]
C[Channel test registry] --> D[Conversation lookup]
B --> D
D --> E{Matrix registered?}
E -->|Yes| F[Lightweight test resolver]
E -->|No| G[Bundled plugin loader]
F --> H[Session matching and casing assertions]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +9. Total +9 across 1 file. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep session-resolution fixtures self-contained through the shared channel registry, with a deterministic guard against accidental bundled-plugin loading. Do we have a high-confidence way to reproduce the issue? Yes: source identifies the missing Matrix registration and resulting bundled-loader branch, and the PR reports a failing guard-only probe. Timeout timing was not independently reproduced in this read-only review. Is this the best way to solve the issue? Yes: reusing the existing registry fixes fixture ownership at setup, while the negative loader assertion catches recurrence without weakening casing checks or increasing timeouts. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 19dbf2e4dabf. 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.
|
* origin/main: test(gateway): isolate session resolution channel fixtures (#151945) fix(clickclack): drain discussion opens before shutdown (#151978) fix(test): restore trusted packaging harness startup (#151967) improve(codex): batch session adoption binding reads (#151979) improve(cron): reduce allocations for busy stream sources (#151956) fix(file-transfer): avoid repeated directory record encoding (#151987) fix: avoid session-list rebuilds when authentication availability changes (#151920) fix(updates): explain externally managed update refusals (#151942) improve(heartbeat): avoid unused config work in membership checks (#151867) fix(android): keep status text readable and label accessibility actions (#151342) improve(ui): show OS and size in the environment selector (#151947) fix(android): keep tool errors visible in collapsed chat activity (#151332)
…151945) Install the session-conversation registry before each case so opaque Matrix room IDs do not trigger cold bundled plugin activation during row preparation. Guard the existing casing assertions against accidental facade loading. Related: openclaw#151204 Reproduced main CI run 35309177026.
Avoid cold Browser plugin activation in a fixture with no browser resources. Follow up lane W concurrency evidence and #151945. Preserve existing assertions, wait budgets, and file parallelism.
Await the session-state cleanup owner before deleting fixture databases. Follow up lane W concurrency evidence and #151945. Preserve existing assertions, wait budgets, and file parallelism.
Route chat.send directly to its owner and defer history, media and title runtime loading. Keep post-import authority checks and observe websocket isolation through actual delivery. Follow up lane W concurrency evidence and #151945. Preserve existing assertions, wait budgets, and file parallelism.
Bound private SDK host copies while retaining native package independence. Follow up lane W concurrency evidence and #151945. Preserve existing assertions, wait budgets, and file parallelism.
Prepare explicit synthetic model policy and plugin metadata for the retention child. Follow up lane W concurrency evidence and #151945. Preserve existing assertions, wait budgets, and file parallelism.
…aw#152779) Avoid cold Browser plugin activation in a fixture with no browser resources. Follow up lane W concurrency evidence and openclaw#151945. Preserve existing assertions, wait budgets, and file parallelism.
…aw#152780) Await the session-state cleanup owner before deleting fixture databases. Follow up lane W concurrency evidence and openclaw#151945. Preserve existing assertions, wait budgets, and file parallelism.
…law#152784) Route chat.send directly to its owner and defer history, media and title runtime loading. Keep post-import authority checks and observe websocket isolation through actual delivery. Follow up lane W concurrency evidence and openclaw#151945. Preserve existing assertions, wait budgets, and file parallelism.
…nclaw#152782) Load the real plugin entry through the bundled facade test owner. Follow up lane W concurrency evidence and openclaw#151945. Preserve existing assertions, wait budgets, and file parallelism.
Bound private SDK host copies while retaining native package independence. Follow up lane W concurrency evidence and openclaw#151945. Preserve existing assertions, wait budgets, and file parallelism.
…penclaw#152781) Seed fresh title-retention transcripts with existing append and transaction owners. Follow up lane W concurrency evidence and openclaw#151945. Preserve existing assertions, wait budgets, and file parallelism.
…law#152785) Prepare explicit synthetic model policy and plugin metadata for the retention child. Follow up lane W concurrency evidence and openclaw#151945. Preserve existing assertions, wait budgets, and file parallelism.
What Problem This Solves
Fixes the opaque Matrix-reference unit-test timeout seen in main run 35309177026.
Related: #151204.
User Impact
This repairs test-fixture isolation. Production session resolution and its existing casing assertions are unchanged.
Why This Change Was Made
The default test plugin registry omitted Matrix. Preparing a synthetic session row therefore sent parent-model lookup through optional bundled plugin activation for the colon-containing room ID. That cold synchronous load caused the timeout; the failure was not a casing mismatch or a stale resident index.
Install the existing session-conversation registry before each test because shared teardown resets the active registry after every case. The existing opaque-reference cases also assert that they never enter the bundled loader, making a missing fixture fail deterministically.
Evidence
session-key-api.jsloader call.sessions-resolve*files andsession-utils.perf.test.ts, including improve(sessions): speed up session links and list pages #151204 resident-index coverage.node scripts/check-changed.mjs, line-cap ratchet,oxfmt --check, andgit diff --checkpassed. A type-aware lint canary rejected an intentionally floating promise with the expected rule. Independent review was clean through P2.The broad-run limit is explicit: the original group again timed out in
desktop/computer-authority.runtime.test.ts(also red before the fix; one candidate case took 502 seconds against its unchanged 90-second limit). The eight-worker group also failedsession-message-events.test.ts(red in the baseline), repository snapshot capture, workspace-result finalization, and workspace-recovery subprocess checks. No retries, increased timeouts, weakened assertions, or baseline exceptions were used to hide those failures. The remaining broad cases were stopped; neither entire group is claimed green.