controller v0.268.0: the undo finds volumes by definition; a held app names only a whole copy; one press = one tested step (R-658, R-659, R-660, R-651; 09 §6.4 part 5)
gates / gates (push) Successful in 27s

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:
adminandClaude Opus 5.5 committed 2026-09-24 08:15:27 +02:00
1 parent 80e6ad8c47
commit 206b0357d1
36 files changed
+2201 -40

No files matched your search

@@ -0,0 +1,47 @@
package main
import (
"go/ast"
"strings"
"testing"
)
// R-659 (v0.268.0) — the pieces are wired: the adapter records the hold through the WHOLE-copy walk
// (never the precondition copy again), and the held-event sink sends app_hold_no_whole_copy.
// An AST walk, not a substring (a commented-out call satisfies strings.Contains).
func TestR659_HoldAndEventAreWired(t *testing.T) {
_, f, _ := slice4CallLines(t)
var calls []string
for _, d := range f.Decls {
fn, ok := d.(*ast.FuncDecl)
if !ok || fn.Name.Name != "HoldAfterFailedUpdate" || fn.Recv == nil || fn.Body == nil {
continue
}
if st, ok := fn.Recv.List[0].Type.(*ast.StarExpr); !ok || st.X.(*ast.Ident).Name != "updateGuardsAdapter" {
continue
}
ast.Inspect(fn.Body, func(n ast.Node) bool {
if sel, ok := n.(*ast.SelectorExpr); ok {
calls = append(calls, sel.Sel.Name)
}
return true
})
}
body := strings.Join(calls, " ")
if !strings.Contains(body, "HoldAfterFailedUpdateWhole") {
t.Fatal("the adapter does not record the hold through HoldAfterFailedUpdateWhole — the precondition copy would be named again (R-659)")
}
if strings.Contains(body, "HoldAfterFailedUpdateHolding") {
t.Fatal("the adapter still calls HoldAfterFailedUpdateHolding with the precondition copy")
}
sends := false
ast.Inspect(mainBody(t), func(n ast.Node) bool {
if sel, ok := n.(*ast.SelectorExpr); ok && sel.Sel.Name == "NotifyAppHoldNoWholeCopy" {
sends = true
}
return true
})
if !sends {
t.Fatal("main never calls NotifyAppHoldNoWholeCopy — support would never be told")
}
}