Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
239 commits
Select commit Hold shift + click to select a range
914c4f6
docs(codec): freeze internal value contract prototype
bbopen Sep 20, 2026
eabfe66
docs(codec): freeze internal value contract prototype
bbopen Sep 20, 2026
90cd6c6
docs(codec): narrow prototype to float16 scientific values
bbopen Sep 20, 2026
37747e8
test(ci): add isolated consumer package gate
bbopen Sep 20, 2026
103ccd6
docs(codec): narrow prototype to float16 scientific values
bbopen Sep 20, 2026
6513c4d
test(pyodide): add real WASM and browser checks
bbopen Sep 20, 2026
dfef732
feat(codegen): validate and preserve callable contracts
bbopen Sep 20, 2026
169ef2d
fix(ci): read Playwright browser metadata through package entry
bbopen Sep 20, 2026
61c09a3
test(pyodide): remove stale browser version constant
bbopen Sep 20, 2026
7d051ca
docs(codec): compose unions and fixed tuples in value contract
bbopen Sep 20, 2026
696ea14
fix(codec): reject unsafe integers and decode Arrow float16
bbopen Sep 20, 2026
56cfa61
docs(codec): compose unions and fixed tuples in value contract
bbopen Sep 20, 2026
cc65cc8
docs(codec): correct value contract revision reference
bbopen Sep 20, 2026
85d4726
fix(pyodide): use local package assets in Node smoke
bbopen Sep 20, 2026
1a436c8
test(pyodide): cover shipped JSON values in local runtime
bbopen Sep 20, 2026
0385994
test(pyodide): fetch locked NumPy asset in CI
bbopen Sep 20, 2026
8f89b9b
test(codec): separate safe scalar and Arrow array expectations
bbopen Sep 20, 2026
add4dac
chore(pyodide): sync bridge core after codec fix
bbopen Sep 20, 2026
94b7201
test(pyodide): report browser compiler diagnostics
bbopen Sep 20, 2026
ae88416
test(ci): compile browser wrapper from packed consumer
bbopen Sep 20, 2026
1b1135d
fix(codec): bound model conversion chains and cycles
bbopen Sep 20, 2026
ad35fc1
test(pyodide): execute native browser imports and bootstrap failure
bbopen Sep 20, 2026
917e368
test(pyodide): invoke browser smoke and propagate Python bootstrap error
bbopen Sep 20, 2026
333301e
ci(codec): run bridge core regressions in required jobs
bbopen Sep 20, 2026
1d60be3
test(pyodide): require missing runtime assets to fail
bbopen Sep 20, 2026
ae18ad7
Merge branch 'codex/tywrap-value-contracts-20260919' into codex/tywra…
bbopen Sep 20, 2026
d5137fa
test(consumer): reject unsafe integers and decode Arrow float16
bbopen Sep 20, 2026
53b3c8b
test(pyodide): preflight required runtime assets
bbopen Sep 20, 2026
5e289b7
test(consumer): install Arrow decoder in isolated project
bbopen Sep 20, 2026
e915ddd
Merge remote-tracking branch 'origin/main' into codex/tywrap-conforma…
bbopen Sep 20, 2026
f300b71
feat(codegen): route callable contracts through generation
bbopen Sep 20, 2026
c6d1543
Merge remote-tracking branch 'origin/main' into codex/tywrap-value-co…
bbopen Sep 20, 2026
c6c1d49
test(pyodide): verify installed runtime pins and core assets
bbopen Sep 20, 2026
892cb25
test(consumer): assert public validation error and always dispose
bbopen Sep 20, 2026
40370ee
fix callable compiler integration regressions
bbopen Sep 20, 2026
3b1e181
test(conformance): assert fresh generation and structured Python errors
bbopen Sep 20, 2026
fbe931e
fix(codec): validate terminal JSON integer metadata
bbopen Sep 20, 2026
c5c02e8
refresh menagerie callable contract snapshots
bbopen Sep 20, 2026
fa09797
feat(runtime): await Python coroutines in Node and Pyodide
bbopen Sep 20, 2026
d0a990e
fix(runtime): preserve timeout diagnostics and async cleanup
bbopen Sep 20, 2026
b39ca6e
Merge commit 'fbe931e' into codex/tywrap-coroutines-final-integration…
bbopen Sep 20, 2026
12a93a1
Merge commit 'd0a990e' into codex/tywrap-coroutines-final-integration…
bbopen Sep 20, 2026
b741337
test(pyodide): prove generated coroutine on real WASM
bbopen Sep 20, 2026
755616f
fix(codec): validate set subclass integers
bbopen Sep 20, 2026
8b2bd08
harden overload correlation and IR traversal
bbopen Sep 20, 2026
0486e7b
feat(runtime): await Python coroutines in Node and Pyodide
bbopen Sep 20, 2026
78d3656
fix(runtime): preserve timeout diagnostics and async cleanup
bbopen Sep 20, 2026
825a46f
honor Python 3.10 overload fallback in tests
bbopen Sep 20, 2026
bfbc6ef
Merge commit '755616f' into codex/tywrap-coroutines-final-integration…
bbopen Sep 20, 2026
93032cd
Merge commit '78d3656' into codex/tywrap-coroutines-final-integration…
bbopen Sep 20, 2026
b5a96b6
normalize cross-version overload snapshot and verify Torch dtype
bbopen Sep 20, 2026
1e8717b
fix(runtime): reap retired Python children after forced shutdown
bbopen Sep 20, 2026
677c06e
Merge commit '1e8717b' into codex/tywrap-coroutines-final-integration…
bbopen Sep 20, 2026
8ec57da
feat(codec): define bytes and per-call provenance contracts
bbopen Sep 20, 2026
88ad9de
feat(codec): define bytes and per-call provenance contracts
bbopen Sep 20, 2026
6b56a96
style(runtime): satisfy shutdown lint rules
bbopen Sep 20, 2026
3393850
test(pyodide): verify real coroutine cancellation and reuse
bbopen Sep 20, 2026
6847a73
Merge branch 'codex/tywrap-coroutines-20260920' into codex/tywrap-cor…
bbopen Sep 20, 2026
a2e2773
feat(codec): carry scalar ndarray proof per RPC call
bbopen Sep 20, 2026
9d9ae8e
consume bytes and scalar provenance in callable validators
bbopen Sep 20, 2026
f096210
chore: integrate reviewed numeric contracts
bbopen Sep 20, 2026
d5b341a
chore: integrate reviewed clean consumer gates
bbopen Sep 20, 2026
a65540b
ci: run full release command on manual validation
bbopen Sep 20, 2026
7e14414
test(architecture): add independent numeric oracle and fixed cases
bbopen Sep 20, 2026
16e2c48
test(architecture): bound exhaustive oracle assertion cost
bbopen Sep 20, 2026
05a891e
test: expect broad hidden overload implementation
bbopen Sep 20, 2026
855115e
style(test): use braces in architecture oracle
bbopen Sep 20, 2026
7e2301c
fix(rpc): keep one-argument validator call shape
bbopen Sep 20, 2026
bc3641b
Merge commit '755616fc2dfac972f3f58fcc997afc53e8b705cf' into codex/ty…
bbopen Sep 20, 2026
a642527
test(rpc): assert additive validator provenance
bbopen Sep 20, 2026
820760b
test: integrate independent binary16 conformance oracle
bbopen Sep 20, 2026
27cf162
Merge commit 'a642527' into codex/tywrap-callable-compiler-20260919
bbopen Sep 20, 2026
b380418
fix(runtime): fence pool replacement until child cleanup succeeds
bbopen Sep 20, 2026
e640be2
Merge branch 'codex/tywrap-coroutines-20260920' into codex/tywrap-cor…
bbopen Sep 20, 2026
552b530
test: prove scalar float16 through generated HTTP wrapper
bbopen Sep 20, 2026
1fa6a87
test(architecture): add overloaded nested-record fixtures
bbopen Sep 20, 2026
8879171
test(pool): wait for retired cleanup before replacement
bbopen Sep 20, 2026
8967a8a
Merge branch 'codex/tywrap-coroutines-20260920' into codex/tywrap-cor…
bbopen Sep 20, 2026
fe21240
Merge branch 'codex/tywrap-callable-compiler-20260919' into codex/tyw…
bbopen Sep 20, 2026
e14d2f3
fix(codec): bind Torch float16 to nested ndarray dtype
bbopen Sep 20, 2026
e9fa9b2
test: align nested scalar proof with array index normalization
bbopen Sep 20, 2026
11a1db7
fix(pool): retain failed cleanup from unpublished workers
bbopen Sep 20, 2026
0c3a1ce
Merge value interface Torch float16 guard
bbopen Sep 20, 2026
6d5fed9
Merge branch 'codex/tywrap-coroutines-20260920' into codex/tywrap-cor…
bbopen Sep 20, 2026
c46f0ad
feat: integrate reviewed bytes and scalar provenance contracts
bbopen Sep 20, 2026
f20b4a7
test: exercise generated Torch float16 wrapper through HTTP codec
bbopen Sep 20, 2026
0ac3823
test: exercise generated callable contracts in isolated consumer
bbopen Sep 20, 2026
f33cc5b
Merge approved Torch dtype contract for conformance proof
bbopen Sep 20, 2026
b831054
test: reject architecture contract mutations structurally
bbopen Sep 20, 2026
f23a890
feat: integrate reviewed coroutine execution and cancellation
bbopen Sep 20, 2026
64087dc
test: keep overload helper out of extracted module callables
bbopen Sep 20, 2026
0852f78
Merge compiler candidate generated Torch and index proofs
bbopen Sep 20, 2026
5c1728f
fix(compiler): derive callable types from IR and detect bound overloa…
bbopen Sep 20, 2026
fda3d6d
fix(ir): avoid array index as inherited type parameters
bbopen Sep 20, 2026
5d0b3ad
fix(scientific): resolve NumPy float16 dtype from expanded annotation
bbopen Sep 20, 2026
ba6da84
Merge compiler NumPy float16 and IR authority fixes for conformance p…
bbopen Sep 20, 2026
96041aa
test: preserve strict NumPy warning control and required dataclass fi…
bbopen Sep 20, 2026
461ff6a
fix(scientific): require NumPy and Torch dtype identity
bbopen Sep 20, 2026
ecba0e0
test: typecheck generated float16 scalar and array results
bbopen Sep 20, 2026
87ce83e
Merge qualified scientific dtype guard and compiler corrections
bbopen Sep 20, 2026
6f82ccb
fix(ir): clear only matching scientific annotation warnings
bbopen Sep 20, 2026
1736b68
Merge exact scientific warning filter for conformance proof
bbopen Sep 20, 2026
0006a3f
feat(generator): expose isolated runtime binding template
bbopen Sep 20, 2026
510ab04
test(binding): stage explicit client binding prototype
bbopen Sep 20, 2026
69a0a03
Merge branch 'codex/tywrap-callable-compiler-20260919' into codex/tyw…
bbopen Sep 20, 2026
d365514
feat: integrate reviewed callable contract compiler
bbopen Sep 20, 2026
129fd24
feat(binding): consume compiler runtime getter template
bbopen Sep 20, 2026
6a72dce
fix(generator): isolate binding provider namespace
bbopen Sep 20, 2026
243b134
Merge branch 'codex/tywrap-callable-compiler-20260919' into codex/tyw…
bbopen Sep 20, 2026
0ab0a01
test: integrate independently reviewed generated consumer proofs
bbopen Sep 20, 2026
dd0534c
fix(binding): accept allocated runtime provider identifier
bbopen Sep 20, 2026
d572cb7
fix(binding): type JSON property mapping explicitly
bbopen Sep 20, 2026
acc8178
chore: include published promotional site in release candidate
bbopen Sep 20, 2026
fb93225
style: format callable compiler source and tests
bbopen Sep 20, 2026
fcfb829
docs: exclude internal contract notes from llms bundle
bbopen Sep 20, 2026
3b84b6f
docs(codec): specify bounded value extension protocols
bbopen Sep 20, 2026
98645b2
test(codec): prototype exact integers and dataclass output
bbopen Sep 20, 2026
5ea7635
test(codec): prototype cross-language value extensions
bbopen Sep 20, 2026
d7c2412
test(codec): reject ambiguous prototype envelopes
bbopen Sep 20, 2026
a367777
test(codec): decode exact requests with declared float nodes
bbopen Sep 20, 2026
bba1e66
test(codec): align prototype Unicode and version boundaries
bbopen Sep 20, 2026
8342221
test(codec): emit the counted Unicode wire form
bbopen Sep 20, 2026
11f4fde
test(codec): match prototype output bytes to checked limit
bbopen Sep 20, 2026
42ef2e4
test(codec): reject ordinary class as dataclass output
bbopen Sep 20, 2026
4f48192
test(codec): show serializable unsupported dataclass field
bbopen Sep 20, 2026
5893212
test(codec): prove generated Point through dataclass adapter
bbopen Sep 20, 2026
3862ebd
test: use generated camelCase Point callable
bbopen Sep 20, 2026
8a1d624
test: derive Point proof from analyzed importable fixture
bbopen Sep 20, 2026
27a5f3f
docs: record exact integer migration costs
bbopen Sep 20, 2026
0954106
docs: separate proposed policy from prototype checks
bbopen Sep 20, 2026
b22bdfa
test: bind generated Point call to explicit value policy adapter
bbopen Sep 20, 2026
9fb5457
docs: record generated Point proof and remaining boundary
bbopen Sep 20, 2026
9a4fc75
test: pin Point adapter rejection causes
bbopen Sep 20, 2026
c31157f
docs: mark bigint generator contract gap
bbopen Sep 20, 2026
f41bb44
test: pin dataclass input and depth rejection
bbopen Sep 20, 2026
90098c5
test(binding): align assertions with generated runtime contracts
bbopen Sep 20, 2026
1d76041
test(node): assert generated coroutine return contract
bbopen Sep 20, 2026
3fefce2
test(pyodide): assert generated coroutine return contract
bbopen Sep 20, 2026
7670512
Merge branch 'codex/tywrap-coroutines-20260920' into codex/tywrap-cor…
bbopen Sep 20, 2026
1515267
test(pyodide): exercise default coroutine capability
bbopen Sep 20, 2026
385d996
chore: integrate reviewed binding template and release formatting
bbopen Sep 20, 2026
932d288
test(binding): reflect Python 3.10 overload fallback
bbopen Sep 20, 2026
37ee8db
Integrate coroutine capability and safe object fallback
bbopen Sep 20, 2026
104efd4
test: integrate reviewed generated dataclass design proof
bbopen Sep 20, 2026
db77710
merge: combine callable compiler with coroutine runtime fixtures
bbopen Sep 20, 2026
67f030e
Update object return snapshots to unknown
bbopen Sep 20, 2026
86b6284
Merge branch 'codex/tywrap-callable-compiler-20260919' into codex/tyw…
bbopen Sep 20, 2026
01c1183
test: require real generated Torch float16 callable in scientific CI
bbopen Sep 20, 2026
57cdbc7
Fail closed on unresolved returns and recognize torch HalfTensor
bbopen Sep 20, 2026
9427879
Merge compiler HalfTensor and fail-closed return support for conforma…
bbopen Sep 20, 2026
f50e552
docs: keep agent guide aligned with curated user documentation
bbopen Sep 20, 2026
4f7c8e5
Keep validation checks when widening unresolved results
bbopen Sep 20, 2026
a289bdc
Resolve selected local records and simple aliases
bbopen Sep 20, 2026
ebfa17e
Reconcile generic safety tests and generated snapshots
bbopen Sep 20, 2026
ec2dbb6
Compose local value contracts and guard foreign validation
bbopen Sep 20, 2026
42feeca
Bound compile-local alias expansion depth
bbopen Sep 20, 2026
8919d12
test(ci): verify exact published npm and PyPI consumer artifacts
bbopen Sep 20, 2026
c762c65
merge: integrate reviewed compiler compatibility corrections
bbopen Sep 20, 2026
3763324
merge: take accepted callable compiler baseline
bbopen Sep 20, 2026
f4b1e92
Merge accepted callable compiler baseline for Torch conformance proof
bbopen Sep 20, 2026
7223c01
Merge commit '42feeca0abd1314592be691faa6d608541dfc6d2' into codex/ty…
bbopen Sep 20, 2026
54cef7c
merge: take accepted conformance evidence
bbopen Sep 20, 2026
737fcff
docs: add 0.11 migration guide to release candidate
bbopen Sep 20, 2026
1e6ff97
test(binding): preserve canonical unknown generic return
bbopen Sep 20, 2026
4db7002
test: analyze Torch fixture outside repository namespace
bbopen Sep 20, 2026
45c4c67
merge: add reviewed published-package verification
bbopen Sep 20, 2026
2cc49f0
feat(contracts): define pinned exact integer revision 3
bbopen Sep 20, 2026
f90705e
docs(codec): specify bounded value extension protocols
bbopen Sep 20, 2026
f9bea9c
test(codec): prototype exact integers and dataclass output
bbopen Sep 20, 2026
4040b74
test(codec): prototype cross-language value extensions
bbopen Sep 20, 2026
e460a4f
test(codec): reject ambiguous prototype envelopes
bbopen Sep 20, 2026
30453fc
test(codec): decode exact requests with declared float nodes
bbopen Sep 20, 2026
8ed94d9
test(codec): align prototype Unicode and version boundaries
bbopen Sep 20, 2026
6e694a7
test(codec): emit the counted Unicode wire form
bbopen Sep 20, 2026
0ad97ce
test(codec): match prototype output bytes to checked limit
bbopen Sep 20, 2026
9a1a4c0
test(codec): reject ordinary class as dataclass output
bbopen Sep 20, 2026
9a00640
test(codec): show serializable unsupported dataclass field
bbopen Sep 20, 2026
80bfa77
test(codec): prove generated Point through dataclass adapter
bbopen Sep 20, 2026
0226fd9
test: use generated camelCase Point callable
bbopen Sep 20, 2026
f76641f
test: derive Point proof from analyzed importable fixture
bbopen Sep 20, 2026
20fa0f6
docs: record exact integer migration costs
bbopen Sep 20, 2026
f835f98
docs: separate proposed policy from prototype checks
bbopen Sep 20, 2026
a84e9b9
test: bind generated Point call to explicit value policy adapter
bbopen Sep 20, 2026
5010dc0
docs: record generated Point proof and remaining boundary
bbopen Sep 20, 2026
58da680
test: pin Point adapter rejection causes
bbopen Sep 20, 2026
18aa8de
docs: mark bigint generator contract gap
bbopen Sep 20, 2026
5b2dc3f
test: pin dataclass input and depth rejection
bbopen Sep 20, 2026
c45aac0
test: add analyzed exact integer callable fixture
bbopen Sep 20, 2026
684b940
test: add private exact integer call adapter
bbopen Sep 20, 2026
bd9efc7
test: keep adapter capability metadata outside request
bbopen Sep 20, 2026
1208322
test: check exact call arguments as one bounded record
bbopen Sep 20, 2026
9aec49f
docs: measure representative exact integer payload growth
bbopen Sep 20, 2026
8d437b7
test: make exact fixture distinguish signed zero
bbopen Sep 20, 2026
d8b29a4
feat(contracts): define pinned exact integer revision 3
bbopen Sep 20, 2026
38c9b84
test: map resolved v3 nodes into prototype codec
bbopen Sep 20, 2026
25644d8
merge: integrate verified real Torch conformance proof
bbopen Sep 20, 2026
ba4b75c
merge: integrate reviewed typed coroutine proofs
bbopen Sep 20, 2026
65bed95
fix(binding): derive both forms from one compiled model
bbopen Sep 20, 2026
beaf569
feat(codegen): compile exact integers behind v3 capability
bbopen Sep 20, 2026
a3bdc13
feat(codegen): compile exact integers behind v3 capability
bbopen Sep 20, 2026
a51301a
fix(contracts): make recursive revisions typecheck
bbopen Sep 20, 2026
d6f1bac
test: prove generated exact bigint wrapper through bound provider
bbopen Sep 20, 2026
694bc00
fix(contracts): make recursive revisions typecheck
bbopen Sep 20, 2026
5e40408
merge: integrate reviewed explicit client binding prototype
bbopen Sep 20, 2026
a8026a2
docs: record accepted binding design and production limits
bbopen Sep 20, 2026
6b12a3e
fix(compiler): reject ambiguous union wire values
bbopen Sep 20, 2026
ba138a4
docs: state bounded generated bigint proof and rollout gap
bbopen Sep 20, 2026
af55f56
fix(compiler): preserve provably disjoint unions
bbopen Sep 20, 2026
1862f3e
fix(codegen): type exact method and variadic inputs
bbopen Sep 20, 2026
d06e4fa
test: prove generated nested exact integer return and request caps
bbopen Sep 20, 2026
42ff1e1
test: reject malformed nested bigint envelope in bound call
bbopen Sep 20, 2026
238b852
docs: record 0.10 history and planned 0.11 release scope
bbopen Sep 20, 2026
11d828a
merge: integrate reviewed exact integer contract prototype
bbopen Sep 20, 2026
4f224da
merge: adopt accepted exact integer v3 source
bbopen Sep 20, 2026
88859e2
fix(compiler): account for permissive marker decoders
bbopen Sep 20, 2026
919a674
docs: explain extractor upgrade and fresh contract generation
bbopen Sep 20, 2026
da1d2fb
docs: require replacing pinned IR during migration
bbopen Sep 20, 2026
b1114e2
docs: describe resolved callable compilation in architecture guide
bbopen Sep 20, 2026
9ed30b1
merge: align exact integer proof with release integration
bbopen Sep 20, 2026
577800b
docs: describe both analyzed exact integer callables
bbopen Sep 20, 2026
f83f2fb
docs: distinguish IR shape from requested module validation
bbopen Sep 20, 2026
b11dae6
fix: guard optional scientific marker fields in unions
bbopen Sep 20, 2026
c791315
merge: integrate reviewed generated bigint adapter proof
bbopen Sep 20, 2026
9e87968
style: format union marker guard
bbopen Sep 20, 2026
3fe3bcf
merge: combine exact integer and union wire guards
bbopen Sep 20, 2026
5f019a5
perf(frame): slice ASCII payloads without per-character scan
bbopen Sep 20, 2026
f1c0041
test(frame): cover ASCII and Unicode frame boundaries
bbopen Sep 20, 2026
4e68452
docs(perf): state fixed chunk gate without stale ratio claim
bbopen Sep 20, 2026
f3a09ef
fix(dev): retain last good bridge when source changes mid-reload
bbopen Sep 20, 2026
193f0a5
merge: integrate reviewed ASCII frame encoding optimization
bbopen Sep 20, 2026
bcc5e47
fix(dev): preserve working reload when Python sources change during p…
bbopen Sep 20, 2026
c01b43b
fix(review): synchronize compiler guides and type generator fixtures
bbopen Sep 20, 2026
9f4ec8c
test: accept exact published prerelease versions
bbopen Sep 20, 2026
861c57e
test(consumer): integrate reviewed exact prerelease validation
bbopen Sep 20, 2026
88a6605
test(codegen): cover extracted positional-only overloads
bbopen Sep 20, 2026
0af3d9f
fix(runtime): isolate retired subprocess generation
bbopen Sep 20, 2026
b89d346
test(codegen): integrate reviewed positional-only overload coverage
bbopen Sep 20, 2026
3dd1330
fix(runtime): integrate reviewed subprocess generation isolation
bbopen Sep 20, 2026
6eec0d4
style(test): format watch regression assertion
bbopen Sep 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 64 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ jobs:
run: npm run test:types
- name: Build
run: npm run build
- name: Full release checks
if: github.event_name == 'workflow_dispatch'
run: CI=1 npm run check:all

test:
if: github.event_name != 'schedule'
Expand Down Expand Up @@ -78,6 +81,60 @@ jobs:
files: ./coverage/lcov.info
fail_ci_if_error: false

isolated-consumer:
if: github.event_name != 'schedule'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: 22
cache: npm
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: '3.11'
- name: Install dependencies
run: npm ci --prefer-offline --no-audit
- name: Build package candidate
run: npm run build
- name: Run isolated consumer check
env:
CI: '1'
run: npx vitest run --config vitest.isolated-consumer.config.ts

pyodide-browser:
if: github.event_name != 'schedule'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: 22
cache: npm
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: '3.11'
- name: Install dependencies
run: npm ci --prefer-offline --no-audit
- name: Install tywrap-ir
run: python -m pip install -e tywrap_ir
- name: Build package
run: npm run build
- name: Install Chromium
run: npx playwright install --with-deps chromium
- name: Fetch locked NumPy asset
run: node scripts/fetch-pyodide-package.mjs numpy
- name: Record pinned runtime evidence
run: node scripts/print-pyodide-ci-evidence.mjs
- name: Run real Pyodide and browser checks
env:
CI: '1'
run: npx vitest run --config vitest.pyodide.config.ts

python-suite-core:
if: github.event_name != 'schedule'
runs-on: ubuntu-latest
Expand All @@ -101,7 +158,7 @@ jobs:
- name: Run Python codec and frame tests
run: |
python -m pip install pytest
python -m pytest test/python/test_bridge_codec.py test/python/test_frame_codec.py
python -m pytest test/python/test_bridge_codec.py test/python/test_bridge_core.py test/python/test_frame_codec.py

