A section registered before the controller's terminal took over, or set there, is replaced or removed by a proposal the operator approves

It could not be changed at all: propose refused a name set there and never replaced one. The ask now says plainly that
it replaces or removes the registered section and binds its text's digest; on Approve every node renders the new text
in the place of the old (a removal leaves it out); a replacement keeps the section's own heading form (issue 340 note 14).

Claude-Session: https://claude.ai/code/session_01NcbgfFSnn24M3GcqttoU7i
This commit is contained in:
2026-11-05 22:14:55 +01:00
parent 2dc9e07e88
commit 657cb2b6c8
7 changed files with 387 additions and 36 deletions
@@ -399,11 +399,10 @@ func TestWhatASessionWouldRunIsRefused(t *testing.T) {
if _, err := Propose(p, ProposeInput{Scope: ScopeNode, Nodes: []string{"all"}, Name: "x", Text: "t\n"}, store, r, t0); err == nil {
t.Error("all at the node scope was taken")
}
// A name the terminal sets is changed there.
// A name the terminal sets is replaced by a proposal over it (TestARegisteredSectionIsReplacedOrRemovedOnTheOperatorsApproval).
writeFile(t, p.Settings, `{"instructions": {"x": ["set at the terminal"]}}`)
if _, err := Propose(p, ProposeInput{Scope: ScopeMesh, Name: "x", Text: "t\n"}, store, r, t0); err == nil ||
!strings.Contains(err.Error(), "controller's terminal") {
t.Errorf("a terminal name was proposed: %v", err)
if _, err := Propose(p, ProposeInput{Scope: ScopeMesh, Name: "x", Text: "t\n"}, store, r, t0); err != nil {
t.Errorf("a terminal name was not proposed over: %v", err)
}
}