test(web): follow the settled-loader startup audit
Loader settlement no longer rejects on a failed optional entry, so the Auto rollback scenario reads the conflict from the startup audit. Refresh the Auto denial golden for the merged composer chrome.
This commit is contained in:
1 parent
6b19923ad5
commit
1de37ddc2b
2 files changed
+11
-13
No files matched your search
@@ -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'),
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user