test: replace tuple casts with structural lifecycle assertions in command specs

Two aggregate-typecheck errors the package-level tsc -b (rootDir=src) never
saw: the commands spec's two-tuple as-cast over the lifecycle slice
(TS2352, host aggregate) becomes a plain commandId projection, and the
fixture spec still read the deleted result member off the pure-admission
execute value (TS2339, client aggregate) — the matched bit is now asserted
as the whole response shape.
This commit is contained in:
imccyu
2026-07-27 17:45:39 +08:00
parent 4ddec0ba2f
commit 4fcfcf32d5
2 changed files with 5 additions and 4 deletions

View File

@@ -76,8 +76,8 @@ describe('createFixtureApi commands/skills', () => {
for (const line of ['/nope', 'plain text', '/']) {
const response = await api.commands.execute(req({ sessionId: sid('fx-alpha'), line }), signal)
if (!response.result.ok) throw new Error('execute failed')
expect(response.result.value.matched).toBe(false)
expect(response.result.value.result).toBeUndefined()
// Pure admission value: the matched bit is the whole response shape.
expect(response.result.value).toEqual({ matched: false })
}
})