Skip to content

feat(codegen): preserve callable contracts - #347

Merged
bbopen merged 54 commits into
mainfrom
codex/tywrap-callable-compiler-20260919
Sep 20, 2026
Merged

bbopen merged 54 commits into
mainfrom
codex/tywrap-callable-compiler-20260919

Conversation

@bbopen

@bbopen bbopen commented Sep 20, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Validate IR 0.4 with located errors and bounded traversal. Compile callable types from validated IR; the facade selects exported names only.
  • Preserve overload declarations and first-match runtime return checks. Warn about possible overlap using Python argument binding, including reordered keyword-only parameters.
  • Resolve values through the frozen revision-2 contract. Supported values include safe JSON integers, bytes, qualified NumPy and Torch float16, and selected local TypedDict records and aliases. Nested local expansion has cycle and depth guards. Foreign names cannot reuse local validators.
  • Widen unresolved or unsupported output types to unknown with located diagnostics, while retaining independent runtime checks where they remain valid. Keep type-only protocol declarations intact.
  • Enable coroutine execution for the current Node and Pyodide bridge capability. Keep unavailable-capability controls and default dataclass behavior conservative. Expose an isolated runtime binding template for separate integration.

Relates to #335 and #336. This PR remains a draft. It includes the scientific value-interface history from #348 and #353 as integration dependencies.

Evidence

  • CI on exact head 42feeca passed across the full matrix, including lint, typecheck, build, test, and optional scientific menagerie jobs.
  • Independent exact-source review accepted the compatibility delta through 42feeca. It checked nested local records and aliases, foreign validator identity, variadic tuple normalization, cycles, configured converter authority, and the 64-node alias boundary.
  • Regression tests cover generated overload behavior, unresolved result safety, local record and alias composition, the 70-alias bound, scalar and nested float16 provenance, and generated HTTP wrapper validation.
  • Host VM pressure remained level 2, so local compiler and full-suite runs were not attempted. CI is the exact-head verification surface.

Open integration gates

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

@github-actions github-actions Bot added the area:ci Area: CI and automation label Sep 20, 2026
@bbopen
bbopen merged commit 7223c01 into main Sep 20, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ci Area: CI and automation area:codegen area:docs Area: documentation area:runtime area:types

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant