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:
@@ -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.");
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user