fix(test): reduce startup-heavy hotspot retention#52381
Conversation
Greptile SummaryThis PR reduces startup time and RSS for five identified hotspot test files by splitting two heavy modules into lighter seams and adding a new Key changes:
Confidence Score: 5/5
|
84d3c15 to
fa1f376
Compare
(cherry picked from commit dbd26e4)
* test: add Feishu bot-menu lifecycle regression (cherry picked from commit 0e825ec) * fix(feishu): harden webhook signature compare (cherry picked from commit 223ae42) * refactor: move feishu zalo zalouser to setup wizard (cherry picked from commit 40be12d) * Plugin SDK: add legacy message discovery helper (cherry picked from commit 4c36436) * refactor: rename setup helper surfaces (cherry picked from commit 53ccc78) * Feishu: split setup adapter helpers (cherry picked from commit 61bcdcc) * refactor: share feishu webhook monitor harness (cherry picked from commit 6464149) * fix(ci): reset deep test runtime state (cherry picked from commit 83a267e) * Plugins: internalize matrix and feishu SDK imports (cherry picked from commit 889bb8a) * Feishu: break plugin-sdk setup cycle (cherry picked from commit 9b6859e) * fix(test): reduce startup-heavy hotspot retention (openclaw#52381) (cherry picked from commit dbd26e4) * feat(feishu): structured cards with identity header, note footer, and streaming enhancements (openclaw#29938) Verified: - pnpm build - pnpm check - pnpm test:macmini Co-authored-by: nszhsl <[email protected]> Co-authored-by: Tak Hoffman <[email protected]> (cherry picked from commit df3a247) * test: dedupe feishu startup preflight waits (cherry picked from commit 1ea5bba) * test: flatten feishu docx hoisted mocks (cherry picked from commit 285f903) * Feishu: move outbound session routing behind plugin boundary (cherry picked from commit 2a02337) * fix(test): split feishu bot helpers (cherry picked from commit 383d5ac) * Security: preserve Feishu reaction chat type (openclaw#44088) * Feishu: preserve looked-up chat type * Feishu: fail closed on ambiguous reaction chats * Feishu: cover reaction chat type fallback * Changelog: note Feishu reaction hardening * Feishu: fail closed without resolved chat type * Feishu: normalize reaction chat type at runtime (cherry picked from commit 3e730c0) * test: reduce feishu reply dispatcher duplication (cherry picked from commit 3ffb9f1) * test: add Feishu ACP failure lifecycle regression (cherry picked from commit 628b55a) * Feishu: lazy-load runtime-heavy channel paths (cherry picked from commit 66a8c25) * fix(test): repair extensions lane regressions (cherry picked from commit 75ab4db) * test: add Feishu card-action lifecycle regression (cherry picked from commit 7d50e7f) * tests(feishu): inject client runtime seam (cherry picked from commit 8448f48) * test: dedupe feishu media account setup (cherry picked from commit 8ca510a) * test: dedupe feishu config schema checks (cherry picked from commit 9a14696) * refactor: share feishu reaction client setup (cherry picked from commit a14a326) * test: reuse feishu streaming merge helper (cherry picked from commit a474a9c) * test: dedupe feishu account resolution fixtures (cherry picked from commit a7e5925) * test: dedupe feishu probe fixtures (cherry picked from commit b23bfef) * test: add Feishu broadcast lifecycle regression (cherry picked from commit c7cebd6) * fix: adapt cherry-picks for fork TS strictness Remove upstream-only files (runtime-api, setup-wizard, message-tool-legacy) and fix import paths for fork's module structure. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]> * fix: remove setup-core.ts (DTS rootDir violation) and fix test mock path - Remove setup-core.ts that caused DTS build failure (extensions/ outside rootDir) - Update helpers.test.ts mock path from onboarding.js to setup.js (matching rename) Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]> * fix: remove extensions/ exports from plugin-sdk (DTS rootDir) and broken test - Remove feishuOnboardingAdapter, zaloOnboardingAdapter, zalouserOnboardingAdapter re-exports from plugin-sdk/* (these pull extensions/ into DTS rootDir scope) - Remove vitest-extensions-config.test.ts (tests non-existent function) Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]> --------- Co-authored-by: Tak Hoffman <[email protected]> Co-authored-by: Peter Steinberger <[email protected]> Co-authored-by: Gustavo Madeira Santana <[email protected]> Co-authored-by: Vincent Koc <[email protected]> Co-authored-by: songlei <[email protected]> Co-authored-by: nszhsl <[email protected]> Co-authored-by: huntharo <[email protected]> Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>
Summary
src/infra/outbound/message-action-runner.threading.test.ts,extensions/msteams/src/monitor.test.ts,extensions/feishu/index.test.ts,extensions/bluebubbles/src/setup-surface.test.ts, andsrc/plugins/provider-wizard.test.ts.singletonIsolatedscheduler support so startup-heavy extension tests can be peeled out of the shared lane.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
User-visible / Behavior Changes
None.
Security Impact (required)
Yes/No) NoYes/No) NoYes/No) NoYes/No) NoYes/No) NoYes, explain risk + mitigation:Repro + Verification
Environment
Steps
OPENCLAW_TEST_MEMORY_TRACE=1 OPENCLAW_TEST_WORKERS=1 pnpm test -- <file>.pnpm build, andpnpm check.Expected
Actual
src/infra/outbound/message-action-runner.threading.test.ts:22.88s/518.6 MiB->2.39s/222.4 MiBextensions/msteams/src/monitor.test.ts:19.56s/584.8 MiB->1.20s/250.2 MiBsrc/plugins/provider-wizard.test.ts:317.8 MiB->237.0 MiB, and now isolated from sharedunit-fastextensions/feishu/index.test.tsandextensions/bluebubbles/src/setup-surface.test.tsremain startup-heavy, but are now isolated from the shared extensions laneextensions/msteams/src/monitor.test.tsshowed no meaningful retained growth, so that case was startup/import cost rather than a real leakEvidence
Attach at least one:
Human Verification (required)
What you personally verified (not just CI), and how:
pnpm buildpnpm checkpnpm testReview Conversations
If a bot review conversation is addressed by this PR, resolve that conversation yourself. Do not leave bot review conversation cleanup for maintainers.
Compatibility / Migration
Yes/No) YesYes/No) NoYes/No) NoFailure Recovery (if this breaks)
4d7706e64cRisks and Mitigations
scripts/test-parallel.mjsnow creates explicit isolated extension entries, andtest/vitest-extensions-config.test.tscovers the include-file behavior.