ci: fix Forgejo Actions on the org runner - CI has never been green on Codeberg #47
Labels
No labels
breaking
bug
documentation
enhancement
epic
good first issue
help wanted
refactoring
resolution/duplicate
resolution/invalid
resolution/wontfix
security
severity/critical
severity/high
severity/low
severity/medium
status/abandoned
status/blocked
status/needs-decision
status/needs-info
status/needs-verification
testing
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
sixfold-space/madtea#47
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Move CI/CD off the current
.forgejo/workflows/Actions setup (ci.yml + drift.yml) onto a proper Woodpecker CI pipeline — the Codeberg-native CI. Target: soon, not blocking current work.Scope:
.woodpecker/pipeline(s) covering what the Actions jobs run today — the full./scripts/gate.shcheck set (build/gofmt/vet/gofix/modtidy/hook-tests + the heavy analyzers: test-race, staticcheck, govulncheck, gosec, modernize, docs-verify, cross-compile, mcp-conformance) plus drift's surface-diff..forgejo/workflows/files once Woodpecker is green (remove, or keep drift.yml's gated forgejo-smoke if Woodpecker can't cover it).Acceptance:
./scripts/gate.shgreen locally (no check lost in translation).Reframed: the Woodpecker migration is dropped; this issue is now "make the existing Forgejo Actions setup green on our own org runner".
Why not Woodpecker / Codeberg CI
Root cause of the red (reproduced 2026-07-15)
Every Actions task in this repo's history failed - 1083 failures, 7 cancelled, 0 successes across 219 runs. Reproduced locally with
forgejo-runner exec -W .forgejo/workflows/ci.yml -j vetinside the runner VM:The JS-implemented actions (actions/checkout, actions/cache pinned from code.forgejo.org) execute
nodeINSIDE the job container, andgolang:1.26-trixieships no node. Every job dies in 3-6s at its firstuses:step. This corrects #28's Alpine/musl hypothesis: glibc did not help - no plain golang image carries node.Plan
Acceptance (revised)
Addendum to the plan: the mcp-conformance job's
apt-get install -y nodejs npmstep is itself a defect. Debian trixie's archive offers nodejs 20.19.2 + npm 9.2.0 (verified in the pinned golang:1.26-trixie image, 2026-07-15), and the project floor is Node 24.18.0 LTS - nothing may install an older runtime.Replacement: install Node from the official nodejs.org dist tarball - pinned exact version (>= 24.18.0), SHA-256 verified against the published SHASUMS256.txt, extracted to /usr/local - instead of apt. nodejs.org is reachable from the runner VM (egress ACL is public-internet-only; confirmed with a 200 from the job network path). npm ships inside the Node tarball, which also retires the ancient apt npm 9.
Acceptance addition: no workflow step installs Node < 24.18.0 or uses Debian's nodejs/npm packages; the conformance job logs
node --version>= 24.18.0 beforenpm ci.Second addendum: version-honesty gate. Today nothing asserts that the toolchain running the checks is the toolchain the project declares - the image digest (go1.26.5), the local toolchain (go1.26.5), and go.mod (go 1.26.5) merely happen to agree. GOTOOLCHAIN=auto makes drift silent: a stale go binary auto-downloads the declared toolchain and proceeds, so a rotted environment (stale image digest, stale /usr/local/go, wrong PATH go) is never surfaced.
Plan additions:
go env GOVERSIONmust exactly equal go.mod'sgodirective; loud failure naming both values otherwise.Acceptance addition: gate.sh fails when run with a toolchain that does not match go.mod; CI proves it runs the pinned image's toolchain (GOTOOLCHAIN=local + the gate check green).
Green, live, on our own runner: ci.yml run #5591792 (https://codeberg.org/sixfold_space/madtea/actions/runs/246 era, run id 5591792) completed success on the org runner with every job passing - the first fully green Actions run in this repository's history (previously 1083/1083 tasks failed). What it took, all merged: de-node'd workflows (PR #135 - shell-git checkout, docker-volume Go caches, Node 24.18.0 pinned tarball for conformance, GOTOOLCHAIN=local + the gate's toolchain-honesty check), the sha256 object-format fix for checkout (PR #136 - this repo is a sha256 repo and a bare git init creates a sha1 client), root-skips for the 0o555 permission-barrier test family (PRs #137/#138), and hermetic committer identity in the initRepoAt fixture (PR #138). Runner-side valid_volumes allowlist applied and documented in docs/contributing/ci.md. drift.yml's smoke job now targets a real label. Pipeline green == gate.sh green, per the revised acceptance.