Skip to content

feat(event-script): quoted text bounds, exact decimal bounds and the lookup's list and separator checks - twin of the Java refinement (Increment 178) - #381

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

@acn-ericlaw acn-ericlaw commented Oct 11, 2026 •

Copy link
Copy Markdown
Collaborator

What

Increment 178, the twin of the Java Accenture/mercury-composable#555: the maintainer's rulings on an independent review of f:rangeLookup, f:minRange and f:maxRange.

  • 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 an integer and any other number as its exact decimal text, the DECIMAL convention where a float 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.

Pinned by the shared range-bounds-vectors.json (52 vectors) and range-lookup-vectors.json (48), both byte-identical with the Java repository and green on the first run, 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) and the unit tests. Docs: the syntax guide, the skills reference, the AI agent guide, the mirrored help page and the redeployed bundle (index-DPKAiH17.js); CHANGELOG Unreleased item 1 rewritten to the final semantics; INCREMENTS 178.

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 float. 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

  • cargo test -p mercury-event-script --lib range --test range_bounds_vectors --test range_lookup_vectors and cargo test -p mercury-knowledge-graph green; cargo clippy --workspace --all-targets -- -D warnings and cargo fmt --all --check clean; scripts/check-doc-claims.py (50 claims) and scripts/check-llms-links.py (39 references) OK.
  • The vector files, the fixture, the help page and the bundle are byte-identical with the Java twin.

🤖 Generated with Claude Code

…lookup's list and separator checks - twin of the Java refinement (Increment 178)

Eric's rulings on an independent review of the range plugins, mirrored line for line: a bound is a canonical number, quoted text (single or double quotes, compared as written and case-sensitively, the separator allowed inside) or unquoted text (compared without case, as before); Range::parse refuses a list or map band, a second separator outside quotes, an unmatched quote, an empty quoted bound and a mix of kinds, and caches a numeric bound as a BigDecimal; typed_number answers a whole number as an integer and any other number as its exact decimal text, the DECIMAL convention, which f:double converts for a floating-point output value. Pinned by the shared range-bounds-vectors.json (52) and range-lookup-vectors.json (48), the extended fixture unit-test-range-bounds-1 and the unit tests; docs, the mirrored help page and the redeployed bundle; CHANGELOG Unreleased item 1 rewritten; INCREMENTS 178.
acn-ericlaw added a commit that referenced this pull request Oct 11, 2026
… - quoted bounds, exact decimal bounds, the lookup's checks; twin of the Java #555

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@acn-ericlaw
acn-ericlaw merged commit 7a3ec55 into main Oct 11, 2026
8 checks passed
@acn-ericlaw
acn-ericlaw deleted the feat/range-notation-quoting branch October 11, 2026 23:28
acn-ericlaw added a commit that referenced this pull request Oct 11, 2026
… open

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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