Documentation
¶
Overview ¶
Package hubleafe2e is an E2E sanity harness for the hub-leaf architecture (ADR 0023). It brings up one coord.Hub and three coord.Leaf instances, runs three disjoint-file tasks (one per leaf), and asserts the spec invariants:
- every slot's Leaf.Commit returns no error and a non-empty rev;
- the hub records at least n trunk commits (the strict spec assertion fossil_commits == tasks; the trial #10 fork+merge auto-merge path can add a +1 merge commit, so >=);
- every slot publishes a tip.changed broadcast (counted by the slot incrementing TipChangedSeen on a successful Leaf.Commit return — each successful commit triggers SyncNow on the leaf.Agent, which posts the manifest to the hub mesh);
- no slot returns an unrecoverable error.
Compared to examples/herd-hub-leaf (the load-scale 16x30 trial), this harness is the 3x3 sanity test: same Hub+Leaf substrate, smaller fan-out, no telemetry plumbing. main_test.go invokes Run.
Lifecycle note: leaf.Agent.SyncNow is non-blocking (fires a signal the agent's pollLoop later consumes), so Leaf.Commit can return before the hub-side HandleSync has crosslinked the manifest into the hub's event table. RunN keeps every leaf alive until polling sees n trunk-checkin events on the hub repo, then tears them down.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.