Skip to content

Backport MessageStorage encoded NonEmptyArray#6031

Merged
tim-smart merged 2 commits intomainfrom
EFF-409/message-storage-nonemptyarray
Feb 5, 2026
Merged

Backport MessageStorage encoded NonEmptyArray#6031
tim-smart merged 2 commits intomainfrom
EFF-409/message-storage-nonemptyarray

Conversation

@tim-smart
Copy link
Contributor

@tim-smart tim-smart commented Feb 5, 2026

Summary

  • Tighten MessageStorage.Encoded API to require Array.NonEmptyArray for id lists (requestIds/shardIds/messageIds).
  • Add non-empty guards in MessageStorage.makeEncoded for repliesForUnfiltered and resetShards (and keep existing guards type-safe) to prevent accidental empty IN () queries.
  • Update SQL driver typing and add a regression test for the empty-iterable guards.

Validation

  • pnpm lint-fix
  • pnpm test run packages/cluster/test/MessageStorage.test.ts
  • pnpm check
  • pnpm build
  • pnpm docgen

Closes #6004

Use Array.NonEmptyArray in encoded driver API and guard empty iterables in makeEncoded to avoid empty IN queries.
@github-project-automation github-project-automation bot moved this to Discussion Ongoing in PR Backlog Feb 5, 2026
@changeset-bot
Copy link

changeset-bot bot commented Feb 5, 2026

🦋 Changeset detected

Latest commit: 3f99e3a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@effect/cluster Patch
@effect/platform-bun Patch
@effect/platform-node-shared Patch
@effect/platform-node Patch
@effect/sql-clickhouse Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@tim-smart tim-smart changed the title EFF-409: Backport MessageStorage encoded NonEmptyArray Backport MessageStorage encoded NonEmptyArray Feb 5, 2026
@tim-smart tim-smart enabled auto-merge (squash) February 5, 2026 03:55
@tim-smart tim-smart merged commit 1781244 into main Feb 5, 2026
11 checks passed
@tim-smart tim-smart deleted the EFF-409/message-storage-nonemptyarray branch February 5, 2026 03:59
@github-project-automation github-project-automation bot moved this from Discussion Ongoing to Done in PR Backlog Feb 5, 2026
@github-actions github-actions bot mentioned this pull request Feb 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant