Skip to content

Prototype explicit runtime-bound generated clients - #355

Closed
bbopen wants to merge 12 commits into
codex/tywrap-callable-compiler-20260919from
codex/tywrap-client-binding-prototype-20260920
Closed

bbopen wants to merge 12 commits into
codex/tywrap-callable-compiler-20260919from
codex/tywrap-client-binding-prototype-20260920

Conversation

@bbopen

@bbopen bbopen commented Sep 20, 2026 •

Copy link
Copy Markdown
Owner

Scope

Prototype explicit runtime binding for #340 on the accepted callable compiler commit 42feeca0abd1314592be691faa6d608541dfc6d2.

  • Generate a shared callable core, a registry-backed legacy adapter, and a bound client companion from one compiled Python module and generator.
  • Keep bridge ownership with the caller. A bound handle uses only call; handle disposal does not dispose the bridge.
  • Preserve generated overloads, generic input types, runtime validation, and the legacy registry path.
  • Reject generated source maps until each output file can carry its own map.

Verification

CI run 35503626271 passed all 22 jobs at 65bed9577254e68566827496a9693223da1e3e05. The Node 22 and Python 3.11 job passed 10 prototype tests. The matrix includes Python 3.10 and 3.12, Bun, macOS, and Windows.

The tests cover two Python environments for one module, concurrent and interleaved calls, class and static methods, overloads, generics, optional and keyword arguments, bytes, failures, borrowing and disposal, mixed Node and HTTP bridges, reloads, and a consumer TypeScript check. The default generated bytes remain unchanged in the fixture test.

An independent review found and reproduced a provenance flaw in the earlier renderer. The corrected head derives both generated forms internally from the same module. The reviewer accepted the corrected internal prototype after the full CI pass.

In the CI size test, binding_fixture source grew from 7,300 to 10,113 bytes and declarations from 1,897 to 5,023 bytes. advanced_types source grew from 22,779 to 28,918 bytes and declarations from 11,236 to 24,377 bytes. A public option needs a package and editor size budget.

Remaining production work

This draft does not add a public generate() option, package export, output-path collision checks, optional declaration handling, or configured output formats. The integration must reject output.sourceMap before calling this renderer until all emitted files support maps. The default generate() path is unchanged. This PR closes no issue and is not release acceptance.

@coderabbitai

coderabbitai Bot commented Sep 20, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

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.

@bbopen

bbopen commented Sep 20, 2026

Copy link
Copy Markdown
Owner Author

Integrated through reviewed implementation PR #362, merged as 43f111b43fbb0ce31dcb59f8fb489e8dadf3f191. This branch head is an ancestor of that merged commit. Final combined release candidate aa5497f867b36a76670afedbe9b34a6712a322e3 passed full CI 35508107651. Closing this component PR because its work is already on main; release publication is tracked by #354.

@bbopen bbopen closed this Sep 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant