Skip to content

test(ci): generate and execute wrappers in a clean consumer project #333

Closed

Description

@bbopen

Require generated-wrapper execution from a clean consumer project.

The focused review on 6b84614 passed 97 tests and skipped one generated runtime test. It requires generated/math.generated.ts to exist before the test starts.

Acceptance criteria:

  • Install the packed candidate package in a clean temporary consumer project.
  • Use an isolated Python environment with the matching tywrap-ir candidate.
  • Reject imports from the repository or an existing editable Python install.
  • Generate wrappers from controlled Python fixtures, compile them, import them, and execute them through NodeBridge.
  • Require no pre-existing generated directory or repository source alias.
  • Exercise a valid call, safe integers, rejection from fix(codec): reject unsafe Python integers before JSON encoding #331, and corrected float16 values from fix(codec): decode Arrow float16 values for NumPy and Torch #332.
  • A function annotated int that returns a string throws BridgeValidationError through its generated wrapper.
  • Required CI installs prerequisites and fails instead of skipping when they are missing.
  • Dispose bridges and remove temporary files after success and failure.

This extends shipped return validation in #268 and pinned contracts in #269. Snapshots and raw bridge tests remain useful but do not replace this check.

Architectural approach:

Provide the isolated consumer setup for #344. Add the architecture proof cases without replacing this issue's package-install and runtime-validation checks. Coordinate through #345.

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

    Required CI now packs npm, builds a Python wheel, installs both in temporary isolated environments, and checks import origins. The consumer generates, compiles, imports, and executes wrappers through NodeBridge. It checks valid calls, numeric boundaries, float16, selected wrong-return rejection, and cleanup. Missing prerequisites fail the job.

    Evidence: test/isolated_consumer.conformance.ts, vitest.isolated-consumer.config.ts, and the required isolated-consumer CI job. The published-consumer check also verifies exact registry packages without a local fallback.

    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

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions