scripts/ci-gate.sh: FRESH=1 silently measures a cached _build on podman 6.2 #1

Open
opened 2026-11-23 01:54:25 +00:00 by pallas · 0 comments
Member

Purpose (work): scripts/ci-gate.sh's FRESH=1 gives a genuinely empty _build, or the run fails by name, so a proof that claims "the run that counts" cannot be measuring beams compiled from other sources.

WHAT HAPPENED (2026-11-23, macula-io/macula-ci-images#19 step 1b)
FRESH=1 scripts/ci-gate.sh finished in about four minutes instead of the ten a cold build takes, and its eunit read _build/test/lib/mcl_graph/ebin/*.beam from inside the working tree, which is exactly the directory the script's own comment says it is not using. Two tests went red against code that was not the source on disk: a mutant runner had left mutated beams behind, and rebar3's mtime check saw a restored source older than the beam, so it did not recompile. A green run had been read the same way minutes earlier.

WHY
podman 6.2.0 ignores --tmpfs /src/_build:exec when that path sits inside a bind-mounted directory. On msi00, both orders of the flags:

podman run --rm -v <tree>:/src --tmpfs /src/_build:exec <image> sh -c 'ls /src/_build'
-> default test        (the tree's own directories, not an empty tmpfs)

So every FRESH=1 run on this box has measured a cached _build, silently.

THE SAME SHAPE, ONE LEVEL DOWN
A file restored after a mutation keeps an mtime older than the beam the mutant compiled, so the next run tests the previous mutant. A mutation runner must rebuild the app per mutant (delete _build/test/lib/<app>/ebin, or touch the restored file); mine does now.

ASK

  1. Make FRESH empty for real: podman volume rm -f mcl-graph-build-fresh then -v mcl-graph-build-fresh:/src/_build, or --mount type=tmpfs,destination=/src/_build if that one survives the bind mount on 6.2.
  2. A check that fails by name before anything runs:
    test -z "$(ls -A /src/_build)" || { echo "FRESH did not take: /src/_build is not empty"; exit 1; }
  3. The sibling services carry the same script (mcl-stations, mcl-mail, mcl-rag); each needs it when next touched.

Refs macula-io/macula-ci-images#19

Purpose (work): `scripts/ci-gate.sh`'s FRESH=1 gives a genuinely empty `_build`, or the run fails by name, so a proof that claims "the run that counts" cannot be measuring beams compiled from other sources. WHAT HAPPENED (2026-11-23, macula-io/macula-ci-images#19 step 1b) `FRESH=1 scripts/ci-gate.sh` finished in about four minutes instead of the ten a cold build takes, and its eunit read `_build/test/lib/mcl_graph/ebin/*.beam` from inside the working tree, which is exactly the directory the script's own comment says it is not using. Two tests went red against code that was not the source on disk: a mutant runner had left mutated beams behind, and rebar3's mtime check saw a restored source older than the beam, so it did not recompile. A green run had been read the same way minutes earlier. WHY podman 6.2.0 ignores `--tmpfs /src/_build:exec` when that path sits inside a bind-mounted directory. On msi00, both orders of the flags: podman run --rm -v <tree>:/src --tmpfs /src/_build:exec <image> sh -c 'ls /src/_build' -> default test (the tree's own directories, not an empty tmpfs) So every FRESH=1 run on this box has measured a cached `_build`, silently. THE SAME SHAPE, ONE LEVEL DOWN A file restored after a mutation keeps an mtime older than the beam the mutant compiled, so the next run tests the previous mutant. A mutation runner must rebuild the app per mutant (delete `_build/test/lib/<app>/ebin`, or `touch` the restored file); mine does now. ASK 1. Make FRESH empty for real: `podman volume rm -f mcl-graph-build-fresh` then `-v mcl-graph-build-fresh:/src/_build`, or `--mount type=tmpfs,destination=/src/_build` if that one survives the bind mount on 6.2. 2. A check that fails by name before anything runs: `test -z "$(ls -A /src/_build)" || { echo "FRESH did not take: /src/_build is not empty"; exit 1; }` 3. The sibling services carry the same script (mcl-stations, mcl-mail, mcl-rag); each needs it when next touched. Refs macula-io/macula-ci-images#19
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
macula-services/mcl-graph#1
No description provided.