Skip to content

Commit 9423498

Browse files
committed
test: the provisioning pins and the dispatcher mount pin name the device registry's table and faces
Claude-Session: https://claude.ai/code/session_01ADHkmRD9KKqvTU3THnute6 Co-authored-by: Claude <noreply@anthropic.com>
1 parent 4ca0ae3 commit 9423498

2 files changed

Lines changed: 10 additions & 5 deletions

File tree

‎packages/runtime/src/dispatcher-plugin.routes.test.ts‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,17 +138,22 @@ describe('createDispatcherPlugin — HTTP route registration', () => {
138138
// domain's floor can only answer a verb that is mounted. No sub-path beyond
139139
// the three faces is mounted. The wire answer is pinned in
140140
// `notifications-every-verb.hono.integration.test.ts`.
141-
it('mounts every verb on each of the three /notifications faces, and no sub-path beyond them', async () => {
141+
it('mounts every verb on each of the five /notifications faces, and no sub-path beyond them', async () => {
142142
const { server, routes } = makeFakeServer();
143143
const plugin = createDispatcherPlugin({ prefix: '/api/v1', securityHeaders: false });
144144
await plugin.start?.(makeCtx(server));
145145

146-
for (const face of ['/notifications', '/notifications/read', '/notifications/read/all']) {
146+
// The three inbox faces, and the device registry's two (ADR-0012 §6).
147+
const faces = [
148+
'/notifications', '/notifications/read', '/notifications/read/all',
149+
'/notifications/devices', '/notifications/devices/:deviceId',
150+
];
151+
for (const face of faces) {
147152
for (const verb of ['GET', 'POST', 'PUT', 'PATCH', 'DELETE']) {
148153
expect(routes.filter((r) => r === `${verb} /api/v1${face}`), `${verb} ${face}`).toHaveLength(1);
149154
}
150155
}
151-
expect(routes.filter((r) => r.includes('/notifications'))).toHaveLength(15);
156+
expect(routes.filter((r) => r.includes('/notifications'))).toHaveLength(25);
152157
});
153158

154159
it('also mounts a known existing route (sanity that start() ran)', async () => {

‎packages/services/service-messaging/src/messaging-service-plugin.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ describe('MessagingServicePlugin — system table provisioning', () => {
230230
describe('MessagingServicePlugin — boot provisioning honours skipSchemaSync (#22984)', () => {
231231
const OBJECTS = [
232232
'sys_notification', 'sys_inbox_message', 'sys_notification_receipt', 'sys_notification_delivery',
233-
'sys_notification_preference', 'sys_notification_template', 'sys_http_delivery',
233+
'sys_notification_preference', 'sys_notification_template', 'sys_http_delivery', 'sys_user_device',
234234
];
235235
const SKIP = 'NOT provisioned at boot';
236236

@@ -357,7 +357,7 @@ describe('MessagingServicePlugin — boot provisioning honours skipSchemaSync (#
357357
describe('MessagingServicePlugin — a failed provision is an error, once per object (#22985)', () => {
358358
const OBJECTS = [
359359
'sys_notification', 'sys_inbox_message', 'sys_notification_receipt', 'sys_notification_delivery',
360-
'sys_notification_preference', 'sys_notification_template', 'sys_http_delivery',
360+
'sys_notification_preference', 'sys_notification_template', 'sys_http_delivery', 'sys_user_device',
361361
];
362362

363363
/** Every DDL succeeds except the named object's, which the driver refuses. */

0 commit comments

Comments
 (0)