v0.303.0 (code): after a restart, a backup capture waits for the drive's bind (R-897)
gates / gates (push) Successful in 1m18s

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
This commit is contained in:
2026-10-07 18:45:01 +02:00
parent 431da7ebbc
commit 29bebbb937
5 changed files with 208 additions and 0 deletions
+9
View File
@@ -25,6 +25,14 @@ import (
// moved out of the controller into the host agent (slice 8C). This Manager now
// only owns the app-data domain.
type Manager struct {
// R-897: when this controller started, and the seams of the post-boot drive wait (driveready.go). Zero
// startedAt = no wait (a Manager built outside NewManager, e.g. a test that does not ask for it).
startedAt time.Time
driveLive func(root string) bool
driveWaitPoll func(time.Duration)
nowFn func() time.Time
driveWarned map[string]bool
driveMu sync.Mutex // its own lock: the capture sweep may run while m.mu is held elsewhere
cfg *config.Config
logger *log.Logger
settings *settings.Settings
@@ -370,6 +378,7 @@ func NewManager(cfg *config.Config, sett *settings.Settings, logger *log.Logger)
logger: logger,
settings: sett,
systemDataPath: cfg.Paths.SystemDataPath,
startedAt: time.Now(),
}
// R-166: its OWN file next to quiesce-state.json, never inside it — one file, one writer.
m.appStop = NewAppStopGuard(filepath.Join(cfg.Paths.DataDir, "appstop-state.json"), logger)