Skip to content

fix: align gltest with the layered genlayer-py lifecycle types - #108

Merged
MuncleUscles merged 1 commit into
v0.30-devfrom
fix/train-lifecycle-types
Aug 31, 2026
Merged

fix: align gltest with the layered genlayer-py lifecycle types#108
MuncleUscles merged 1 commit into
v0.30-devfrom
fix/train-lifecycle-types

Conversation

@kirilaa

@kirilaa kirilaa commented Aug 28, 2026

Copy link
Copy Markdown

Depends-On: genlayerlabs/genlayer-py#109

Why

genlayer-py #109 layered the consumer transaction lifecycle over the raw protocol status and removed the public TransactionStatus enum; #110 carries the decision-bound fee and appeal surface used by the current train. gltest/types.py still imported the removed name, so import gltest raised ImportError and E2E scenario 050 could not collect.

What

  • gltest.types imports ProtocolTransactionStatus from the layered surface and re-exports TransactionLifecycle.
  • TransactionStatus stays exported from gltest.types as an alias of ProtocolTransactionStatus. That is gltest's own compatibility choice for its downstream suites; it does not reintroduce the removed SDK name. Internal gltest code uses the protocol name and expresses waits with wait_until.
  • wait_until_from_status compares status text instead of enum identity, so both the old FINALIZED and the new Finalized spellings resolve to the same wait.
  • tx_execution_succeeded and tx_execution_failed read the state-discriminated lifecycle field (decided/accepted, finalized) and fall back to the flat status that pre-lifecycle receipts still carry.
  • Both import paths keep a fallback to the pre-lifecycle SDK, so the suite still runs against the genlayer-py version pinned in uv.lock.

No use site referenced a removed enum member: finalization readiness is a resolution verdict, not a status, and gltest never named READY_TO_FINALIZE.

Needed for the resolution-kernel train E2E closure.

Testing

  • pytest tests/gltest tests/gltest_cli — 111 passed against the new genlayer-py and 111 passed against the older SDK, confirming both paths.
  • pytest tests/gltest_direct/test_sdk_loader.py — 12 passed.
  • Four new assertion tests cover decided, finalized, undetermined, and processing lifecycles.

genlayer-py dropped the public `TransactionStatus` enum when it layered the
consumer lifecycle over the raw protocol status. gltest imports the protocol
enum from the new surface and keeps `TransactionStatus` as an alias of it so
downstream suites that already pass it to `wait_transaction_status` keep
working; internal code uses the protocol name and `wait_until`.

Success assertions read the state-discriminated `lifecycle` field and fall
back to the flat status that pre-lifecycle receipts still carry, so gltest
works against both SDK generations.
@coderabbitai

coderabbitai Bot commented Aug 28, 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: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: bfd3c147-a3f0-45d1-ad9f-b93d8d60efeb

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

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.

@MuncleUscles MuncleUscles left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the protocol-status migration and the testing-suite-owned import bridge on this exact head. It does not restore ReadyToFinalize or probe old/new deployments. Native tests and branch policy are green. Approving.

@MuncleUscles
MuncleUscles merged commit 7d6de26 into v0.30-dev Aug 31, 2026
15 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.

2 participants