diff --git a/agents/sage/work/vikunja-setup/comment-partB-r188.mjs b/agents/sage/work/vikunja-setup/comment-partB-r188.mjs new file mode 100644 index 000000000..15817dbb3 --- /dev/null +++ b/agents/sage/work/vikunja-setup/comment-partB-r188.mjs @@ -0,0 +1,55 @@ +// Sage, 2026-10-20: Part B window file draft 2 (mos-0957) and row 188 (#1686) briefed. Comments on P19 385 (Part B), +// 409 (M8) and 410 (M9), per mos-0882 (every landing or decision gets a Vikunja comment). Sage's own key (bot +// user 13); the sync key reads back. Comments only: no task edits, labels, assignees or bucket moves. Checks each +// task's title before posting. Prints no secret. +// Usage: node comment-partB-r188.mjs https://tasks.woltje.com SAGE_TOKEN_FILE SYNC_TOKEN_FILE OUT_JSON +import { readFileSync, writeFileSync, existsSync } from "node:fs"; +const [ORIGIN, KEY, SYNC, OUT] = process.argv.slice(2); +if (!/^https:\/\/tasks\.woltje\.com$/.test(ORIGIN)) throw new Error("tasks.woltje.com only"); +if (!OUT || existsSync(OUT)) throw new Error("OUT_JSON missing or exists; refusing"); +const PROJECT = 19; +const PSIG = "Posted by Sage (T3 1ef1e4f8) with Sage's own key (bot user 13)."; +const esc = (s) => s.replace(/&/g, "&").replace(//g, ">"); +const ps = (xs) => xs.map((x) => `
${esc(x)}
`).join("") + `${esc(PSIG)}
`; +const ROW = "Queue row 188 (Gitea #1686) holds the tests for P19 409 (M8) and 410 (M9) as one row: owner Darkwing, reviewer Filbert, gate owner Sage. It is briefed (docs/plans/2026-10-20_proof-test-gaps.md, refactor 525990ecb). Tests only in packages/cli/tests/stack-release.test.mjs; scripts/stack-release.sh stays blob 2586a2a37cd2. Mos ruled it lands before the Part B window runs (mos-0956), since Part B is the first real proof file through these checks."; +const POSTS = [ + { id: 385, title: /X-authentik-username from 127\.0\.0\.1/, body: [ + "The Part B window file is agents/sage/work/window-plan/repin-partB-proof.md, draft 2, blob 55da51c0462b on refactor 525990ecb. Mos's A2 check of draft 1 (mos-0957) asked for two fixes. B6 and B-R1 now expect the stop's own rows for the old chief (an appended role_claims release and an events session.ended from endLaunch, as Part A showed), the new PM launch rows, and nothing from the matrix requests, with PB5 counting each step. PB6, PB7 and B-R1 now run matrix rows (a)-(h). Mos rechecks the new blob. Nothing ran; the pointer is still 490e2771d3d0 with the proof off.", + "Nothing in the window runs before Jason's J1 go, row 188 landing, and Q1. Q1 is the order of the uid separation (J2) and this window: the current code requires the proof file to be owned by the uid that runs the Console, in stack-release.sh, webui-service.sh and serve.mjs, so J2 first would refuse B3. Sage recommends Part B under jwoltje first with J2 as its own row after; Mos reads it the same way. It is Jason's call and is on his morning list with J1-J6.", + ROW, + ] }, + { id: 409, title: /M8/, body: [ROW] }, + { id: 410, title: /M9/, body: [ROW] }, +]; +const key = readFileSync(KEY, "utf8").trim(), sync = readFileSync(SYNC, "utf8").trim(); +async function api(method, path, body, auth) { + const r = await fetch(ORIGIN + path, { method, headers: { Authorization: `Bearer ${auth}`, "Content-Type": "application/json" }, body: body === undefined ? undefined : JSON.stringify(body), redirect: "error" }); + const t = await r.text(); let json = null; try { json = JSON.parse(t); } catch {} + return { status: r.status, json }; +} +const list = (j) => j?.items ?? (Array.isArray(j) ? j : []); +const rec = { at: new Date().toISOString(), comments: [], problems: [] }; +const save = () => { + const out = JSON.stringify(rec, null, 1) + "\n"; + if (out.includes(key) || out.includes(sync)) throw new Error("secret in the record; not written"); + writeFileSync(OUT, out); +}; +for (const P of POSTS) { + const t = await api("GET", `/api/v2/tasks/${P.id}`, undefined, sync); + if (t.status !== 200 || t.json?.project_id !== PROJECT || !P.title.test(t.json?.title ?? "")) throw new Error(`task ${P.id}: ${t.status}, title check failed; nothing posted`); +} +writeFileSync(OUT, "", { flag: "wx" }); +for (const P of POSTS) { + const c = await api("PUT", `/api/v1/tasks/${P.id}/comments`, { comment: ps(P.body) }, key); + const e = { task: P.id, status: c.status, id: c.json?.id ?? null }; + rec.comments.push(e); + if (c.status >= 300 || !Number.isSafeInteger(c.json?.id)) { rec.problems.push(`comment ${P.id}: ${c.status} ${c.json?.message ?? ""}`); save(); continue; } + const back = await api("GET", `/api/v2/tasks/${P.id}/comments?per_page=50`, undefined, sync); + const found = list(back.json).find((x) => x.id === c.json.id); + Object.assign(e, { readBack: back.status, found: Boolean(found) }); + if (back.status !== 200 || !found) rec.problems.push(`comment ${P.id} read-back: ${back.status}`); + save(); +} +save(); +process.stdout.write(JSON.stringify(rec, null, 1) + "\n"); +if (rec.problems.length) process.exit(2); diff --git a/agents/sage/work/vikunja-setup/partB-r188-2026-10-20.json b/agents/sage/work/vikunja-setup/partB-r188-2026-10-20.json new file mode 100644 index 000000000..6e848ec98 --- /dev/null +++ b/agents/sage/work/vikunja-setup/partB-r188-2026-10-20.json @@ -0,0 +1,27 @@ +{ + "at": "2026-10-20T10:36:31.714Z", + "comments": [ + { + "task": 385, + "status": 201, + "id": 358, + "readBack": 200, + "found": true + }, + { + "task": 409, + "status": 201, + "id": 359, + "readBack": 200, + "found": true + }, + { + "task": 410, + "status": 201, + "id": 360, + "readBack": 200, + "found": true + } + ], + "problems": [] +} diff --git a/docs/SESSIONS.md b/docs/SESSIONS.md index b34d56680..35bdecb17 100644 --- a/docs/SESSIONS.md +++ b/docs/SESSIONS.md @@ -1344,3 +1344,4 @@ are never rewritten or removed; corrections are new entries. 2026-10-20T10:24:26Z | Sage (Opus 5.5, 1ef1e4f8) | row 187 landing gate and landing (#1685, Part B A0) | landed 9a71e4e80 (author Darkwing), patch-id 6b57c47bc661 = r1 candidate 52a5ecc1d143; gate passed 10:21:55Z (cli 446/446, every package and scripts/test-*.sh); queue 652d6f3a8 revs 2201-2206; #1685 comment 29425, closed; P19 407-410 filed, P19 385 comment 357 2026-10-20T10:25:22Z | Darkwing (Opus 5.5, 7525c8e4) | row 187 (#1685, Part B A0): activate sets, carries and drops the Console's proof pair | landed: 9a71e4e80 (Sage, pushed with a843ae284, gate cli 446/446 and every scripts/test-*.sh); candidate 52a5ecc1d143 matches the landing (patch-id 6b57c47bc661); stack-release 144/144, base control red on all eleven T53 subtests, mutants m1-m7 killed; three deviations accepted in sage-1267/1269; Filbert approve 29424; follow-ups P19 407-410 (N1 carried-pair checks, N2 repo-path proof file, N3 :689 comment, N4 TOOLS.md:904) 2026-10-20T10:29:37Z | Sage (Opus 5.5, 1ef1e4f8) | Part B window file for Mos's A2 check (mos-0928, P19 385) | drafted agents/sage/work/window-plan/repin-partB-proof.md (blob 77843e62747e) on a843ae284: B3 and B-R1 are live-copy activates of 490e2771d with the pair and --no-proof, no re-pin needed (490e2771d..a843ae284 changes only the tool and its test); Q1 raised: J2 first conflicts with the uid checks in stack-release.sh:777, webui-service.sh:201 and serve.mjs:228; plan b05eb85e unchanged; P19 409/410 gate the run (mos-0956); runs nothing +2026-10-20T10:36:45Z | Sage (Opus 5.5, 1ef1e4f8) | Part B window file draft 2 (mos-0957 F1, F2) and row 188 brief (#1686, P19 409/410) | draft 2 blob 55da51c0462b (148a9503d); Mos A2 recheck passed (mos-0958, ruling: B6 (1) applies to whichever chief B0's launches list shows, id recorded at B0); brief 240f21650, row 188 added and briefed (revs 2207-2208, 525990ecb), pushed 742e98976..525990ecb; Darkwing launched (sage-1278); Vikunja comments 358 (P19 385), 359 (409), 360 (410); nothing live changed