Conversation
GenVM PR actionsTick a box to run it (the box unticks itself when handled). Actions only run while the PR has the
Commands
|
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Repository: genlayerlabs/genvm-manager/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
kriss39
force-pushed
the
fix/dynarray-extended-slice
branch
from
September 15, 2026 09:01
b323d07 to
4df324a
Compare
kriss39
force-pushed
the
fix/dynarray-extended-slice
branch
from
September 16, 2026 13:00
4df324a to
f9f9a26
Compare
kriss39
force-pushed
the
fix/dynarray-extended-slice
branch
from
September 16, 2026 19:09
f9f9a26 to
b2283d5
Compare
kriss39
force-pushed
the
fix/dynarray-extended-slice
branch
from
September 18, 2026 08:46
b2283d5 to
5b582e1
Compare
kriss39
force-pushed
the
fix/dynarray-extended-slice
branch
from
September 30, 2026 08:48
5b582e1 to
0b03344
Compare
Member
|
thanks for finding a bug, but I am unsure if we can change the hash now, so I am holding this PR for now. I will think more about it |
kriss39
force-pushed
the
fix/dynarray-extended-slice
branch
from
October 2, 2026 13:35
0b03344 to
41f8b27
Compare
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.
What
DynArray.__setitem__with an extended slice (step other than 1) counts its targets as(stop - start) // step, which undercounts whenever(stop - start) % step != 0. The surplus values then fall through to the insert branch, so the array grows and its tail is reordered; with fewer values than targets a bareStopIterationescapes.listrejects a size mismatch on an extended slice withValueError;DynArraysilently deleted or inserted instead.__getitem__and__delitem__already handle these slices correctly; only assignment was affected. The state is wrong the same way on every validator, so this is a contract data-integrity bug rather than a consensus split.Change (executor line v0.3,
runners/genlayer-py-std)storage/dyn_array.py: count targets withlen(range(start, stop, step))and raiseValueErroron a size mismatch for extended slices, matchinglist.tests/test_storage_vec.py: parametrized cases for positive/negative extended slices and the size-mismatch rejection. The existingtest_setitem_slicenever reached this path (it always assigns 5 values and returns early whenlistraises).runners/support/versions/current.nix: refreshedgenlayer-std,py-genlayer,py-genlayer-multihashes.Executor commit: kriss39/genvm-executor@7df2d9c on
pr/v0.3/fix/dynarray-extended-slice(rebased onto the current pinned7e0936a).Verification
runners/genlayer-py-std:pytest tests --ignore=tests/embeddings→ 976 passed, 1 failed (test_render_rejects_malformed_image, PIL not installed in my venv — unrelated). The new cases fail 7/8 on the unpatched code and pass with the fix.list(random get/set/del slice sequences): 1030/3000 mismatches before, 0 after.ruff format/ruff checkclean on the changed files.hash-updater.pyon this machine (no nix, and the repo does not build runners on macOS). Instead I reproduced the content-addressing locally —make-zip.pyunder Python 3.13 over thecleanSource-filteredsrc/plusrunner.json, then theDependsuids for the two wrappers — and confirmed it yields the three hashes currently committed bit-for-bit before applying the same procedure to the patched tree. Please treat the#runners-allnix build as unrun on my side; if it reports a mismatch I will update from thegot:values.v0.2.x does not vendor the Python runner sources, so no
pr/v0.2/...branch.Independent of the other two PRs I opened today; whichever
current.nixchange lands second I will rebase and recompute.