v0.270.0: no update for a current app (R-679); an interrupted install is reported (R-681); a restore brings back the pinned version's health check (R-669); R-674
gates / gates (push) Successful in 24s
gates / gates (push) Successful in 24s
Five red-proofs. MinAgent 0.131.0 unchanged. 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:
@@ -0,0 +1,33 @@
|
||||
package stacks
|
||||
|
||||
import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
|
||||
// R-669 (v0.270.0): after a restore writes the app's .felhom.yml, that file IS the pinned version's
|
||||
// record — so the NEXT update's undo judges the old version with the restored probe, not the failed
|
||||
// step's. Asserted on what the undo actually reads: savePreUpdateMeta's copy.
|
||||
//
|
||||
// COMPANION RED-PROOF (REPORT.md): make RecordRestoredAppliedMeta a no-op (v0.269.1: no restore path
|
||||
// rewrote applied-meta) → "the next undo would judge with the failed step's probe".
|
||||
func TestR669_RestoreResetsTheAppliedRecord(t *testing.T) {
|
||||
m, _, _, _ := newSlice4Manager(t)
|
||||
dir := filepath.Dir(m.stacks["nextcloud"].ComposePath)
|
||||
if err := os.MkdirAll(filepath.Dir(AppliedMetaFile(dir)), 0o755); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
mustWrite(t, AppliedMetaFile(dir), "healthcheck:\n checks:\n - type: api\n port: 8999\n") // left by the failed step
|
||||
mustWrite(t, filepath.Join(dir, ".felhom.yml"), "healthcheck:\n checks:\n - type: api\n port: 80\n") // written by the restore
|
||||
m.RecordRestoredAppliedMeta("nextcloud", dir)
|
||||
md, err := savePreUpdateMeta(dir)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
b, _ := os.ReadFile(filepath.Join(md, ".felhom.yml"))
|
||||
if strings.Contains(string(b), "8999") || !strings.Contains(string(b), "port: 80") {
|
||||
t.Fatalf("the next undo would judge with the failed step's probe:\n%s", b)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user