feat: add /build/tags tag-taxonomy feed for CI frontmatter validation - #2051
Merged
Conversation
Mirror the existing /build/verb-definitions pattern:
- anonymous app.get('/build/tags') in srv/server.js reads name+label from
com.sap.developers.ims.Tags ordered by name, 60s Cache-Control, returns
{ tags: [names], buildAt }, 500s on error
- scripts/fetch-tags.ts writes hugo/data/tags.json, warn-and-continue
- wire fetch-tags into build:all next to fetch-verb-definitions
- unit test asserts endpoint returns tags array from seeded rows
jung-thomas
marked this pull request as ready for review
August 27, 2026 14:17
This was referenced Aug 27, 2026
Merged
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
Adds a build-time tag-taxonomy feed so a downstream CI checker can validate tutorial frontmatter
tagsagainst the canonical taxonomy. Mirrors the existing/build/verb-definitionspattern exactly.Changes
srv/server.js— new anonymousapp.get('/build/tags', ...)handler alongside the other/build/*handlers. Readsname+labeldirect from the rawcom.sap.developers.ims.Tagsentity (NOT via AdminService, whose@requireschain would 403 an anonymous request),orderBy('name'), setsCache-Control: public, max-age=60, returns{ tags: rows.map(r => r.name), buildAt }, 500s on error.scripts/fetch-tags.ts— mirrorsscripts/fetch-verb-definitions.ts; fetches${CAP_BASE_URL||'http://localhost:4004'}/build/tags, writeshugo/data/tags.json({ tags, buildAt, error }), warn-and-continues on failure.package.json— newfetch-tagsnpm script; wired intobuild:allimmediately afterfetch-verb-definitions.test/unit/srv/build-tags-feed.test.js— unit test mirroring the verb-definitions build test (samecds.test('serve', '--project', '.', '--in-memory')bootstrap): asserts 200 + tags array, 60s Cache-Control, ISObuildAt, and returns the name strings of seeded Tags rows ordered by name.Verification
npx vitest run test/unit/srv/build-tags-feed.test.js --project unit— 4/4 passing.Notes
namestrings (the fullcategory>valuetag) — all a membership check needs.hugo/data/tags.jsoncommitted; generation is left to the build.Draft — targeting DEV.