Skip to content

ci: add baseline GitHub Actions workflow - #6

Open
draevik wants to merge 2 commits into
lightchain-protocol:mainfrom
draevik:chore/baseline-ci
Open

ci: add baseline GitHub Actions workflow#6
draevik wants to merge 2 commits into
lightchain-protocol:mainfrom
draevik:chore/baseline-ci

Conversation

@draevik

@draevik draevik commented Aug 12, 2026

Copy link
Copy Markdown

What this fixes

Repo has zero CI visible to PR authors (Issue #2). Upstream's GH Actions workflows were stripped in favor of Buildkite, but the Buildkite pipeline lives in the Buildkite dashboard, not this repo — so external PRs get no automated feedback. epoch_processing.go, the file at the center of the 2026-08-11 incident, had no CI gate on it.

What this adds

.github/workflows/ci.yml, matching the "Proposed scope (minimal first PR)" from Issue #2: go build ./... plus go test on the packages this fork actually modifies. Deliberately not porting upstream's fuzz/clang-format/horusec/etc. workflows in this first pass, per the issue's own suggestion.

A finding along the way: core/altair currently fails on main

Issue #2 proposed testing core/epoch, core/altair, and cmd/prysmctl. Running that locally surfaced two pre-existing failures, unrelated to this PR:

--- FAIL: TestProcessEpoch_CanProcess (1.37s)
    assertions.go:40: transition_test.go:21 Values are not equal, want: 31999841265 (uint64), got: 31999841900 (uint64)
--- FAIL: TestProcessEpoch_CanProcessBellatrix (1.45s)
    assertions.go:40: transition_test.go:53 Values are not equal, want: 31999839993 (uint64), got: 31999841900 (uint64)
FAIL    github.com/OffchainLabs/prysm/v7/beacon-chain/core/altair       206.302s

In both cases the actual balance is higher than the test expects — consistent with the April patch (feat(epoch): convert inactivity penalty to forced exit) that intentionally made epoch_precompute.go skip applying the inactivity penalty to balances. My read is that transition_test.go's golden values were never updated after that patch landed, and nothing caught it because there was no CI. I haven't fixed this here — I don't want to guess at the correct new expected values for a consensus test without someone who owns the reward-math intent confirming them. Opening a separate issue with these details rather than bundling an unverified fix into a CI PR.

core/altair is excluded from this workflow's test step for now (kept in go build ./..., which does pass) so this baseline CI isn't red from day one. See the follow-up issue for tracking.

Verification

Ran locally (go1.26.0, WSL2/Ubuntu):

go build ./...
go test ./beacon-chain/core/epoch/... ./cmd/prysmctl/...

Both clean:

ok      github.com/OffchainLabs/prysm/v7/beacon-chain/core/epoch
ok      github.com/OffchainLabs/prysm/v7/beacon-chain/core/epoch/precompute
?       github.com/OffchainLabs/prysm/v7/cmd/prysmctl   [no test files]
ok      github.com/OffchainLabs/prysm/v7/cmd/prysmctl/testnet
ok      github.com/OffchainLabs/prysm/v7/cmd/prysmctl/validator

Before merging, please

Confirm this goes green on GitHub's actual runners (first real end-to-end run). Also flagging: once the altair follow-up is fixed, core/altair should be added back into this workflow's test step.

Closes issue #2

@draevik draevik changed the title ci: add baseline GitHub Actions workflow (closes PR 2) ci: add baseline GitHub Actions workflow Aug 12, 2026
draevik and others added 2 commits August 12, 2026 07:46
The repo currently has zero CI visible to PR authors: upstream Prysm's
workflows were intentionally stripped (8437139) in favor of Buildkite,
but the Buildkite pipeline lives in the Buildkite dashboard rather than
this repo, so it gives no automated feedback to anyone opening a PR from
outside the org - and nothing public re-runs it. The
epoch_processing.go file at the center of the 2026-08-11 incident and
its fix had no CI gate in between.

Deliberately narrow scope for a first cut:
- gofmt check across the module.
- bazel build + test restricted to beacon-chain/core/epoch and
  core/altair - the LightChain-patched consensus packages, so the exact
  area that caused the incident is covered starting now.

Explicitly NOT attempted: full 'bazel test //...' on every PR. This is a
large fork with a correspondingly large suite; doing that properly needs
a caching/runner strategy (self-hosted runners or a remote cache) that's
a separate piece of work, not something to guess at inside this patch.
Left as a follow-up, possibly as a scheduled/nightly job instead of
per-PR.

Untested: I don't have access to this repo's GitHub Actions runners or
Bazel remote cache from this environment, so the workflow is reviewed by
inspection (valid YAML, package paths confirmed to exist in the tree) but
not run end-to-end. Please verify it goes green on a real PR before
relying on it as a merge gate.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…s proposed scope

Original patch used Bazel; rewritten to match what issue lightchain-protocol#2 actually
asked for - go build ./... plus go test on the packages this fork
modifies. Also added cmd/prysmctl (a third LightChain-patched package,
per PR1's history) and dropped core/altair from the test step for now:
TestProcessEpoch_CanProcess and TestProcessEpoch_CanProcessBellatrix
currently fail against main, unrelated to this change - likely stale
golden values from the April inactivity-penalty-skip patch, not
verified/fixed here. Tracking as a separate issue rather than shipping
this workflow red on day one.

Verified locally (go1.26.0, WSL2/Ubuntu):
  go build ./...                                    -> success
  go test ./beacon-chain/core/epoch/... ./cmd/prysmctl/...  -> all ok
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