The tested resolve for host00's signer, and 0.11.0 #5

Manually merged
terra merged 5 commits from ceres/19-rag-cutover-deploy into main 2026-11-23 22:45:27 +00:00
Member

Purpose (change): mcl-rag can be released on the forge the way mcl-mail is — a tested lock handed to host00's signer, a signer-lock stage to export it, and 0.11.0 as the release that carries the SQLite store (macula-io/macula-ci-images#19 step 2).

Two commits:

  1. The tested resolve (the macula-realm#3 pattern, as mcl-mail#6). rebar.lock leaves git and joins .gitignore, because the signer refuses a signed tree that carries its own lock. lint.yml resolves once (rebar3 get-deps) so the hash gate and every suite after it run on that resolve, and hands the lock on as two workflow_call outputs (base64 bytes, sha256 D). A new lock-arrives job decodes them on every pull request and goes red unless they hash to D. build-push.yml gains hand-lock: on a forge push to main, after the tests, it files <commit>.<D>.rebar.lock on the tested-locks pre-release, running no dependency code. The Containerfile COPYs rebar.lock with no glob and cmps it after rebar3 get-deps, so a rewrite is the refusal, and gains FROM scratch AS signer-lock holding the lock the release was assembled on.
  2. Release 0.11.0: the seven apps, the relx release version and the changelog's Unreleased section (the SQLite store, the cutover import, the reverse export). 0.11.0 rather than 0.10.3 because the data dir changes shape and a first start on an old volume is refused by name until the export is beside it.

The tested-locks pre-release on this repository is a lander's act after this lands (mcl-mail#6's shape). No tag here: the release tag names D and is cut once this is on main.

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

Purpose (change): mcl-rag can be released on the forge the way mcl-mail is — a tested lock handed to host00's signer, a `signer-lock` stage to export it, and 0.11.0 as the release that carries the SQLite store (macula-io/macula-ci-images#19 step 2). Two commits: 1. **The tested resolve** (the macula-realm#3 pattern, as mcl-mail#6). rebar.lock leaves git and joins .gitignore, because the signer refuses a signed tree that carries its own lock. `lint.yml` resolves once (`rebar3 get-deps`) so the hash gate and every suite after it run on that resolve, and hands the lock on as two `workflow_call` outputs (base64 bytes, sha256 D). A new `lock-arrives` job decodes them on every pull request and goes red unless they hash to D. `build-push.yml` gains `hand-lock`: on a forge push to main, after the tests, it files `<commit>.<D>.rebar.lock` on the `tested-locks` pre-release, running no dependency code. The Containerfile COPYs rebar.lock with no glob and `cmp`s it after `rebar3 get-deps`, so a rewrite is the refusal, and gains `FROM scratch AS signer-lock` holding the lock the release was assembled on. 2. **Release 0.11.0**: the seven apps, the relx release version and the changelog's Unreleased section (the SQLite store, the cutover import, the reverse export). 0.11.0 rather than 0.10.3 because the data dir changes shape and a first start on an old volume is refused by name until the export is beside it. The `tested-locks` pre-release on this repository is a lander's act after this lands (mcl-mail#6's shape). No tag here: the release tag names D and is cut once this is on main. Refs macula-io/macula-ci-images#19
macula-io/macula-ci-images#19 step 2. The release path on the forge builds a
signed image on host00's signer, and the signer refuses a tree that carries its
own lock: it builds on the lock the CI tested, fetched by name from the
repository's `tested-locks` pre-release (the macula-realm#3 pattern, as
mcl-mail#6). So:

- rebar.lock leaves git and joins .gitignore. A signed tree holding it is
  refused, and the lock the image is built on must be the bytes the tests ran
  on, not whatever a fresh resolve picks on the day.
- lint.yml resolves once (`rebar3 get-deps`), so the hash gate below it and
  every suite after it run on that resolve, and hands the lock on as two
  outputs: the bytes (base64) and D, their sha256. A new `lock-arrives` job
  proves on every pull request that the bytes crossing workflow_call decode to
  the digest the check job printed.
- build-push.yml gains `hand-lock`: on a push to main on the forge, after the
  tests passed, it files `<commit>.<D>.rebar.lock` on the `tested-locks`
  pre-release with the run's own token. It runs no dependency code: one shell
  step, no checkout, no rebar3.
- The Containerfile COPYs rebar.lock with no glob, keeps the handed file across
  `rebar3 get-deps`, and `cmp` is the refusal of a rewrite: rebar3 has no
  --check-locked and silently rewrites a lock it disagrees with. It also gains
  the `signer-lock` stage the signer builds alone (`--target signer-lock`) to
  export the lock the release was assembled on.

No behaviours change: the image and the release are the same code, built on a
lock that is now proved rather than assumed.

Refs macula-io/macula-ci-images#19
Release 0.11.0: the SQLite store, and the forge release path it is built on
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 8m18s
lint-and-test / The tested lock arrives whole (pull_request) Successful in 2s
80968337b7
The release, its seven apps and rebar.config's relx version all say 0.11.0, as
the bump for 0.10.2 did. The changelog's Unreleased section becomes 0.11.0: the
store moves from barrel's RocksDB docdb and vectordb to one SQLite file through
the Rust NIF `mcl_rag_store_nif`, with the cutover import, the count check, and
the way back's reverse export.

The release is 0.11.0 and not 0.10.3 because the data dir changes shape and a
first start on an existing volume is refused by name until the cutover export
is beside it (`{store_open_failed, {store_missing_beside_barrel, ...}}`): an
operator following the tag has to run the cutover, and a patch number would read
as "pull the image and restart".

