From 77bcc35adbf4a44006cecbe253295ab7cad0c3ae Mon Sep 17 00:00:00 2001 From: Tianyi Cui <53024+tianyicui@users.noreply.github.com> Date: Sat, 19 Sep 2026 20:52:09 +0800 Subject: [PATCH] fix(test): type migrated JSON without an unknown cast The merged concurrent migration test used an as-unknown widening assertion after JSON.parse. Master now rejects newly introduced unknown casts, so that test blocks the repository gate and unrelated PR validation. Give the map callback an explicit unknown return type instead. Keep the gate baseline unchanged; parsing and assertions have the same runtime behavior. --- scripts/migrate-sessions-to-v4.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/migrate-sessions-to-v4.spec.ts b/scripts/migrate-sessions-to-v4.spec.ts index e4735db329..cf52171fef 100644 --- a/scripts/migrate-sessions-to-v4.spec.ts +++ b/scripts/migrate-sessions-to-v4.spec.ts @@ -246,7 +246,7 @@ describe('one-time V4 migration command', () => { )) current.push(decoded) } - expect(current[0]!.toString().trim().split('\n').slice(1).map(line => JSON.parse(line) as unknown)).toMatchObject([ + expect(current[0]!.toString().trim().split('\n').slice(1).map((line): unknown => JSON.parse(line))).toMatchObject([ { type: 'subagent/catalog', data: { childId: 'z-child', childCreatedAt: 2, mode: 'continuable', label: 'saved child' } }, ]) outputs.push(current)