From 46261fb6418cadfb7262c4c948f0e415d219eca6 Mon Sep 17 00:00:00 2001 From: igneum-labs <337424239+igneum-labs@users.noreply.github.com> Date: Thu, 8 Oct 2026 02:58:49 +0000 Subject: [PATCH 1/2] merge-to-master: the suspension refusal lets --self-test through to exercise the refusal itself (the first cut refused its own self-test under the real marker) Co-Authored-By: Claude Fable 5.1 --- tools/ci/merge-to-master.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/ci/merge-to-master.sh b/tools/ci/merge-to-master.sh index 1cebd10de..d44eb5219 100755 --- a/tools/ci/merge-to-master.sh +++ b/tools/ci/merge-to-master.sh @@ -154,7 +154,7 @@ success 4 u push run [ "$fails" = 0 ] && echo "self-test passed: a GitHub remote is refused with exit 2 while the suspension marker stands and a mirror remote is not; the CI rule binds a GitHub remote only; a landed master is fast-forwarded to every mirror and a refused mirror push is a line, not a failure; a green branch run merges; a red one is refused; an unknown read is waited through and refused only at the deadline; a queued run is waited for with the clock; an unrun branch is pushed once and then waited for; a red master refuses every merge but the declared fix" exit $fails fi -github_suspended_refusal "$REMOTE" && exit 2 # before any gh or git call +if [ "$SELF_TEST" != 1 ] && github_suspended_refusal "$REMOTE"; then exit 2; fi # before any gh or git call (the self-test exercises the function itself) [ -z "$(git status --porcelain --untracked-files=no)" ] || { echo "merge-to-master: the tree has uncommitted tracked changes; commit first" >&2; exit 1; } bash tools/ci/gh-account-check.sh || exit 1 # gh's active account on this Mac is the stored Igneum entry (main's rule, 7 October 2026, 21:5x UK) SHA=$(git rev-parse "$BRANCH"); G=$(cd "$(git rev-parse --git-common-dir)" && pwd -P) From 51481b1cac99381889dfb4d47b4d85b03634adba Mon Sep 17 00:00:00 2001 From: igneum-labs <337424239+igneum-labs@users.noreply.github.com> Date: Thu, 8 Oct 2026 02:59:43 +0000 Subject: [PATCH 2/2] merge-to-master self-test: the nested refusal call's exit is caught (under set -e a plain assignment of a failing substitution ended the script before any check ran) Co-Authored-By: Claude Fable 5.1 --- tools/ci/merge-to-master.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/ci/merge-to-master.sh b/tools/ci/merge-to-master.sh index d44eb5219..3a434f2ed 100755 --- a/tools/ci/merge-to-master.sh +++ b/tools/ci/merge-to-master.sh @@ -87,7 +87,7 @@ if [ "$SELF_TEST" = 1 ]; then fails=0; d=$(mktemp -d); fake="$d/ci-state.sh" # the suspension marker: a GitHub remote is refused with the line, exit 2, before anything else; a mirror remote is not; no marker, no refusal printf 'suspended-since: 2026-10-07T17:02:00Z\n' > "$d/marker" - out="$(IGNEUM_GITHUB_SUSPENDED_FILE="$d/marker" bash "$0" --remote origin 2>&1)"; rc=$? + rc=0; out="$(IGNEUM_GITHUB_SUSPENDED_FILE="$d/marker" bash "$0" --remote origin 2>&1)" || rc=$? # under set -e a plain assignment of a failing substitution ends the script [ "$rc" = 2 ] || { echo "self-test failed: a GitHub remote under the marker was not refused with exit 2 (exit $rc): $out"; fails=1; } case "$out" in *"REFUSED. GitHub is unreachable"*"--remote box"*) ;; *) echo "self-test failed: the refusal did not name the switch: $out"; fails=1 ;; esac ( SUSPENDED_FILE="$d/marker"; github_suspended_refusal box >/dev/null 2>&1 ) && { echo "self-test failed: the box mirror remote was refused under the marker"; fails=1; }