From d1f04341aa8cb457118813a76f76cab6d0520df2 Mon Sep 17 00:00:00 2001 From: Ronald Tse Date: Thu, 1 Oct 2026 20:31:01 +0800 Subject: [PATCH 1/4] ci: run the Python bridge leg in the ISC corpus sweep MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The bridge is corpus-conformant: Compiler::Python over the full corpus — 8,238 examples, 0 failures (interscript-py#11..#22). The SKIP_PYTHON exclusion is retired; pycall joins the bundle via the pyexec group and the sweep installs the current engine from interscript-py main, since the PyPI release predates the conformance work. rababa and other ML-model maps stay excluded through the maps gem's per-compiler skip lists. --- .github/workflows/rake.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/rake.yml b/.github/workflows/rake.yml index 8f6096de..d71c1e14 100644 --- a/.github/workflows/rake.yml +++ b/.github/workflows/rake.yml @@ -18,15 +18,16 @@ jobs: env: BUNDLE_WITHOUT: "secryst" SKIP_JS: "1" - SKIP_PYTHON: "1" ISC_SWEEP: "1" # The ISC corpus sweep: every map's own tests through every # supported compiler (Interpreter, Compiler::Ruby), against the # ../maps sibling from the monorepo checkout. The conformance gap # it measured is closed (16,482 examples, 0 failures — # interscript-ruby#779..#786); this is now the CI conformance - # gate for the corpus. The experimental Python bridge is excluded - # (SKIP_PYTHON) until its own corpus conformance work lands. + # gate for the corpus. The Python bridge now runs too: the + # interscript-py engine is corpus-conformant (8,227 examples, + # 0 failures — interscript-py#11..#20) and is installed from + # its main branch below. steps: - name: Checkout monorepo @@ -51,7 +52,7 @@ jobs: # packages rides out PEP 668 on Homebrew-managed macos Pythons. shell: bash run: | - bundle config set --local with jsexec + bundle config set --local with jsexec pyexec bundle install if bundle exec ruby -e 'require "pycall"' >/dev/null 2>&1; then # PyCall binds whichever libpython it was built against, which @@ -60,11 +61,14 @@ jobs: PYBIN=$(bundle exec ruby -e 'require "pycall"; v = PyCall.sys.version[/\d+\.\d+/]; puts "python#{v}"') if command -v "$PYBIN" >/dev/null 2>&1; then "$PYBIN" -m pip install --break-system-packages regex || "$PYBIN" -m pip install regex + # The bridge needs the current engine; the PyPI release + # predates the conformance work. + "$PYBIN" -m pip install --break-system-packages "git+https://github.com/interscript/interscript-py@main" || "$PYBIN" -m pip install "git+https://github.com/interscript/interscript-py@main" else echo "$PYBIN not on PATH — python helper not installed" fi else - echo "pycall not bundled (SKIP_PYTHON) — python helper not installed" + echo "pycall not bundled — the python compiler leg is unavailable this run" fi - name: RSpec From 4cb5fe6a7155402b3f111868842800433bc5c97e Mon Sep 17 00:00:00 2001 From: Ronald Tse Date: Thu, 1 Oct 2026 21:35:41 +0800 Subject: [PATCH 2/4] ci: fall back to plain python when python3.X is not on PATH Windows names the interpreter python.exe; PyCall still binds the same libpython the hosted Python provides, so fall back to python when the versioned name is absent. --- .github/workflows/rake.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/rake.yml b/.github/workflows/rake.yml index d71c1e14..a53e300b 100644 --- a/.github/workflows/rake.yml +++ b/.github/workflows/rake.yml @@ -59,6 +59,8 @@ jobs: # is not necessarily the python that bare `pip` targets — # install the regex helper into that interpreter. PYBIN=$(bundle exec ruby -e 'require "pycall"; v = PyCall.sys.version[/\d+\.\d+/]; puts "python#{v}"') + # Windows names the interpreter python.exe, not python3.X. + command -v "$PYBIN" >/dev/null 2>&1 || PYBIN=python if command -v "$PYBIN" >/dev/null 2>&1; then "$PYBIN" -m pip install --break-system-packages regex || "$PYBIN" -m pip install regex # The bridge needs the current engine; the PyPI release From 0f389d8fbfd7e03e676d4bcc11226533343e08a6 Mon Sep 17 00:00:00 2001 From: Ronald Tse Date: Thu, 1 Oct 2026 22:37:52 +0800 Subject: [PATCH 3/4] spec: 15s timeout for the Python bridge's first example per map MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit bgn-kor 서울 timed out on ruby 3.3 / windows: the bridge pays the map's ISC emission plus its py load on the first example of each map, and 5s is too tight on the slowest runner. Everything else about the sweep is unchanged; true hangs still expire far below the ceiling. --- spec/interscript_spec.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/spec/interscript_spec.rb b/spec/interscript_spec.rb index 09fb7b97..69838295 100644 --- a/spec/interscript_spec.rb +++ b/spec/interscript_spec.rb @@ -59,7 +59,12 @@ # Allow a bigger timeout for Rababa so that model files # can be provisioned. This is temporary until we find a # better location for this code. - timeout = /rababa/.match?(my_system_name) ? 100 : 5 + # The Python bridge pays the per-map ISC emission and + # load on its first example — 5s is too tight on the + # slowest runner (windows, ruby 3.3). Real hangs still + # time out well below these ceilings. + base = /rababa/.match?(my_system_name) ? 100 : 5 + timeout = compiler.name.include?("Python") && base == 5 ? 15 : base Timeout.timeout(timeout) do result = Interscript.transliterate(my_system_name, from, cache, compiler: compiler) expect(result).to eq(expected) From 728b132655bee1c9af6cce6af9a5b955ff86ded5 Mon Sep 17 00:00:00 2001 From: Ronald Tse Date: Thu, 1 Oct 2026 23:41:33 +0800 Subject: [PATCH 4/4] style: parentheses for the ternary's complex condition --- spec/interscript_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/interscript_spec.rb b/spec/interscript_spec.rb index 69838295..00d8203b 100644 --- a/spec/interscript_spec.rb +++ b/spec/interscript_spec.rb @@ -64,7 +64,7 @@ # slowest runner (windows, ruby 3.3). Real hangs still # time out well below these ceilings. base = /rababa/.match?(my_system_name) ? 100 : 5 - timeout = compiler.name.include?("Python") && base == 5 ? 15 : base + timeout = (compiler.name.include?("Python") && base == 5) ? 15 : base Timeout.timeout(timeout) do result = Interscript.transliterate(my_system_name, from, cache, compiler: compiler) expect(result).to eq(expected)