Skip to content

fix(sync): auto-register challenge tag routes in ROUTES_WITHOUT_FULL_COVERAGE - #222

Merged
sinduri-g merged 1 commit into
mainfrom
fix/sync-challenge-tag-routes
Aug 27, 2026
Merged

fix(sync): auto-register challenge tag routes in ROUTES_WITHOUT_FULL_COVERAGE#222
sinduri-g merged 1 commit into
mainfrom
fix/sync-challenge-tag-routes

Conversation

@sinduri-g

@sinduri-g sinduri-g commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Problem

When a new adventure is synced, its level topics generate /challenges/<tag>/
routes at build time. The route-coverage drift gate (route-coverage.spec.ts)
requires every built route to appear in A11Y_PAGES, SMOKE_ROUTES, or
ROUTES_WITHOUT_FULL_COVERAGE — but the sync script never added challenge tag
routes, so CI failed with "New routes are untested."

Fix

sync-adventure.mjs now upserts a // GENERATED:<slug>-challenges block in
ROUTES_WITHOUT_FULL_COVERAGE containing one entry per unique tag across all
live levels. Duplicates with the manual list or other adventure blocks are
harmless (the coverage gate uses a Set).

The tagToSlug logic matches src/lib/challenges.ts exactly:
tag.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/(^-|-$)/g, "").

Checks

npm run sync && npm run build && npm run test:e2e

…COVERAGE

When a new adventure is synced, its level topics generate /challenges/<tag>/
routes that the route-coverage drift gate (route-coverage.spec.ts) requires to
be acknowledged in ROUTES_WITHOUT_FULL_COVERAGE. The script now upserts a
GENERATED block per adventure alongside the existing smoke and a11y blocks.

Signed-off-by: Sinduri Guntupalli <sinduri.guntupalli@dynatrace.com>
@sinduri-g sinduri-g changed the title fix(sync): auto-register challenge tag routes in ROUTES_WITHOUT_FULL_… fix(sync): auto-register challenge tag routes in ROUTES_WITHOUT_FULL_COVERAGE Aug 27, 2026
@github-actions

github-actions Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-08-27 15:00 UTC

@sinduri-g
sinduri-g merged commit a859411 into main Aug 27, 2026
10 checks passed
@sinduri-g
sinduri-g deleted the fix/sync-challenge-tag-routes branch August 27, 2026 14:59
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