Skip to content

ci: vendor the dependency closure so the build stops depending on a live testnet - #68

Merged
zxxma merged 2 commits into
feat/topaz-v2-renamefrom
chore/vendor-dep-closure
Jul 20, 2026
Merged

zxxma merged 2 commits into
feat/topaz-v2-renamefrom
chore/vendor-dep-closure

Conversation

@zxxma

@zxxma zxxma commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

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 lint and gno test don't resolve dependencies from a lockfile — they derive the source from the pkgpath domain (rpcpkgfetcher.go: https://rpc.%s:443), and rpc.gno.land CNAMEs 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 GNOVERSION fixes neither:

  1. Syntax skew — the chain serves pre-interrealm-v2 sources, i.e. the deps are older than the pinned compiler. Bumping moves further away, not closer.
  2. Packages simply gone — r/demo/profile returns a server-side "package is not available". The failed fetch leaves the cache directory uncreated, which then resurfaces as a misleading open …/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 is realmid, 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.

  • Zero code changes, zero Makefile changes — load.go short-circuits the fetch on any workspace-local match.
  • Placement at the repository root, not under gno/, is load-bearing. make lint, make test and make fmt all target ./gno/..., so vendored third-party code is resolved but never linted, tested or reformatted. Verified: gno fmt -w touches zero vendored files, so the existing no-diff gate still passes.
  • 23 packages, 100 .gno files, ~1 MB.

Result, with the network unavailable: lint clean · 6/6 packages ok · gno fmt zero diff · no gno: downloading line 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/v0 exposes a single-value Get, while this codebase calls the two-value form. Vendoring upstream p/nt/avl/v0 for 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/avl is vendored from the fork (byte-identical to deps/avl in samcrew-deployer, which carries its own guard pinning it to upstream f3d5a5d13). This is also why the branch targets feat/topaz-v2-rename rather than main: main is pre-interrealm-v2, its unsuffixed p/nt/* imports cannot resolve on topaz-1 at all, and it is not locally buildable.

The one remaining stdlib avl import — ntavl in gno/p/basedao/utils.gno — is correct and stays: svg.Canvas.Style is a *nt/avl/v0.Tree, so that boundary must match the stdlib ABI exactly. It only calls NewTree(), never Get, so it carries no arity exposure.

Two guards, so this cannot rot

  • Hermeticity — the lint job now fails if gno: downloading ever appears, so the closure cannot silently become incomplete.
  • Provenance — a new vendored-provenance job proves every vendored file is byte-identical to gnolang/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-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 — otherwise a fork PR could inject via the Makefile.

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-tidy is a silent no-op — it runs find gno -name gno.mod, but the repo uses gnomod.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.

…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.
@zxxma
zxxma merged commit ad971e5 into feat/topaz-v2-rename Jul 20, 2026
4 checks passed
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