#!/usr/bin/env python3 """recheck.py [...] — newest tag of the same shape: in the same major and at all (the currency audit's method, catalog-currency-2026-09-30/00-currency.py, imported, read-only), plus every newer tag of the same shape.""" import importlib.util, sys, datetime A = "/mnt/5_hdd/felhom.eu/git/felhom.eu/documentation/audits/catalog-currency-2026-09-30/00-currency.py" refs = sys.argv[1:] sys.argv = ["x", "/mnt/5_hdd/felhom.eu/git/app-catalog-felhom.eu", "/dev/null"] s = importlib.util.spec_from_file_location("c", A); c = importlib.util.module_from_spec(s); s.loader.exec_module(c) print("# upstream re-check", datetime.datetime.now(datetime.timezone.utc).isoformat(timespec="seconds")) for ref in refs: try: repo, tag = c.split_ref(ref); host, r = c.host_repo(repo) tags = c.tags_all(host, r); res = c.newest(tags, tag) cur = c.tokenize(tag) newer = sorted([t for t in tags if (p := c.tokenize(t)) and p[0] == cur[0] and len(p[1]) == len(cur[1]) and p[1] > cur[1] and p[1][0] == cur[1][0] and not c.unstable(t)], key=lambda t: c.tokenize(t)[1]) print(f"{ref}: newest same major = {res['maj'][0] if res['maj'] else None}; newest at all = {res['all'][0] if res['all'] else None}; newer in major: {newer}") except Exception as e: print(ref, "ERR", repr(e)[:200])