R-896: the volume-persistence gate refuses a host that is not a scratch host (no containers on DooPlex)
gates / gates (push) Successful in 7s
gates / gates (push) Successful in 7s
check() refuses (HARNESS REFUSED, exit 3) before any docker call unless /opt/upg exists (the bench) or FELHOM_SCRATCH_HOST=1. TestVenue red before the guard; new end-to-end decoy. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
This commit is contained in:
1 parent
8ea72aa397
commit
1a642b43e7
6 files changed
+113
-88
No files matched your search
@@ -944,9 +944,33 @@ def collect_apps(root: Path, only=None, include_unavailable=False):
|
||||
# apart, so a summary can say whether the gate ran at all. Pinned by test_check_volume_persistence.py.
|
||||
HARNESS_REFUSED = 3
|
||||
|
||||
# R-896 (2026-10-10): the real prober builds a canary image and runs every template on the LOCAL Docker. Run on DooPlex
|
||||
# (the production host) it acted there — and its self-test failed for every app. So it runs only where the host says it
|
||||
# is a scratch host: the bench's layout directory, or an explicit FELHOM_SCRATCH_HOST=1 from the person who knows the box.
|
||||
# Fail closed: no marker → HARNESS REFUSED before any docker call. Pinned by TestVenue (test_check_volume_persistence.py).
|
||||
SCRATCH_ENV = "FELHOM_SCRATCH_HOST"
|
||||
SCRATCH_MARKERS = (Path("/opt/upg"),) # the bench guest's harness layout (upgrade-test.py ROOT)
|
||||
|
||||
|
||||
def venue_refusal() -> str:
|
||||
"""Empty when this host may run containers for the gate; otherwise the reason it may not."""
|
||||
if os.environ.get(SCRATCH_ENV) == "1":
|
||||
return ""
|
||||
if any(m.is_dir() for m in SCRATCH_MARKERS):
|
||||
return ""
|
||||
return ("this host is not a scratch host (no %s, %s is not 1) — the gate runs real containers on the local "
|
||||
"Docker and must not act on a production host (R-896). Run it on the bench, or set %s=1 on a scratch "
|
||||
"host." % (" / ".join(str(m) for m in SCRATCH_MARKERS), SCRATCH_ENV, SCRATCH_ENV))
|
||||
|
||||
|
||||
def check(root: Path, only=None, prober=docker_prober, include_unavailable=False,
|
||||
evidence: Path | None = None, skip_self_test=False) -> int:
|
||||
if prober is docker_prober:
|
||||
why = venue_refusal()
|
||||
if why:
|
||||
print(f"ERROR: {why}", file=sys.stderr)
|
||||
print("HARNESS REFUSED — not a scratch host; no container was started")
|
||||
return HARNESS_REFUSED
|
||||
apps, skipped = collect_apps(root, only, include_unavailable)
|
||||
if skipped:
|
||||
print(f"skipping {len(skipped)} app(s) not offered for new installs: {', '.join(skipped)}")
|
||||
|
||||
Reference in new issue
Block a user