Skip to content

ES-2944 - built-in mocking#217

Merged
jgrantr merged 3 commits intomasterfrom
feature/ES-2944-added-better-mocking-into-sdk
Mar 14, 2026
Merged

ES-2944 - built-in mocking#217
jgrantr merged 3 commits intomasterfrom
feature/ES-2944-added-better-mocking-into-sdk

Conversation

@jgrantr
Copy link
Contributor

@jgrantr jgrantr commented Mar 14, 2026

  • new best-of-breed mocking that combines what was being done in the SDK, in the Rithum layers, and in copy/paste code
  • written in Typescript
  • fully-tested
  • markdown doc for coding-assist agents to be able to use it

Note

Medium Risk
Adds a substantial new mocking layer that overrides core SDK queue read/write, enrich/offload, checkpointing, and S3 stream behavior; while isolated to tests, inaccuracies vs real pipeline semantics could lead to false confidence in unit tests.

Overview
Introduces a new lib/mock-sdk.ts utility that wraps an RStreamsSdk instance with a .mock control surface for unit tests, intercepting queue reads/writes (fromLeo/toLeo/load), checkpointing, cron/bot calls, and optional S3 stream interactions while preserving real stream utilities.

Adds extensive unit + integration coverage (test/lib.mock-sdk.utest.ts) validating end-to-end enrich/offload behavior, spy/capture APIs, reset semantics, and S3 mocking, plus a new lib/mock-sdk.md guide documenting recommended handler-testing patterns and the mock API.

Updates .gitignore to exclude local Claude settings (.claude/settings.local.json).

Written by Cursor Bugbot for commit 7802bd7. This will update automatically on new commits. Configure here.

- new best-of-breed mocking that combines what was being done in the SDK, in the Rithum layers, and in copy/paste code
- written in Typescript
- fully-tested
- markdown doc for coding-assist agents to be able to use it
@jgrantr jgrantr requested a review from czirker March 14, 2026 22:34
@ch-snyk-sa
Copy link

ch-snyk-sa commented Mar 14, 2026

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@jgrantr jgrantr requested review from bxgrant and scotthawker March 14, 2026 22:34
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

@jgrantr jgrantr merged commit bda2482 into master Mar 14, 2026
8 checks passed
@jgrantr jgrantr deleted the feature/ES-2944-added-better-mocking-into-sdk branch March 14, 2026 23:25
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.

4 participants