gates: the today-override announces itself; malformed no longer swallowed
gates / gates (push) Successful in 15s

Part 6 of the hub-blindness task, separable and done rather than dropped.

Both due_checks_gate.py and instructions_gate.py read FELHOM_GATE_TODAY so
their suites can control "today", and neither said so. A shell that still has
it exported -- exactly what a session doing gate-test work leaves behind --
made both gates evaluate against a fabricated date and pass in SILENCE. That
is this project's own named failure class: an instrument that can quietly
return the wrong answer is not a measurement. The seam is legitimate and
stays; the silence was the defect.

Both now print a loud line naming the variable, its value, and that the real
date is being ignored, before any verdict.

And instructions_gate.py no longer swallows a MALFORMED override: it used to
fall through to the real date without a word while due_checks_gate.py already
exited 2 on the same input -- one variable, two gates, disagreeing about what
a mistake means. Both exit 2 now.

Tests extended in both suites (42 and 73 assertions, green). Red-proof: the
announcement was deleted from due_checks_gate.py and its two assertions were
seen failing, then reverted.

Also adds REPORT-hub-blindness.md (topic-suffixed; the shared REPORT.md is
left alone per the parallel-session rule).
This commit is contained in:
2026-08-18 19:32:35 +02:00
parent c03f629d43
commit 104ef34f57
6 changed files with 310 additions and 2 deletions
+8 -1
View File
@@ -87,10 +87,17 @@ def today_utc():
override = os.environ.get("FELHOM_GATE_TODAY")
if override:
try:
return datetime.strptime(override.strip(), "%Y-%m-%d").date()
d = datetime.strptime(override.strip(), "%Y-%m-%d").date()
except ValueError:
print("DUE-CHECKS GATE INCONCLUSIVE: FELHOM_GATE_TODAY=%r is not YYYY-MM-DD" % override)
sys.exit(2)
# THE OVERRIDE ANNOUNCES ITSELF. A shell that still has this exported — exactly what a session
# doing gate-test work leaves behind — would otherwise make this gate evaluate a fabricated
# "today" and pass in silence. An instrument that can quietly return the wrong answer is not a
# measurement, so the seam stays and is made loud.
print("!! FELHOM_GATE_TODAY=%s IS SET — this gate is evaluating against that date, NOT "
"today's real UTC date. Unset it for a real run." % override.strip())
return d
return datetime.now(timezone.utc).date()