python-suite-data:
if: github.event_name != 'schedule'
Expand Down Expand Up @@ -223,11 +280,12 @@ jobs:
PIP_PROGRESS_BAR: 'off'
run: |
python -m pip install -e tywrap_ir
python -m pip install numpy==2.3.5 pandas==3.0.2 pyarrow==24.0.0 scipy==1.16.3 scikit-learn==1.8.0
python -m pip install numpy==2.3.5 pandas==3.0.2 pyarrow==24.0.0 scipy==1.16.3 scikit-learn==1.8.0 pydantic==2.7.4
python -m pip install torch==2.10.0 --index-url https://download.pytorch.org/whl/cpu
- name: Run pinned scientific menagerie
env:
TYWRAP_CODEC_PYTHON: python
TYWRAP_REQUIRE_TORCH_CONFORMANCE: '1'
run: npm run test:menagerie

os:
Expand Down Expand Up @@ -359,6 +417,8 @@ jobs:
needs:
- lint
- test
- isolated-consumer
- pyodide-browser
- python-suite-core
- python-suite-data
- living-app
Expand All @@ -373,6 +433,8 @@ jobs:
fail=0
if [ "${{ needs.lint.result }}" != "success" ]; then echo "::error::lint: ${{ needs.lint.result }}"; fail=1; fi
if [ "${{ needs.test.result }}" != "success" ]; then echo "::error::test: ${{ needs.test.result }}"; fail=1; fi
if [ "${{ needs.isolated-consumer.result }}" != "success" ]; then echo "::error::isolated-consumer: ${{ needs.isolated-consumer.result }}"; fail=1; fi
if [ "${{ needs.pyodide-browser.result }}" != "success" ]; then echo "::error::pyodide-browser: ${{ needs.pyodide-browser.result }}"; fail=1; fi
if [ "${{ needs.python-suite-core.result }}" != "success" ]; then echo "::error::python-suite-core: ${{ needs.python-suite-core.result }}"; fail=1; fi
if [ "${{ needs.python-suite-data.result }}" != "success" ]; then echo "::error::python-suite-data: ${{ needs.python-suite-data.result }}"; fail=1; fi
if [ "${{ needs.living-app.result }}" != "success" ]; then echo "::error::living-app: ${{ needs.living-app.result }}"; fail=1; fi
Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/published-consumer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Published consumer

# Run only after both exact versions are public on npm and PyPI.
# From the released repository ref:
# gh workflow run published-consumer.yml --ref <release-ref> \
# -f npm_version=<exact-npm-version> -f pypi_version=<exact-pypi-version>
on:
workflow_dispatch:
inputs:
npm_version:
description: Exact published tywrap version on npm
required: true
type: string
pypi_version:
description: Exact published tywrap-ir version on PyPI
required: true
type: string

run-name: npm ${{ inputs.npm_version }} and PyPI ${{ inputs.pypi_version }}

permissions:
contents: read

jobs:
published-consumer:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: 22
cache: npm
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: '3.11'
- name: Install test runner
run: npm ci --ignore-scripts --prefer-offline --no-audit --no-fund
- name: Check published packages in a clean consumer
env:
CI: '1'
TYWRAP_CONSUMER_MODE: published
TYWRAP_PUBLISHED_NPM_VERSION: ${{ inputs.npm_version }}
TYWRAP_PUBLISHED_PYPI_VERSION: ${{ inputs.pypi_version }}
run: npx vitest run --config vitest.isolated-consumer.config.ts
32 changes: 29 additions & 3 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,17 @@ The scientific codec envelope reference lives in

## Recent releases

### v0.10.0: scientific codec correctness

`v0.10.0` shipped on 13 July 2026. Scientific values now compose inside
containers, and decoded envelopes validate their shape, dtype, and provenance.
JSON ndarray and pandas conversions reject values they cannot preserve.
Torch bfloat16 values use exact float32 storage, and Arrow supports scalar arrays.
The pinned scientific menagerie checks the supported cases and explicit failures.

