You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
WO20: reverse-mode golden gate (capture once, replay in all four runtimes) #286
Reverse mode now exists in all four runtimes (rs reference, ruby pin, ts/py compiled-IR ports) but has NO cross-runtime golden gate. Build the reverse-mode capture/replay gate mirroring the forward one (tests/golden/isc-wf0.jsonl + additivity gates).
Approach
Extend the rs capture tooling: for each map with reverse content (the reverse_maps fixtures + corpus maps whose reverse is well-defined), capture forward-input -> reversed-output rows per runtime into tests/golden/isc-reverse.jsonl (or an equivalent additive file — design the shape following the forward golden).
Replay gates per runtime: ts, py, ruby replay the captured reverse rows byte-identically (mirroring tests/test_golden_capture.py / golden-isc-wf0.test.ts / tests/golden_capture.rs patterns).
Wire into maps-CI additivity-gates alongside the forward gates.
rs remains the capture reference; where ruby's documented crash deviations apply, mirror rs's recorded choices exactly (they are already the ports' behavior).
Gates
Zero-delta on the forward golden (untouched).
The reverse golden: captured once, replayed identically by all four.
Suite green everywhere; CI wiring green.
Branches: wo20-reverse-gate-rs (capture extension), wo20-reverse-gate-ruby (py+ruby replay), wo20-reverse-gate-ts (ts replay), maps CI wiring rides the maps-side branch.
iscrs capture --reverse extends the forward capture: for each map, reverse the document (Document#reverse parity) and capture the REVERSED document's own embedded tests — the swapped pairs, so every row's src is a forward expected output and the row set mirrors the forward golden's shape ({"map", "src", "out"}), one jsonl row per pair.
tests/golden/isc-reverse.jsonl: 10,024 rows over 313 maps (428 corpus maps + 10 reverse fixtures, captured against maps main). The fixtures gained their ruby-ground-truth embedded tests so they feed the capture. Maps whose reverse is unsupported (documented ruby-crash deviations) contribute no rows — absence is the recorded choice; execution errors record as null, the canonical marker every replay gate maps its own errors to.
Replay (byte-identical, verified locally against the sibling layout):
Divergences found by the gate (documented, not papered over): the first full-corpus capture diverged — ruby 568 rows/27 maps, ts 603/33, py 3,215/123. Two families: the ruby-engine family fires reversed zero-width-from rules (empty from + boundary assertions, e.g. the ALA-LC Arabic rule-8a word-initial-hamzah deletion) as insertions where the rs engine leaves them inert — rs reproduces those maps' swapped embedded tests, the ports' engines do not — plus reversed parallel rule-selection order; py's compiled-IR port deviates more broadly. Those 125 maps are excluded from the golden via the checked-in manifest tests/golden/reverse-divergent-maps.txt (rs side), which documents the families and shrinks to zero as the engines converge. Follow-up engine work is the natural next WO item.
CI wiring:#297 (wo20-reverse-gate-ci) — a reverse step per runtime job in additivity-gates.yml, forward steps untouched. Merge order: rs #32, ruby #865, ts #141 first (or together); until then the reverse steps no-op (skip-on-missing is uniform).
Gates: forward golden untouched and zero-delta (13,745 rows, re-verified by re-capture diff + all four forward gates); reverse golden captured once, replayed identically by all four; suites green.
Activity
ronaldtse commentedon Nov 16, 2026
WO20 milestone — the reverse-mode golden gate is built, replayed green in all four runtimes, and wired into maps-CI. Branches + PRs:
Capture (rs, the reference): interscript/interscript-rs#32 (
wo20-reverse-gate-rs)iscrs capture --reverseextends the forward capture: for each map, reverse the document (Document#reverseparity) and capture the REVERSED document's own embedded tests — the swapped pairs, so every row's src is a forward expected output and the row set mirrors the forward golden's shape ({"map", "src", "out"}), one jsonl row per pair.tests/golden/isc-reverse.jsonl: 10,024 rows over 313 maps (428 corpus maps + 10 reverse fixtures, captured against maps main). The fixtures gained their ruby-ground-truth embedded tests so they feed the capture. Maps whose reverse is unsupported (documented ruby-crash deviations) contribute no rows — absence is the recorded choice; execution errors record asnull, the canonical marker every replay gate maps its own errors to.Replay (byte-identical, verified locally against the sibling layout):
tools/isc_wf1_golden_gate.rb --reverse+ skip-on-missing — WO20: the reverse-mode golden gate — ruby + py replay (#286) interscript-ruby#865 (wo20-reverse-gate-ruby)interscript-py/tests/test_golden_reverse.py(same branch)test/golden-isc-reverse.test.ts— WO20: the reverse-mode golden gate — ts replay (#286) interscript-ts#141 (wo20-reverse-gate-ts)tests/golden_reverse_capture.rs(capture branch)Divergences found by the gate (documented, not papered over): the first full-corpus capture diverged — ruby 568 rows/27 maps, ts 603/33, py 3,215/123. Two families: the ruby-engine family fires reversed zero-width-from rules (empty from + boundary assertions, e.g. the ALA-LC Arabic rule-8a word-initial-hamzah deletion) as insertions where the rs engine leaves them inert — rs reproduces those maps' swapped embedded tests, the ports' engines do not — plus reversed parallel rule-selection order; py's compiled-IR port deviates more broadly. Those 125 maps are excluded from the golden via the checked-in manifest
tests/golden/reverse-divergent-maps.txt(rs side), which documents the families and shrinks to zero as the engines converge. Follow-up engine work is the natural next WO item.CI wiring: #297 (
wo20-reverse-gate-ci) — a reverse step per runtime job inadditivity-gates.yml, forward steps untouched. Merge order: rs #32, ruby #865, ts #141 first (or together); until then the reverse steps no-op (skip-on-missing is uniform).Gates: forward golden untouched and zero-delta (13,745 rows, re-verified by re-capture diff + all four forward gates); reverse golden captured once, replayed identically by all four; suites green.