Skip to content

docs(py-sdk): fix Event docstring to gl.chain.Event 📝 - #4

Open
dohernandez wants to merge 1 commit into
v0.3-devfrom
docs/fix-gl-event-docstring
Open

docs(py-sdk): fix Event docstring to gl.chain.Event 📝#4
dohernandez wants to merge 1 commit into
v0.3-devfrom
docs/fix-gl-event-docstring

Conversation

@dohernandez

Copy link
Copy Markdown
Member

Summary

Re-port of archived-repo PR genlayerlabs/genvm#328 (stranded OPEN by the 2026-07-22 migration), fixing genvm#327: the Event class docstring shows contracts subclassing gl.Event, which raises AttributeError at runtime — Event is exported only under genlayer.chain since 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 building gen_getLogs e2e (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.Event alias (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.Contractgl.contract.Contract, gl.deploy_contractgl.contract.deploy, gl.Eventgl.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.Event finds no other fixable site: the v0.3 changelog occurrences are labeled v0.2.x "before" examples (must stay), and tests/cases/stable/py/events/post_event.py already uses gl.chain.Event.

🤖 Generated with Claude Code

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>
@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 0a0561c2-8b90-4a66-a573-6cfec0f98ccb

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/fix-gl-event-docstring

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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