test: remove redundant cases and strengthen persistence, terminal and mobile checks (#33318)

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
This commit is contained in:
OrcaWin
2026-10-24 17:35:35 -07:00
committed by GitHub
co-authored by OrcaWin
parent 7ffcb7c7b4
commit e8a18a03d5
18 changed files with 128 additions and 210 deletions
@@ -118,7 +118,10 @@ describe('child-work admission of what a child is doing', () => {
it('carries owner and residency through, and clears the operation of a parked child', () => {
const { store, admission } = setup()
admission.announce(observation())
admission.announce(
observation({ operation: { toolName: 'Bash', basis: 'open', observedAt: 10 } })
)
expect(store.getChild('child-1')?.operation).toMatchObject({ toolName: 'Bash' })
admission.announce(
observation({
aliases: [{ segmentId: 'segment-1', aliasKind: 'task_id', alias: 'shell-1' }],
@@ -118,6 +118,14 @@ describe('agent child-work admission', () => {
).toMatchObject({ accepted: true, childWorkId: 'child-1', created: false })
expect(store.getChildren(parent)).toMatchObject([{ childWorkId: 'child-1', kind: 'agent' }])
expect(store.getSnapshot().aliases.every((alias) => alias.kind === 'agent')).toBe(true)
expect(
admission.announce(
announce(parent, {
aliases: [{ segmentId: 'segment-1', aliasKind: 'tool_use_id', alias: 'tool-1' }],
observedAt: 13
})
)
).toMatchObject({ accepted: true, childWorkId: 'child-1', created: false })
})
it('preserves the logical id and prior outcome across an explicit resume fence', () => {