tasks: confirm-read tests for 429, 401 and a failed call, and the fake's view 404 is 3014 (#1565)

Row 71. Test 18 gains three steps after the 404/503 step: the child's task
list answers 404 and its confirm read answers 429, 401 or status 0 (the
fake throws fetch failed). Each tick refuses with tracker-not-found and
the child stays. The fake answers a missing kanban view with code 3014,
the live v2.7.0 answer in the tick-62 record.

Built by Researcher's Haiku subagent (decision 129). Approved by Filbert
(28171) and Dewey (28172) on manifest 9ac3a56e. Sage's gate on e635ef1b:
every node suite and scripts/test-*.sh green.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-10-13 10:02:31 -05:00
co-authored by Claude Opus 5.5
parent 03828cc41e
commit efd2b57af1
2 changed files with 17 additions and 5 deletions
+13 -2
View File
@@ -430,8 +430,8 @@ test('a child whose kanban view is deleted still refuses the tick, and the recon
const rootTask = await add(w, w.project, 'root');
await ready(w);
const rows = () => w.store.get('SELECT (SELECT count(*) FROM events) + (SELECT count(*) FROM task_snapshots) n').n;
// The board answers 404 with code 13001, and the project still reads, so the child hasn't left
// the tree. The tick reads the project, fails, and writes nothing, not even the root's edit.
// The board answers 404 with code 3014 (the live v2.7.0 answer, tick-62 record), and the project
// still reads, so the child hasn't left the tree. The tick reads the project, fails, and writes nothing, not even the root's edit.
w.fake.deleteView(w.fake.kanban(child).id);
await w.ui('PATCH', `/tasks/${rootTask}`, { title: 'root renamed' });
await sleep(20);
@@ -459,6 +459,17 @@ test('a child whose kanban view is deleted still refuses the tick, and the recon
w.fake.fault('GET', new RegExp(`^/projects/${child}/tasks$`), 404);
w.fake.fault('GET', new RegExp(`^/projects/${child}$`), 503);
await assert.rejects(w.adapter.tick('demo'), { code: 'tracker-not-found' });
// The confirm read answers another 4xx: the tick still refuses, and the child stays.
w.fake.fault('GET', new RegExp(`^/projects/${child}/tasks$`), 404);
w.fake.fault('GET', new RegExp(`^/projects/${child}$`), 429);
await assert.rejects(w.adapter.tick('demo'), { code: 'tracker-not-found' });
w.fake.fault('GET', new RegExp(`^/projects/${child}/tasks$`), 404);
w.fake.fault('GET', new RegExp(`^/projects/${child}$`), 401);
await assert.rejects(w.adapter.tick('demo'), { code: 'tracker-not-found' });
// The confirm read's call fails (status 0, which the client returns for a thrown fetch): the tick refuses.
w.fake.fault('GET', new RegExp(`^/projects/${child}/tasks$`), 404);
w.fake.fault('GET', new RegExp(`^/projects/${child}$`), 0);
await assert.rejects(w.adapter.tick('demo'), { code: 'tracker-not-found' });
await w.ui('PATCH', `/tasks/${task}`, { title: 'child renamed' });
await sleep(20);
await w.adapter.tick('demo');