Grocy and LubeLogger: two new apps, each with its complete record
gates / gates (push) Failing after 14m4s

60 template directories, 58 offered. Records: onboarding/grocy.md and
onboarding/lubelogger.md, all 61 checks answered, none open. Evidence:
felhom.eu/documentation/audits/new-apps-2026-10-10/.

Grocy 4.7.1 from lscr.io/linuxserver/grocy (grocy publishes no image of its
own). SQLite in one volume, no HDD, ~30 MiB idle, amd64 + arm64, Hungarian UI
91.6 %. First admin class 3: it starts with its documented admin/admin and
after_install replaces that password with a generated one.

LubeLogger v1.7.3 from ghcr.io/hargata/lubelogger. LiteDB in one volume, no
HDD, ~60 MiB idle, amd64 + arm64. First admin class 1 — and it has to be: the
image ships EnableAuth=false, and with that the middleware mints a ticket with
the IsRootUser role for every visitor. Measured on a default start: a stranger
got 200 on /, on /api/vehicles and on /Home/Settings and CREATED A VEHICLE.
The compose entrypoint exports EnableAuth=true and the SHA-256 of a generated
name and password, so the app's own login is on before its first byte (at t+1 s
nothing listening, at t+2 s /api/vehicles already 401).

Two defects found by the walk and fixed before publishing:

1. An after_install command may not contain `$`. The controller runs every
   element through os.Expand and refuses one naming anything outside env:, so
   PHP cannot be inlined. On 9202 the first attempt came back
   `[pw argv dsn db i t e s n q h] not declared in env or has no value — not
   run` and the app sat behind its install hold with admin/admin in place. The
   code now lives in a file the compose entrypoint writes. Written into
   REUSE.md's after_install row as a trap.

2. Grocy's persisted config.php does not follow the image. The image copies
   config-dist.php only when that file is absent, so a volume written by 4.6.0
   and started under 4.7.1 answered HTTP 500 on every page — AUTH_CLASS names a
   class 4.7 moved — while its log said migrations done. The entrypoint now
   deletes the file at every start. The 4.6.0 -> 4.7.1 edge failed before this
   and is proven after it, on both venues.

Ladders, written by upgrade-test.py --write-ladder from both verdicts:
  grocy       4.6.0 -> 4.7.1   bench proven, box proven (guarded Update, 41 s)
  lubelogger  v1.7.2 -> v1.7.3 bench proven, box proven (25.6 s)
Checklist 6.3 came from a real failure, not a forced one: before the config.php
fix the product undid the same step in 346 s with the data intact.

REUSE.md: a fifth healthcheck family (bash /dev/tcp) for an image with no HTTP
client at all, measured in both directions.

Tool fixes made on the way: check-onboarding.py crashed on a Windows console
while printing which ids were open; upgrade-test.py's read_text/write_text used
the platform encoding and wrote a cp1250 em dash into a template full of
Hungarian.
This commit is contained in:
admin committed 2026-10-10 12:31:34 +02:00
1 parent b38aa92317
commit b7f0f7cef5
16 files changed
+1190 -127

No files matched your search

