gates / gates (push) Successful in 29s
- Twelve steps published on both venues (catalog): first ladders for calibre-web, gitea, wger, crafty-controller, uptime-kuma, zipline (two steps); within-major emby, ghost, home-assistant, outline, rallly. immich's step v3.0.3 -> v3.2.2 re-proven at 768M (Part D). - Part C: the night leg skips a digest-only change AND the catalog never records a same-tag re-test, so a same-name upstream fix reaches no box. Row R-740; the decision in STATUS; `09` decision 30 carries a dated note (the decision itself unchanged). - Rows: 369 -> 377. Opened R-735..R-742; closed R-735, R-738, R-742; narrowed R-462, R-624, R-446, R-440, R-734, R-732. The currency audit gains §1b (and corrects its 31+1 to 30+2). Evidence: documentation/audits/more-night-apps-2026-09-30/. Report: REPORT-more-night-apps-2026-09-30.md. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
79 lines
4.1 KiB
Plaintext
79 lines
4.1 KiB
Plaintext
package stacks
|
|
|
|
// SCRATCH (not committed; a copy of controller d48da6c in the scratchpad) — Part C, 2026-09-30:
|
|
// what the night leg and the Update button do with an app AT THE HEAD TAG whose catalog carries a
|
|
// NEWER tested digest for that same tag (a same-name repush the catalog re-tested).
|
|
|
|
import (
|
|
"path/filepath"
|
|
"strings"
|
|
"testing"
|
|
)
|
|
|
|
func TestPartC_DigestOnlyBehindAtHead(t *testing.T) {
|
|
m, dir, _, ups, logBuf := legManager(t)
|
|
catDir := filepath.Dir(m.CatalogTemplatePath("nextcloud", "docker-compose.yml"))
|
|
// the ladder: B -> C tested at digest dA, tested 2026-09-29
|
|
mustWrite(t, filepath.Join(catDir, ".felhom.yml"), "display_name: Nextcloud\nupdate_ladder:\n"+
|
|
` - {"from": {"web": "`+ladderB+`"}, "to": {"web": "`+ladderC+`"}, "digest": {"web": "`+dA+`"}, "verdict": "proven", "tested_at": "2026-09-29T00:00:00Z"}`+"\n")
|
|
// the box: at C (the head tag), running the OLDER digest dB, installed 2026-09-20
|
|
cur := "services:\n web:\n image: " + ladderC + "@" + dB + "\nvolumes:\n db:\n"
|
|
mustWrite(t, ComposePathIn(dir), cur)
|
|
mustWrite(t, AppliedComposePath(dir), cur)
|
|
mustWrite(t, filepath.Join(dir, "app.yaml"), "deployed: true\nenv: {}\npinned_images:\n web: "+ladderC+
|
|
"\ninstalled_images:\n web:\n ref: "+ladderC+"\n digest: "+dB+"\n at: \"2026-09-20T00:00:00Z\"\n")
|
|
if err := m.ScanStacks(); err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
st, _ := m.GetStack("nextcloud")
|
|
t.Logf("1. CatalogOrder = %v (catalog digests %v, tested %v; installed %+v)", CatalogOrder(*st), st.CatalogDigests, st.CatalogTestedAt, st.AppConfig.InstalledImages["web"])
|
|
legOpts(m, nil)
|
|
s := mustLeg(t, m)
|
|
t.Logf("2. night leg: presses=%d step=%+v", len(*ups), legStepFor(s, "nextcloud"))
|
|
for _, l := range strings.Split(logBuf.String(), "\n") {
|
|
if strings.Contains(l, "update-leg") {
|
|
t.Logf(" log: %s", l)
|
|
}
|
|
}
|
|
// 3. the household's Update button
|
|
if err := m.StartGuardedUpdate("nextcloud"); err != nil {
|
|
t.Logf("3. Update button refused: %v", err)
|
|
return
|
|
}
|
|
st2 := waitUpdateDone(t, m, "nextcloud")
|
|
body := fileBody(t, ComposePathIn(dir))
|
|
t.Logf("3. Update button: phase=%s err=%q presses=%d; live compose pins the tested digest dA: %v; pin=%s",
|
|
st2.UpdatePhase, st2.UpdateError, len(*ups), strings.Contains(body, ladderC+"@"+dA), pinOf(t, dir))
|
|
}
|
|
|
|
// Option (a)'s box half, measured before it is costed: IF the catalog carried a same-tag re-test
|
|
// (from == to == C, tested at the new digest dA, newer than the install), what would the leg do?
|
|
func TestPartC_IfTheCatalogWroteARefreshEntry(t *testing.T) {
|
|
m, dir, _, ups, logBuf := legManager(t)
|
|
catDir := filepath.Dir(m.CatalogTemplatePath("nextcloud", "docker-compose.yml"))
|
|
mustWrite(t, filepath.Join(catDir, ".felhom.yml"), "display_name: Nextcloud\nupdate_ladder:\n"+
|
|
` - {"from": {"web": "`+ladderB+`"}, "to": {"web": "`+ladderC+`"}, "digest": {"web": "`+dB+`"}, "verdict": "proven", "tested_at": "2026-09-19T00:00:00Z"}`+"\n"+
|
|
` - {"from": {"web": "`+ladderC+`"}, "to": {"web": "`+ladderC+`"}, "digest": {"web": "`+dA+`"}, "verdict": "proven", "tested_at": "2026-09-29T00:00:00Z"}`+"\n")
|
|
cur := "services:\n web:\n image: " + ladderC + "@" + dB + "\nvolumes:\n db:\n"
|
|
mustWrite(t, ComposePathIn(dir), cur)
|
|
mustWrite(t, AppliedComposePath(dir), cur)
|
|
mustWrite(t, filepath.Join(dir, "app.yaml"), "deployed: true\nenv: {}\npinned_images:\n web: "+ladderC+
|
|
"\ninstalled_images:\n web:\n ref: "+ladderC+"\n digest: "+dB+"\n at: \"2026-09-20T00:00:00Z\"\n")
|
|
if err := m.ScanStacks(); err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
st, _ := m.GetStack("nextcloud")
|
|
t.Logf("1. CatalogOrder = %v", CatalogOrder(*st))
|
|
legOpts(m, nil)
|
|
s := mustLeg(t, m)
|
|
body := fileBody(t, ComposePathIn(dir))
|
|
t.Logf("2. night leg: presses=%d step=%+v; live compose pins dA: %v", len(*ups), legStepFor(s, "nextcloud"), strings.Contains(body, ladderC+"@"+dA))
|
|
for _, l := range strings.Split(logBuf.String(), "\n") {
|
|
if strings.Contains(l, "update-leg") || strings.Contains(l, "step") {
|
|
t.Logf(" log: %s", l)
|
|
}
|
|
}
|
|
s2 := mustLeg(t, m)
|
|
t.Logf("3. the next night: presses=%d step=%+v", len(*ups), legStepFor(s2, "nextcloud"))
|
|
}
|