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
+21
View File
@@ -516,6 +516,27 @@ def test_two_file_shape_still_checked_byte_identical():
check("tally names the two-file shape", "two-file shape" in out)
# ── Part 6 — the today-override must ANNOUNCE itself, and a malformed one must not be ignored ──
def test_override_announces_itself():
with tempfile.TemporaryDirectory() as tmp:
root = make_repo(tmp, "# Repo\n")
rc, out = run_gate(root, today="2026-08-06")
check("P6: valid override is announced", "FELHOM_GATE_TODAY=2026-08-06" in out and "IS SET" in out)
check("P6: announcing does not change the verdict", rc == 0, "rc=%d" % rc)
def test_malformed_override_exits_2_instead_of_silently_using_the_real_date():
"""It used to fall through to today's real date without a word — and disagreed with
due_checks_gate.py, which already exited 2 on the same input. Same seam, same rule."""
with tempfile.TemporaryDirectory() as tmp:
root = make_repo(tmp, "# Repo\n")
rc, out = run_gate(root, today="not-a-date")
check("P6: malformed override exits 2", rc == 2, "rc=%d" % rc)
check("P6: names the variable and the bad value", "FELHOM_GATE_TODAY" in out and "not-a-date" in out)
check("P6: says it refuses to fall back", "Refusing to fall back" in out)
def main():
print("test_instructions_gate")
for fn in sorted(