Repository navigation
feat(event-script): f:minRange and f:maxRange - the bounds of a range typed by the notation; rangeLookup checks every band when it reads a table - #554
Merged
Conversation
… typed by the notation; rangeLookup checks every band when it reads a table Two simple plugins read one range in the band notation (min..max, min.., ..max) and answer its lower or upper bound: a numeric bound as a number (a whole number a long, any other number a double), a text bound as text, an open end as the optional default or null. The three range plugins share one notation reader, RangeNotation, allow-listed in the loader's gate, so a malformed, mixed or empty range (3..3, the upper bound being excluded) is refused by every one of them, and the lookup now checks every band when it reads the table, whatever the value. Pinned by the shared range-bounds-vectors.json (34 vectors), three new range-lookup vectors, the fixture unit-test-range-bounds-1 and the plugin and gate tests; docs and the help page with the rebuilt bundle.
…d parse split into helpers (two Sonar code smells); the vector test's javadoc and imports tidied Sonar on the branch: the constant NUMERIC beside the field numeric (now CANONICAL_NUMBER), and parse at cognitive complexity 17 (the notation refusal, the first-draft markers, the two-bound checks and the open-end reading are helpers now; no behaviour change - the plugin, gate, vector and graph tests are green). The vector test's unused List import and its javadoc wording are Eric's touch-up.
acn-ericlaw
added a commit
that referenced
this pull request
Oct 11, 2026
…cury #380 merged (62239b44); both range-bound plugins on main Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.
What
f:minRange(range, default)andf:maxRange(range, default), two simple plugins that read one range in the notation off:rangeLookup's bands (min..max,min..,..max) and return its lower or upper bound, typed by the notation: a numeric bound is a number (a whole number within the 64-bit range a long, any other number a double), a text bound is text as written, and an open end answers the optional default, or null when there is none.f:rangeLookupnow checks every band when it reads a table, whatever the value, so a band that could never match (3..3, the upper bound being excluded) is refused by name on the table's first use. The three plugins share one notation reader,RangeNotationincom.accenture.util, allow-listed in the plugin loader's bytecode gate beside the decimal helper, so a range is refused by one of them exactly when the others refuse it; the gate test now names the three plugins.Pinned by the shared
range-bounds-vectors.json(34 vectors, byte-identical with the Rust twin Accenture/mercury#380, Increment 177), three newrange-lookup-vectors.jsonentries, the fixtureunit-test-range-bounds-1(the band the lookup chose read back through a dynamic key; agraph.mathIF/THEN/ELSE computing the distance to the next tier only when the band has an upper bound), the plugin tests and the gate test. Docs: the syntax guide's plugin table and The bounds of a band, the flow schema reference, the skills reference's Range tables, the command reference, the AI agent guide andhelp graph-data-mapperwith the rebuilt bundle (index-DgBUB6YY.js; a rebuild of the unchanged sources reproduced the committed bundle byte for byte before the help edit). CHANGELOG Unreleased item 1.Why
Eric's follow-up to
f:rangeLookup: with the bounds encoded in the range text, a developer or an AI agent needsgraph.mathorgraph.data.mapperto read a band's min and max back, typed as the number or text they are; and a range whose max is not above its min can never match, so the lookup must refuse it rather than carry it silently.Verification
mvn -o -q -pl system/event-script-engine teston the plugin, lookup and gate tests;mvn -o -pl system/minigraph-playground-engine teston the two vector tests andGraphTaskTest(23 tests, 0 failures);SkillSnapshotTestgreen.scripts/check-doc-canon.py,check-minigraph-grammar.pyandcheck-rest-automation-grammar.pyOK.Upgrade note: a range table holding an empty or mixed band beyond the bands a run reached was accepted before and is refused now - fix the band; no other action.
Co-Authored-By: Claude Fable 5.1 noreply@anthropic.com
🤖 Generated with Claude Code