hubleafe2e

package
v0.14.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 10, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

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

func Run

func Run(ctx context.Context, t *testing.T, dir string) (*runResult, error)

Run is a convenience wrapper for the canonical 3-agent scenario.

func RunN

func RunN(ctx context.Context, t *testing.T, dir string, n int) (*runResult, error)

RunN brings up a single coord.Hub and n coord.Leaf instances against dir, runs one disjoint-file task per slot, and reports the aggregated trunk-commit / tip-changed counters.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL