diff --git a/apps/web/tests/shipped-composition.e2e.ts b/apps/web/tests/shipped-composition.e2e.ts index 525e27062f..8b40c5ed7c 100644 --- a/apps/web/tests/shipped-composition.e2e.ts +++ b/apps/web/tests/shipped-composition.e2e.ts @@ -13,7 +13,7 @@ import { LlmAdapter, ToolCallId } from '@deepseek-ai/dsh-llm' import type { GenerateOptions, LlmResolvedModelInfo, StreamChunk } from '@deepseek-ai/dsh-llm' import { canonicalPath, writableRoots } from '@deepseek-ai/dsh-sandbox' import { SESSION_FORMAT_VERSION, SessionId, type SessionEvent } from '@deepseek-ai/dsh-session' -import { composeEntries, loadOverlayPatches } from '@deepseek-ai/dsh-app-boot' +import { auditStartupEntries, composeEntries, loadOverlayPatches } from '@deepseek-ai/dsh-app-boot' // These imports carry the tools/sandboxPolicy/approval Context merges. import { RUN_CODE_NAME } from '@deepseek-ai/dsh-tools' import type {} from '@deepseek-ai/dsh-sandbox-policy' @@ -1005,9 +1005,13 @@ it('rolls back a failed shipped Auto initialization before publishing or interce // not an Auto reviewer or a supported host composition. const stopUnsupportedConflict = ctx.permissionPresets.registerAuto(() => {}) try { - await expect( - autoEntry.update({ disabled: false }).then(() => ctx.loader.await()), - ).rejects.toThrow('preset "auto" is already registered') + // A failed optional entry settles the Loader without rejecting it and + // reports through the startup audit, which is where the conflict surfaces. + const warnings: string[] = [] + await autoEntry.update({ disabled: false }) + await ctx.loader.await() + await auditStartupEntries(ctx, 'web e2e scaffold', (line) => { warnings.push(line) }) + expect(warnings.join('\n')).toContain('preset "auto" is already registered') const handle = await ctx.agents.create({ sessionId: SessionId('shipped-auto-init-rollback'), diff --git a/snapshots/web/auto-review-denial/ui.expected.md b/snapshots/web/auto-review-denial/ui.expected.md index 3161c98835..c430cf3f33 100644 --- a/snapshots/web/auto-review-denial/ui.expected.md +++ b/snapshots/web/auto-review-denial/ui.expected.md @@ -26,9 +26,7 @@ - img - text: Bash Rejected by Auto review - textbox "Message or run a task, / commands, @ files or sessions" -- button "Commands": - - img -- button "Add attachment": +- button "Add files or run commands": - img - 'button "Access mode, current: Auto review EXP"': - text: Auto review @@ -73,9 +71,7 @@ - text: "OUT Tool was not executed. Reason: ptc raw reason" - button "Inspect" - textbox "Message or run a task, / commands, @ files or sessions" -- button "Commands": - - img -- button "Add attachment": +- button "Add files or run commands": - img - 'button "Access mode, current: Auto review EXP"': - text: Auto review @@ -143,9 +139,7 @@ - tab "Timing" - tabpanel "Result": "AutoReviewDeniedError: AUTO_REVIEW_DENIED Error: Auto review rejected tool \"bash\"; its body was not executed" - textbox "Message or run a task, / commands, @ files or sessions" -- button "Commands": - - img -- button "Add attachment": +- button "Add files or run commands": - img - 'button "Access mode, current: Auto review EXP"': - text: Auto review