Skip to content

Architecture: compile value contracts and compose conversion rules #345

Closed

Description

@bbopen

Reduce repeated defects by making type generation, conversion, and validation derive their decisions from one complete callable contract.

The design has two cooperating parts:

  1. Compile Python callable information into a resolved contract with arguments, overloads, logical result types, representations, runtime requirements, and diagnostics.
  2. Compose value conversion from shared semantic rules for primitives, records, collections, and scientific values.

Tracking:

Keep explicit runtime binding in #340 as a separate design lane. It removes global bridge selection from bound clients but is not required to prove the compiler or codec design.

Proof cases:

  • Integer policy shared by producer, generated types, and validator.
  • Float16 ndarray conversion reused by Torch.
  • An overloaded function returning a nested record.

Acceptance criteria:

Start with the bounded prototypes in #335 and #343. Keep transports and value RPC intact. Capability diagnostics do not implement coroutine execution; #338 still needs runtime work.

This revises the earlier issue-by-issue approach. Use the existing defect issues as acceptance cases. Let the prototype evidence determine implementation order and the release split with #342. Do not close defects based on architecture documents alone.

Activity

  1. added this to the Next milestone on Sep 11, 2026
  2. self-assigned this
    on Sep 11, 2026
  3. bbopen commented on Sep 20, 2026

    @bbopen
    OwnerAuthor

    The architecture decision is proceed for the accepted callable compiler and value-contract changes. Independent review covered the compiler, numeric behavior, overloads, coroutines, and the bounded extension proofs. Three generated-wrapper paths pass end-to-end checks. Precise return types require supported conversion and validation; unresolved and unsupported cases retain distinct diagnostics.

    The decision records compatibility, same-run performance evidence, and explicit limits. Bigint, dataclass, and runtime-binding prototypes remain design proofs. The final combined candidate passed its required checks. Publication and installed-consumer evidence are recorded in #334 and #342 and linked below.

    Evidence: docs/maintainers/architecture-decision-0.11.md, its linked design/review records, and the final CI and publication evidence below.

    Verified release evidence:

    The architecture decision records the accepted scope and prototype limits.

    Closing with the implemented and verified 0.11 release outcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions