Skip to content

RC v0.1.0#185

Draft
jeroenrinzema wants to merge 256 commits intorelease/v0.1.0-rcfrom
main
Draft

RC v0.1.0#185
jeroenrinzema wants to merge 256 commits intorelease/v0.1.0-rcfrom
main

Conversation

@jeroenrinzema
Copy link
Copy Markdown
Contributor

@jeroenrinzema jeroenrinzema commented Mar 4, 2026

🚧 WIP, but almost there!

First release candidate for Lunogram is taking shape. Feedback welcome.

jeroenrinzema and others added 30 commits February 22, 2026 14:19
…m:lunogram/platform into feat/-Include-the-ability-to-run-journeys
- Split monolithic JourneyEditor.tsx into logical modules: .constants, .types, .utils, and dedicated components for Nodes and Edges.
- Enhanced management API endpoints for organizations
- Improved rule query builder to support organization conditions
- Added organization member conditions support
- Database migrations for organization data normalization
- Updated pubsub consumers for organization events
- Comprehensive test coverage for query builder
- New organization views (list, detail, members, events, attributes)
- JSON editor and attribute editor components
- Organization rule builder UI components
- User organization membership display
- Updated API client with generated types
- Removed copilot instructions file
- Add Broadcast, CreateBroadcast, UpdateBroadcast models and list/CRUD
  endpoints to the courier management API (management_gen.go)
- Add BroadcastState enum (pending, scheduled, sending, completed,
  failed, cancelled)
- Prefix CampaignUserStatus enum values with type name
- Remove rules.RuleSet custom type references from OpenAPI spec (oss),
  replacing with generic map[string]interface{} for rule fields
- Delete courier rules package (rules/rules.go) as it is no longer used
- Fix backoffice agent to not record edits on stream errors
Restore 1774900004_schedules_cascade_delete which was previously deployed
and then deleted, causing golang-migrate to fail with 'file does not exist'.

Renumber external_ids (1774900000 → 1774900005) and
campaign_sends_broadcast_id (1774900001 → 1774900006) so they sort after
the current DB version and will actually be applied.
The composite PK (campaign_id, user_id, reference_id) caused silent data
loss when multiple broadcasts targeted the same campaign and users with an
empty provider response ID. The ON CONFLICT DO NOTHING clause discarded
every insert after the first broadcast, leaving subsequent broadcasts stuck
in 'sending' state because CountSendsByBroadcastID returned 0.

Changes:
- Migration adds broadcast_id to the PK, back-filling existing NULL values
  with the zero UUID and making the column NOT NULL.
- InsertCampaignSend coalesces nil BroadcastID to uuid.Nil for non-broadcast
  sends (e.g. journey triggers).
- Tests verify multi-broadcast inserts, nil broadcast_id handling, and
  same-broadcast deduplication.
Support delivering events to all users or organizations whose JSONB
data column matches a given filter (PostgreSQL @> containment),
as an alternative to targeting by explicit identifier.

- Add `match` field to user and organization event schemas (OpenAPI + Go)
- Validate mutual exclusivity of `match` and `identifier` in the API layer
- New `MatchUserEvent` / `MatchOrganizationEvent` pubsub schemas and subjects
- Fan-out consumers that resolve match filters into individual events
  with dedup keys derived from the origin message ID
- `WithInProgress` handler wrapper to heartbeat during long fan-outs
- Streaming `ScanUsersMatchingData` / `ScanOrganizationsMatchingData` store queries
- Prometheus metrics for match event processing and fan-out counts
- Update docs and JavaScript SDK documentation with match examples
Move the ReleaseLeader call outside of the node.mu lock in the leader
handler goroutine. Holding the mutex during this Redis network call
blocked heartbeat and campaign goroutines from completing their defers,
preventing the WaitGroup from reaching zero and causing Shutdown to hang.
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