Skip to content

test: regression-lock review fixes + add CI#33

Merged
simonorzel26 merged 1 commit into
mainfrom
chore/tap-ci-regression-tests
Jul 2, 2026
Merged

test: regression-lock review fixes + add CI#33
simonorzel26 merged 1 commit into
mainfrom
chore/tap-ci-regression-tests

Conversation

@simonorzel26

Copy link
Copy Markdown
Contributor

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

  • Window filter (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 stub Sql stands in for the tagged-template call.
  • getMany chunking: chunk() keeps every IN-list under the kernel bound (including the boundary at exactly the limit and one past it).
  • weekEnd half-open: weekEnd is exactly start + 7d, with 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-lockfile, bun test, and the SDK build (so the published package stays compilable and never ships test files in dist).

Build hygiene

  • Client tests live under src/__tests__ (already excluded by tsconfig) so tsc never compiles them into dist.
  • *.test.ts is excluded from the demo tsconfig so next build never tries to typecheck a bun:test import (which would otherwise break the prod build).

Not covered here: the events.listen error-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

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
simonorzel26 merged commit e5841c8 into main Jul 2, 2026
1 check passed
@simonorzel26
simonorzel26 deleted the chore/tap-ci-regression-tests branch July 2, 2026 15:39
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.
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