v0.314.0: a restore puts the setup gate back as it was (R-1057); a test build moves with the floor (R-1053); Prowlarr links itself (R-1058); the box claims Plex by address (R-1060)
gates / gates (push) Successful in 47s

MinAgent 0.155.0 (unchanged). Tests red-proved by mutation (A: 10, B: 7, C: 1, C2: 2).

Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
This commit is contained in:
2026-10-15 14:34:33 +02:00
parent e209a8d724
commit 17863fe8bc
22 changed files with 762 additions and 21 deletions
+14 -1
View File
@@ -3202,9 +3202,20 @@ func (a *stackAdapter) GetStackRecoveryInfo(name string) (backup.RecoveryInfo, b
PortableSecretEnvVars: portableNames,
PortableSecrets: portable,
InstalledImages: installedRefs(s.AppConfig),
// R-1057 (v0.314.0): the gate as it stands at this backup — read from the file, the record of truth.
SetupGate: gateAtCapture(&meta, stackDir),
}, true
}
// gateAtCapture reads the app's setup-gate record from its app.yaml on disk for the backup (stacks.GateCapture).
func gateAtCapture(meta *stacks.Metadata, stackDir string) *backup.GateState {
var rec *stacks.SetupGateRecord
if cfg := stacks.LoadAppConfig(stackDir); cfg != nil {
rec = cfg.SetupGate
}
return stacks.GateCapture(meta, rec)
}
// installedRefs renders app.yaml's `installed_images` observation as service -> `ref@digest` (v0.275.0,
// R-696) for the data stamps. Nil when nothing was observed — absent means UNKNOWN (deploy.go).
func installedRefs(cfg *stacks.AppConfig) map[string]string {
@@ -3263,7 +3274,9 @@ func (a *stackAdapter) RecreateStackDefinitionFromUnit(name, composeSrcDir strin
return fmt.Errorf("restoring %s from unit: %w", fname, err)
}
}
if err := a.mgr.PersistUnitRedeployConfig(name, fullEnv); err != nil {
// R-1057 (v0.314.0): the gate as the backup recorded it — the unit's app.yaml, read BEFORE the write.
gate := stacks.ReadGateAtBackup(filepath.Join(composeSrcDir, "app.yaml"))
if err := a.mgr.PersistUnitRedeployConfigGate(name, fullEnv, gate); err != nil {
return err
}