fix: refuse to git fetch while the Docker case list cannot be read (release review)

readDockerCases() reads an unreadable or half-written docker-cases.json as [], so a fetch (which runs
repository hooks, and runs unattended on the interval) could run inside a Docker workspace. The fetch
paths now read it through a strict reader: the Fetch button answers a failed run (state 'error') and the
scheduler skips the tick, undoes its picks and logs once. The status and diff routes are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Codeman maintainer committed 2026-10-27 02:58:37 +01:00
1 parent b89f15c12f
commit 1752d7ee2c
8 files changed
+221 -18

No files matched your search

+2 -1
View File
@@ -406,7 +406,8 @@ export class WebServer extends EventEmitter {
sessionIds: () => this.sessions.keys(),
getSession: (id) => this.sessions.get(id),
readSettings: readGitFetchSettings,
// The same Docker list the panel's routes use: the rule has to be one rule.
// The same Docker list the panel's Fetch button uses: the rule has to be one rule. It rejects on a list
// that cannot be read, and the tick then fetches nothing (fail closed).
dockerWorkspaces: defaultDockerWorkspaces,
// Bounded probe, DEFAULT options (rule #516): a tick is a bulk scan, so it keeps the stall cap and must
// never be handed `pastCap`. A folder on a mount that stopped answering is skipped, not fetched.