FB3, FB4, FB5: the bridge performs what the gate owes through the seat git and says each outcome, reads groups from the seat, and its owed tools

Taken over from the join (6ada2089, f1417ab0, 6e162a60, 3a4e62b0, 73fb42d7, ee15a280, a5476f62, 94a4e62a, 33907a81, e519cc87, e8f268c1) and fitted to the final
contracts: the seat's events are pull-updated, pull-merged, pull-closed, forge-delete; OwedEnded keeps only the fields §164 names; merge-pull
takes no ask. A merge act is performed only as a switched act (§169); from G the gate owes none (§167).

Builds: design 47 G §43, §45, §157, §161, §162, §163, §164, §167, §168, §169, §171, §250

Claude-Session: https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ
This commit is contained in:
2026-11-11 11:54:56 +01:00
parent 3a4768ab43
commit 0b597eb417
26 changed files with 1940 additions and 1492 deletions
@@ -142,6 +142,37 @@ func TestGateKeysAsGoDeliveryHadThem(t *testing.T) {
t.Errorf("%q reads as a switched act's id", other)
}
}
// A switched act's id carries its state, key and revision, and reads back; any other id is not one.
for _, c := range []struct {
state, key string
rev uint64
id string
}{
{SwitchedOwed, "novox.app.7.0123abcd.status=mesh/delivery", 4, "switched.owed.4.novox.app.7.0123abcd.status=mesh/delivery"},
{SwitchedMerges, "release-g", 12, "switched.merges.12.release-g"},
} {
id, err := SwitchedActID(c.state, c.key, c.rev)
if err != nil || id != c.id {
t.Errorf("SwitchedActID(%q, %q, %d) = %q, %v; want %q", c.state, c.key, c.rev, id, err, c.id)
}
if s, k, r, ok := ParseSwitchedActID(id); !ok || s != c.state || k != c.key || r != c.rev {
t.Errorf("ParseSwitchedActID(%q) = %q %q %d %v", id, s, k, r, ok)
}
}
for _, bad := range []struct {
state, key string
rev uint64
}{{"turns", "k", 1}, {SwitchedOwed, "", 1}, {SwitchedOwed, "a@b", 1}, {SwitchedMerges, "k", 0}} {
if id, err := SwitchedActID(bad.state, bad.key, bad.rev); err == nil {
t.Errorf("SwitchedActID(%+v) = %q, no error", bad, id)
}
}
for _, other := range []string{"novox.app.7.0123abcd.view@1700000000", "switched.turns.1.k", "switched.owed.x.k",
"switched.owed.0.k", "switched.owed.3", "switched.owed.3.k@1"} {
if _, _, _, ok := ParseSwitchedActID(other); ok {
t.Errorf("%q reads as a switched act's id", other)
}
}
}
func TestGateValuesRefuseWhatTheirRulesRefuse(t *testing.T) {