Commit Graph

20 Commits

Author SHA1 Message Date
cbac166782 test(core-realtime): unit cover registerChannel + listChannels
- Add 4 new test cases to RealtimeHandlerRegistry test suite
- registerChannel stores outbound-only descriptors distinct from inbound
- listChannels() includes both inbound (from register) and outbound-only channels
- Validates backward-compat guarantee and re-registration behavior

Test count: 4 → 8 in realtime-handler-registry.test.ts
All 35 tests in core-realtime pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 00:42:35 +02:00
b9caf605d2 test(web-next): e2e realtime-ping (4 checkpoints) 2026-05-09 00:39:44 +02:00
2351ca6249 feat(web-next): register realtime-ping inbound (env-gateable) 2026-05-08 23:20:58 +02:00
90ef577b9d feat(core-realtime): realtime-ping proof-of-life channel pair 2026-05-08 23:19:52 +02:00
228cfb57c0 fix(core-realtime): address Phase 2 code review (typing, error handling, params)
- Type socket.data.user via AppSocketData/AppSocket generics (no more any)
- Wrap Gate 1 authenticator call in try/catch so exceptions reject the
  connection with connect_error instead of being swallowed
- Fix Gate 3 userScoped channel authorize: derive params.userId from the
  authenticated socket user so owner-inbound is accepted
- Await io.close(callback) in stop() to ensure full shutdown
- Remove unused httpServer field from constructor (io already holds the ref)
- Extract CHANNEL_ROOM_PREFIX/channelRoom helper to channel-room.ts;
  replace three `ch:${name}` magic strings; re-export from index
- Add JSDoc to ChannelScope explaining userScoped params/template convention
- Fix "allows subscribe + invokes handler with ctx" test: hoist received
  outside beforeEach and assert ctx shape
- New test: rejects connection when authenticator throws
- New test: userScoped channel accepts inbound from owner, rejects from anon
2026-05-08 21:52:52 +02:00
964fabf796 fix(core-realtime): remove unused PLACEHOLDER var and ClientSocket import (lint) 2026-05-08 21:16:44 +02:00
d4a3f95938 feat(core-realtime): public barrel 2026-05-08 21:16:22 +02:00
2939ff8bb5 feat(core-realtime): SocketIORealtimeServer (4 lifecycle gates) 2026-05-08 21:16:03 +02:00
9d04bdc65b feat(core-realtime): SocketIORealtimeBroadcaster 2026-05-08 21:15:07 +02:00
86b9418758 feat(core-realtime): IRealtimeServer interface 2026-05-08 21:14:43 +02:00
5e57c66140 feat(core-realtime): InMemoryRealtimeBroadcaster (test/dev impl) 2026-05-08 21:14:33 +02:00
6c5484b874 feat(core-realtime): RealtimeHandlerRegistry 2026-05-08 21:14:11 +02:00
f072435024 feat(core-realtime): authorize function (4 scope kinds) 2026-05-08 21:13:48 +02:00
0771601571 feat(core-realtime): channel-template matcher (placeholder extraction) 2026-05-08 21:13:18 +02:00
691b4942d5 feat(core-realtime): IRealtimeAuthenticator interface 2026-05-08 21:12:56 +02:00
caf86abbe5 feat(core-realtime): IRealtimeHandler + IInboundDescriptor types 2026-05-08 21:12:47 +02:00
795511b5b3 feat(core-realtime): IRealtimeBroadcaster interface + symbol registry 2026-05-08 21:12:36 +02:00
7e922bc406 feat(core-realtime): RealtimeChannelDescriptor + defineRealtimeChannel 2026-05-08 21:12:24 +02:00
1a0e3c20ff chore(core-realtime): align scaffold style with core-events (review polish) 2026-05-08 21:09:50 +02:00
bbdb456aa0 chore(core-realtime): scaffold package
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-08 20:58:05 +02:00