controller: F7 atomic volume dumps + F6 no-single-copy + F5 stale-primary sweep (WIP, pre-build)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017CDMFpFx84pfviCTVuGGhf
This commit is contained in:
2026-07-12 09:00:16 +02:00
parent b389e73fff
commit 68b3a3932e
13 changed files with 569 additions and 57 deletions
+7 -7
View File
@@ -93,7 +93,7 @@ func TestOffbox_BaseArgsCarryConnectTimeout(t *testing.T) {
base, env := m.offboxBaseArgs(sett.GetOffboxTarget())
joined := strings.Join(base, " ")
for _, want := range []string{
"-oConnectTimeout=10", // THE spike Q8 fail-fast knob
"-oConnectTimeout=10", // THE spike Q8 fail-fast knob
"-oStrictHostKeyChecking=yes", // no blind TOFU
"-oUserKnownHostsFile=", // pinned host key
"-oBatchMode=yes", // no interactive hang
@@ -466,8 +466,8 @@ const resticLockErr = "unable to create lock in backend: repository is already l
// lockRunner records calls and returns the lock error for `backup` the first `lockTimes` times it's called.
type lockRunner struct {
backups, prunes, unlockStale, unlockRemoveAll int
lockTimes int
seq []string
lockTimes int
seq []string
}
func (r *lockRunner) run(_ context.Context, _ []string, args ...string) ([]byte, error) {
@@ -629,10 +629,10 @@ func TestOffbox_ValidateRejectsInjection(t *testing.T) {
{Host: "-oProxyCommand=touch /tmp/pwn", User: "felhom", RepoPath: "/srv/repo"}, // ssh option injection
{Host: "nas;rm -rf /", User: "felhom", RepoPath: "/srv/repo"}, // metacharacters
{Host: "nas.local", User: "-oProxyCommand=x", RepoPath: "/srv/repo"}, // user option injection
{Host: "nas.local", User: "felhom", RepoPath: "/srv/repo; evil"}, // path metacharacters
{Host: "nas.local", User: "felhom", RepoPath: "/srv/../etc"}, // traversal
{Host: "nas local", User: "felhom", RepoPath: "/srv/repo"}, // space
{Host: "nas.local", User: "felhom", RepoPath: "relative/path"}, // non-absolute
{Host: "nas.local", User: "felhom", RepoPath: "/srv/repo; evil"}, // path metacharacters
{Host: "nas.local", User: "felhom", RepoPath: "/srv/../etc"}, // traversal
{Host: "nas local", User: "felhom", RepoPath: "/srv/repo"}, // space
{Host: "nas.local", User: "felhom", RepoPath: "relative/path"}, // non-absolute
}
for i, b := range bad {
bb := b