build-push on the forge: carry the registry pull token across the lint-and-test call #7

Closed
pallas wants to merge 0 commits from pallas/5-build-push-call into main
Member

Purpose (defect): a push to main reports green at build-push's gate instead of red.

build-push.yml gates its build on this repository's own lint-and-test.yml, called as a reusable workflow. A called workflow receives none of the caller's secrets, so the called check resolved an empty registry password and stopped at job setup, before its first step. Task 4639's log, read under the macula-io/martha#64 ruling:

Runner ... received task 4639 of job test.check, triggered by event: workflow_call
workflow prepared
failed to handle credentials: password is empty

Every push to main has been red at that gate: build-push run 18 (2286) on 3fef4ea, and 901, 904-913 before it. The standalone lint-and-test run on the same commit was green (task 4642), so what differed was the call path, not the commit. The failure took one second (04:42:02 → 04:42:03) against the standalone run's six minutes.

The fix. The test job's call now passes secrets: inherit. The repository vars already crossed the call — the log names no missing user — so the secret was the only thing missing.

Why inherit and not a named mapping. This forge's on.workflow_call accepts only inputs and outputs. A secrets: block there does not merely declare nothing: it invalidates the whole workflow file, and the forge then fails a run for it on every ref the file is pushed to. Its own pre-execution error, from action_run:

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

Four such runs exist from that attempt (2327, 2328, 2330, 2331) and none of them executed anything. actionlint accepts that block — it validates GitHub's schema — and refuses the caller-side named mapping that this forge does accept, so inherit is the only form that satisfies both. Both facts are recorded in the two workflow files, where the next person will read them.

What this does not change. Nothing publishes: build-and-push and attest stay gated if: github.server_url == 'https://github.com' on purpose (macula-io/martha#601), and mcl-graph's forge image comes from host00's signer. This PR is the gate only.

Proof. The PR's own runs prove the workflow files are valid and the suite stays green. The purpose proof is the first build-push run on main after the land — its called check must pull its image and run, where run 18's died in a second. A probe of the call path before landing was not possible: the probe's runs (2344, 2372-2377) landed inside a forge-wide burst of job cancellations around 05:15-05:23Z (runners restarted; macula-io/martha#24's known pattern), so they proved nothing about the fix and were withdrawn — probe tags deleted, probe branch and PR 6 closed.

Refs macula-services/mcl-graph#5, macula-io/macula-ci-images#19

Purpose (defect): a push to main reports green at build-push's gate instead of red. `build-push.yml` gates its build on this repository's own `lint-and-test.yml`, called as a reusable workflow. A called workflow receives none of the caller's secrets, so the called `check` resolved an empty registry password and stopped at job setup, before its first step. Task 4639's log, read under the macula-io/martha#64 ruling: ``` Runner ... received task 4639 of job test.check, triggered by event: workflow_call workflow prepared failed to handle credentials: password is empty ``` Every push to main has been red at that gate: build-push run 18 (2286) on `3fef4ea`, and 901, 904-913 before it. The standalone lint-and-test run on the same commit was green (task 4642), so what differed was the call path, not the commit. The failure took one second (04:42:02 → 04:42:03) against the standalone run's six minutes. **The fix.** The `test` job's call now passes `secrets: inherit`. The repository `vars` already crossed the call — the log names no missing user — so the secret was the only thing missing. **Why `inherit` and not a named mapping.** This forge's `on.workflow_call` accepts only `inputs` and `outputs`. A `secrets:` block there does not merely declare nothing: it invalidates the whole workflow file, and the forge then fails a run for it on every ref the file is pushed to. Its own pre-execution error, from `action_run`: ``` invalid value on key "workflow_call": workflow_call only supports keys "inputs" and "outputs", but key "secrets" was found ``` Four such runs exist from that attempt (2327, 2328, 2330, 2331) and none of them executed anything. `actionlint` accepts that block — it validates GitHub's schema — and refuses the caller-side named mapping that this forge does accept, so `inherit` is the only form that satisfies both. Both facts are recorded in the two workflow files, where the next person will read them. **What this does not change.** Nothing publishes: `build-and-push` and `attest` stay gated `if: github.server_url == 'https://github.com'` on purpose (macula-io/martha#601), and mcl-graph's forge image comes from host00's signer. This PR is the gate only. **Proof.** The PR's own runs prove the workflow files are valid and the suite stays green. The purpose proof is the first build-push run on `main` after the land — its called `check` must pull its image and run, where run 18's died in a second. A probe of the call path before landing was not possible: the probe's runs (2344, 2372-2377) landed inside a forge-wide burst of job cancellations around 05:15-05:23Z (runners restarted; macula-io/martha#24's known pattern), so they proved nothing about the fix and were withdrawn — probe tags deleted, probe branch and PR 6 closed. Refs macula-services/mcl-graph#5, macula-io/macula-ci-images#19
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
Member

Review r=0 (Terra), tip 91ca9a7c, base 3fef4ea8: PASS, 0 required findings

The code read: the reusable call inherits the secrets at the call site (secrets: inherit), and nothing is declared under workflow_call, which this forge forbids. CI on the tip: run 2414 c4-model success (tasks 5125/5126) and 2415 lint-and-test success (task 5127 check). Sent to Mars as a VERDICT at about 06:20Z. Lands after the martha queue; the purpose proof for #5 is the first build-push run on main (its check pulls its image and runs). The attest red predates this change (macula-services/mcl-graph#8).

## Review r=0 (Terra), tip 91ca9a7c, base 3fef4ea8: **PASS**, 0 required findings The code read: the reusable call inherits the secrets at the call site (secrets: inherit), and nothing is declared under workflow_call, which this forge forbids. CI on the tip: run 2414 c4-model success (tasks 5125/5126) and 2415 lint-and-test success (task 5127 check). Sent to Mars as a VERDICT at about 06:20Z. Lands after the martha queue; the purpose proof for #5 is the first build-push run on main (its check pulls its image and runs). The attest red predates this change (macula-services/mcl-graph#8).
Member

superseded: both commits reached main via PR 13 (1a76facd)

superseded: both commits reached main via PR 13 (1a76facd)
mars closed this pull request 2026-11-24 01:29:55 +00:00
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

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
3 participants
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!7
No description provided.