feat(kanban): expose redacted sync diagnostics

req: operations/001

req: security/002

req: sync/016
This commit is contained in:
slhx agent
2026-07-13 20:06:25 +02:00
parent fbc0c9db30
commit f1dc6edb7a
5 changed files with 188 additions and 11 deletions
+3
View File
@@ -51,6 +51,7 @@ function migrateCommandLog(request, oldVersion) {
schemaVersion: COMMAND_SCHEMA,
targetColumn: command.targetColumn || "done",
accountPartition: command.accountPartition || "demo:demo",
queuedAt: Number.isSafeInteger(command.queuedAt) ? command.queuedAt : Date.now(),
});
}
meta.put({ from: oldVersion, to: DATABASE_VERSION, migrated: legacy.length }, MIGRATION_KEY);
@@ -139,6 +140,7 @@ async function appendReorder(database, accountPartition, wire) {
actor,
session: stableSession(),
causal,
queuedAt: Date.now(),
kind: "reorder_card",
cardId: String(wire[2] || "1"),
targetColumn: "done",
@@ -199,6 +201,7 @@ function validate(command) {
if (typeof command.actor !== "string" || !command.actor) invalidCommand(command, "actor");
if (typeof command.session !== "string" || !command.session) invalidCommand(command, "session");
if (!Number.isSafeInteger(command.causal) || command.causal < 1) invalidCommand(command, "causal");
if (!Number.isSafeInteger(command.queuedAt) || command.queuedAt < 0) invalidCommand(command, "queuedAt");
if (command.id !== `${command.actor}:${command.causal}`) invalidCommand(command, "id");
if (command.kind !== "reorder_card") invalidCommand(command, "kind");
if (typeof command.cardId !== "string" || !command.cardId) invalidCommand(command, "cardId");