Skip to content

docs(contributing): install mage from the CI tools module, not @latest (celeris#838) - #485

Merged
FumingPower3925 merged 3 commits into
mainfrom
fix/probatorium-mage-hint-pin-celeris-838
Oct 3, 2026
Merged

FumingPower3925 merged 3 commits into
mainfrom
fix/probatorium-mage-hint-pin-celeris-838

Conversation

@FumingPower3925

@FumingPower3925 FumingPower3925 commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Part of goceleris/celeris#838: the probatorium part. The celeris part is goceleris/celeris#910. goceleris/celeris#838 needs both PRs: once both have merged, close it by hand.

Defect

CONTRIBUTING.md:7 at a814a5e, this PR's base, tells a contributor to run go install github.com/magefile/mage@latest. CI installs the mage that .github/tools/go.mod pins (probatorium#458), with go install -modfile="$GITHUB_WORKSPACE/.github/tools/go.mod" tool. The lint workflow and every tier workflow do this. So the hint follows whatever mage releases next, and a local mage can drift from CI's without any change in this repository.

Today they agree: mage@latest resolves to v1.17.2, the same as the pin (round 0, logs/hint-check.log). The defect is the floating hint, not a wrong version today.

Fix

  • The setup step now runs the same install as CI: GOWORK=off go install -modfile=.github/tools/go.mod tool. It installs mage v1.17.2 and actionlint v1.7.12. actionlint is the one the PR template asks for.
  • A short note says that .github/tools pins both, and why GOWORK=off is there.
  • Round 1 added GOWORK=off. go refuses -modfile in workspace mode, and .gitignore:50-51 lists go.work, so a contributor who has one hit go: -modfile cannot be used in workspace mode. The old mage@latest hint never had that problem, because pkg@version ignores workspaces. CI has no go.work, so CI was never affected.

Check

fix-r1/scripts/hint-gowork-485.sh (log fix-r1/logs/hint-gowork-485-summary.log, under the lane evidence dir lanes-20261003/CI1/):

  • It takes the install line out of CONTRIBUTING.md's sh block rather than retyping it.
  • It runs that line in a private clone, with a go.work at the clone root (use .) as a contributor would have it, into a private GOBIN.
  • It reads what was built with go version -m.
arm go.work result
A0: origin/main a814a5e (mage@latest) yes rc 0, mage v1.17.2
A: round 0, 4b82e7c (failing-first) yes rc 1, -modfile cannot be used in workspace mode, nothing installed
B: this branch yes rc 0, mage v1.17.2 and actionlint v1.7.12
C: negative control, round 0's CONTRIBUTING.md copied in with cp yes rc 1, the same error
E: this branch no rc 0, mage v1.17.2 and actionlint v1.7.12

The same script also greps for any @latest tool install. It finds CONTRIBUTING.md:7 at origin/main and nothing on this branch (grep rc 1). This branch changes only CONTRIBUTING.md, so there is no Go package or workflow to test.

Cost

None.

Review (round 2)

Two reviews of ae3cf19 found nothing against this PR, so it is unchanged (head still ae3cf19).

@coderabbitai

coderabbitai Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: goceleris/probatorium/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8812e15a-1b98-409d-89a2-7c21cf3eb7d3
📥 Commits

Reviewing files that changed from the base of the PR and between 4528957 and f350448.

📒 Files selected for processing (1)
  • CONTRIBUTING.md
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.

📜 Recent review details
⏰ Context from checks skipped due to timeout. (25)
  • GitHub Check: coverage (root module)
  • GitHub Check: servers/iris
  • GitHub Check: servers/fasthttp
  • GitHub Check: servers/gorilla_ws
  • GitHub Check: servers/fiber
  • GitHub Check: servers/hertz
  • GitHub Check: servers/echo
  • GitHub Check: servers/gnet
  • GitHub Check: servers/nbio
  • GitHub Check: govulncheck
  • GitHub Check: servers/chi
  • GitHub Check: ansible loads every playbook and tasks file
  • GitHub Check: servers/celeris
  • GitHub Check: validation/refapp
  • GitHub Check: mage-tagged
  • GitHub Check: validation zombie guard (Linux /proc)
  • GitHub Check: servers/gin
  • GitHub Check: root module
  • GitHub Check: servers/stdhttp
  • GitHub Check: go vet + golangci-lint + gofmt
  • GitHub Check: validation/properties/fieldguard
  • GitHub Check: Analyze (actions)
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: Analyze (python)
  • GitHub Check: Analyze (go)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: CR
Repo: goceleris/probatorium

Timestamp: 2026-10-03T09:36:58.112Z
Learning: Source excerpt:
# Contributing

## Setup

```sh
go mod download
GOWORK=off go install -modfile=.github/tools/go.mod tool   # mage and actionlint, the versions CI runs
```
Learnt from: CR
Repo: goceleris/probatorium

Timestamp: 2026-10-03T09:36:58.112Z
Learning: Source excerpt:
# Contributing

## Setup

```sh
go mod download
GOWORK=off go install -modfile=.github/tools/go.mod tool   # mage and actionlint, the versions CI runs
```
🔀 Multi-repo context goceleris/celeris, goceleris/loadgen

Linked repositories findings

goceleris/celeris

  • Tool-install pattern: On the inspected branch of open PR #910, .github/tools/go.mod:15–18 declares benchstat and govulncheck, not Mage or actionlint. CI installs Mage and actionlint separately with pinned versions in .github/workflows/ci.yml:36–39, 47–54. This branch therefore does not corroborate a unified tools-module install for those tools. [::goceleris/celeris::]
  • Workspace-mode rationale: .github/scripts/bench-ab.sh:41–44, 55–56 explicitly sets GOWORK=off when using -modfile, explaining that a contributor’s go.work otherwise puts Go in workspace mode. [::goceleris/celeris::]

goceleris/loadgen

  • Pinned actionlint precedent: .github/tools/go.mod:10, 20 declares actionlint as a tool with a pinned dependency; .github/workflows/ci.yml:31–40 invokes it using go tool -modfile=.... Dependabot is configured to update that tools module in .github/dependabot.yml:20–30. The module contains actionlint only, not Mage. [::goceleris/loadgen::]

📝 Summary

Summary by CodeRabbit

  • Documentation
    • Updated contributor setup instructions to install Mage and actionlint at the versions used by the project’s lint workflow.

Walkthrough

CONTRIBUTING.md updates setup instructions to install Mage and actionlint from versions pinned in .github/tools/go.mod, with GOWORK=off.

Changes

Contributor Setup

Layer / File(s) Summary
Pinned tool installation
CONTRIBUTING.md
The setup instructions replace the latest Mage install command with pinned Mage and actionlint installation instructions. They explain the pinned version source and use of GOWORK=off.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~4 minutes

Merge Risk: ⚪ Minimal · up to f3504

Contributor setup now follows the repository’s pinned tool versions and matches the lint workflow; no actionable setup regression remains, so the change is mergeable after normal checks.

Architecture Summary

Architecture risk: 🔵 Low · up to f3504

The change affects 1 system.

Changed systems: CONTRIBUTING.md

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — CONTRIBUTING.md (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in CONTRIBUTING.md: Setup now installs Mage and actionlint using the pinned tools module with workspace mode disabled, replacing the unpinned go install github.com/magefile/mage@latest instruction. Added text explains the version source and why GOWORK=off is used.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title follows the required conventional-commit format and summarizes the change: it replaces the floating Mage install with the CI tools module.
Description check ✅ Passed The description explains the documentation change, its reason, and the reported checks.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Negative Control For Changed Checks ✅ Passed Only CONTRIBUTING.md changed. No changed path is under validation/ or report/, and no mage_.go or workflow__test.go file changed. The negative-control requirement does not apply.
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Oct 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

…(celeris#838)

CONTRIBUTING's setup step ran `go install github.com/magefile/mage@latest`,
which follows whatever mage releases next, while CI installs the mage that
.github/tools/go.mod pins. It now runs the same install as the lint
workflow, `go install -modfile=.github/tools/go.mod tool`, which also gives
the actionlint the PR template asks for.
…it works next to a local go.work (celeris#838)

go refuses -modfile in workspace mode, and .gitignore lists go.work, so the
setup hint stopped with '-modfile cannot be used in workspace mode' for a
contributor who has one.
@FumingPower3925
FumingPower3925 force-pushed the fix/probatorium-mage-hint-pin-celeris-838 branch from 4b82e7c to ae3cf19 Compare October 3, 2026 04:42
@FumingPower3925
FumingPower3925 marked this pull request as ready for review October 3, 2026 09:35
@FumingPower3925
FumingPower3925 merged commit ce81fff into main Oct 3, 2026
30 checks passed
@FumingPower3925
FumingPower3925 deleted the fix/probatorium-mage-hint-pin-celeris-838 branch October 3, 2026 09:42
FumingPower3925 added a commit to goceleris/celeris that referenced this pull request Oct 3, 2026
…he version it ended with; pin the mage and benchstat hints (celeris#838) (#910)

mage Tools now installs h2spec v2.6.0 on every platform: the go install fallback, which resolved to v2.2.1+incompatible ("Version: 2.0.0"), is gone or pinned, and the target prints the version it ended up with. CONTRIBUTING.md and .github/scripts/bench-ab.sh no longer suggest @latest installs that differ from the versions CI pins. This is the celeris part of #838; the probatorium part is goceleris/probatorium#485.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation mage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant