test(stack): cover synced context regressions

This commit is contained in:
creatixchu
2026-08-06 11:55:14 +08:00
parent d0d8cd5365
commit 954dd33242
2 changed files with 7 additions and 3 deletions
@@ -5,7 +5,7 @@
- tab "Chat" [selected]
- tab "Trajectory"
- img
- text: "plan Plan mode on. Use /plan off to leave. Plan a small change: add a --greeting flag to a CLI. Do not read or write any files. Call exit_plan_mode with a short plan of at most five bullet points. Once the plan is approved, reply with the single word DONE and stop. {{clock}}"
- text: "plan Plan mode on. Use /plan off to leave. Interjection Plan a small change: add a --greeting flag to a CLI. Do not read or write any files. Call exit_plan_mode with a short plan of at most five bullet points. Once the plan is approved, reply with the single word DONE and stop. {{clock}}"
- button "Copy":
- img
- button "Branch into a new conversation" [disabled]:
@@ -409,6 +409,10 @@ describe('dsh-tool-skill', () => {
const home = await tempDir('tool-proposed-empty-catalog')
const ctx = await setup(home)
const session = Session.create(SessionId('proposed-empty-catalog'))
const malformed = createUserMessage({
content: [{ type: 'text', text: 'preserve unreadable claimed context' }],
source: { kind: 'skill-catalog', form: 'catalog' } as never,
})
const stale = createUserMessage({
content: catalogContent(['- `stale-skill`: Stale skill']),
source: {
@@ -418,9 +422,9 @@ describe('dsh-tool-skill', () => {
},
})
const decision = await proposeStep(ctx, sessionAgent(session), [stale])
const decision = await proposeStep(ctx, sessionAgent(session), [malformed, stale])
expect(decision).toEqual({ kind: 'enter', messages: [] })
expect(decision).toEqual({ kind: 'enter', messages: [malformed] })
})
it('keeps a proposed catalog that already matches the current snapshot', async () => {