The Python package stayed at `tywrap-ir` 0.3.0 with IR schema 0.4.0.
See [the changelog](./CHANGELOG.md#0100-2026-07-13) for compatibility details.

### v0.9.0: typed value-RPC

`v0.9.0` narrowed tywrap to one job done well: typed value-RPC between
Expand Down Expand Up @@ -113,9 +124,24 @@ and bridge live.

## Now

The typed value-RPC contract pass (#260) is complete as of `v0.9.0`, and the
scientific data plane (#237) as of `v0.8.0`. The next release theme is not yet
locked; candidates are drawn from **Later** below.
The next planned release is `v0.11.0`, tracked in #342 and #334. It must reject
unsafe Python integers before JSON encoding and decode Arrow float16 storage
as numeric values. Generated wrappers must pass a clean consumer installation
test with the candidate npm and Python packages.

Architecture work in #345 joins callable resolution with shared value contracts.
Its proof covers safe integers, float16 arrays reused by Torch, and overloads
that return nested records. Independent tests must exercise generation,
TypeScript compilation, execution, decoding, and return validation.

Overload preservation and coroutine execution have separate acceptance criteria
in #336 and #338. Actual Pyodide and browser tests in #341 must pass before any
browser coroutine claim. The release scope will record only accepted behavior.

Bigint transport, dataclass values, and explicitly bound clients remain bounded
design prototypes in #337, #339, and #340. Completing their designs does not
establish general production support. The current integer release policy remains
rejection outside the JavaScript safe range.

See [docs/codec-envelopes.md](./docs/codec-envelopes.md) for the scientific
codec envelope reference.
Expand Down
1 change: 1 addition & 0 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export default defineConfig({
text: 'Guide',
items: [
{ text: 'Getting Started', link: '/guide/getting-started' },
{ text: 'Migrating to 0.11', link: '/guide/migrating-to-0-11' },
{ text: 'Agent Adoption', link: '/guide/agent-adoption' },
{ text: 'Configuration', link: '/guide/configuration' },
{ text: 'Watch & Reload', link: '/guide/dev-reload' },
Expand Down
132 changes: 132 additions & 0 deletions docs/guide/migrating-to-0-11.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
# Migrating to 0.11

This guide covers the planned 0.11 changes. The release is not published yet.

## Large Python integers

Python `int` results still use TypeScript `number`. The supported range is
`-9007199254740991` through `9007199254740991`, inclusive.

Earlier versions could round larger integers when JavaScript parsed the response.
The new serializer rejects those values before writing JSON. This applies to root
results, nested containers, supported NumPy scalars, and model dumps.

For example, a result containing `{"items": [9007199254740993]}` now fails at
`result.items[0]`. The error identifies the unsafe value and suggests an explicit
string or an Arrow integer column.

Return a string when the value represents an identifier or must remain an exact
decimal integer:

```python
def large_identifier() -> str:
return str(9007199254740993)
```

The generated return type is `Promise<string>`. Convert that string with
JavaScript `BigInt` if your application needs integer arithmetic. Validate any
string that comes from an untrusted source before using it.

Keep integer columns in Arrow tables when you need the existing Arrow int64
representation. Arrow int64 remains exact and can decode as JavaScript `bigint`.
JSON fallback does not provide that representation and rejects unsafe integers.

Booleans and finite floats remain supported. Converting an integer to a Python
`float` can lose precision before tywrap receives it. Use a string when exactness
matters. Tagged bigint transport remains a separate design proposal.

## NumPy and Torch float16

The Arrow decoder now converts float16 storage words into their numeric values
before reshaping the result. For example, `[15872, 49280]` becomes the intended
`[1.5, -2.25]`. Remove application code that manually decodes those storage words.

The conversion preserves signed zero, finite subnormal values, and finite extrema.
NumPy arrays and nested Torch tensors use the same conversion. Non-finite results
continue to reject under the existing policy.

The scientific envelope format, JSON fallback, and Arrow int64 behavior stay
compatible. Torch bfloat16 keeps its existing float32 transport conversion.

## Return types that cannot be validated

An unresolved Python `object` result now produces `Promise<unknown>`. Python
objects can include strings and numbers, which TypeScript's `object` type excludes.

An unresolved generic result also becomes `unknown`. Earlier wrappers could
declare `Promise<T>` while accepting any returned value. A generic input remains
generic, but its type alone cannot prove that Python returned the same type.
This also applies when the unresolved type parameter appears in a nested result.

Generation reports the unresolved conversion. `--fail-on-warn` rejects that
diagnostic. Use a supported concrete return annotation or overload when the
Python API has a known result type. Otherwise, check the value before using it:

```ts
const result = await generatedFunction(input);
if (typeof result !== 'string') {
throw new TypeError('Expected a string result');
}
console.log(result.toUpperCase());
```

The current value contract does not resolve every Python annotation. For example,
`Literal` results become `unknown`, while their existing literal checks remain.
Other unresolved returns retain available marker, container or record checks.
These partial checks do not prove a precise TypeScript return type.
Type-only Protocol methods keep their declared generic signatures.

Supported string and integer overloads retain their corresponding return types.
Use Python 3.11 or later to extract registered overloads. Python 3.10 keeps the
implementation signature when its typing module cannot expose the overloads.

## Coroutine results

The updated Node and Pyodide bridges await Python coroutine results. Generated
wrappers use the function's resolved result type, such as `Promise<string>`.
Upgrade the generator and runtime together, then regenerate wrappers.

An HTTP client still depends on its server. Use a compatible server that awaits
Python results; upgrading the TypeScript client does not update that server.

## Regenerate wrappers

After these versions are published, upgrade both packages:

```bash
npm install tywrap@0.11.0
python3 -m pip install --upgrade tywrap-ir==0.3.1
```

Use the Python executable selected by `runtime.node.pythonPath` and
`runtime.node.virtualEnv` instead of `python3` when your configuration differs.
The new extractor captures generic parameters used only in overload annotations.
Its IR schema remains `0.4.0`, so the schema check alone cannot detect an older
extractor or an older saved contract.

Extract fresh IR when regenerating:

```bash
npx tywrap generate --no-cache
```

This bypasses the on-disk IR cache. It does not replace existing cache entries.
If you enable caching again, first remove the old generated IR files from
`.tywrap/cache` so generation extracts and caches the updated contracts.

If you use `contractInput`, temporarily omit it to extract fresh contracts with
the updated Python package. Review each new `<module>.contract.json` in your
output directory. Replace the corresponding pinned input file with that contract,
or point `contractInput` to the new file. Then restore the setting.
The `--no-cache` option does not replace a pinned input contract.

Regenerate wrappers with the upgraded generator. Python `int` return validators
then check the safe integer range as well as the JavaScript value type.
Regeneration also applies the reviewed callable-contract diagnostics.

Update any tests that expected a rounded integer or float16 storage words.
Assert the corrected value or the specific conversion error instead.

Run your generated calls against the upgraded runtime before deploying them.
An old wrapper cannot add the new generated return checks by itself, although the
upgraded Python serializer still rejects unsafe integer results.
Loading
Loading