docs(py-sdk): fix Event docstring to gl.chain.Event 📝 - #4
Open
dohernandez wants to merge 1 commit into
Open
Conversation
Contracts copying the docstring crash at module load: Event is exported only under genlayer.chain since the v0.3 namespace rename, and the top-level lazy __getattr__ is a module loader only, so gl.Event raises AttributeError — surfacing as an opaque accepted-with-VmError deploy. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
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.
Summary
Re-port of archived-repo PR genlayerlabs/genvm#328 (stranded OPEN by the 2026-07-22 migration), fixing genvm#327: the
Eventclass docstring shows contracts subclassinggl.Event, which raisesAttributeErrorat runtime —Eventis exported only undergenlayer.chainsince the v0.3 namespace rename, and the top-level lazy__getattr__is a module loader only. A contract following the docstring crashes at module load, and because the crashed deploy is still accepted by consensus (accepted-with-VmError), the symptom downstream is "successful deploy, zero events" — this cost the genlayer-node team a full cross-repo debugging cycle while buildinggen_getLogse2e (NOD-322/324). Verified both forms on the v0.6.0-rc1 bundle runner:gl.Event→ VmError + empty emissions;gl.chain.Event→ Return + expected emission.Decision record (carried over from genvm#327, so it isn't lost with the archive)
Restoring a top-level
gl.Eventalias (option 2 of genvm#327) was considered and REJECTED. The v0.2.x → v0.3 rename was deliberate and systematic — the whole flat namespace moved into submodules (gl.Contract→gl.contract.Contract,gl.deploy_contract→gl.contract.deploy,gl.Event→gl.chain.Event, …; see the migration table in the python-sdk v0.3 changelog). A back-alias for exactly one renamed name would erode that consistency, reintroduce two spellings of the same API for docs/examples/goldens to drift between, and create a third state across the already-shipped v0.3 rc line. The compatibility story for v0.2.x contracts is the changelog migration table.Audit
A full-repo grep for
gl.Eventfinds no other fixable site: the v0.3 changelog occurrences are labeled v0.2.x "before" examples (must stay), andtests/cases/stable/py/events/post_event.pyalready usesgl.chain.Event.🤖 Generated with Claude Code