catalog-since gate: an image: move must bump the app's catalog_since (R-452) — hook-enforced, shallow CI skips out loud
gates / gates (push) Successful in 1s

This commit is contained in:
2026-09-13 19:42:13 +02:00
parent 7410915d82
commit 3f73c0e28a
7 changed files with 200 additions and 8 deletions
+10 -5
View File
@@ -58,10 +58,10 @@ class CatalogGatesFastTest(unittest.TestCase):
spec = importlib.util.spec_from_file_location("catalog_gates_under_test", ENTRY)
mod = importlib.util.module_from_spec(spec)
spec.loader.exec_module(mod)
self.assertEqual(len(mod.GATES), 4)
self.assertEqual([g[0] for g in mod.GATES if g[3]], ["image-pins", "engine-major"])
# exactly one gate needs git history; it is the one the CI half cannot run (R-452)
self.assertEqual([g[0] for g in mod.GATES if g[4]], ["engine-major"])
self.assertEqual(len(mod.GATES), 5)
self.assertEqual([g[0] for g in mod.GATES if g[3]], ["image-pins", "engine-major", "catalog-since"])
# two gates need git history; they are the ones the CI half cannot run (R-452's shallow gap)
self.assertEqual([g[0] for g in mod.GATES if g[4]], ["engine-major", "catalog-since"])
def test_engine_major_ran_under_fast(self):
"""The 2026-09-13 gate is fast (git reads only) and must be IN --fast, or the hook that
@@ -77,7 +77,7 @@ class CatalogGatesFastTest(unittest.TestCase):
subprocess.run(["git", "clone", "-q", "--depth", "1", "file://" + ROOT, tmp],
check=True, capture_output=True)
# test the WORKING-TREE runner and gate, not whatever HEAD happens to hold
for fn in ("catalog_gates.py", "check-engine-major.py", "check-image-pins.py"):
for fn in ("catalog_gates.py", "check-engine-major.py", "check-image-pins.py", "check-catalog-since.py"):
shutil.copy(os.path.join(ROOT, "scripts", fn), os.path.join(tmp, "scripts", fn))
p = subprocess.run([sys.executable, os.path.join(tmp, "scripts", "catalog_gates.py"),
"--fast"], cwd=tmp, capture_output=True, text=True)
@@ -90,5 +90,10 @@ class CatalogGatesFastTest(unittest.TestCase):
shutil.rmtree(tmp, ignore_errors=True)
if __name__ == "__main__":
unittest.main(verbosity=2)
def test_catalog_since_ran_under_fast(self):
"""R-452's gate is fast (git reads only) and must be IN --fast, like engine-major."""
self.assertIn("catalog-since gate", self.out)