feat(codegen): port client-lib plugin to TII v1beta0#12
Merged
Conversation
The .trix/client-lib plugin still rendered against the legacy bindgen-v1alpha2 data shape, so every transaction was silently dropped against a v1beta0 TII. Rewrites the template to consume tii.transactions / tii.profiles / tii.environment, emits protocol identity constants and an embedded profile surface wired into the Client, and adds a render-fixture test that imports the generated module. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The codegen render-fixture test shells out to `tx3c`; the unit job did not have it on PATH. Adds the tx3-lang/actions/setup step. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The codegen render-fixture test needs the `json` renderer helper, which ships in the beta channel ahead of stable. Tracks beta until the helper reaches the stable toolchain. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The render-fixture test exercises the .trix/client-lib templates and tx3c, not the SDK runtime, so it does not belong in the unit job. Marks it with the `codegen` pytest marker, excludes it from the unit job, and runs it in a new `codegen` CI job. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The render-fixture check exercises the .trix/client-lib templates and tx3c, not the SDK runtime, so it should not be SDK test code. Removes the pytest test and marker and replaces them with a CI-owned shell script that the `codegen` job runs: it invokes `tx3c codegen` directly, smoke-checks the generated surface, and imports the output against this repo's SDK. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The codegen check must replicate what a consumer gets: the rendered output resolves the published runtime SDK at the version its generated manifest pins. Drops the patch / replace / paths / editable-install overrides that bound the check to in-repo SDK source. This also exercises the version pin in the generated manifest itself. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Reverts the codegen job's toolchain setup to the default stable channel. The check stays red until a tx3c release carrying the codegen `json` helper reaches stable. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
.trix/client-lib/from the legacybindgen-v1alpha2data shape to TIIv1beta0. The old template silently dropped every transaction against av1beta0TII.__init__.pynow emits per-transactionParamsdataclasses +*_TIRenvelopes +Clientmethods, protocol identity constants (PROTOCOL_NAME,PROTOCOL_VERSION,TARGET_TII_VERSION), an embeddedPROFILESmap +ENVIRONMENT_SCHEMA, and aClientthat accepts a profile selector.sdk/tests/test_codegen.py— a render-fixture test that renders the sharedtransfer.tiiand imports the generated module.Blocked on
tx3crelease that includes thejsonhelper — tx3-lang/tx3#325. Mark ready once that release is available to CI.Follow-up
After merge, cut the immutable
codegen-v1beta0tag on this repo (parity-matrix C.4).Test plan
pytest tests/test_codegen.pywithtx3c≥ the json-helper release🤖 Generated with Claude Code