Files
stack/packages/tasks/tests/deploy.test.mjs
T
jason.woltjeandClaude Opus 5.5 7e73c2cd13 feat(tasks): the Vikunja v2 adapter, broker task verbs and sync (row 38, S3, darkwing)
packages/tasks adds the Vikunja v2 client, the eight task verbs, the
board-plus-cursor poll with its 60 s window and the digest. The broker
gains the task verbs and boots trackers from the boot config (lead
decisions 66 to 68). Due dates are truncated to the second and recorded
as truncated (B1). A write that lands but whose final read fails counts
as landed, in update and in create (B2).

Candidate agents/darkwing/work/slice1-s3, build-r2.patch 71ce87e6,
manifest e10e30e3 (28 files). Filbert approved round 2 on #1520
(comment 26853). Darkwing's post-reset rerun: test-release 14/14,
test-task 98/98 (comment 26857).

Integration gate in a worktree on c4baf779 with the patch applied:
bus 67, business 60, control-board 124, discord 173, ledger 78,
mosaic 69, queue 148, seat 19, tasks 51 and webui 14, all with no
failures. Conversation is 149/3. The three cohort kill cases (K1, K3,
K10) fail the same on the unpatched base, and the patch doesn't touch
the package. Every scripts/test-*.sh is green. test-release 14/14 and
test-task 98/98 ran on the existing gate2 compose network, because the
host's Docker address pools are exhausted. No network was created or
pruned.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-09 07:40:48 -05:00

25 lines
1.5 KiB
JavaScript

import test from 'node:test';
import assert from 'node:assert/strict';
import { readFileSync } from 'node:fs';
const compose = readFileSync(new URL('../deploy/vikunja/compose.yaml', import.meta.url), 'utf8');
const runbook = readFileSync(new URL('../../../docs/guides/slice-1-identities.md', import.meta.url), 'utf8');
const lines = compose.split('\n').filter((l) => !/^\s*#/.test(l));
// REQ-TASK-3: the upstream image by digest, the same one the runbook and the probes used.
test('the bundled Vikunja is the pinned upstream image the runbook names', () => {
const images = lines.filter((l) => /^\s*image:/.test(l)).map((l) => l.split('image:')[1].trim());
assert.equal(images.length, 1);
assert.match(images[0], /^vikunja\/vikunja@sha256:[0-9a-f]{64}$/);
assert.ok(runbook.includes(images[0]), 'the runbook pins another digest');
assert.equal(lines.some((l) => /^\s*build:/.test(l)), false);
});
test('every published port is on 127.0.0.1, and no secret is in the file', () => {
const at = lines.findIndex((l) => /^\s*ports:/.test(l));
const ports = [];
for (let i = at + 1; i < lines.length && /^\s*-/.test(lines[i]); i++) ports.push(lines[i]);
assert.ok(ports.length > 0);
for (const p of ports) assert.match(p, /^\s*- "127\.0\.0\.1:/);
assert.equal(lines.some((l) => /network_mode:\s*host/.test(l)), false);
assert.equal(/SERVICE_SECRET|JWTSECRET|PASSWORD/i.test(lines.join('\n')), false);
assert.match(compose, /VIKUNJA_SERVICE_ENABLEREGISTRATION: "false"/);
});