+50 -50
View File
@@ -193,7 +193,7 @@ def render(app: str, images: dict, workdir: Path, env: dict, template: str = Non
Substitution is per service and only on that service's own `image:` line — never a blind
string replace, which would also rewrite an image name that appears in a comment or an env var.
"""
src = (TEMPLATES / (template or app) / "docker-compose.yml").read_text()
src = (TEMPLATES / (template or app) / "docker-compose.yml").read_text(encoding="utf-8")
out, cur = [], None
for line in src.splitlines():
m = re.match(r"^ ([A-Za-z0-9_-]+):\s*$", line)
@@ -204,7 +204,7 @@ def render(app: str, images: dict, workdir: Path, env: dict, template: str = Non
line = mi.group(1) + images[cur]
out.append(line)
workdir.mkdir(parents=True, exist_ok=True)
(workdir / "docker-compose.yml").write_text(apply_bench_overrides(app, pg_mounts_for("\n".join(out) + "\n")))
(workdir / "docker-compose.yml").write_text(apply_bench_overrides(app, pg_mounts_for("\n".join(out) + "\n")), encoding="utf-8")
write_secret_file(workdir / ".env", "".join(f"{k}={v}\n" for k, v in env.items()))
return workdir / "docker-compose.yml"
@@ -509,7 +509,7 @@ def memory_watch(app: str, project: str, workdir: Path, seconds: int, say, ev: P
scheme = "http"
if native is None and boxport is not None:
# a box-fixture app: load the container traefik routes `/` to, at its own port
rts = boxport.routes((workdir / "docker-compose.yml").read_text())
rts = boxport.routes((workdir / "docker-compose.yml").read_text(encoding="utf-8"))
root = [r for r in rts if not r[0]] or rts
if root:
cname, port = root[0][1], root[0][2]
@@ -525,7 +525,7 @@ def memory_watch(app: str, project: str, workdir: Path, seconds: int, say, ev: P
opener = urllib.request.build_opener(_NoRedirect, urllib.request.HTTPSHandler(context=ssl._create_unverified_context()))
host = None
try:
envtxt = (workdir / ".env").read_text()
envtxt = (workdir / ".env").read_text(encoding="utf-8")
sub = re.search(r"^SUBDOMAIN=(.*)$", envtxt, re.M)
dom = re.search(r"^DOMAIN=(.*)$", envtxt, re.M)
if sub and dom:
@@ -597,7 +597,7 @@ def memory_watch(app: str, project: str, workdir: Path, seconds: int, say, ev: P
"oom_kills": None if v["oom_kill"] is None else v["oom_kill"] - (b.get("oom_kill") or 0),
"restarts": (v["restarts"] or 0) - (b.get("restarts") or 0),
"oomkilled_flag": v["oomkilled_flag"], "measured": v["cgroup"]}
(ev / "memory-samples.json").write_text(json.dumps(samples, indent=2))
(ev / "memory-samples.json").write_text(json.dumps(samples, indent=2), encoding="utf-8")
killed = any((p["oom_kills"] or 0) > 0 or p["restarts"] > 0 or p["oomkilled_flag"] for p in per.values())
# DECIDED 2026-09-23 night (CC, unattended — operator may reverse; `09` §3 decision 22): the mark
# reads the APP's own memory (anon, sampled) where it was measured. memory.peak counts the file cache,
@@ -906,7 +906,7 @@ def bench_convert(conv, e, app, project, workdir, env, ev, say):
cvp._sh(["docker", "start", cid])
pg_wait(cid, user)
before = pg_check(cid, user)
(ev / "convert-check-before.txt").write_text("\n".join(before) + "\n")
(ev / "convert-check-before.txt").write_text("\n".join(before) + "\n", encoding="utf-8")
# the dump carries the app's rows and its roles' password hashes: it stays in the WORK dir (removed with the
# edge), never in the evidence that is copied off the bench and committed.
dump = workdir / "convert-dumpall.sql"
@@ -914,7 +914,7 @@ def bench_convert(conv, e, app, project, workdir, env, ev, say):
with open(dump, "w") as f:
r = subprocess.run(["docker", "exec", cid, "pg_dumpall", "-h", "127.0.0.1", "-U", user], stdout=f,
stderr=subprocess.PIPE, text=True, timeout=7200)
if r.returncode != 0 or PG_DUMPALL_DONE not in dump.read_text()[-4096:]:
if r.returncode != 0 or PG_DUMPALL_DONE not in dump.read_text(encoding="utf-8")[-4096:]:
raise RuntimeError(f"pg_dumpall rc={r.returncode} / no completion line: {r.stderr[-300:]}")
rec["dump_s"], rec["dump_bytes"] = round(time.time() - td, 2), dump.stat().st_size
vols = json.loads(cvp._sh(["docker", "inspect", cid, "--format", "{{json .Mounts}}"]).stdout or "[]")
@@ -938,16 +938,16 @@ def bench_convert(conv, e, app, project, workdir, env, ev, say):
_psql(cid2, user, "postgres", f'DROP DATABASE "{db}"')
dropped.append(db)
skip = {f"CREATE ROLE {r};" for r in _psql(cid2, user, "postgres", "select quote_ident(rolname) from pg_roles where rolname !~ '^pg_'")}
body = "".join(l for l in dump.read_text().splitlines(True) if l.rstrip("\r\n") not in skip)
body = "".join(l for l in dump.read_text(encoding="utf-8").splitlines(True) if l.rstrip("\r\n") not in skip)
tl = time.time()
r = subprocess.run(["docker", "exec", "-i", cid2, "psql", "-h", "127.0.0.1", "-U", user, "-d", "postgres",
"-v", "ON_ERROR_STOP=1", "-q"], input=body, capture_output=True, text=True, timeout=7200)
(ev / "convert-load.err").write_text(r.stderr)
(ev / "convert-load.err").write_text(r.stderr, encoding="utf-8")
if r.returncode != 0:
raise RuntimeError(f"the load stopped (rc={r.returncode}): {r.stderr.strip()[:400]}")
rec["load_s"], rec["dropped"], rec["skipped_create_role"] = round(time.time() - tl, 2), dropped, sorted(skip)
after = pg_check(cid2, user)
(ev / "convert-check-after.txt").write_text("\n".join(after) + "\n")
(ev / "convert-check-after.txt").write_text("\n".join(after) + "\n", encoding="utf-8")
if after != before:
raise RuntimeError("the check differs after the load: " + "; ".join(sorted(set(before) ^ set(after)))[:400])
ver = cvp._sh(["docker", "exec", cid2, "sh", "-c", 'cat "$PGDATA/PG_VERSION"']).stdout.strip()
@@ -970,8 +970,8 @@ def run_edge(edge_id: str) -> dict:
shutil.rmtree(workdir, ignore_errors=True)
tdir = e.get("template") or app
felhom = (TEMPLATES / tdir / ".felhom.yml").read_text()
compose_text = (TEMPLATES / tdir / "docker-compose.yml").read_text()
felhom = (TEMPLATES / tdir / ".felhom.yml").read_text(encoding="utf-8")
compose_text = (TEMPLATES / tdir / "docker-compose.yml").read_text(encoding="utf-8")
env = cvp.build_env(app, felhom, compose_text)
rec = {"harness_version": HARNESS_VERSION, "edge": edge_id, "app": app, "note": e["note"],
@@ -1037,9 +1037,9 @@ def run_edge(edge_id: str) -> dict:
return rec
files_before = bind_tree_hash(project, workdir)
(ev / "files-before.json").write_text(json.dumps(files_before, indent=2))
(ev / "files-before.json").write_text(json.dumps(files_before, indent=2), encoding="utf-8")
detail_before = bind_tree_files(project, workdir)
(ev / "files-before-detail.json").write_text(json.dumps(detail_before, indent=2))
(ev / "files-before-detail.json").write_text(json.dumps(detail_before, indent=2), encoding="utf-8")
# --- 4. TO ---
swap_at = datetime.now(timezone.utc).replace(microsecond=0).isoformat().replace("+00:00", "Z")
@@ -1061,7 +1061,7 @@ def run_edge(edge_id: str) -> dict:
rec["healthy_after"] = ok2
rec["duration_s"] = secs2
say(f"TO settled={ok2} in {secs2}s :: {json.dumps(states2)}")
(ev / "to-states.json").write_text(json.dumps(states2, indent=2))
(ev / "to-states.json").write_text(json.dumps(states2, indent=2), encoding="utf-8")
# CAPTURE THE WHOLE TO-STEP LOG *NOW*, not at the end.
# `docker compose logs` only shows the CONTAINERS THAT EXIST, and the abort below replaces
@@ -1070,17 +1070,17 @@ def run_edge(edge_id: str) -> dict:
# skipped") survived only because it had already been extracted. Same class as R-320: the
# intermediate teardown is the one that loses the evidence.
full_to = compose(workdir, project, "logs", "--no-color", timeout=180)
(ev / "to-full.log").write_text((full_to.stdout + full_to.stderr)[-400000:])
(ev / "to-full.log").write_text((full_to.stdout + full_to.stderr)[-400000:], encoding="utf-8")
rec["engine_state_after"] = engine_state(e["to"]) or None
if rec["engine_state_after"]:
for svc, st in rec["engine_state_after"].items():
say(f"engine state {svc}: {st['answer'][:180]}")
(ev / "engine-state.json").write_text(json.dumps(rec["engine_state_after"], indent=2))
(ev / "engine-state.json").write_text(json.dumps(rec["engine_state_after"], indent=2), encoding="utf-8")
mig = migration_lines(project, workdir, swap_at)
rec["migration_observed"] = mig[0] if mig else None
(ev / "migration-lines.txt").write_text("\n".join(mig))
(ev / "migration-lines.txt").write_text("\n".join(mig), encoding="utf-8")
say(f"migration lines observed: {len(mig)}")
# --- 5. THE RESULT ---
@@ -1090,11 +1090,11 @@ def run_edge(edge_id: str) -> dict:
# --- 5a. did the update rewrite the household's FILES? (decision 13's `files may change`) ---
files_after = bind_tree_hash(project, workdir)
(ev / "files-after.json").write_text(json.dumps(files_after, indent=2))
(ev / "files-after.json").write_text(json.dumps(files_after, indent=2), encoding="utf-8")
rec["files_changed"] = sorted(k for k in set(files_before) | set(files_after)
if files_before.get(k) != files_after.get(k))
detail_after = bind_tree_files(project, workdir)
(ev / "files-after-detail.json").write_text(json.dumps(detail_after, indent=2))
(ev / "files-after-detail.json").write_text(json.dumps(detail_after, indent=2), encoding="utf-8")
rec["files_changed_detail"] = changed_files(detail_before, detail_after)[:200]
counted, ignored = classify_changes(app, detail_before, detail_after)
rec["files_ignored"] = ignored[:200] # R-734: app-owned markers taken away, each with its reason
@@ -1125,12 +1125,12 @@ def run_edge(edge_id: str) -> dict:
render(app, e["frm"], workdir, env, e.get("template"))
up3 = compose(workdir, project, "up", "-d")
ok3, secs3, states3 = settle(project, workdir, wait=180)
(ev / "abort-states.json").write_text(json.dumps(states3, indent=2))
(ev / "abort-states.json").write_text(json.dumps(states3, indent=2), encoding="utf-8")
if not ok3:
rec["abort"] = "refuses"
lg = compose(workdir, project, "logs", "--tail", "40", "--no-color", timeout=120)
tail = (lg.stdout + lg.stderr).strip()
(ev / "abort-refusal.txt").write_text(tail)
(ev / "abort-refusal.txt").write_text(tail, encoding="utf-8")
rec["abort_detail"] = tail[-900:]
say(f"ABORT: the app did NOT come back (rc={up3.returncode}, {secs3}s)")
else:
@@ -1145,10 +1145,10 @@ def run_edge(edge_id: str) -> dict:
rec["total_s"] = round(time.time() - t0, 1)
# EVIDENCE FIRST, TEARDOWN SECOND (R-320): the intermediate teardown is the one that gets
# forgotten, so everything is written before a single container is removed.
(ev / "run.log").write_text("\n".join(log))
(ev / "run.log").write_text("\n".join(log), encoding="utf-8")
lg = compose(workdir, project, "logs", "--no-color", timeout=180)
(ev / "compose-final.log").write_text((lg.stdout + lg.stderr)[-400000:]) # post-abort state only — see to-full.log
(ev / "verdict.json").write_text(json.dumps(rec, indent=2))
(ev / "compose-final.log").write_text((lg.stdout + lg.stderr)[-400000:], encoding="utf-8") # post-abort state only — see to-full.log
(ev / "verdict.json").write_text(json.dumps(rec, indent=2), encoding="utf-8")
compose(workdir, project, "down", "-v", "--remove-orphans", timeout=900)
# R-624: no evidence file keeps a secret this run made, and the run's .env does not outlive it.
held = redact_tree(ev, secrets_)
@@ -1164,7 +1164,7 @@ def template_images(app: str, template_dir: Path) -> dict:
"""{service: image} of a catalog template — the per-service reading every gate makes."""
sys.path.insert(0, str(Path(__file__).resolve().parent))
import ladder
return ladder.images_in((template_dir / app / "docker-compose.yml").read_text())
return ladder.images_in((template_dir / app / "docker-compose.yml").read_text(encoding="utf-8"))
def add_move_edge(app: str, moves: list) -> str:
@@ -1192,7 +1192,7 @@ def add_definition_edge(app: str, to_dir: str) -> str:
The FROM side is still read from the catalog, never typed. --write-ladder --to-definition writes such a step."""
frm = template_images(app, TEMPLATES)
to = template_images(to_dir, TEMPLATES)
if not to or to == frm and (TEMPLATES / to_dir / "docker-compose.yml").read_text() == (TEMPLATES / app / "docker-compose.yml").read_text():
if not to or to == frm and (TEMPLATES / to_dir / "docker-compose.yml").read_text(encoding="utf-8") == (TEMPLATES / app / "docker-compose.yml").read_text(encoding="utf-8"):
raise SystemExit(f"--move-to: {to_dir} defines nothing new against {app}")
eid = f"MV-{app}"
EDGES[eid] = dict(app=app, note=f"definition step to {to_dir}", frm=frm, to=to, to_template=to_dir)
@@ -1216,7 +1216,7 @@ def add_retest_edge(app: str, services: list) -> str:
sys.path.insert(0, str(Path(__file__).resolve().parent))
import ladder, image_digest
frm = template_images(app, TEMPLATES)
entries, _, errs = ladder.parse((TEMPLATES / app / ".felhom.yml").read_text())
entries, _, errs = ladder.parse((TEMPLATES / app / ".felhom.yml").read_text(encoding="utf-8"))
if errs or not entries or entries[-1].get("to") != frm:
raise SystemExit(f"--retest {app}: the template has no ladder whose newest entry is its compose ({errs or 'no entry'})")
tested = entries[-1].get("digest") or {}
@@ -1257,8 +1257,8 @@ def write_ladder(argv) -> int:
def arg(name, default=None):
return argv[argv.index(name) + 1] if name in argv else default
bench = json.loads(Path(argv[0]).read_text())
box = json.loads(Path(arg("--box")).read_text())
bench = json.loads(Path(argv[0]).read_text(encoding="utf-8"))
box = json.loads(Path(arg("--box")).read_text(encoding="utf-8"))
cat = Path(arg("--catalog"))
app = bench["app"]
if bench.get("verdict") != "proven" or box.get("verdict") != "proven":
@@ -1270,7 +1270,7 @@ def write_ladder(argv) -> int:
return 1
tdir = cat / "templates" / app
comp_p, fy_p = tdir / "docker-compose.yml", tdir / ".felhom.yml"
comp = comp_p.read_text()
comp = comp_p.read_text(encoding="utf-8")
cur = ladder.images_in(comp)
bfrom, bto = plain_refs(bench["from"]), plain_refs(bench["to"])
retest = bfrom == bto # `09` §3 decision 52: the same tags, tested at a new digest
@@ -1330,7 +1330,7 @@ def write_ladder(argv) -> int:
if conv:
entry["engine_conversion"] = {k: conv[k] for k in ("service", "engine", "from", "to")}
if retest:
head = (ladder.parse(fy_p.read_text())[0] or [{}])[-1]
head = (ladder.parse(fy_p.read_text(encoding="utf-8"))[0] or [{}])[-1]
entry["digest_from"] = {s: (ref_digest(bench["from"][s]) or (head.get("digest") or {}).get(s)) for s in bto}
if head.get("to") != bto:
print(f"REFUSED {app}: a re-test must follow an entry that names the same refs (the head is {head.get('to')})")
@@ -1342,29 +1342,29 @@ def write_ladder(argv) -> int:
# `09` §6.4 part 5: the step being SUPERSEDED keeps its own definition. When the ladder's head is the
# compose as it stands, that compose — the head's images with every fix that flowed since — becomes
# steps/<step_key(head.to)>.yml, the file a box one step behind will pin (check-test-record.py rule 4).
prior, _, _ = ladder.parse(fy_p.read_text())
prior, _, _ = ladder.parse(fy_p.read_text(encoding="utf-8"))
if prior and prior[-1].get("to") == cur:
sp = tdir / ladder.step_file(cur)
if not sp.exists():
sp.parent.mkdir(parents=True, exist_ok=True)
sp.write_text(comp)
sp.write_text(comp, encoding="utf-8")
print(f"STEP {app}: the superseded step {cur} keeps its definition at {ladder.step_file(cur)}")
smp = tdir / ladder.step_meta_file(cur)
if not smp.exists(): # R-664: and its own .felhom.yml, without the ladder
smp.write_text(ladder.strip_ladder_block(fy_p.read_text()))
smp.write_text(ladder.strip_ladder_block(fy_p.read_text(encoding="utf-8")))
print(f"STEP {app}: … and its .felhom.yml at {ladder.step_meta_file(cur)}")
todef = arg("--to-definition")
if todef:
# R-762: a definition step (a new service): the TO compose is that definition as a whole, and its images must
# be exactly what the bench tested TO. Never a hand edit — the file the bench ran is the file written.
newc = (Path(todef) / "docker-compose.yml").read_text()
newc = (Path(todef) / "docker-compose.yml").read_text(encoding="utf-8")
if ladder.images_in(newc) != bto:
print(f"REFUSED {app}: the definition names {ladder.images_in(newc)}, the bench tested TO {bto}")
return 1
comp_p.write_text(newc)
fy = fy_p.read_text()
comp_p.write_text(newc, encoding="utf-8")
fy = fy_p.read_text(encoding="utf-8")
fy = re.sub(r'^catalog_since:.*$', 'catalog_since: "%s"' % _dt.date.today().isoformat(), fy, count=1, flags=re.M)
fy_p.write_text(ladder.append_entry(fy, entry))
fy_p.write_text(ladder.append_entry(fy, entry), encoding="utf-8")
print(f"WROTE {app}: DEFINITION STEP {bfrom} -> {bto} peak {peak}% marks {entry['marks']}")
return 0
# move the compose, per service, on that service's own image: line
@@ -1377,14 +1377,14 @@ def write_ladder(argv) -> int:
if mi and svc in bto and mi.group(2) == bfrom[svc]:
line = mi.group(1) + bto[svc]
out.append(line)
comp_p.write_text(pg_mounts_for("\n".join(out) + "\n") if conv else "\n".join(out) + "\n")
if ladder.images_in(comp_p.read_text()) != bto:
comp_p.write_text(comp)
comp_p.write_text(pg_mounts_for("\n".join(out) + "\n") if conv else "\n".join(out) + "\n", encoding="utf-8")
if ladder.images_in(comp_p.read_text(encoding="utf-8")) != bto:
comp_p.write_text(comp, encoding="utf-8")
print(f"REFUSED {app}: the compose could not be moved line by line — restored")
return 1
fy = fy_p.read_text()
fy = fy_p.read_text(encoding="utf-8")
fy = re.sub(r'^catalog_since:.*$', 'catalog_since: "%s"' % _dt.date.today().isoformat(), fy, count=1, flags=re.M)
fy_p.write_text(ladder.append_entry(fy, entry))
fy_p.write_text(ladder.append_entry(fy, entry), encoding="utf-8")
print(f"WROTE {app}: {'RE-TEST ' if retest else ''}{bfrom} -> {bto} peak {peak}% marks {entry['marks']}"
+ (f" digest {entry['digest_from']} -> {digests}" if retest else ""))
return 0
@@ -1405,7 +1405,7 @@ def write_restep(argv) -> int:
def arg(name, default=None):
return argv[argv.index(name) + 1] if name in argv else default
bench = json.loads(Path(argv[0]).read_text())
bench = json.loads(Path(argv[0]).read_text(encoding="utf-8"))
dfn, cat, evid = Path(arg("--definition")), Path(arg("--catalog")), arg("--evidence")
app = bench["app"]
if bench.get("verdict") != "proven" or not bench.get("memory") or (bench.get("harness_version") or 0) < 2:
@@ -1416,7 +1416,7 @@ def write_restep(argv) -> int:
print(f"REFUSED {app}: the memory watch saw OOM kills in {kills}")
return 1
tdir = cat / "templates" / app
entries, _, errs = ladder.parse((tdir / ".felhom.yml").read_text())
entries, _, errs = ladder.parse((tdir / ".felhom.yml").read_text(encoding="utf-8"))
idx = [i for i, e in enumerate(entries or []) if e.get("from") == bench["from"] and e.get("to") == bench["to"]]
if not idx:
print(f"REFUSED {app}: no ladder entry is {bench['from']} -> {bench['to']}")
@@ -1425,7 +1425,7 @@ def write_restep(argv) -> int:
print(f"REFUSED {app}: that entry is the HEAD — its definition is the compose (use --write-ladder)")
return 1
e = entries[idx[-1]]
comp = (dfn / "docker-compose.yml").read_text()
comp = (dfn / "docker-compose.yml").read_text(encoding="utf-8")
if ladder.images_in(comp) != e["to"]:
print(f"REFUSED {app}: the definition names {ladder.images_in(comp)}, the step is {e['to']}")
return 1
@@ -1435,8 +1435,8 @@ def write_restep(argv) -> int:
return 1
head = (f"# RE-PROVEN {_dt.date.today().isoformat()} on the bench on THIS definition (upgrade-test.py --restep): "
f"{evid} — definition sha256 {hashlib.sha256(comp.encode()).hexdigest()[:16]}\n")
sp.write_text(head + comp)
smp.write_text(head + ladder.strip_ladder_block((dfn / ".felhom.yml").read_text()))
sp.write_text(head + comp, encoding="utf-8")
smp.write_text(head + ladder.strip_ladder_block((dfn / ".felhom.yml").read_text(encoding="utf-8")))
peaks = {n: c.get("anon_peak_pct") for n, c in (bench["memory"].get("containers") or {}).items()}
print(f"RESTEP {app}: {ladder.step_file(e['to'])} and its .felhom.yml rewritten from {dfn} (anon peaks {peaks})")
return 0
@@ -1470,7 +1470,7 @@ def main(argv):
rec = run_edge(edge_id)
results.append(rec)
print(json.dumps(rec, indent=2), flush=True)
(EVIDENCE / "summary.json").write_text(json.dumps(results, indent=2))
(EVIDENCE / "summary.json").write_text(json.dumps(results, indent=2), encoding="utf-8")
return 0