spec: gallery parity with the TypeScript examples - #769
Conversation
The same conversion table interscript-ts examples/ asserts - same bytes from every runtime, demonstrated. Verified locally: 3/3 green.
The gemspec derives its maps dependency constraint from this version (~> 2.5.0a now). Maps shipped 2.5.0 (the ISC corpus) on 2026-08-26 and every CI job since has failed bundler resolution against ../maps — main has been red since. The release of the gem itself remains an owner decision; this only restores resolvable CI.
The standard job plain-checkouts the standalone repo; the Gemfile's path: ../maps then fails bundler resolution (exit 13) before any linting runs. The maps checkout makes the Gemfile resolvable - lint itself never loads the corpus.
|
The version lockstep fix (2.4.5 -> 2.5.0) unmasked main's real rspec state: 79 of 315 examples fail on the first bundler-resolvable run since 2026-08-26 — the gem's full-corpus suite against the ISC-only maps corpus (the same class of work interscript-py#5 just completed for Python). Those failures predate this PR and are untouched by it; this PR's own additions are green (gallery parity 3/3 locally, StandardRB clean, CI now resolves). Suggest triaging the 79 as their own work order — likely an ISC-era pass over the Ruby runtime mirroring interscript-py#5. |
|
Root cause named for the CI failure of this spec (and likely many of the 79): |
TODO.impl 12-14 (all COMPLETE): - 12: NodeAdapter wires ISC dependencies - the adapter built metadata/tests/aliases/stages and silently DROPPED dependencies, so every cross-map run in an .isc document dereferenced nil (interpreter.rb:78 via the run branch). Deps now carry full_name, the alias, import semantics (unaliased = library import, the ISC form of the .imp 'dependency x, import: true'), and documents loaded through the compiler's own dispatch so chains recurse. Also: rule constraints read :item (the builder's shape) - reading the wrong key silently produced a match-always before-guard, the exact Oleghovych regression the Python port hit too. Repro spec RED then GREEN against the real corpus (bgnpcgn-ukr -> Anton Olehovych, bgnpcgn-deu -> Tschueß!). Local runs had been green only because the gem's load path preferred the installed 2.4.3 .imp maps gem. - 13: standardrb 0 offenses (was: the job never got past bundler). Autofix + hand fixes; the deliberate idioms (/-d flags, DSL method_missing) carry inline disables with reasons; URI.open gets a scoped disable (fixed interscript-hosted model URI, not input). - 14: weekly lockstep-check workflow - the maps-version drift that red-broke CI silently for two weeks now fails as a named alert with both version numbers in the log.
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v7 | ||
| - name: Clone the maps corpus as the path dependency | ||
| run: git clone --depth 1 https://github.com/interscript/maps ../maps | ||
| - uses: ruby/setup-ruby@v1 | ||
| with: | ||
| ruby-version: "3.4" | ||
| - name: Report both version numbers | ||
| run: | | ||
| echo "gem: $(ruby -Ilib -e 'require "interscript/version"; print Interscript::VERSION')" | ||
| echo "maps: $(ruby -e 'print File.read("../maps/interscript-maps.gemspec")[/INTERSCRIPT_MAPS_VERSION = "([^"]+)"/, 1]')" | ||
| - name: Resolve the lockfile against the corpus | ||
| run: bundle lock |
| # Unescape YAML escape sequences, then re-escape for ISC | ||
| text = text.gsub('\\"', '"').gsub("\\\\", "\\") | ||
| @out << text.gsub('\\', '\\\\\\\\').gsub('"', '\\"').gsub("\\u", "\\\\\\\\u") | ||
| @out << text.gsub("\\", "\\\\\\\\").gsub('"', '\\"').gsub("\\u", "\\\\\\\\u") |
| @out << "\\n" + @scanner[1].strip + " " | ||
| cont = @scanner.scan(/[^\n]+/).to_s | ||
| cont = cont.gsub('\\', '\\\\\\\\').gsub('"', '\\"').gsub("\\u", "\\\\\\\\u") | ||
| cont = cont.gsub("\\", "\\\\\\\\").gsub('"', '\\"').gsub("\\u", "\\\\\\\\u") |
| @out << "\\n" + @scanner[1].strip + " " | ||
| cont = @scanner.scan(/[^\n]+/).to_s | ||
| cont = cont.gsub('\\', '\\\\\\\\').gsub('"', '\\"').gsub("\\u", "\\\\\\\\u") | ||
| cont = cont.gsub("\\", "\\\\\\\\").gsub('"', '\\"').gsub("\\u", "\\\\\\\\u") |
| @out << " description {\n #{escaped.split("\n").join("\n ")}\n }\n" | ||
| else | ||
| @out << " description { #{escaped = s.gsub("\\", "\\\\\\\\").gsub("{", "\\{").gsub("}", "\\}")} }\n" | ||
| @out << " description { #{s.gsub("\\", "\\\\\\\\").gsub("{", "\\{").gsub("}", "\\}")} }\n" |
| @out << " description {\n #{escaped.split("\n").join("\n ")}\n }\n" | ||
| else | ||
| @out << " description { #{escaped = s.gsub("\\", "\\\\\\\\").gsub("{", "\\{").gsub("}", "\\}")} }\n" | ||
| @out << " description { #{s.gsub("\\", "\\\\\\\\").gsub("{", "\\{").gsub("}", "\\}")} }\n" |
|
Final state of this PR after TODO.impl round three (items 12-14, register in TODO.impl/):
Merging on the strictly-improves rule (main carries the same 77; this PR repairs CI resolution, the lint gate, and the ISC dependency path without touching the failing suites). |
What
spec/gallery_parity_spec.rb— the same conversion table the TypeScript example gallery (interscript-ts/examples/) asserts:Anton Olehovych/Solomiia/Kyivthroughbgnpcgn-ukr-Cyrl-Latn-2019.Why
"Same bytes from every runtime" is the project's core promise; this pins it example-to-example. The Python runtime gained its parity gate in interscript-py#5 (which also restored its ISC support).
Verified locally: 3/3 green.