Refs macula-io/macula-ci-images#19
build-and-push runs on the forge with every step skipped, so attest can expand
All checks were successful
c4 model / c4-model-1 (pull_request) Successful in 5s
c4 model / c4-model (pull_request) Successful in 0s
lint-and-test / check (pull_request) Successful in 7m26s
lint-and-test / The tested lock arrives whole (pull_request) Successful in 3s
4d7d553327
Forgejo failed the whole run before any job started: run 42 at 8796bcbf died
with `preExecutionError: Unable to evaluate `with` of job attest: job
build-and-push is missing output digest`. build-and-push carried
`if: github.server_url == 'https://github.com'`, so on the forge it was skipped,
its `digest` output did not exist, and attest's `with:` could not be expanded --
which took the lint child job down with the run. So no forge push to main could
ever have filed the tested lock: `hand-lock` needs that same run.

The job now runs on the forge with every step skipped by its own server_url
guard, ends with an empty digest, and attest expands -- mcl-mail's shape, whose
runs 931-944 and 2074 found the same failure. The condition is written out
because the forge's half needs !cancelled() (the guard is skipped there) and a
status function anywhere drops the implicit success(). On GitHub the gate is the
one it always was.

Refs macula-io/macula-ci-images#19
Every container job names the registry pull account, as mcl-mail's do
Some checks failed
c4 model / c4-model (pull_request) Has been cancelled
c4 model / c4-model-1 (pull_request) Has been cancelled
lint-and-test / check (pull_request) Has been cancelled
lint-and-test / The tested lock arrives whole (pull_request) Has been cancelled
8bfe2b072b
macula-ci-images#19 step 2, Mars's (a). `check` already named it; `lock-arrives`
and `hand-lock` did not, and a job container that cannot pull the pinned image
fails in the second before its first step, which is what a called job did in the
dispatched build-push run 53 (mcl-rag run 53: `check` failed 21:26:44 -> :45 on
4d7d5533 while the same file passed as its own run 52 on the same commit).

The two jobs now carry the org's read-only pull account exactly as `check` does
(`vars.CI_IMAGE_PULL_USER` / `secrets.CI_IMAGE_PULL_TOKEN`), so a job behaves the
same whether it is run or called.

Refs macula-io/macula-ci-images#19
The called lint-and-test gets the registry secret it pulls its image with
All checks were successful
c4 model / c4-model-1 (pull_request) Successful in 3s
c4 model / c4-model (pull_request) Successful in 0s
lint-and-test / check (pull_request) Successful in 12m57s
lint-and-test / The tested lock arrives whole (pull_request) Successful in 2s
168642b106
mcl-rag run 53 (`workflow_dispatch`, 4d7d5533): the called `check` failed
21:26:44 -> 21:26:45 while the same lint.yml, on its own run 52 on the same
commit, was green. mcl-graph hit the identical pair (6688/6689) and its logs
name the cause: a called workflow receives none of the caller's secrets, so the
job's container pull resolved an empty `CI_IMAGE_PULL_TOKEN` and stopped at
setup -- "failed to handle credentials: password is empty" (mcl-graph#5, #7).

The `test:` job now passes `secrets: inherit`. A named mapping is not open to
us: this forge's `on.workflow_call` accepts only `inputs` and `outputs`, and a
`secrets:` block there invalidates the whole file (mcl-graph#7). The repository
`vars` already cross the call, so the secret was the only thing missing.

Without this the landed main push could never file the tested lock: `hand-lock`
needs `test`, and `test` was failing in its child.

Refs macula-io/macula-ci-images#19, macula-services/mcl-graph#5, macula-services/mcl-graph#7
terra manually merged commit 7f622050fb into main 2026-11-23 22:45:27 +00:00
Author
Member

Purpose met on main 7f622050.

The tested lock was filed on tested-locks by main's build-push hand-lock (task 7236, success), and the release holds exactly that asset:

7f622050fb77c53c1abfc8ff8e96a9327dea9f0f.bb1ea0c50a050ed070a2efb4f1b531a825d6ceb5c1dcd970d56566bee33a5b18.rebar.lock

Every task on that tip is success or skipped, read from /actions/tasks: build-push guard success, check success, test success, build-and-push success, attest success, File the tested resolve for the signer success; lint check success, The tested lock arrives whole skipped; c4-model success.

What the Purpose asked for, on main: rebar.config declares {release, {mcl_rag, "0.11.0"}, ...}; the Containerfile COPYs rebar.lock with no glob and cmps it after rebar3 get-deps, and carries FROM scratch AS signer-lock holding the lock the release was assembled on.

No tag: 0.11.0 waits on Raf's menu (the /etc/image-signer/targets line and the mcl-rag-publisher login). This issue's work is done.

Purpose met on main `7f622050`. The tested lock was filed on `tested-locks` by main's build-push `hand-lock` (task 7236, success), and the release holds exactly that asset: ``` 7f622050fb77c53c1abfc8ff8e96a9327dea9f0f.bb1ea0c50a050ed070a2efb4f1b531a825d6ceb5c1dcd970d56566bee33a5b18.rebar.lock ``` Every task on that tip is success or skipped, read from `/actions/tasks`: build-push `guard` success, `check` success, `test` success, `build-and-push` success, `attest` success, `File the tested resolve for the signer` success; lint `check` success, `The tested lock arrives whole` skipped; c4-model success. What the Purpose asked for, on main: `rebar.config` declares `{release, {mcl_rag, "0.11.0"}, ...}`; the Containerfile COPYs `rebar.lock` with no glob and `cmp`s it after `rebar3 get-deps`, and carries `FROM scratch AS signer-lock` holding the lock the release was assembled on. No tag: 0.11.0 waits on Raf's menu (the `/etc/image-signer/targets` line and the `mcl-rag-publisher` login). This issue's work is done.
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-rag!5
No description provided.