Skip to content

Conversation

@jtomaszewski
Copy link

Summary

  • Add optional immediateProcessing boolean to InboxOutboxModuleEventOptions (default: true for backward compatibility)
  • When false, events are only saved to DB and processed later by the poller, enabling a safer "fire and forget" pattern for crash recovery scenarios
  • Update README with documentation and trade-offs table

Test plan

  • Added unit tests for immediateProcessing: false with both emit and emitAsync
  • Added unit tests for immediateProcessing: true (explicit)
  • Added unit tests for immediateProcessing: undefined (default behavior)
  • All existing tests pass

🤖 Generated with Claude Code

jtomaszewski and others added 5 commits December 3, 2025 01:12
* test(mikroorm-driver): add comprehensive test suite for MikroORM driver

- Set up Vitest with SWC for decorator metadata support
- Add test utilities for spinning up isolated NestJS apps with fresh PostgreSQL databases
- Add unit tests for MikroOrmInboxOutboxTransportEvent entity
- Add unit tests for MikroORMDatabaseDriver (persist, remove, flush, findAndExtendReadyToRetryEvents)
- Add unit tests for MikroORMDatabaseDriverFactory (forked entity managers, isolation)
- Add integration tests for TransactionalEventEmitter with real database
- Fix integer overflow for timestamps by using bigint column type

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* ci: add GitHub workflow for MikroORM driver tests

- Add test-mikroorm-driver.yml workflow with PostgreSQL service
- Revert @mikro-orm versions to ^6.3.9 as requested

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(ci): build core package before running MikroORM driver tests

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
Fix typo in field name throughout codebase and add database migrations
to rename the column from delived_to_listeners to delivered_to_listeners.

BREAKING CHANGE: Existing databases require running the new migration
to rename the column.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
* fix `npm run build` for all pkgs (vibe-kanban eeb84602)

* Done. Updated the paths configuration in `test-core.yml` to match the mikroorm workflow pattern:

- Added `branches: [main]` filter for both push and pull_request
- Added `package.json` and `package-lock.json` (dependency changes may affect tests)
- Added `.github/workflows/test-core.yml` (workflow changes should trigger a run)

* Done. Removed `branches: [main]` from both workflows. They'll now trigger on any branch when the relevant paths change.
1. **test-core.yml**: Added a "Type check" step that runs `npm run build` before tests
2. **test-mikroorm-driver.yml**: Added a "Type check MikroORM driver" step that runs `npm run build` on the mikroorm-driver workspace before tests

This ensures TypeScript type errors are caught early in CI before tests run, preventing the issue where tests could pass while type errors exist in the code.
* Done. Here's what I added:

**Created `.github/workflows/publish-preview.yml`** - A new GitHub Action workflow that:
- Triggers on pull requests and pushes to main
- Builds all workspace packages
- Publishes preview packages using pkg.pr.new with compact URLs

**Updated `package.json` (root)** - Added a root-level `build` script for npm workspaces.

**Updated `packages/core/package.json`** - Added the `repository` field (other packages already had it) to enable the `--compact` flag for shorter URLs.

**Next step**: Install the [pkg.pr.new GitHub App](https://github.com/apps/pkg-pr-new) on the repository to activate the preview publishing.

* fix(ci): remove --compact flag (requires npm publish with repository field)
@jtomaszewski jtomaszewski force-pushed the vk/cb52-make-immediate-p branch from 23ef214 to 601c725 Compare December 3, 2025 01:12
jtomaszewski and others added 4 commits December 3, 2025 02:16
…ntPoller (#4)

* test workflows run twice in a PR? (vibe-kanban 7dc44370)

see #8

* feat(core): add graceful shutdown handling to RetryableInboxOutboxEventPoller

Implement OnModuleDestroy lifecycle hook to properly clean up resources
during application shutdown:
- Unsubscribe from RxJS interval to stop polling
- Track in-flight event processing and wait for completion
- Add isShuttingDown flag to prevent new processing during shutdown

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
Add optional `immediateProcessing` boolean to InboxOutboxModuleEventOptions
(default: true for backward compatibility). When set to false, events are
only saved to DB and processed later by the poller, enabling a safer
"fire and forget" pattern for crash recovery scenarios.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
verify that it is not processed immediately, but eventually once poller runs
@jtomaszewski jtomaszewski force-pushed the vk/cb52-make-immediate-p branch from 7c99c58 to 660e05e Compare December 3, 2025 01:18
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