build-push: the test gate inherits the pull token, so the called check runs on the forge (mcl-graph#5) #13

Manually merged
terra merged 3 commits from juno/5-call-inherit into main 2026-11-24 01:27:21 +00:00
Member

Refs macula-services/mcl-graph#5.

Purpose (defect): the build-push gate on the forge reports the called check as failed at its container pull, so every push to main is red at the gate instead of showing what the tests did.

Carries Pallas's two commits (8ee80f2, 91ca9a7) and merges current main b92e7c1, so the diff against main is her three files: build-push.yml (secrets: inherit on the test: job only, with the reason written at both files), lint-and-test.yml (the note that nothing may be declared under on.workflow_call on this forge), and the changelog entry. Terra PASSed the same content at r=0 on 91ca9a7.

Proof on the call path itself, without landing. build-push.yml carries workflow_dispatch, and no job on this path keys on the event except the two GitHub-gated ones (guard, build-and-push), which skip on the forge either way. Dispatched build-push.yml on this branch — run 3087 (#58):

  • check (the called job) success: it pulled its container and ran the suite, about five minutes;
  • test (the call) success; guard success; guard-1 and build-and-push skipped;
  • against run 18 (#2286) on 3fef4ea: check and test both failure, check dead in one second at job setup, "failed to handle credentials: password is empty".

What this PR does not fix, stated rather than hidden: run 3087's run-level status is still failure while every task it has is success or skipped. attest never starts, because its needs: build-and-push is skipped on the forge. That predates this change — the issue's own run 18 table says "attest never started" — and it is the only red left; it is not the gate this PR is about.

Exposure. inherit hands the called workflow the repository's secrets. That called file has one job, all shell, no marketplace action, and touches secrets only at container.credentials for the read-only pull account, so it reaches nothing a standalone run of the same file in this repository does not already reach. This forge accepts no secrets: block under on.workflow_call (its own pre-execution error, quoted in the file), so a named mapping is not available to narrow it further; actionlint refuses the caller-side mapping form.

Refs macula-services/mcl-graph#5. Purpose (defect): the build-push gate on the forge reports the called check as failed at its container pull, so every push to main is red at the gate instead of showing what the tests did. Carries Pallas's two commits (`8ee80f2`, `91ca9a7`) and merges current main `b92e7c1`, so the diff against main is her three files: `build-push.yml` (`secrets: inherit` on the `test:` job only, with the reason written at both files), `lint-and-test.yml` (the note that nothing may be declared under `on.workflow_call` on this forge), and the changelog entry. Terra PASSed the same content at r=0 on `91ca9a7`. **Proof on the call path itself, without landing.** `build-push.yml` carries `workflow_dispatch`, and no job on this path keys on the event except the two GitHub-gated ones (`guard`, `build-and-push`), which skip on the forge either way. Dispatched `build-push.yml` on this branch — run 3087 (#58): - `check` (the called job) **success**: it pulled its container and ran the suite, about five minutes; - `test` (the call) **success**; `guard` success; `guard-1` and `build-and-push` skipped; - against run 18 (#2286) on `3fef4ea`: `check` and `test` both failure, `check` dead in one second at job setup, "failed to handle credentials: password is empty". **What this PR does not fix, stated rather than hidden:** run 3087's run-level status is still `failure` while every task it has is success or skipped. `attest` never starts, because its `needs: build-and-push` is skipped on the forge. That predates this change — the issue's own run 18 table says "attest never started" — and it is the only red left; it is not the gate this PR is about. **Exposure.** `inherit` hands the called workflow the repository's secrets. That called file has one job, all shell, no marketplace action, and touches secrets only at `container.credentials` for the read-only pull account, so it reaches nothing a standalone run of the same file in this repository does not already reach. This forge accepts no `secrets:` block under `on.workflow_call` (its own pre-execution error, quoted in the file), so a named mapping is not available to narrow it further; actionlint refuses the caller-side mapping form.
Pass the registry pull token to the lint-and-test call
Some checks failed
build-and-push / guard-1 (push) Has been skipped
build-and-push / guard (push) Successful in 0s
build-and-push / build-and-push (push) Has been skipped
build-and-push / attest (push) Failing after 0s
build-and-push / check (push) Successful in 5m45s
build-and-push / test (push) Successful in 0s
lint-and-test.yml / Pass the registry pull token to the lint-and-test call (push) Failing after 0s
8ee80f237f
A called workflow gets none of the caller's secrets unless they are passed and
declared. build-push's `test` job calls this repository's lint-and-test.yml for
its gate, and the called check pulls its CI image from the forge registry with
secrets.CI_IMAGE_PULL_TOKEN: that resolved empty, so the job stopped before its
first step — the log of task 4639 reads "failed to handle credentials: password
is empty" — and every push to main has been red at that gate (run 18 = 2286 on
3fef4ea; earlier 901, 904-913), while the standalone lint-and-test run on the
same commit was green.

The repository variables do cross the call: the same message names no missing
user. So only the one secret is passed, from build-push's `test` job, and
declared under lint-and-test's on.workflow_call.

Refs macula-services/mcl-graph#5
Inherit the secrets at the call: this forge forbids secrets under workflow_call
Some checks failed
build-and-push / guard-1 (push) Has been skipped
build-and-push / test (push) Successful in 0s
build-and-push / guard (push) Successful in 0s
c4 model / c4-model (pull_request) Successful in 0s
c4 model / c4-model-1 (pull_request) Successful in 3s
lint-and-test / check (pull_request) Successful in 5m17s
build-and-push / build-and-push (push) Has been skipped
build-and-push / check (push) Successful in 7m48s
build-and-push / attest (push) Failing after 0s
91ca9a7c32
Completes the fix above. A named mapping at the caller is refused, because
Forgejo 15 accepts only `inputs` and `outputs` under on.workflow_call: the
callee cannot declare the secret, and actionlint refuses a caller naming an
undeclared one. Worse, an `on.workflow_call.secrets` block does not merely fail
to declare anything — it makes the whole file invalid, and the forge's own
pre-execution error says why:

  invalid value on key "workflow_call": workflow_call only supports keys
  "inputs" and "outputs", but key "secrets" was found

and an invalid file is then run against every ref it is pushed to (four such
runs, 2327/2328/2330/2331, all failed at preparation).

So the `test` job's call passes `secrets: inherit` — no declaration on either
side, same-repository call into this repository's own lint workflow — and
lint-and-test's `workflow_call` records the trap so nobody re-adds it.

Refs macula-services/mcl-graph#5
Merge main b92e7c1 into juno/5-call-inherit (mcl-graph#5)
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 4m43s
99b14b9bbe
terra manually merged commit 1a76facdb0 into main 2026-11-24 01:27:21 +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!13
No description provided.