Skip to content

fix: ship the dependency libraries in the JSON-IR artifact - #194

Merged
ronaldtse merged 1 commit into
mainfrom
fix/ship-library-libs
Sep 28, 2026
Merged

ronaldtse merged 1 commit into
mainfrom
fix/ship-library-libs

Conversation

@ronaldtse

Copy link
Copy Markdown
Contributor

Problem

The interscript.maps.ir artifact is built from maps/*.isc only. The four dependency libraries — posix, unicode, var-Cyrl, var-kor — still exist only as legacy .iml files in libs/, so the v2.5.1 artifact (289 files) shipped without them.

Every system map that declares a library dependency fails at runtime against that artifact with Map dependency missing: <lib> — live right now on api.interscript.org:

  • bgnpcgn-deu-Latn-Latn-2000 "Tschüß!" → null (18 maps affected: German, Belarusian, Macedonian, Bulgarian, Russian GOST, the Korean sets)

A second latent bug: 16 maps reference jamo/hangul aliases owned by var-kor while declaring only posix/unicode/var-Cyrl. The old corpus masked this because its library JSONs were leak-merged with every library's aliases; unqualified alias resolution walks declared dependencies only.

Fix

  1. Port the four libraries to .isc in libs/ — verbatim transcriptions of the .iml alias definitions (the .iml files stay). TS builder now compiles maps/*.isc + libs/*.isc → 293 files; parse gates (Ruby + TS) cover libs/.
  2. Declare dependency "var-kor" in the 16 maps that use its aliases.
  3. Artifact count checks: 289 → 293 (workflow + deploy-side fetch script lands separately).

Verification

  • 293/293 .isc parse under both the Ruby and TS parsers
  • Rebuilt artifact vs v2.5.1: 273 system JSONs byte-identical, 16 gain the var-kor dependency entry, +4 library JSONs
  • api.interscript.org parity suite (production replay): all 12 fixtures byte-identical with this corpus, including bgnpcgn-deu "Tschüß!" → Tschueß! and the full 288-entry detect ranking

After merge, tag v2.5.2 to cut the artifact; the deploy repo pins the new artifact version and Tschüß! returns on production.

The artifact built from maps/*.isc alone dropped posix, unicode,
var-Cyrl, and var-kor (still only present as legacy .iml files in
libs/). Every library-dependent system map — bgnpcgn-deu (Tschüß!),
the Belarussian, Macedonian, and Korean sets, 18 maps in all — fails
at runtime with "Map dependency missing" against the v2.5.1 artifact.

Port the four libraries to .isc (verbatim from the .iml alias
definitions, which remain in place) and compile them into the
artifact: 293 files total. Also declare the var-kor dependency in the
16 maps whose rules reference jamo aliases without listing the
library — unqualified alias resolution walks declared dependencies
only, and the leak-merged library JSONs of the old corpus masked the
gap. Artifact count checks updated to 293.
ronaldtse added a commit to interscript/api that referenced this pull request Sep 28, 2026
Replaces the corpus built by interscript-ruby's JsonIR with output of
the canonical builder — interscript-ts's ISC converter, the same
pipeline that produces the interscript/maps release artifact. 273 of
289 system JSONs were not byte-identical to production; the parity
gate caught Tamil (தமிழ் came out 'tamail̮a').

Also picks up interscript/maps#194: the four dependency libraries
(posix, unicode, var-Cyrl, var-kor) ship in the corpus again, and the
16 maps referencing var-kor aliases declare the dependency. This
restores bgnpcgn-deu (Tschüß! -> Tschueß!) and the other 17
library-dependent maps that api.interscript.org currently fails with
'Map dependency missing'.

The detect ranking (288 systems) and systemCodes count (289
addressable) are re-baselined to the corrected corpus; production
currently returns a truncated 48-map detect ranking and null for
library-dependent maps, so test/fixtures/parity.json records the
corrected behavior until the deploy catches up.

scripts/build-maps.rb pointed at the retired Ruby pipeline; it now
defers to scripts/build-maps.mjs, which runs the canonical TS builder
and regenerates manifest.js.
@ronaldtse
ronaldtse merged commit c6ab970 into main Sep 28, 2026
7 checks passed
ronaldtse added a commit to interscript/api that referenced this pull request Sep 28, 2026
…tems) (#26)

* maps: regenerate the compiled JSON IR corpus from interscript-maps 2.5.1 (289 systems)

Built with build-maps.rb against the ISC corpus through interscript-ruby's NodeAdapter (funcall-node casing fix + array-valued Any serialisation). 293 files: 289 systems + 4 libraries (posix, unicode, var-Cyrl, var-kor). One corpus-data gap noted: bgnpcgn-tuk-Cyrl-Latn-1993 depends on a 1979 map absent from the maps repo.

* maps: rebuild the bundled corpus from the TS converter with libraries

Replaces the corpus built by interscript-ruby's JsonIR with output of
the canonical builder — interscript-ts's ISC converter, the same
pipeline that produces the interscript/maps release artifact. 273 of
289 system JSONs were not byte-identical to production; the parity
gate caught Tamil (தமிழ் came out 'tamail̮a').

Also picks up interscript/maps#194: the four dependency libraries
(posix, unicode, var-Cyrl, var-kor) ship in the corpus again, and the
16 maps referencing var-kor aliases declare the dependency. This
restores bgnpcgn-deu (Tschüß! -> Tschueß!) and the other 17
library-dependent maps that api.interscript.org currently fails with
'Map dependency missing'.

The detect ranking (288 systems) and systemCodes count (289
addressable) are re-baselined to the corrected corpus; production
currently returns a truncated 48-map detect ranking and null for
library-dependent maps, so test/fixtures/parity.json records the
corrected behavior until the deploy catches up.

scripts/build-maps.rb pointed at the retired Ruby pipeline; it now
defers to scripts/build-maps.mjs, which runs the canonical TS builder
and regenerates manifest.js.

* style: prettier-format scripts/build-maps.mjs
@ronaldtse ronaldtse mentioned this pull request Sep 28, 2026
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