Repository navigation
Conversation
…d fork
topaz-1's stdlib p/nt/avl/v0 exposes a single-value Get. gnodaokit called
the two-value form, so a fork of avl carrying that signature was vendored
alongside the real dependency closure, exempted from the provenance
byte-comparison, and guarded by two bespoke CI steps instead.
Calling the chain's own shape removes all of it. An absent key reads back
as nil, so the type assertion that already followed every lookup settles
absent and wrong-type in one step:
roleData, ok := m.Roles.Get(role).(*Role)
if !ok {
// absent, or not a *Role
}
That collapses 13 duplicated `if !ok` blocks in members.gno alone.
Six lookups treated a present-but-wrong-typed entry differently from an
absent one, panicking rather than falling through. The stores are exported
avl trees, so a same-realm write can produce either, and the distinction is
worth keeping: absent is a normal answer and a wrong type is a bug. Those
six check Has in the failure path so the panic survives, with a test that
goes red when any of them is removed.
vendored/gno.land/p/samcrew/avl/ is deleted, and with it the only source
exemption in the provenance job. Every vendored file is now byte-compared
against gnolang/gno at the pinned GNOVERSION in both directions, so the job
covers 118 files with nothing skipped but this directory's own README,
NOTICE and LICENSE. The stdlib-avl boundary step and the two-value Get step
are gone; the compiler enforces both directly now.
The pinned ref also carries input checks the fork predates: GetByIndex
panics on a negative index, TraverseByOffset clamps a negative offset, and
pager.GetPageWithSize panics on a non-positive page size. None is reachable
here. extensions.gno rejects a negative index before GetByIndex and
normalises a negative start before IterateByOffset, ParseQuery clamps a
non-positive size back to the default, and both pager call sites pass 10.
NOTICE recorded 2c7f1abe while the Makefile pins fc40526; it now matches.
davd-gzl
marked this pull request as ready for review
July 27, 2026 17:01
Collaborator
Author
|
To be merged in #65 |
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.
p/samcrew/avlis a fork of a package we already vendor, kept only because itsTree.Getreturns(value, exists)where the chain's returns a single value. It has to be exempted from the provenance byte-comparison, and that exemption is the one hole in the job: it matches a directory prefix, but the compiler resolves a package by themoduleline in itsgnomod.toml. A directory undervendored/gno.land/p/samcrew/avl/can therefore claim any package path, become what the build compiles, and still getdrift 0.Calling the chain's own
Getremoves the fork and the exemption with it. An absent key reads back as nil, so the type assertion that already followed every lookup settles absent and wrong-type at once:Six lookups panicked on a present-but-wrong-typed entry instead of falling through. They keep that, via
Hasin the failure path, andstore_corruption_test.gnogoes red if any of the six is dropped.Provenance now covers all 118 vendored files with no source exemption, and the shadow directory above is caught as
MISSING UPSTREAM. The two fork-specific CI steps are deleted.NOTICErecorded2c7f1abewhile the Makefile pinsfc40526; it now matches.Lint clean, 10 of 10 test targets green.