Skip to content

feat(WO15): add interscript-py — Python runtime with compiled-IR execution and the model layer - #830

Merged
ronaldtse merged 2 commits into
mainfrom
worktree-agent-ae2bc888bd4fe8108
Nov 3, 2026
Merged

ronaldtse merged 2 commits into
mainfrom
worktree-agent-ae2bc888bd4fe8108

Conversation

@ronaldtse

Copy link
Copy Markdown
Contributor

Summary

  • WO15: interscript-py, the Python runtime, scaffolded under interscript-py/ — compiled JSON-IR map execution (interscript.maps.ir.v1: manifest + SHA256SUMS + per-map IR), loader with registry resolve and sha256 verification, and the interscript-ml fold-in as the optional [ml] model layer (ByT5 byte+3+EOS, IMF zip sha256, single-row-greedy decode)
  • Results: 8,048+ embedded corpus rows byte-exact across 256 bundled maps (317 pytest green); full corpus 305/305 runnable maps pass — 2 known-divergent rows skipped with evidence (TS reference produces identical bytes; the rows need Ruby-only string-alias semantics)
  • Model vectors: 5/6 conformance families byte-identical (urd-diac-base, khm-phonemic, tha-phonemic, fas-diac-base, urd-g2p-base — the last via the multi-part 2.1GB release download + sha256 verify); tha-g2p-lex-1.0 has no release asset to fetch
  • FINDING recorded for the owner: the released tha-phonemic-1.0.zip carries internal metadata id tha-g2p-lex-1.0 (sha matches the sidecar; weights decode correctly 12/12) — upstream packaging bug in interscript-models, worth a re-release
  • parsanol-python parse path documented in the README as the follow-up; package home question (own repo vs subtree) noted for the owner

Test plan

  • make test: 317 passed, 15 skipped (locally verified)
  • Full-corpus run: 305/305 runnable maps pass
  • 5/6 model families byte-identical against the frozen conformance fixtures

…mpiled JSON-IR map artifact

New top-level package (BSD-3-Clause), independent of the Ruby gem:

- loader for interscript.maps.ir.v1 artifact dirs (manifest +
  SHA256SUMS verify, release-tarball extraction, dependency resolution),
  matching the TS reference consumer's format exactly
- executor: port of interscript-ts runtime/ (sub rules with lookaround
  constraints and capture templates, parallel blocks via trie or
  megaregexp, run/funcall), on the regex module for \p{L} + variable
  lookbehind
- conformance: byte-exact replay of frozen model vectors
  (interscript-models/conformance) and the maps corpus' own embedded
  tests (bundled curated 265-map compiled subset; full corpus via
  $INTERSCRIPT_MAPS_IR)
- models subpackage: fold-in of the ByT5 IMF loader (byte+3 + EOS
  tokens, per-member sha256 verification, index registry resolve,
  single-row-greedy decode), optional [ml] extra
- artifact_fetch: GitHub Releases download channel
- python -m interscript.artifact_fetch, Makefile (test/test-full/
  test-ml/lint/build-artifact), scripts/build_maps_ir.sh

Embedded-corpus results: 256/256 runnable maps byte-identical on the
bundled subset, 305/305 on the full 313-map corpus (2 known-divergent
maps skipped: TS reference produces identical bytes; rows need Ruby-
only char-class alias semantics or the lexicon layer).
…; tidy counts

- add unicode/var-Cyrl/var-kor lib maps so every bundled map's declared
  dependencies resolve inside the subset (un-bul -> var-kor was dangling)
- strict_id flag for the tha-phonemic family: the released zip's
  metadata.yaml id is mislabeled upstream (tha-g2p-lex-1.0) while the
  weights decode its vectors 12/12 byte-exact; outputs stay byte-checked
- README/docstring subset counts (268), drop an unused import shim
@ronaldtse
ronaldtse merged commit 34bd882 into main Nov 3, 2026
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant