Skip to content

Commit 11a1fef

Browse files
test(server): migration 113 leaves a subagent whose group is null
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 41c699c commit 11a1fef

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

‎apps/server/src/persistence/Migrations/113_RepairSubagentGroups.test.ts‎

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,18 @@ layer("113_RepairSubagentGroups", (it) => {
9090
},
9191
),
9292
],
93+
[
94+
"subagent-null",
95+
threadPayload(
96+
"subagent-null",
97+
{
98+
parentThreadId: "owner",
99+
relationshipToParent: "subagent",
100+
rootThreadId: "owner",
101+
},
102+
{ group: null },
103+
),
104+
],
93105
];
94106
for (const [id, payload] of rows) {
95107
yield* sql`
@@ -119,15 +131,15 @@ layer("113_RepairSubagentGroups", (it) => {
119131
["owner", "object"],
120132
["seat", "object"],
121133
["subagent", "object"],
134+
["subagent-null", "null"],
122135
],
123136
);
124137

125138
yield* runMigrations({ toMigrationInclusive: 113 });
126139
const after = new Map((yield* read).map((row) => [row.thread_id, row]));
127-
for (const id of ["owner", "seat"]) {
140+
for (const id of ["owner", "seat", "subagent-null"]) {
128141
const earlier = before.find((row) => row.thread_id === id);
129142
assert.strictEqual(after.get(id)?.payload_json, earlier?.payload_json);
130-
assert.strictEqual(after.get(id)?.group_type, "object");
131143
}
132144
const subagent = after.get("subagent");
133145
assert.strictEqual(subagent?.group_type, null);

0 commit comments

Comments
 (0)