test: regression-lock review fixes + add CI#33
Merged
Conversation
The SDK/app fixes from the review shipped without tests, and the repo had no CI, so nothing stopped a future change from reintroducing them. Add focused unit tests for the cleanly-testable fixes and a CI workflow that runs them on every push and PR. Tests: - client window filter: bookings.get/holds.get window rows client-side with a half-open overlap even when the kernel returns every row (a stub Sql stands in for the tagged-template call). This was the highest-impact fix (false conflicts). - getMany chunking: chunk() keeps every IN-list query under the kernel bound. - weekEnd half-open: weekEnd is exactly start + 7d (no dropped final millisecond). - ICS folding: renderCalendar folds on UTF-8 octets, never exceeding 75 or splitting a multibyte code point, and a folded summary unfolds back to the original. CI (.github/workflows/ci.yml): bun install (frozen), bun test, and the SDK build so the published package stays compilable and never ships test files in dist. Also moved the client tests under src/__tests__ (the path tsconfig already excludes) so tsc does not compile them into dist, and excluded *.test.ts from the demo tsconfig so next build never tries to typecheck a bun:test import. Claude-Session: https://claude.ai/code/session_011xCXj7xa56EENNvTX3SjTb
simonorzel26
added a commit
that referenced
this pull request
Jul 2, 2026
#33) The SDK/app fixes from the review shipped without tests, and the repo had no CI, so nothing stopped a future change from reintroducing them. Add focused unit tests for the cleanly-testable fixes and a CI workflow that runs them on every push and PR. Tests: - client window filter: bookings.get/holds.get window rows client-side with a half-open overlap even when the kernel returns every row (a stub Sql stands in for the tagged-template call). This was the highest-impact fix (false conflicts). - getMany chunking: chunk() keeps every IN-list query under the kernel bound. - weekEnd half-open: weekEnd is exactly start + 7d (no dropped final millisecond). - ICS folding: renderCalendar folds on UTF-8 octets, never exceeding 75 or splitting a multibyte code point, and a folded summary unfolds back to the original. CI (.github/workflows/ci.yml): bun install (frozen), bun test, and the SDK build so the published package stays compilable and never ships test files in dist. Also moved the client tests under src/__tests__ (the path tsconfig already excludes) so tsc does not compile them into dist, and excluded *.test.ts from the demo tsconfig so next build never tries to typecheck a bun:test import.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The SDK/app fixes from #32 shipped without tests, and tap had no CI, so nothing prevents a future change from reintroducing them. This adds focused unit tests for the cleanly-testable fixes and a CI workflow that runs them on every push and PR (mirroring deltat's CI).
Tests
bookings.get/holds.get): rows are windowed client-side with a half-open overlap even when the kernel returns all of them. This was the highest-impact fix (it was causing false conflicts). A stubSqlstands in for the tagged-template call.chunk()keeps everyIN-list under the kernel bound (including the boundary at exactly the limit and one past it).weekEndis exactlystart + 7d, with no dropped final millisecond.renderCalendarfolds on UTF-8 octets, never exceeding 75 or splitting a multibyte code point, and a folded summary unfolds back to the original.CI
.github/workflows/ci.yml:bun install --frozen-lockfile,bun test, and the SDK build (so the published package stays compilable and never ships test files indist).Build hygiene
src/__tests__(already excluded by tsconfig) sotscnever compiles them intodist.*.test.tsis excluded from the demo tsconfig sonext buildnever tries to typecheck abun:testimport (which would otherwise break the prod build).Not covered here: the
events.listenerror-handling and empty-label fixes (need a listen/insert mock, lower ROI) and the calendar slot-picker date fix (inline UI logic). Noting them honestly rather than pretending the suite is exhaustive.🤖 Generated with Claude Code
https://claude.ai/code/session_011xCXj7xa56EENNvTX3SjTb