Skip to content

Refuse 703 and 723 without their fourth digit (1.2.1) - #18

Merged
MaximBelov merged 1 commit into
masterfrom
fix/incomplete-composed-ai
Aug 13, 2026
Merged

MaximBelov merged 1 commit into
masterfrom
fix/incomplete-composed-ai

Conversation

@MaximBelov

Copy link
Copy Markdown
Owner

703 and 723 build their identifier by putting the fourth digit onto a stem instead of matching it, so unlike every other family there is no switch arm to fall through:

]C1703  ->  { ai: "703", dataTitle: "PROCESSOR # ", data: "" }   — a successful parse
]C1723  ->  { ai: "723", dataTitle: "CERT # ",      data: "" }

Neither 703 nor 723 is an identifier the standard defines, and the title trails off after the #. Both are refused now with unrecognised AI.

The guard added in 1.2.0 misses this: it fires when nothing was parsed at all, and here an element is built — just a nonsense one.

421, 423 and 427 are three digits by definition rather than stems waiting for a fourth, so they are untouched. 7030-7039 and 7230-7239 still parse.

Releases as 1.2.1. 407 specs, coverage still 100%.

Both build their identifier by putting the fourth digit onto a stem rather than
by matching it, so unlike every other family there is no switch arm to fall
through. A barcode stopping before that digit came back as a successful parse
whose ai was "703" or "723", neither of which the standard defines, and whose
title trailed off after the "#".

The guard added in 1.2.0 did not catch it: that one fires when nothing was
parsed at all, and here an element is built, just a nonsense one.

421, 423 and 427 are three digits by definition rather than stems waiting for a
fourth, and are untouched.
@MaximBelov
MaximBelov merged commit 78d45cc into master Aug 13, 2026
1 check passed
@MaximBelov
MaximBelov deleted the fix/incomplete-composed-ai branch October 13, 2026 19:29
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