fix: keep a remote session's fix plan authoritative (release review, #722)

#722 stopped handing a remote session's workingDir to the Ralph tracker,
which also left isFileAuthoritative false for remote sessions only. That
flag is what keeps the output-based completion guessers off, and it is
true for every local session with a working directory, so a remote loop
could end, and mark every todo done, on a prose line such as "All tasks
completed" while a local one cannot.

setRemoteWorkingDir() records the path without reading or watching the
local disk, so the fix plan stays authoritative as for a local session;
the file still reaches the tracker only through fix-plan/read, over ssh.
The test pins both, and fails on the previous head.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Codeman maintainer committed 2026-10-28 09:25:50 +01:00
1 parent 593b2eb2ea
commit 1ad9db7606
5 files changed
+73 -15

No files matched your search

+9 -3
View File
@@ -2068,9 +2068,15 @@ export class WebServer extends EventEmitter {
// Set working directory for Ralph tracker to auto-load @fix_plan.md (not supported for external CLIs).
// A remote session's workingDir is a path on the remote host, and the watcher reads and
// fs.watch()es it on the LOCAL disk, so it is skipped there too.
if (!isExternalCliMode(session.mode) && !session.remote) {
session.ralphTracker.setWorkingDir(session.workingDir);
// fs.watch()es it on the LOCAL disk, so a remote session only records the path: the fix plan stays
// authoritative as for a local session (keeping the output-based completion guessers off), and its
// file is read over ssh only on an explicit import (fix-plan/read).
if (!isExternalCliMode(session.mode)) {
if (session.remote) {
session.ralphTracker.setRemoteWorkingDir(session.workingDir);
} else {
session.ralphTracker.setWorkingDir(session.workingDir);
}
}
// Start watching for new images in this session's working directory (if enabled globally and per-session).