Repository navigation
ci: vendor the dependency closure so the build stops depending on a live testnet - #68
Merged
Merged
Conversation
…ive testnet CI has been red since 2026-06-04, and the cause is not in this repo's code. `gno lint` and `gno test` derive dependency sources from the pkgpath domain (rpcpkgfetcher.go: https://rpc.%s:443), and rpc.gno.land CNAMEs to betanet — a mutable testnet. A hermetically pinned compiler was being fed by a live, unversioned source, so any upstream redeploy retroactively broke every branch, including already-merged history. Two independent failure classes, neither fixed by bumping the pin: 1. Syntax skew — the chain serves pre-interrealm-v2 sources, i.e. the deps are OLDER than the pinned compiler, so bumping moves further away, not closer. 2. Packages gone — r/demo/profile returns a server-side "not available". The failed fetch leaves the cache dir uncreated, which then resurfaces as a misleading `open …/p/onbloc/json: no such file or directory` — a masked download failure, not cache corruption. Vendoring removes the network from the build, which is the only thing that closes both. Zero code changes and zero Makefile changes: load.go short-circuits the fetch on any workspace-local match. Placement at the repository root rather than under gno/ is load-bearing — make lint/test/fmt all target ./gno/..., so vendored code is resolved but never linted, tested or reformatted. Result: lint clean, 6/6 packages ok, `gno fmt` zero diff, and no `gno: downloading` line at all, with the network unavailable. The avl role is vendored from the p/samcrew/avl FORK, not upstream. topaz-1's stdlib p/nt/avl/v0 exposes a single-value Get while this codebase calls the two-value form, so vendoring upstream there would produce a green build compiled against an ABI the target chain does not have — a false green in exactly the place a gate should prevent one. The one remaining stdlib avl import, in basedao/utils.gno, is deliberate: svg.Canvas.Style is a *nt/avl/v0.Tree, so that boundary must match the stdlib ABI, and it only calls NewTree(). Two guards keep this honest. The lint job now fails if `gno: downloading` ever appears, so the closure cannot silently become incomplete. A new vendored-provenance job proves every vendored file is byte-identical to gnolang/gno@GNOVERSION — 118 files, currently zero drift — refuses to pass vacuously if it checks nothing, and asserts the fork still exposes the two-value Get. GNOVERSION is read from the checked-out tree, so it is validated as a bare hex sha and passed through env rather than interpolated into a run block, where a fork PR could otherwise inject.
…tion
Review follow-ups on the vendoring change.
The guard could be bypassed three ways. `find -type f` skips symlinks, but the
gno loader follows them, so a symlinked .gno was compiled while the byte
comparison never saw it — verified: it produced redeclaration errors across five
packages while the job still reported drift 0. Symlinks under vendored/ are now
refused outright. Deletions were invisible because the walk only visited files
that exist here; removing a single file from a vendored package left both the
provenance job AND lint green. The comparison now runs in both directions, scoped
to directories actually vendored as packages so intermediate namespace dirs do
not demand upstream files we never took.
More important, a green build here does NOT by itself prove the tree is
publishable, and the README said otherwise. GNOVERSION is 2c7f1abe; topaz-1 runs
fc4052651, so ~15 vendored packages differ from what the chain hosts — including
p/nt/avl/v0, whose on-chain Get is single-value while the vendored copy is
two-value. That is safe today for one narrow reason: gnodaokit crosses that
boundary only via ntavl.NewTree(), identical in both. Nothing enforced it, so a
single new ntavl.Get() would compile green here and fail AddPackage on-chain. CI
now asserts the boundary stays limited to NewTree, and the README states the real
reason rather than implying the vendored copy matches the chain.
Attribution: this redistributes 118 files covered by the GNO Network General
Public License, and the repo carried no notice. Adds upstream's LICENSE.md and a
NOTICE recording repo, commit and licence, both excluded from the comparison.
Also: one `${{ }}` was still interpolated inside a run: block, contradicting the
file's own comment — now passed via env. GNOVERSION is read with tail -1 to match
make's last-assignment-wins. The lint job pins a cold GNOHOME, because a warm
module cache short-circuits the fetch before the "downloading" line prints and
would silently disable the hermeticity check; it also captures the exit status so
the missing-package advice still prints when lint actually fails. checkout@v3 to
@v4 for consistency.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why CI is red, and why bumping the pin doesn't fix it
CI has been red since 2026-06-04, and the cause is not in this repo's code.
gno lintandgno testdon't resolve dependencies from a lockfile — they derive the source from the pkgpath domain (rpcpkgfetcher.go:https://rpc.%s:443), andrpc.gno.landCNAMEs to betanet, a mutable testnet. So a hermetically pinned compiler was being fed by a live, unversioned dependency source. Any upstream redeploy retroactively breaks every branch, including already-merged history.There are two independent failure classes, and bumping
GNOVERSIONfixes neither:r/demo/profilereturns a server-side "package is not available". The failed fetch leaves the cache directory uncreated, which then resurfaces as a misleadingopen …/p/onbloc/json: no such file or directory. That ENOENT is a masked download failure, not cache corruption — which is why it has been so hard to read.A control experiment confirms it: PR #62 pins a toolchain byte-identical to
main's and still fails. The only package that passes anywhere isrealmid, the one with zero chain-hosted dependencies.The fix
Vendor the dependency closure. It removes the network from the build, which is the only thing that closes both classes.
load.goshort-circuits the fetch on any workspace-local match.gno/, is load-bearing.make lint,make testandmake fmtall target./gno/..., so vendored third-party code is resolved but never linted, tested or reformatted. Verified:gno fmt -wtouches zero vendored files, so the existing no-diff gate still passes..gnofiles, ~1 MB.Result, with the network unavailable: lint clean · 6/6 packages
ok·gno fmtzero diff · nogno: downloadingline at all.The avl role is vendored from the fork, deliberately
This is the part that matters most, and it is a correction to the original plan.
topaz-1's stdlib
p/nt/avl/v0exposes a single-valueGet, while this codebase calls the two-value form. Vendoring upstreamp/nt/avl/v0for the data-structure role would produce a green build compiled against an ABI the target chain does not have — a false green in exactly the place a gate exists to prevent one, and it would mask the very failure the ceremony most needs caught.So
gno.land/p/samcrew/avlis vendored from the fork (byte-identical todeps/avlin samcrew-deployer, which carries its own guard pinning it to upstreamf3d5a5d13). This is also why the branch targetsfeat/topaz-v2-renamerather thanmain:mainis pre-interrealm-v2, its unsuffixedp/nt/*imports cannot resolve on topaz-1 at all, and it is not locally buildable.The one remaining stdlib avl import —
ntavlingno/p/basedao/utils.gno— is correct and stays:svg.Canvas.Styleis a*nt/avl/v0.Tree, so that boundary must match the stdlib ABI exactly. It only callsNewTree(), neverGet, so it carries no arity exposure.Two guards, so this cannot rot
gno: downloadingever appears, so the closure cannot silently become incomplete.vendored-provenancejob proves every vendored file is byte-identical tognolang/gno@GNOVERSION. Currently 118 files checked, zero drift. It refuses to pass vacuously if it ever checks nothing, and it asserts the fork still exposes the two-valueGet.GNOVERSIONis read from the checked-out tree, so it is validated as a bare hex sha and passed throughenv:rather than interpolated into arun:block — otherwise a fork PR could inject via theMakefile.What this unblocks
The "CI all green" merge gate is currently unsatisfiable on this repo, so no PR can legitimately land. This makes it satisfiable again, which is a prerequisite for #65, #66, #67 and the freeze.
Also worth noting:
make gno-mod-tidyis a silent no-op — it runsfind gno -name gno.mod, but the repo usesgnomod.toml, so it matches zero files. Left alone here deliberately; repairing it may produce a diff and fail the no-diff gate, so it deserves its own change.