test(cli): give the layered-skills e2e sessions run-unique ids

The suite composes over the ambient DSH home, so a fixed session id
collides with the log a previous run persisted once the tool-execution
path checks persisted identity.
This commit is contained in:
Yichen Jiang
2026-08-09 22:49:01 +08:00
parent 4b628a8703
commit d7605c62e9
+5 -2
View File
@@ -1,3 +1,4 @@
import { randomUUID } from 'node:crypto'
import { mkdir, mkdtemp, readFile, writeFile } from 'node:fs/promises'
import { tmpdir } from 'node:os'
import { fileURLToPath } from 'node:url'
@@ -181,7 +182,9 @@ describe('the shipped Web composition', () => {
].join('\n'))
const handle = await ctx.agents.create({
sessionId: SessionId('preset-skills-standard'),
// Unique per run: the composition persists into the ambient DSH home,
// and a fixed id would collide with a log an earlier run left there.
sessionId: SessionId(`preset-skills-standard-${randomUUID()}`),
setup: agentCtx => ctx.agentPresets.mount(agentCtx, 'standard').then(() => undefined),
})
try {
@@ -212,7 +215,7 @@ describe('the shipped Web composition', () => {
it('shows a core-web agent the global layer but no loader tool', async () => {
const handle = await ctx.agents.create({
sessionId: SessionId('preset-skills-core-web'),
sessionId: SessionId(`preset-skills-core-web-${randomUUID()}`),
setup: agentCtx => ctx.agentPresets.mount(agentCtx, 'core-web').then(() => undefined),
})
try {