|
| 1 | +# [COMPLETE 2026-09-08 — repro spec RED then GREEN; deps wired, constraint key fixed, library-import semantics restored] 12 — Ruby adapter drops ISC dependencies (P1) |
| 2 | + |
| 3 | +## Goal |
| 4 | +`NodeAdapter#build` wires the ISC document's dependencies into the |
| 5 | +Node::Document (dependencies, dep_aliases, lazily-loaded documents) so |
| 6 | +`run map.<alias>.stage.<name>` works — unblocking PR #769 and the |
| 7 | +corpus-era rspec failures. |
| 8 | + |
| 9 | +## Why |
| 10 | +Root cause of the 79-failure batch (named 2026-09-08): the adapter |
| 11 | +sets metadata/tests/aliases/stages/name and silently drops |
| 12 | +`dependencies` — every cross-map run in an `.isc` document then |
| 13 | +dereferences nil (`reverse_run` on nil at interpreter.rb:78 via the |
| 14 | +run branch). Local runs never saw it: they resolved the installed |
| 15 | +`interscript-maps-2.4.3` gem (`.imp`) because the gem's load path |
| 16 | +prefers installed map gems over siblings. |
| 17 | + |
| 18 | +## Spec (TDD) |
| 19 | + |
| 20 | +1. RED: a spec that forces the ISC corpus onto the load path |
| 21 | + (`Interscript.load_path` prepended with the maps checkout), |
| 22 | + transliterates `bgnpcgn-ukr-Cyrl-Latn-2019` "Антон Олегович", and |
| 23 | + asserts "Anton Olehovych" — currently raises the nil crash. |
| 24 | +2. GREEN: `build` constructs `Node::Dependency` per ISC dependency — |
| 25 | + `full_name`, `name` (the alias, symbolized), `import = false` (ISC |
| 26 | + v1 carries no import marker; alias-having deps are reached through |
| 27 | + `dep_aliases`, which `import` does not gate), `document` parsed |
| 28 | + through the same dispatch the compiler uses (`.isc` → parse_isc, |
| 29 | + else DSL.parse) so chains resolve recursively. |
| 30 | +3. `doc.dep_aliases[name] = dep` mirroring the DSL (document.rb:40). |
| 31 | + |
| 32 | +## Acceptance |
| 33 | +- The repro spec green; PR #769's gallery parity green against the |
| 34 | + real corpus (not the stale gem). |
| 35 | +- Corpus-census rspec run: failure count measured before/after, |
| 36 | + remainder categorized in the PR body (this fix may not cure all 79; |
| 37 | + what remains is named, not hidden). |
0 commit comments