fix(canvas-agent): avoid production migration numbering collision

This commit is contained in:
134 2026-10-20 15:02:02 +08:00
parent 650a94db72
commit 3ad7fd6b45
4 changed files with 4 additions and 4 deletions

View File

@ -607,8 +607,8 @@
{
"idx": 84,
"version": "7",
"when": 1792022400000,
"tag": "0100_add_canvas_agent_runs",
"when": 1792454400000,
"tag": "0104_add_canvas_agent_runs",
"breakpoints": true
}
]

View File

@ -25,7 +25,7 @@ required. Configure the project service:
- `CANVAS_ZCODE_STATE_DIR=/var/lib/yedir-canvas-agent`
- `CANVAS_ZCODE_NODE_PATH=/opt/yedir-canvas-zcode/current/bin/node`
Apply the additive `0100_add_canvas_agent_runs.sql` migration before the new
Apply the additive `0104_add_canvas_agent_runs.sql` migration before the new
route is used. The host service launches a scope, drops to a unique numeric task
UID and starts unshared mount/user/PID/network/IPC namespaces. Each task mounts
only its workspace/home, read-only runtime/system binaries and its exact broker

View File

@ -45,7 +45,7 @@ test.describe("canvas agent durable run isolation", () => {
await client.unsafe(
'CREATE TABLE "User" ("id" uuid PRIMARY KEY); CREATE TABLE "Chat" ("id" uuid PRIMARY KEY, "userId" uuid NOT NULL); CREATE TABLE "CanvasProject" ("id" uuid PRIMARY KEY, "userId" uuid NOT NULL, "workspaceType" varchar DEFAULT \'canvas\', "canvasData" jsonb, "updatedAt" timestamp DEFAULT now());',
);
await client.unsafe(readFileSync("lib/db/migrations/0100_add_canvas_agent_runs.sql", "utf8"));
await client.unsafe(readFileSync("lib/db/migrations/0104_add_canvas_agent_runs.sql", "utf8"));
await client`INSERT INTO "User" VALUES (${owner}), (${other})`;
await client`INSERT INTO "Chat" VALUES (${chatId}, ${owner}), (${otherChat}, ${other})`;
await client`INSERT INTO "CanvasProject" ("id", "userId") VALUES (${projectId}, ${owner}), (${otherProject}, ${other})`;