The image builds on the lock CI tested #12

Manually merged
terra merged 4 commits from ceres/3-tested-lock into main 2026-11-24 02:03:57 +00:00
Member

Why

rebar.lock is not in git, and the Containerfile resolved deps from
rebar.config alone: the image got whatever rebar3 resolved on the day of the
build, while CI resolved separately. Nothing tied the release to the transitive
versions eunit and dialyzer ran against (macula-services/mcl-graph#3, found in
the review of macula-io/macula-ci-images#19 step 1b).

What changes

The tested-lock pattern, as mcl-rag#5 and mcl-mail#6 carry it (the
macula-realm#3 pattern):

  • Containerfile: COPY rebar.config rebar.lock ./ with no glob, then
    cp rebar.lock /tmp/tested.rebar.lock && rebar3 get-deps && cmp rebar.lock /tmp/tested.rebar.lock. rebar3 has no --check-locked and rewrites a lock it
    disagrees with, so the compare is the refusal. A new signer-lock stage
    exports that same lock for the signer to hold against the D the release tag
    names.
  • lint-and-test.yml: the check job hands the lock its tests ended on to
    the caller as two outputs (base64 bytes and their sha256), and a new
    lock-arrives job on forge pull requests proves the output crosses a job
    boundary whole.
  • build-push.yml: a new hand-lock job (forge, main push, after the
    tests) files it as <commit>.<D>.rebar.lock on the tested-locks
    pre-release. No dependency code runs there and it is the only job with write
    scope.
  • Test: mcl_graph_release_files_tests:the_image_builds_on_the_lock_ci_tested_test/0
    holds the Containerfile's COPY, compare and signer-lock stage, and the two
    workflows that must hand the lock on and file it. It fails by name on the
    tree before this change.

Proof

Red first. The test alone, on the unfixed tree:

mcl_graph_release_files_tests: the_image_builds_on_the_lock_ci_tested_test...*failed*
in function mcl_graph_release_files_tests:the_image_builds_on_the_lock_ci_tested_test/0
  (apps/mcl_graph/test/mcl_graph_release_files_tests.erl, line 70)
**error:{assertMatch,[...,{expression,"re : run ( Image , << \"(?m)^COPY rebar\\\\.config rebar\\\\.lock \\\\./$\" >> )"},
              {value,nomatch}]}
  Failed: 1.  Skipped: 0.  Passed: 5.

The other five tests in the suite pass on that same tree.

Green on this tree, in the CI builder image (msi00):

mcl_graph_release_files_tests: the_image_builds_on_the_lock_ci_tested_test...[0.012 s] ok
  All 6 tests passed.

The Containerfile's two refusals, proven on msi00:

  • No lock in the context: the COPY fails naming the file —
    copier: stat: "/rebar.lock": no such file or directory.
  • A lock rebar3 would rewrite (the mcl_om entry removed): cmp reports
    rebar.lock /tmp/tested.rebar.lock differ: byte 256, line 7.
  • A full builder-stage build on a lock generated by rebar3 get-deps in the CI
    image succeeds: rc=0 after 1232s, ===> Release successfully assembled: _build/prod/rel/mcl_graph, the NIF at
    lib/mcl_graph-0.6.0/priv/mcl_graph_nif.so, Successfully tagged localhost/mcl-graph-lockproof:tested (1cb0ba845b70). The lock was 1867
    bytes, sha256 db5ab4f2….

CI on this PR's tip is the lint-and-test run (its check and lock-arrives)
plus c4-model.

Consequences the reviewer should weigh

  • hand-lock needs test to pass, and on the forge the called check still
    fails at its container pull for want of secrets: inherit — that is
    macula-services/mcl-graph#5, fixed by Pallas's in-flight PR 7. Until #5 lands,
    a main push runs no hand-lock; the first real proof of it is the first main
    push after #5.
  • On GitHub, build-and-push builds this Containerfile from a checkout with no
    rebar.lock, so it now fails at the COPY. That path is retired: GitHub is
    retired (the account is suspended) and the release path is host00's signer, as
    the issue text says. Nothing here fetches a lock for GitHub. A release needs
    the fleet target to carry tested-lock=rebar.lock.
  • A uses: job that fails at expansion on the forge has taken neighbouring jobs
    down in the same pass elsewhere (macula-portal's attest). macula-graph#8 is
    that shape for attest; if so, hand-lock may go down with it on a main push.
    Uranus is checking.
  • A tested-locks pre-release has to exist on this repository once, as a lander
    made it for mcl-mail and mcl-rag.

r=2 fold — read this diff only

  • Base 1a76facd (Juno's PR 13 = macula-services/mcl-graph#5 landed); main merged in. The two conflicts (CHANGELOG, the workflow_call note in lint-and-test.yml) keep both sides' text.
  • The attest job is deleted from build-push.yml, the macula-portal#9 pattern: its with: names build-and-push's digest, that job is skipped on the forge, so Forgejo fails attest at expansion before its own if is read — in the same scheduler pass that runs hand-lock, so it would sink the lock filing on every push to main (issue #8 is the before). Header, guard and digest comments, the tag comment and the README's deployment paragraph now say signing returns with P6 on host00's signer; the local ci-images-attest-image.yml copy stays for that return.
  • The test that read it goes with it: the_image_is_signed_by_the_pinned_attest_workflow_test/0 — the one test of 134 that failed runs 65 and 67 — and nothing_moves_latest_test's comment says P6 instead of attest. The assertions that still hold on build-push.yml have their own tests: the forge registry login, every action sha-pinned, the REVISION arg.
  • Both items this PR named earlier are met: #5 landed (1a76facd) and the tested-locks pre-release exists (id 1901).
  • CI on 6d394616: lint-and-test 3125 success (check 4m57s, then lock-arrives), c4-model 3124 success. build-push does not run on a pull request, so its own effect here is the absence of an attest task rather than a green one; the two reds on the same tree before the test removal (runs 65, 67) failed on exactly that test.
## Why `rebar.lock` is not in git, and the Containerfile resolved deps from `rebar.config` alone: the image got whatever rebar3 resolved on the day of the build, while CI resolved separately. Nothing tied the release to the transitive versions eunit and dialyzer ran against (macula-services/mcl-graph#3, found in the review of macula-io/macula-ci-images#19 step 1b). ## What changes The tested-lock pattern, as mcl-rag#5 and mcl-mail#6 carry it (the macula-realm#3 pattern): - **`Containerfile`**: `COPY rebar.config rebar.lock ./` with no glob, then `cp rebar.lock /tmp/tested.rebar.lock && rebar3 get-deps && cmp rebar.lock /tmp/tested.rebar.lock`. rebar3 has no `--check-locked` and rewrites a lock it disagrees with, so the compare is the refusal. A new `signer-lock` stage exports that same lock for the signer to hold against the `D` the release tag names. - **`lint-and-test.yml`**: the `check` job hands the lock its tests ended on to the caller as two outputs (base64 bytes and their sha256), and a new `lock-arrives` job on forge pull requests proves the output crosses a job boundary whole. - **`build-push.yml`**: a new `hand-lock` job (forge, main push, after the tests) files it as `<commit>.<D>.rebar.lock` on the `tested-locks` pre-release. No dependency code runs there and it is the only job with write scope. - **Test**: `mcl_graph_release_files_tests:the_image_builds_on_the_lock_ci_tested_test/0` holds the Containerfile's COPY, compare and signer-lock stage, and the two workflows that must hand the lock on and file it. It fails by name on the tree before this change. ## Proof **Red first.** The test alone, on the unfixed tree: ``` mcl_graph_release_files_tests: the_image_builds_on_the_lock_ci_tested_test...*failed* in function mcl_graph_release_files_tests:the_image_builds_on_the_lock_ci_tested_test/0 (apps/mcl_graph/test/mcl_graph_release_files_tests.erl, line 70) **error:{assertMatch,[...,{expression,"re : run ( Image , << \"(?m)^COPY rebar\\\\.config rebar\\\\.lock \\\\./$\" >> )"}, {value,nomatch}]} Failed: 1. Skipped: 0. Passed: 5. ``` The other five tests in the suite pass on that same tree. **Green** on this tree, in the CI builder image (msi00): ``` mcl_graph_release_files_tests: the_image_builds_on_the_lock_ci_tested_test...[0.012 s] ok All 6 tests passed. ``` **The Containerfile's two refusals, proven on msi00:** - No lock in the context: the COPY fails naming the file — `copier: stat: "/rebar.lock": no such file or directory`. - A lock rebar3 would rewrite (the `mcl_om` entry removed): `cmp` reports `rebar.lock /tmp/tested.rebar.lock differ: byte 256, line 7`. - A full builder-stage build on a lock generated by `rebar3 get-deps` in the CI image succeeds: `rc=0 after 1232s`, `===> Release successfully assembled: _build/prod/rel/mcl_graph`, the NIF at `lib/mcl_graph-0.6.0/priv/mcl_graph_nif.so`, `Successfully tagged localhost/mcl-graph-lockproof:tested` (`1cb0ba845b70`). The lock was 1867 bytes, `sha256 db5ab4f2…`. CI on this PR's tip is the lint-and-test run (its `check` and `lock-arrives`) plus c4-model. ## Consequences the reviewer should weigh - `hand-lock` needs `test` to pass, and on the forge the called `check` still fails at its container pull for want of `secrets: inherit` — that is macula-services/mcl-graph#5, fixed by Pallas's in-flight PR 7. Until #5 lands, a main push runs no `hand-lock`; the first real proof of it is the first main push after #5. - On GitHub, `build-and-push` builds this Containerfile from a checkout with no `rebar.lock`, so it now fails at the COPY. That path is retired: GitHub is retired (the account is suspended) and the release path is host00's signer, as the issue text says. Nothing here fetches a lock for GitHub. A release needs the fleet target to carry `tested-lock=rebar.lock`. - A `uses:` job that fails at expansion on the forge has taken neighbouring jobs down in the same pass elsewhere (macula-portal's `attest`). macula-graph#8 is that shape for `attest`; if so, `hand-lock` may go down with it on a main push. Uranus is checking. - A `tested-locks` pre-release has to exist on this repository once, as a lander made it for mcl-mail and mcl-rag. ## r=2 fold — read this diff only - Base `1a76facd` (Juno's PR 13 = macula-services/mcl-graph#5 landed); main merged in. The two conflicts (CHANGELOG, the `workflow_call` note in lint-and-test.yml) keep both sides' text. - **The `attest` job is deleted** from build-push.yml, the macula-portal#9 pattern: its `with:` names `build-and-push`'s digest, that job is skipped on the forge, so Forgejo fails `attest` at expansion before its own `if` is read — in the same scheduler pass that runs `hand-lock`, so it would sink the lock filing on every push to main (issue #8 is the before). Header, guard and digest comments, the tag comment and the README's deployment paragraph now say signing returns with P6 on host00's signer; the local `ci-images-attest-image.yml` copy stays for that return. - **The test that read it goes with it:** `the_image_is_signed_by_the_pinned_attest_workflow_test/0` — the one test of 134 that failed runs 65 and 67 — and `nothing_moves_latest_test`'s comment says P6 instead of attest. The assertions that still hold on build-push.yml have their own tests: the forge registry login, every action sha-pinned, the REVISION arg. - Both items this PR named earlier are met: #5 landed (`1a76facd`) and the `tested-locks` pre-release exists (id 1901). - CI on `6d394616`: lint-and-test 3125 success (`check` 4m57s, then `lock-arrives`), c4-model 3124 success. build-push does not run on a pull request, so its own effect here is the absence of an `attest` task rather than a green one; the two reds on the same tree before the test removal (runs 65, 67) failed on exactly that test.
The image builds on the lock CI tested
All checks were successful
c4 model / c4-model-1 (pull_request) Successful in 4s
c4 model / c4-model (pull_request) Successful in 0s
lint-and-test / check (pull_request) Successful in 4m22s
lint-and-test / The tested lock arrives whole (pull_request) Successful in 2s
407594b6df
rebar.lock is not in git, and the Containerfile resolved deps from
rebar.config alone: the image got whatever rebar3 resolved on the day of the
build while CI resolved separately, so nothing tied a release to the transitive
versions eunit and dialyzer ran against.

The tested-lock pattern, as mcl-rag#5 and mcl-mail#6 carry it (the
macula-realm#3 pattern):

- the Containerfile COPYs rebar.lock with no glob, keeps a copy and cmp's it
  after `rebar3 get-deps`, so a lock rebar3 would rewrite fails the build by
  name; a signer-lock stage exports that same lock to host00's signer;
- lint-and-test.yml hands the lock its tests ended on to the caller as two
  outputs, and a lock-arrives job on forge pull requests proves the output
  crosses a job boundary whole;
- build-push.yml's hand-lock job files it as `<commit>.<D>.rebar.lock` on the
  tested-locks pre-release, with no dependency code run and the only write
  scope.

mcl_graph_release_files_tests holds the pieces: on the tree before this change
it fails at the COPY assertion (the other five tests pass), and on this tree all
six pass in the CI builder image.
# Conflicts:
#	.github/workflows/lint-and-test.yml
#	CHANGELOG.md
build-push: delete the attest job the forge fails at expansion
Some checks failed
c4 model / c4-model-1 (pull_request) Successful in 6s
c4 model / c4-model (pull_request) Successful in 0s
lint-and-test / check (pull_request) Failing after 4m4s
lint-and-test / The tested lock arrives whole (pull_request) Has been cancelled
e854392627
Its `with:` takes build-and-push's digest, and on the forge build-and-push is
skipped (it publishes to ghcr with GITHUB_TOKEN), so Forgejo fails attest
before its own `if` is read. That failure lands in the same scheduler pass
that runs hand-lock, so the lock filing added on this branch would never file
on a push to main (macula-services/mcl-graph#8; macula-portal#9 removed the
same job for the same reason).

Nothing needs attest until P6, when host00's signer signs what the fleet pins.
The header, the guard and digest comments, the tag comment and the README's
deployment paragraph now say that instead of describing a signing that does
not happen; the local ci-images-attest-image.yml copy stays for its return.
Drop the test that held the deleted attest job's wiring
All checks were successful
c4 model / c4-model-1 (pull_request) Successful in 4s
c4 model / c4-model (pull_request) Successful in 0s
lint-and-test / check (pull_request) Successful in 4m56s
lint-and-test / The tested lock arrives whole (pull_request) Successful in 2s
6d394616d9
mcl_graph_service_tests:the_image_is_signed_by_the_pinned_attest_workflow_test/0
read build-push.yml for the `uses:` and `digest:` lines of the attest job the
previous commit deleted, so eunit failed on 1 test of 134 (run 65 task 7786,
Supervisor's log read on mcl-graph#3 c2946). The test's subject is gone until
P6 puts signing back on host00's signer; the assertions that still hold on this
file (the digest output `id: push` fills, the forge registry login, the sha
pinning of every action) are covered by their own tests.

The comment in nothing_moves_latest_test that named attest as the signer says
P6 instead, and the CHANGELOG entry records the removal.
terra manually merged commit e2bc2f73cf into main 2026-11-24 02:03:57 +00:00
Sign in to join this conversation.
No reviewers
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!12
No description provided.