fix(FN-4257): align heartbeat cwd acquisition fallback

Fusion-Task-Id: FN-4257
Fusion-Task-Lineage: db48d51e-9e7d-471d-b26b-2a8763fb41d1
This commit is contained in:
Fusion
2026-05-13 01:35:36 -07:00
committed by gsxdsm
parent bf6a679ff1
commit fc248c47e1
2 changed files with 3 additions and 3 deletions

View File

@@ -2211,7 +2211,7 @@ describe("executeHeartbeat", () => {
expect(mockedCreateFnAgent).toHaveBeenCalledOnce();
const callArgs = mockedCreateFnAgent.mock.calls[0]![0];
expect(callArgs.cwd).toBe("/tmp/test");
expect(callArgs.cwd).toBe("/tmp/worktree-fn-001");
expect(callArgs.systemPrompt).toContain(HEARTBEAT_SYSTEM_PROMPT);
expect(callArgs.systemPrompt).toContain("## Soul");
expect(callArgs.systemPrompt).toContain("Act like a practical teammate who prioritizes clarity.");

View File

@@ -2105,13 +2105,13 @@ export class HeartbeatMonitor {
}
let sessionCwd = rootDir;
if (!isNoTaskRun && taskDetail && heartbeatModelSettings) {
if (!isNoTaskRun && taskDetail) {
try {
const acquisition = await acquireTaskWorktree({
task: taskDetail,
rootDir,
store: taskStore,
settings: heartbeatModelSettings,
settings: heartbeatModelSettings ?? {},
logger: heartbeatLog,
audit,
runContext,