From 53c66010fae84c8671f41c36cc9c0160fec6af6a Mon Sep 17 00:00:00 2001 From: fujibee Date: Fri, 11 Sep 2026 15:35:44 -0700 Subject: [PATCH 01/10] feat(sweep): fan out self-repair to corroborated panes --- scripts/lib/sweep.sh | 155 ++++++++++++++++++++++++++++++++++++++++++ scripts/sweep.sh | 27 ++++++++ tests/test_sweep.bats | 91 +++++++++++++++++++++++++ 3 files changed, 273 insertions(+) create mode 100644 scripts/lib/sweep.sh create mode 100755 scripts/sweep.sh create mode 100644 tests/test_sweep.bats diff --git a/scripts/lib/sweep.sh b/scripts/lib/sweep.sh new file mode 100644 index 00000000..3f01c40e --- /dev/null +++ b/scripts/lib/sweep.sh @@ -0,0 +1,155 @@ +#!/usr/bin/env bash +# sweep.sh -- explicit leader-side fan-out for a team's self-repair (#1152). + +[ -n "${_AGMSG_SWEEP_SH:-}" ] && return 0 +_AGMSG_SWEEP_SH=1 + +# This is the only seam between the command and #1155. Once that change lands, +# the body is exactly the production primitive. Keeping the call here also lets +# the orchestrator tests replace the observation without an environment-based +# target injection path in the shipped command. +_agmsg_sweep_agent_rows() { + declare -F agmsg_terminal_agents >/dev/null 2>&1 || return 127 + agmsg_terminal_agents +} + +# These two adapters are intentionally fail-closed until the instance-aware +# label reader and compare-and-poke ABI land. Neither may be emulated by loading +# a driver against the leader's environment: two terminal instances routinely +# contain the same bare pane id. +_agmsg_sweep_label_at() { return 127; } # +_agmsg_sweep_poke_fenced() { return 127; } # +_agmsg_sweep_instance_allowed() { return 127; } # + +# Is