gates: the today-override announces itself; malformed no longer swallowed
gates / gates (push) Successful in 15s
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:
@@ -121,12 +121,29 @@ def effective(text):
|
||||
|
||||
|
||||
def today_tuple():
|
||||
"""Local date as (y, m, d). Injectable via FELHOM_GATE_TODAY for the test suite."""
|
||||
"""Local date as (y, m, d). Injectable via FELHOM_GATE_TODAY for the test suite.
|
||||
|
||||
THE OVERRIDE ANNOUNCES ITSELF (R-339 session, 2026-08-18). It is a legitimate test seam and the
|
||||
suite depends on it — but a shell that still has it exported, which is exactly what a session
|
||||
doing gate-test work leaves behind, silently made every date comparison here evaluate against a
|
||||
fabricated day and pass. That is this project's own named failure class: an instrument that can
|
||||
quietly return the wrong answer is not a measurement. So the override is kept and made LOUD.
|
||||
|
||||
A MALFORMED override is now exit 2, not a silent fall-through to the real date. Quietly ignoring
|
||||
it means the run the operator thought they were doing is not the run that happened — and it also
|
||||
made this gate disagree with due_checks_gate.py, which already exited 2. Same seam, same rule.
|
||||
"""
|
||||
override = os.environ.get("FELHOM_GATE_TODAY")
|
||||
if override:
|
||||
m = ISO_DATE_RE.match(override.strip())
|
||||
if m:
|
||||
print("!! FELHOM_GATE_TODAY=%s IS SET — this gate is evaluating against that date, NOT "
|
||||
"today's real date. Unset it for a real run." % override.strip())
|
||||
return tuple(int(g) for g in m.groups())
|
||||
print("FAIL: FELHOM_GATE_TODAY=%r is set but is not YYYY-MM-DD." % override)
|
||||
print(" Refusing to fall back to the real date: the run you think you are doing would")
|
||||
print(" not be the run that happens. Fix or unset the variable.")
|
||||
sys.exit(2)
|
||||
import datetime
|
||||
|
||||
d = datetime.date.today()
|
||||
|
||||
Reference in New Issue
Block a user