fix(support): agent-demo self-seeds (join default queue + go online); tickets always get a queue

Root cause of 'waiting for escalations': no queue/membership meant tickets were
never assigned. Now: createTicket find-or-creates a default queue; new joinDefault
endpoint + useGoOnline hook; agent-demo joins+goes-AVAILABLE on load (assignPending
picks up any waiting ticket). smoke-support self-seeds (no seed script needed).
Also: vitest singleFork to end cross-file DB races (45 tests deterministic).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-01 12:39:14 +05:30
parent eb04becc57
commit 9c6e2c76e8
9 changed files with 49 additions and 8 deletions
+6 -2
View File
@@ -14,8 +14,12 @@ export default defineConfig({
},
test: {
include: ['packages/**/src/**/*.{test,spec}.ts', 'test/**/*.{test,spec}.ts'],
// DB-backed specs share one Postgres and truncate tables between tests, so
// test files must not run in parallel against it.
// DB-backed specs share one Postgres and TRUNCATE between tests. Run every
// file in a single worker process, sequentially, so there is no cross-file
// race on the shared database.
fileParallelism: false,
sequence: { concurrent: false },
pool: 'forks',
poolOptions: { forks: { singleFork: true } },
},
});