Repository navigation
feat(WO16): ISC-WF-1 workflow extension (ruby reference implementation) - #834
Merged
Merged
Conversation
…tioning The workflow-extension layer per docs/isc-wf-1.md (maps repo, normative draft 1.0): W1 named rulesets with in-place macro expansion (cycles are load errors), W2 use-with-override merging (child-wins on exact from-equality within one pass), W3 language conditioning (map-declared languages, caller-selected, guard-applicable rules beat unguarded same-from rules, all guards inert otherwise). Grammar: ruleset/use/override/languages/when join the keyword table and the stage/system productions; the .parg port is updated in step. The NodeAdapter expands use sites at load time with per-site deep copies; the Interpreter threads a language through runs and filters parallel passes per selected language (variants memoized per language so the compiled-tree caches stay isolated). Node layer gains Ruleset, Use, LanguagesDecl and Sub#when_languages; the document hash, Lutaml models, YamlBridge and Serializer round-trip the new constructs. Additive-only: the golden-capture gate (11,048 rows over the 404-map corpus) is byte-identical before and after; the full corpus parses 408/408 on both sides. The harness lives in tools/isc_wf1_golden_gate.rb.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements the ISC-WF-1 workflow extension (maps docs/isc-wf-1.md) in the Ruby reference runtime — W1 named rulesets, W2 use-with-override, W3 language conditioning:
ruleset <ident> { ... },use <ident>/use <ident> override { rows },languagesdeclaration,when tag1, tag2on subs (grammar/isc.parg+ stages/system/items concerns).node_adapter.rb: load-time macro expansion — memoized rulesets, cycle rejection as load error, per-site deep copies, W2 merge (child-wins on byte-exact from-equality; expansion = kept rows in order, then overrides).interpreter.rb: language threading throughrun, per-language parallel-pass variants memoized so compiled-tree caches stay isolated; guards inert unless the caller selects a declared language; guard-applicable wins over unguarded same-from.Interscript.transliterate(..., language:); new nodesRuleset/Rule::Use/LanguagesDecl,Sub#when_languages; serializer/Lutaml models via attribute+map declarations only.languages/rulesetsonly when used — pre-WF1 hash shapes unchanged (additive).Notable interpretation calls (documented in commit): W2 overrides join the trailing parallel block so child rows share the single longest-match pass; a
whenon an override row applies to that row alone;languagesis system-block-only per normative §5.1.Verification
tools/isc_wf1_golden_gate.rb, committed §7 harness): corpus parse 408/408 before and after; golden 11,048 rows zero-delta against the pre-change baseline.NotImplementedErrors (Item::Alias#max_length, 4 Arabic maps) — identical before and after.standardrb --no-fixclean on changed files.