Skip to content

Commit 097af03

Browse files
committed
fix: address review feedback from CodeRabbit and Devin
- Include test step in no-checklist fallback when includeTests is true - Restore observations from snapshot in SessionSnapshotRestoreCommand
1 parent b3e6df2 commit 097af03

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

packages/cli/src/commands/session.ts

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ export class SessionSnapshotRestoreCommand extends Command {
402402
return 1;
403403
}
404404

405-
const { sessionState } = manager.restore(this.name);
405+
const { sessionState, observations } = manager.restore(this.name);
406406

407407
const sessionMgr = new SessionManager(projectPath);
408408
const currentState = sessionMgr.getOrCreate();
@@ -413,6 +413,22 @@ export class SessionSnapshotRestoreCommand extends Command {
413413
});
414414
sessionMgr.save();
415415

416+
try {
417+
if (observations && observations.length > 0) {
418+
const store = new ObservationStore(projectPath);
419+
for (const obs of observations) {
420+
store.add(
421+
obs.type as Parameters<ObservationStore['add']>[0],
422+
obs.content as unknown as Parameters<ObservationStore['add']>[1],
423+
obs.agent as Parameters<ObservationStore['add']>[2],
424+
obs.relevance,
425+
);
426+
}
427+
}
428+
} catch {
429+
// Non-critical: session state restored even if observations fail
430+
}
431+
416432
console.log(chalk.green(`\u2713 Snapshot restored: ${this.name}`));
417433
return 0;
418434
}

packages/core/src/plan/issue-planner.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,9 @@ export class IssuePlanner {
228228
files,
229229
steps: [
230230
{ type: 'implement', description: issue.title },
231+
...(includeTests
232+
? [{ type: 'test' as const, description: `Write tests for ${issue.title}` }]
233+
: []),
231234
],
232235
});
233236
}

0 commit comments

Comments
 (0)