Skip to content

test(openclaw): cover Session Sentry event field fallbacks#3

Draft
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/missing-test-coverage-1785
Draft

test(openclaw): cover Session Sentry event field fallbacks#3
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/missing-test-coverage-1785

Conversation

@cursor

@cursor cursor Bot commented Jun 17, 2026

Copy link
Copy Markdown

Risky behavior now covered

  • OpenClaw message_sending events that provide outbound text via text instead of content are still scanned by Session Sentry.
  • Session identity fallback across conversationId and session_id is preserved when conversation_id is absent, preventing accidental counter merging under default.

Test files added/updated

  • openclaw-plugin/test/session_sentry.test.ts

Why this reduces regression risk

These tests lock down compatibility with multiple OpenClaw event shapes used by the Session Sentry hook. A regression in these fallbacks could silently skip multi-turn exfil scanning or collapse unrelated conversations into the same risk counter.

Validation

  • npm test -- session_sentry.test.ts (15 passed)
  • npm test in openclaw-plugin (24 passed)

Note: npm ci reported engine warnings because the environment has Node v22.14.0 while some OpenClaw dependencies declare >=22.19.0; tests still passed.

Open in Web View Automation 

Co-authored-by: Joshua Ferguson <JoshuaAFerguson@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant