Skip to content

fix(isc): a ruleset declared twice is a load error (G7, py canon) - #138

Merged
ronaldtse merged 1 commit into
mainfrom
fix/g7-duplicate-rulesets
Nov 14, 2026
Merged

ronaldtse merged 1 commit into
mainfrom
fix/g7-duplicate-rulesets

Conversation

@ronaldtse

Copy link
Copy Markdown
Contributor

WO18 audit gap G7 - the ts half (rs landed in interscript-rs#19, py rejects at parse). ruleset a declared twice: ts silently kept the FIRST definition and find() lookup made the executed body declaration-order dependent. expandDocument now throws a named IscLoadError ("declared more than once in "); every document passes through it at load, dependencies included. Audit probe tst-rscycle context: with in-block use the old merge could pull content from BOTH definitions.

TDD: wf1 test red (loaded and executed the second body) then green; isc suite 135/135; lint + prettier clean.

keep-first silently hid map bugs, and first-`find` lookup made the
executed body declaration-order dependent. expandDocument now rejects
duplicate ruleset names with a named IscLoadError, matching rs #19's
builder check and py's parse rejection; ruby keeps first (its half is
separate). Every document passes through expandDocument at load - deps
included - so a dependent's duplicate cannot slip through.

TDD: wf1 test red (loaded, executed the second body) -> green; isc
suite 135/135.
@ronaldtse
ronaldtse merged commit c901827 into main Nov 14, 2026
8 of 9 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