Skip to content

test(slack): drop redundant .js-suffixed system-event mock - #119352

Merged
steipete merged 1 commit into
mainfrom
steipete/fix-slack-event-mock-suffix
Aug 4, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/fix-slack-event-mock-suffix

Conversation

@steipete

@steipete steipete commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

Resolves a problem where 42 Slack monitor test suites failed at collection before a single test ran. Each of the five monitor event suites registered a duplicate vi.mock for "openclaw/plugin-sdk/system-event-runtime.js" (with a .js suffix) alongside the extensionless mock. That suffixed subpath is not a declared export of the openclaw package, so vitest aborts collection with "./plugin-sdk/system-event-runtime.js" is not exported under the conditions ["node", "development", "import"].

Why This Change Was Made

The extensionless mock vi.mock("openclaw/plugin-sdk/system-event-runtime", ...) already intercepts the production import, so the .js-suffixed duplicate is dead weight that only breaks resolution. The fix deletes the redundant three-line mock block from each of the five files. No production code is touched; this is test-only cleanup.

User Impact

No user-visible impact — this restores a broken test suite so the Slack monitor event behavior is actually exercised again (1026 tests across 48 suites).

Evidence

  • node scripts/run-vitest.mjs extensions/slack/src/monitor -- --reporter=dot: 48 suites / 1026 tests pass (previously 42 suites errored at collection with the export-resolution failure).
  • Autoreview (codex, high): clean, no accepted findings.

Found during a broad stress sweep of the repo's test surface.

The five monitor event suites each registered a second vi.mock for
"openclaw/plugin-sdk/system-event-runtime.js" alongside the extensionless
mock. The .js-suffixed subpath is not a declared export of the openclaw
package, so vitest fails suite collection with "not exported under the
conditions [node, development, import]" — taking down 42 suites before a
single test ran. The extensionless mock already intercepts the production
import, so the duplicate is removed.
@openclaw-barnacle openclaw-barnacle Bot added channel: slack Channel integration: slack size: XS maintainer Maintainer-authored PR labels Aug 4, 2026
@steipete
steipete marked this pull request as ready for review August 4, 2026 21:37
@steipete
steipete merged commit 44f3747 into main Aug 4, 2026
148 of 150 checks passed
@steipete
steipete deleted the steipete/fix-slack-event-mock-suffix branch August 4, 2026 22:04
@steipete

steipete commented Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Aug 5, 2026
Punchcard-Session: crisp-lantern-orchard-nv

* origin/main:
  perf(memory): defer session backfill runtime (#119372)
  fix(ci): isolate built TUI PTY fixture (#119339)
  fix(commands): restore tool inventory for dynamic models (#119306)
  fix(media): release rejected BytePlus and Runway video downloads under debug capture (#119257)
  docs: add ChromeOS (Crostini) platform install guide (#107663)
  test(msteams): serve JWKS from in-process server in auth coverage (#119354)
  fix(qa): enable OpenAI for stored audio scenario (#119349)
  test(agents): realpath apply-patch temp dir fixture (#119353)
  test(slack): drop redundant .js-suffixed system-event mock (#119352)
  fix(exec): leave safe builtins unrewritten in enforced mode (#119351)
  fix(sessions): keep gateway responsive while large transcript archives are built (#112424)
  fix(tui): restore provider auth in installed local mode (#119283)
vincentkoc added a commit that referenced this pull request Aug 5, 2026
…time

* origin/main: (75 commits)
  fix(commands): restore tool inventory for dynamic models (#119306)
  fix(media): release rejected BytePlus and Runway video downloads under debug capture (#119257)
  docs: add ChromeOS (Crostini) platform install guide (#107663)
  test(msteams): serve JWKS from in-process server in auth coverage (#119354)
  fix(qa): enable OpenAI for stored audio scenario (#119349)
  test(agents): realpath apply-patch temp dir fixture (#119353)
  test(slack): drop redundant .js-suffixed system-event mock (#119352)
  fix(exec): leave safe builtins unrewritten in enforced mode (#119351)
  fix(sessions): keep gateway responsive while large transcript archives are built (#112424)
  fix(tui): restore provider auth in installed local mode (#119283)
  fix(release): accept legacy empty core artifacts (#119337)
  fix(qa): carry selected runtime into flow scenarios (#119324)
  fix(ci): retry interrupted Windows dashboard release checks (#119095)
  fix(release): filter validation ancestry fetch (#119334)
  fix(release): accept trusted extended-stable validation evidence (#119264)
  fix(sessions): preserve recorder-owned user turns (#119307)
  perf(cli): split plugin registry startup timing (#119318)
  fix(qa): align release scenario setup and compaction proof (#119188)
  fix(ci): avoid duplicate Matrix release QA runs (#119171)
  perf(agents): reuse provider policy manifest registry (#119305)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 5, 2026
…119352)

The five monitor event suites each registered a second vi.mock for
"openclaw/plugin-sdk/system-event-runtime.js" alongside the extensionless
mock. The .js-suffixed subpath is not a declared export of the openclaw
package, so vitest fails suite collection with "not exported under the
conditions [node, development, import]" — taking down 42 suites before a
single test ran. The extensionless mock already intercepts the production
import, so the duplicate is removed.

Co-authored-by: Peter Steinberger <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: slack Channel integration: slack maintainer Maintainer-authored PR size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant