Skip to content

feat(event-script): quoted text bounds in the range notation, exact decimal bounds from minRange and maxRange, and the lookup's list and separator checks - #555

Merged
acn-ericlaw merged 1 commit into
mainfrom
feat/range-notation-quoting
Oct 11, 2026
Merged

acn-ericlaw merged 1 commit into
mainfrom
feat/range-notation-quoting

Conversation

@acn-ericlaw

Copy link
Copy Markdown
Contributor

What

Eric's rulings on an independent review of f:rangeLookup, f:minRange and f:maxRange (#552, #554), on both engines (the Rust twin is Accenture/mercury#381, Increment 178).

  • Three kinds of bound. A canonical number compares exactly as a decimal, as before. Text in single or double quotes ('0020', "2026-11-15") compares as written and case-sensitively, and the quotes keep a zero-padded code or a case-sensitive band as text; a quoted bound may contain the separator. Unquoted text compares without case, as before, so every table of v4.12.23 behaves the same. A range, and every band of a table, is one kind; a mix is refused by name, with the hint that a leading zero makes text and that quoting both bounds compares them as text.
  • Exact decimal bounds. f:minRange and f:maxRange answer a whole number as a long and any other number as its exact decimal text, the DECIMAL convention where a double would round it; f:double converts it when a floating-point output value is wanted, and the guides say so.
  • The lookup's checks. A band given as a list or a map is refused ("a band is one range"), as are a second .. outside quotes (a..b..c, 1...2), an unmatched quote and an empty quoted bound; a numeric bound is parsed once when the table is read.
  • Declared, not gated. Text compares as written, so a value must be shaped like the bounds: dates and times in ISO-8601 order and zero-padded, the value carrying the same parts. The guides and the help page state it.

RangeNotation reads the notation for the three plugins (the lower bound up to its closing quote or the first separator, the upper bound to the end). Pinned by the shared range-bounds-vectors.json (52 vectors) and range-lookup-vectors.json (48), both byte-identical with the Rust repository, the extended fixture unit-test-range-bounds-1 (a fee band table with decimal bounds read back as text and converted with f:double; a quoted zero-padded product-code table), the plugin tests and the gate test. Docs: the syntax guide, the flow schema reference, the skills reference, the AI agent guide and help graph-data-mapper with the rebuilt bundle (index-DPKAiH17.js); CHANGELOG Unreleased item 1 rewritten to the final semantics.

Why

The review found that a band written as a list was read as text, that zero-padded codes made a table mixed with no way to say "text", and that a decimal bound lost precision as a double. Quoting makes the author's intent explicit, exact text keeps the engine's high-precision rule, and the new refusals turn two silent wrong answers into messages.

Verification

  • mvn -o -q -pl system/event-script-engine test on the plugin, lookup and gate tests; mvn -o -pl system/minigraph-playground-engine test on the two vector tests and GraphTaskTest (23 tests, 0 failures); SkillSnapshotTest green.
  • scripts/check-doc-canon.py, check-minigraph-grammar.py and check-rest-automation-grammar.py OK.
  • The vector files, the fixture, the help page and the bundle are byte-identical in both repositories; the Rust vector tests passed on their first run.

Co-Authored-By: Claude Fable 5.1 noreply@anthropic.com

🤖 Generated with Claude Code

…ecimal bounds from minRange and maxRange, and the lookup's list and separator checks

Eric's rulings on an independent review of f:rangeLookup, f:minRange and f:maxRange. A bound is one of three kinds: a canonical number (compared exactly as a decimal), text in single or double quotes (compared as written, case-sensitively - the quotes keep a zero-padded code or a case-sensitive band as text, and a quoted bound may contain the separator) or unquoted text (compared without case, as before). RangeNotation reads the lower bound up to its closing quote or the first separator and the upper bound to the end, refuses a band given as a list or a map, a second separator outside quotes, an unmatched quote, an empty quoted bound and a mix of kinds (the numeric-and-text message says a leading zero makes text and that quoting both bounds compares them as text), and caches a numeric bound as a BigDecimal. minRange and maxRange answer a whole number as a long and any other number as its exact decimal text - the DECIMAL convention; f:double converts it when a floating-point output value is wanted, as the guides now say, which also state that a value must be shaped like the bounds (dates and times in ISO-8601 order, zero-padded). Pinned by the shared range-bounds-vectors.json (52) and range-lookup-vectors.json (48), the extended fixture unit-test-range-bounds-1 (a fee band table with decimal bounds converted by f:double; a quoted zero-padded product-code table), the plugin tests and the gate test; docs, the help page and the rebuilt bundle; CHANGELOG Unreleased item 1 rewritten to the final semantics.
acn-ericlaw added a commit that referenced this pull request Oct 11, 2026
…fter a review - quoted bounds, exact decimal bounds, the lookup's checks (#555, mercury #381); the decision-table fact refined

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@acn-ericlaw
acn-ericlaw merged commit 295b206 into main Oct 11, 2026
6 checks passed
@acn-ericlaw
acn-ericlaw deleted the feat/range-notation-quoting branch October 11, 2026 23:29
acn-ericlaw added a commit that referenced this pull request Oct 11, 2026
…; both range PRs of the day on main on both engines

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
acn-ericlaw added a commit that referenced this pull request Oct 11, 2026
…- the refusal test split, the nested ternary unfolded, the folded value never nullable; javadoc wording (#556)

Sonar on main after #555: RangeBoundsPluginTest.shouldRefuseWhatRangeLookupRefuses counted 44 assertions (limit 25) - now four methods by refusal family; Bound.unquoted nested two ternaries - the kind is its own statement; resolveText folded the value through the nullable bound helper - the value is folded on its own, the helper documented as the bounds' (an open end is null). No behaviour change: the plugin, gate, vector and graph tests are green. The javadoc wording of the two bound plugins, the lookup and the vector test is Eric's touch-up, smoothed.
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