Skip to content

fix: legacy raw-body GraphQL + rababa-to-ML routing (restores the interscript.org demo) - #3

Merged
ronaldtse merged 5 commits into
mainfrom
fix/legacy-graphql-and-rababa
Aug 23, 2026
Merged

fix: legacy raw-body GraphQL + rababa-to-ML routing (restores the interscript.org demo)#3
ronaldtse merged 5 commits into
mainfrom
fix/legacy-graphql-and-rababa

Conversation

@ronaldtse

Copy link
Copy Markdown
Contributor

What

Website-driven E2E verification of api.interscript.org found that the live interscript.org demo (React client) has been broken since the Cloudflare cutover:

  • It POSTs GraphQL documents as the raw body with a urlencoded content type (accepted by the old Lambda; rejected by Yoga with "Must provide query string"), so the demo's Detect button returns nothing.
  • Its Diacritize button calls transliterate with the legacy var-ara-Arab-Arab-rababa system code, which now fails with map_not_found.

Fixes

  1. Legacy raw-body GraphQL — the catch-all wraps non-JSON POST bodies as {query} before handing the request to Yoga (server.ts). JSON bodies pass through untouched.
  2. Rababa routing — transliterateResolver maps var-ara-Arab-Arab-rababa to the Modal inference service (model ara-diac-1.0, parity-verified ONNX decode). The demo's Diacritize button is now served by our own SOTA Arabic model. ML env is threaded via setMl from the worker env.
  3. Red CI repaired — restores the file:vendor/interscript-ts dependency dropped in fbadcbc (CI has been failing typecheck/test/build since then); rewrites gen-models.mjs in pure Node (the embedded python one-liner was committed broken); regenerates the model index to add released heb-diac-1.1 (10 models). dist rebuilt and fully committed.

Tests

  • 22 unit tests green (adds: raw-body urlencoded, application/graphql, JSON passthrough, rababa proxied to ML with stubbed fetch).
  • E2E suite gains 3 checks (49 total): legacy raw-body transliterate, rababa diacritizes live.
  • Verified the Modal service diacritizes مدرسة جميلة -> مَدْرَسَةٌ جَمِيلَةٌ.

…rence

The interscript.org demo POSTs GraphQL documents as the raw body with
a urlencoded content type (the old Lambda accepted this); wrap such
bodies as {query} so Yoga parses them. Its Diacritize button calls
transliterate with the var-ara-Arab-Arab-rababa system code — route
that to the Modal inference service (ara-diac-1.0) instead of failing
with map_not_found.

Also: regenerate the model index (adds released heb-diac-1.1; 10
models) and rewrite gen-models in pure Node (the embedded python
one-liner was committed broken).
@ronaldtse
ronaldtse merged commit 21697f8 into main Aug 23, 2026
6 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