Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ describe('Session plan, compact, usage, and resume APIs', () => {
}
});

it.todo('marks resumed plan mode active when the restored plan has no plan data', async () => {
it('marks resumed plan mode active when the restored plan has no plan data', async () => {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Fix the fixture before enabling this legacy resume test

This test now runs, but it never creates the advertised “restored plan has no plan data” state: the session setup calls setPlanMode(true), which currently writes a plan_mode.enter record with an id (packages/agent-core/src/agent/plan/index.ts:39), while removeManualPlanIds only removes/edits plan.enter and plan.manual_enter records. As a result, the wire history still contains the normal plan id and this test largely duplicates the preceding resume test instead of covering the legacy/missing-plan-data path; update the fixture to strip plan_mode.enter’s id or seed an actual legacy record before enabling it.

Useful? React with 👍 / 👎.

const homeDir = await makeTempDir(tempDirs, 'kimi-sdk-resume-legacy-plan-home-');
const workDir = await makeTempDir(tempDirs, 'kimi-sdk-resume-legacy-plan-work-');
await writeTestConfig(homeDir);
Expand Down Expand Up @@ -189,7 +189,10 @@ describe('Session plan, compact, usage, and resume APIs', () => {
await expect(resumed.getStatus()).resolves.toMatchObject({
planMode: true,
});
await expect(resumed.getPlan()).resolves.toBeNull();
await expect(resumed.getPlan()).resolves.toMatchObject({
content: '',
path: expect.stringContaining('/plans/'),
});
} finally {
await resumedHarness.close();
}
Expand Down