Skip to content

Pin the catalogue parser with a test, after it broke twice in silence - #150

Merged
oblomov-dev merged 1 commit into
mainfrom
claude/catalogue-parser-test
Aug 16, 2026
Merged

Pin the catalogue parser with a test, after it broke twice in silence#150
oblomov-dev merged 1 commit into
mainfrom
claude/catalogue-parser-test

Conversation

@oblomov-dev

Copy link
Copy Markdown
Member

scripts/link-samples.mjs reads SAMPLES.md out of a checkout of another repository, and its row pattern has now stopped matching twice — first when the catalogue grew the @docs links under the keywords, then today when it grew the " @summary sentence in normal type above them.

Both times the symptom was the bad kind. Not a red run — a wrong answer:

`z2ui5_cl_smp_app_493` is not in the sample catalogue — renamed, deleted, or a typo

which is precisely the sentence this check exists to say truthfully. A parser that fails open like that is worse than one that throws.

What changes

The parser moves into scripts/lib/catalogue.mjslink-samples resolves a checkout and rewrites pages at import time, which is why it could not be tested where it was — and test/catalogue.test.mjs pins one row of every shape the three sample repositories generate:

fixture row shape
**Basics I** — Hello World title + sub only (the oldest)
+ <sub>keywords</sub> as it was until today
+ summary + keywords + docs today's, all four blocks
no bold header titled by its section
<br><span>…</span> a block with a tag nobody here has seen

That last one failed when it was written, which is the point of writing it: the pattern accepted <sub> blocks and bare text and nothing else, so a future <span> would have taken the whole row down. A block is now <br> plus anything — this script reads the title, the class and the path, and what the other blocks say is the reader's business.

The row shape is maintained in abap2UI5/samples, /samples-controls and /samples-stack, and read here and in abap2UI5/ai-mcp: a contract between five programs, of which this repository owns none.

npm test (2 tests) now runs first in npm run check.


Generated by Claude Code

scripts/link-samples.mjs reads SAMPLES.md out of a checkout of another
repository, and its row pattern has now stopped matching TWICE - first when
the catalogue grew the `@docs` links under the keywords, then today when it
grew the `" @summary` sentence in normal type above them.

Both times the symptom was the bad kind. Not a red run: a WRONG ANSWER. Every
page's declaration came back as

  `z2ui5_cl_smp_app_493` is not in the sample catalogue - renamed, deleted,
  or a typo

which is precisely the sentence this check exists to say TRUTHFULLY. A parser
that fails open like that is worse than one that throws.

So the parser moves into scripts/lib/catalogue.mjs - link-samples resolves a
checkout and rewrites pages at import time, which is why it could not be
tested where it was - and test/catalogue.test.mjs pins one row of every shape
the three sample repositories generate: title only, + keywords, + summary +
keywords + docs, a row with no header of its own, and a block with a tag
nobody here has seen.

That last one failed when it was written, which is the point of writing it: the
pattern accepted `<sub>` blocks and bare text and nothing else, so a future
`<span>` would have taken the whole row down. A block is now `<br>` plus
anything - this script reads the title, the class and the path, and what the
other blocks say is the reader's business.

The row shape is maintained in abap2UI5/samples, /samples-controls and
/samples-stack, and read here and in abap2UI5/ai-mcp: a contract between five
programs, of which this repository owns none.

  npm test         2 test(s), part of `npm run check` (CI)
  check:samples    152 samples, 39 pages, 109 links, up to date
Copilot AI lite review requested due to automatic review settings August 16, 2026 18:47

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@oblomov-dev
oblomov-dev merged commit 5b2da91 into main Aug 16, 2026
1 check passed
@oblomov-dev
oblomov-dev deleted the claude/catalogue-parser-test branch August 16, 2026 19:03
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.

3 participants