Skip to content

Commit 4e34268

Browse files
committed
ci(workspace): run collaboration service tests
1 parent 9e380c6 commit 4e34268

5 files changed

Lines changed: 27 additions & 4 deletions

File tree

‎.github/workflows/deploy.yml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ jobs:
4848
- name: Test
4949
run: npm test -- --coverage
5050

51+
- name: Collaboration service tests
52+
run: npm run test:collaboration
53+
5154
- name: Edge function tests
5255
run: npm run test:edge
5356

‎AGENTS.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ npm run docs:check
3636
npm run lint
3737
npm run typecheck
3838
npm test -- --coverage
39+
npm run test:collaboration
3940
npm run test:edge
4041
npm run build
4142
CI=1 PORT=18080 PLAYWRIGHT_BASE_URL=http://127.0.0.1:18080 npm run test:e2e

‎docs/development.md‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,16 @@ Follow existing functional React, Zustand, Zod, and shadcn/Radix patterns. Reuse
7777

7878
Run the closest unit or component test while changing behavior. Run lint, type checking, and build before handing work off.
7979

80+
## Collaboration service spike
81+
82+
The Phase 0 service evidence lives under `services/collaboration/`. Run:
83+
84+
```bash
85+
npm run test:collaboration
86+
```
87+
88+
The spike is not a deployed service. Its in-memory writer lock is single-process evidence; the database-backed service and advisory-lock lifecycle belong to P2.1.
89+
8090
## Edge Function workflow
8191

8292
Edge Functions live under [`supabase/functions/`](../supabase/functions/). Shared server code belongs in `_shared` only when at least two functions use the same boundary or policy.

‎docs/testing.md‎

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,14 @@ npx vitest run src/test/security/url-validation.test.ts
4848

4949
For a bug, watch the reproduction fail for the expected reason before implementing the fix.
5050

51+
## Collaboration service tests
52+
53+
```bash
54+
npm run test:collaboration
55+
```
56+
57+
This runs the isolated Node service spike with real Hocuspocus providers and Yjs documents. It covers durable acknowledgement ordering, reconnect sync, duplicate delivery, schema and size rejection, writer serialization, stale epochs, and process-kill recovery. It does not prove PostgreSQL advisory locks or a deployed collaboration service.
58+
5159
## Edge Function tests
5260

5361
```bash
@@ -91,9 +99,10 @@ The gate runs, in order:
9199
2. lint
92100
3. type checking
93101
4. selected-scope coverage
94-
5. native Edge Function tests
95-
6. production build
96-
7. desktop and mobile Chromium
102+
5. collaboration service tests
103+
6. native Edge Function tests
104+
7. production build
105+
8. desktop and mobile Chromium
97106

98107
It does not start local Supabase, run pgTAP, run WebKit, or use protected staging.
99108

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"test:e2e": "playwright test --project=desktop-chromium --project=mobile-chromium",
2525
"test:e2e:webkit": "playwright test --project=webkit",
2626
"test:e2e:staging": "playwright test --project=staging",
27-
"verify": "npm run docs:check && npm run lint && npm run typecheck && npm test -- --coverage && npm run test:edge && npm run build && CI=1 PORT=18080 PLAYWRIGHT_BASE_URL=http://127.0.0.1:18080 npm run test:e2e"
27+
"verify": "npm run docs:check && npm run lint && npm run typecheck && npm test -- --coverage && npm run test:collaboration && npm run test:edge && npm run build && CI=1 PORT=18080 PLAYWRIGHT_BASE_URL=http://127.0.0.1:18080 npm run test:e2e"
2828
},
2929
"dependencies": {
3030
"@capacitor/app": "^8.1.0",

0 commit comments

Comments
 (0)