09 §3 decision 250 (operator 2026-10-15 11:26/11:29): a release needs no golden, CC raises the floor after the three test boxes, the golden is weekly; 247 reversed, 7 stands. golden_currency_gate judges the golden's AGE (>7 days); Sunday golden step; rule files, CLAUDE.md, runbooks, build skill follow; R-1045 closed (floor 0.313.0); R-1051 floor route, R-1052 new-box path, R-1053 rc tags never moved
gates / gates (push) Successful in 6m37s
gates / gates (push) Successful in 6m37s
Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
This commit is contained in:
1 parent
5791fa83e3
commit
e92501f5a1
19 files changed
+220
-42
No files matched your search
@@ -119,6 +119,7 @@ def main():
|
||||
|
||||
fails += waiver_cases()
|
||||
fails += rebake_cases()
|
||||
fails += age_cases()
|
||||
|
||||
if fails:
|
||||
print()
|
||||
@@ -148,7 +149,7 @@ def run_gate_env(env):
|
||||
return p.returncode, p.stdout + p.stderr
|
||||
|
||||
|
||||
def synthetic_tree(released, baked, waiver_text, register_rows=("R-468",)):
|
||||
def synthetic_tree(released, baked, waiver_text, register_rows=("R-468",), bake_date="2026-01-01"):
|
||||
"""Build a tree where the CHANGELOG lists `released` (newest first) and one golden `baked` has a
|
||||
real-shaped bake log. Returns (env, tmpdir)."""
|
||||
tmp = tempfile.mkdtemp(prefix="golden-waiver-")
|
||||
@@ -157,8 +158,8 @@ def synthetic_tree(released, baked, waiver_text, register_rows=("R-468",)):
|
||||
for v in released:
|
||||
fh.write("## v%s — synthetic (2026-01-01)\n\nbody\n\n" % v)
|
||||
ev = os.path.join(tmp, "tests")
|
||||
os.makedirs(os.path.join(ev, "golden-%s-2026-01-01" % baked))
|
||||
with io.open(os.path.join(ev, "golden-%s-2026-01-01" % baked, "bake.log"), "w",
|
||||
os.makedirs(os.path.join(ev, "golden-%s-%s" % (baked, bake_date)))
|
||||
with io.open(os.path.join(ev, "golden-%s-%s" % (baked, bake_date), "bake.log"), "w",
|
||||
encoding="utf-8") as fh:
|
||||
fh.write("[golden] upload OK (HTTP 201)\nGOLDEN_VERSION=%s\nGOLDEN_SHA256=%s\n" % (baked, REAL_SHA))
|
||||
reg = os.path.join(tmp, "OPEN-ITEMS.md")
|
||||
@@ -286,4 +287,37 @@ def rebake_cases():
|
||||
return fails
|
||||
|
||||
|
||||
# ── The age rule (2026-10-15, `09` §3 decision 250) ─────────────────────────────────────────────
|
||||
#
|
||||
# A release needs no golden; the golden is weekly. The gate convicts only when the release is AHEAD and the newest
|
||||
# bake is MORE THAN 7 days old. COMPANION RED-PROOF (2026-10-15): set GOLDEN_MAX_AGE_DAYS to 0 → CASE 18 and CASE 20
|
||||
# fail (a 3-day and a 7-day golden convicted); set it to 30 → CASE 19 fails (an 8-day golden passes). Restored.
|
||||
def age_cases():
|
||||
fails = []
|
||||
today = datetime.datetime.now(datetime.timezone.utc).date()
|
||||
ago = lambda n: (today - datetime.timedelta(days=n)).isoformat()
|
||||
BEHIND = (["9.9.9", "9.9.8", "9.9.7"], "9.9.7")
|
||||
|
||||
def check(label, released_baked, bake_date, want_rc, must=(), must_not=()):
|
||||
env, tmp = synthetic_tree(released_baked[0], released_baked[1], None, bake_date=bake_date)
|
||||
try:
|
||||
rc, out = run_gate_env(env)
|
||||
finally:
|
||||
shutil.rmtree(tmp, ignore_errors=True)
|
||||
bad = [m for m in must if m not in out] + ["NOT expected: " + m for m in must_not if m in out]
|
||||
if rc != want_rc or bad:
|
||||
fails.append("%s: rc=%d (wanted %d) %s\n%s" % (label, rc, want_rc, bad, out[-900:]))
|
||||
else:
|
||||
print("%s ok" % label)
|
||||
|
||||
check("CASE 18 (age: release ahead, golden 3 days old -> 0, advisory)", BEHIND, ago(3), 0,
|
||||
must=("ADVISORY", "3 day(s) old", "golden currency gate OK"), must_not=("GOLDEN CURRENCY GATE FAILED",))
|
||||
check("CASE 19 (age: release ahead, golden 8 days old -> 1)", BEHIND, ago(8), 1,
|
||||
must=("GOLDEN CURRENCY GATE FAILED", "8 day(s) old", "more than 7"))
|
||||
check("CASE 20 (age: exactly 7 days is the limit and PASSES)", BEHIND, ago(7), 0, must=("ADVISORY",))
|
||||
check("CASE 21 (age: an UNRECORDED golden is convicted however fresh — R-385)", (["9.9.9", "9.9.7"], "9.9.8"),
|
||||
ago(0), 1, must=("UNRECORDED",))
|
||||
return fails
|
||||
|
||||
|
||||
sys.exit(main())
|
||||
Reference in new issue
Block a user