Skip to content

feat(WO17): py golden additivity gate + constraint class-context port (rs/ts parity) - #841

Merged
ronaldtse merged 1 commit into
mainfrom
wo17/py-golden-and-constraints
Nov 11, 2026
Merged

ronaldtse merged 1 commit into
mainfrom
wo17/py-golden-and-constraints

Conversation

@ronaldtse

Copy link
Copy Markdown
Contributor

Summary

WO17 step 2a — two pieces for interscript-py:

  1. The permanent golden additivity test (tests/test_golden_capture.py, mirror of rs tests/golden_capture.rs and ts test/golden-isc-wf0.test.ts): parse the sibling maps/libs corpus, compile in-process, replay all 12,337 golden rows byte-identically; the adopting-maps manifest is honored; sibling-gated skip with a GOLDEN_ROOT override. Harness detection was proven against a doctored golden (one flipped row → the failure names exactly that map) before the clean run.
  2. The constraint class-context port (rs/ts parity, the ts #124 fix): compile_item gains class_ctx — constraint positions and any() alias arguments compile in CLASS context, where an imported charset alias resolving to a string expands per-character (rs convert_class_alias; local string aliases stay sequences, capture innards stay sequence-resolved). Without it the ell lookbehinds compiled from a ~400-char literal sequence and could never match, silently disabling alalc-ell's medial γ rules.

Verification

  • tests/test_golden_capture.py green on the real golden: 12,337/12,337 byte-identical through the in-process py runtime (83 s); pre-fix the in-process path diverged on exactly 5 rows (all alalc-ell-Grek-Latn-2010).
  • 4 constraint regression specs watched failing before the port (root-cause shape; from any(charset) single char; local-alias sequence preservation; the five ell rows + the word-final γκ guard through the full path).
  • Constraint/wf1/parser suites green post-fix.

…port

Step 2 of the improvement round, two pieces:

- tests/test_golden_capture.py: the PERMANENT golden additivity test
  for interscript-py (mirror of rs tests/golden_capture.rs and ts
  test/golden-isc-wf0.test.ts): parse the sibling maps/libs corpus,
  compile, replay all 12,337 golden rows byte-identically; adopting
  manifest honored; sibling-gated skip (GOLDEN_ROOT override).
  Harness detection proven against a doctored golden (one flipped row
  -> failure names exactly that map).

- The rs/ts constraint fix lands in the py runtime: compile_item gains
  class_ctx — constraint positions (before/not_before/after/not_after)
  and any() alias arguments compile in CLASS context, where an
  IMPORTED charset alias resolving to a string expands per-character
  (rs convert_class_alias; local string aliases stay sequences).
  Without it the ell lookbehinds compiled from a ~400-char literal
  sequence and could never match, silently disabling alalc-ell's
  medial gamma rules. 4 regression specs watched failing first
  (root-cause shape, from-any single char, local-alias sequence
  preservation, the five ell rows + the word-final gk guard through
  the in-process path).

Verified: golden 12,337/12,337 byte-identical through the in-process
py runtime (83 s; pre-fix exactly 5 divergent rows, all
alalc-ell-Grek-Latn-2010); constraint/wf1/parser suites green.
@ronaldtse
ronaldtse merged commit cc25797 into main Nov 11, 2026
13 checks passed
@ronaldtse ronaldtse mentioned this pull request Nov 12, 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