fix: align gltest with the layered genlayer-py lifecycle types - #108
fix: align gltest with the layered genlayer-py lifecycle types#108kirilaa wants to merge 1 commit into
Conversation
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.
|
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: defaults 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:
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 |
MuncleUscles
left a comment
There was a problem hiding this comment.
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.
Depends-On: genlayerlabs/genlayer-py#109
Why
genlayer-py #109 layered the consumer transaction lifecycle over the raw protocol status and removed the public
TransactionStatusenum.gltest/types.pystill imported that name, soimport gltestraisedImportErroragainst the new SDK and E2E scenario 050 could not even collect.What
gltest.typesimportsProtocolTransactionStatusfrom the layered surface and re-exportsTransactionLifecycle.TransactionStatusstays exported fromgltest.typesas an alias ofProtocolTransactionStatus. That is gltest's own compatibility choice for its downstream suites (which pass it towait_transaction_status); it does not reintroduce the removed SDK name. Internal gltest code uses the protocol name and expresses waits withwait_until.wait_until_from_statuscompares status text instead of enum identity, so both the oldFINALIZEDand the newFinalizedspellings resolve to the same wait.tx_execution_succeeded/tx_execution_failedread the state-discriminatedlifecyclefield (decided/accepted,finalized) and fall back to the flatstatusthat pre-lifecycle receipts still carry.genlayer-pyversion pinned inuv.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 (local train checkout) and 111 passed against the older SDK, confirming both paths.pytest tests/gltest_direct/test_sdk_loader.py— 12 passed.