docs: decisions 133 (redeploy without rows 91 and 93) and 134 (Filbert to Opus 5.5), P19 #250 close record

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-10-13 09:11:18 -05:00
co-authored by Claude Opus 5.5
parent 8ac8055c4d
commit bc49fb2c03
5 changed files with 128 additions and 1 deletions
@@ -0,0 +1,19 @@
{
"at": "2026-10-13T14:06:30.698Z",
"task": 250,
"problems": [],
"comment": {
"status": 201,
"id": 134,
"readBack": 200,
"found": true
},
"update": {
"status": 200,
"inverse": "mark undone: POST /api/v1/tasks/250 done false (sage key)",
"readBack": 200,
"done": true,
"titleSame": true,
"descriptionSame": true
}
}
@@ -0,0 +1,63 @@
// Sage, 2026-10-13: Mos's redeploy ruling (decision 133). Comments on #250 (row 94 mixed state, plain
// `mosaic inbox` fails on a pre-94 bus) and marks it done: the bus restarted on 2b2a9e14 code at
// 14:04:18Z, so the broker has the messages verb and row 99's fallback is dropped. Sage's own key (bot
// user 13). The update sends the task as the v1 GET returned it with only done changed; the sync key reads
// title, description and done back. Rollback is marking it undone. Prints no secret.
// Usage: node close-250.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 TASK = 250;
const TITLE = "Row 94 mixed state: plain `mosaic inbox` may fail until bus restart";
const SIG = "Created by Sage (T3 1ef1e4f8) with Sage's own key (bot user 13).";
const esc = (s) => s.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
const p = (...xs) => xs.map((x) => `<p>${esc(x)}</p>`).join("") + `<p>${esc(SIG)}</p>`;
const TEXT = [
"Closed by the redeploy, not by a fix row. Jason rebooted dragon-lin at 13:40Z and the bus unit, which is not enabled, stayed down. Mos ruled the planned redeploy ships now without rows 91 and 93 (decision 133).",
"Sage reinstalled the unit (adds the EnvironmentFile line) and started mosaic-bus@mosaic-stack at 14:04:18Z from the canonical checkout at 8ac8055c. That tree includes row 94 (2b2a9e14), so the running broker dispatches the messages verb (packages/bus/src/broker.mjs:983) and plain `mosaic inbox` no longer gets unknown-verb.",
"Row 99 (the text-mode fallback, Gitea #1593) is dropped and does not land. The fallback only helps against a pre-94 bus, which can now only come back through a rollback. The packet stays as evidence at agents/researcher/work/queue-99/r1/ (commit 8ac8055c).",
];
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(), task: TASK, 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);
};
const task = await api("GET", `/api/v2/tasks/${TASK}`, undefined, sync);
if (task.status !== 200 || task.json?.project_id !== 19 || task.json?.title !== TITLE) throw new Error(`task ${TASK}: ${task.status}, project ${task.json?.project_id}, title differs or missing`);
if (task.json.done) throw new Error(`task ${TASK} is already done; refusing`);
const before = { title: task.json.title, description: task.json.description };
writeFileSync(OUT, "", { flag: "wx" });
const c = await api("PUT", `/api/v1/tasks/${TASK}/comments`, { comment: p(...TEXT) }, key);
rec.comment = { status: c.status, id: c.json?.id ?? null };
if (c.status >= 300 || !Number.isSafeInteger(c.json?.id)) rec.problems.push(`comment: ${c.status} ${c.json?.message ?? ""}`);
else {
const back = await api("GET", `/api/v2/tasks/${TASK}/comments?per_page=50`, undefined, sync);
const found = list(back.json).find((x) => x.id === c.json.id);
Object.assign(rec.comment, { readBack: back.status, found: Boolean(found) });
if (back.status !== 200 || !found) rec.problems.push(`comment read-back: ${back.status}`);
}
save();
if (!rec.problems.length) {
const full = await api("GET", `/api/v1/tasks/${TASK}`, undefined, key);
if (full.status !== 200 || full.json?.id !== TASK) rec.problems.push(`v1 get: ${full.status}`);
else {
const u = await api("POST", `/api/v1/tasks/${TASK}`, { ...full.json, done: true }, key);
rec.update = { status: u.status, inverse: `mark undone: POST /api/v1/tasks/${TASK} done false (sage key)` };
const back = await api("GET", `/api/v2/tasks/${TASK}`, undefined, sync);
Object.assign(rec.update, { readBack: back.status, done: back.json?.done, titleSame: back.json?.title === before.title, descriptionSame: back.json?.description === before.description });
if (u.status >= 300 || back.status !== 200 || back.json?.done !== true || !rec.update.titleSame || !rec.update.descriptionSame) rec.problems.push("update or read-back differs");
}
}
save();
process.stdout.write(JSON.stringify(rec, null, 1) + "\n");
if (rec.problems.length) process.exit(2);