Skip to content

chore(concepts): retire legacy Hugo concept path + LEGACY_CONCEPT_RENDER (#1327 Task 6 Step 4) - #1567

Merged
jung-thomas merged 1 commit into
mainfrom
worktree-1327-concepts-legacy-cleanup
Aug 9, 2026
Merged

chore(concepts): retire legacy Hugo concept path + LEGACY_CONCEPT_RENDER (#1327 Task 6 Step 4)#1567
jung-thomas merged 1 commit into
mainfrom
worktree-1327-concepts-legacy-cleanup

Conversation

@jung-thomas

Copy link
Copy Markdown
Contributor

Closes the last open item on #1327Task 6 Step 4, the deferred legacy cleanup.

Why now

The CAP-owned /concepts/ pipeline (#1327 Tasks 1–6) has been live on DEV and PROD since 2026-07-27. Re-verified against both live environments on 2026-08-09:

  • DEV /concepts/: 888 KB (was 2.07 MB), SSR top-100 + embedded concepts-data JSON + RecycleScroller; detail pages return data-render-source="cap".
  • PROD /concepts/: 712 KB, same new pipeline; detail pages data-render-source="cap".
  • Content rebuilds running green on the new path; the legacy-concept-render escape hatch was never triggered.

The 2-week DEV-stability gate from the issue comment is met (~13 days), so the legacy path is retired.

⚠️ This removes the one-command LEGACY_CONCEPT_RENDER rollback hatch — for PROD as well as DEV, since PROD has since cut over too. Rollback after this merge is a code revert (this PR), not a workflow flag.

What's deleted

  • scripts/fetch-concepts.ts (455 lines) — the Hugo concept .md fetcher — plus its fetch-concepts npm script and its slot in build:all
  • hugo/layouts/concepts/{list,single}.html (~890 lines) — the Hugo concept templates
  • The LEGACY_CONCEPT_RENDER escape hatch entirely:
    • legacy-concept-render workflow input + the "Fetch published concepts" step + the two publish-step envs in rebuild-content.yml
    • the legacyConceptRender branch and the now-unused discoverConcepts() walker in scripts/publish-content.ts

The render-concepts publish phase is now gated on (!opts.slug && channel === 'prod') only. The publish-content-qa regression guard (that keeps the phase off the QA channel — #1372) is updated to match the new gate.

Non-deletions / doc fixes

Stale comments repointed from the deleted script to the CAP render path in build-concepts.js, discovery-mission-categories.js (also corrected a wrong importer reference), published-concepts-query.js, concepts-filter/main.ts, plus knowledge-graph.md and testing-endpoints.md. /build/concepts and buildConceptsPayload are kept — they still back both the endpoint and the CAP render pipeline. Historical docs/superpowers/{done,plans}/* docs left as provenance; the active plan's Task 6 Step 4 is marked done.

Net

~1,419 lines deleted, 26 added (the original estimate of ~200 didn't count the two large Hugo layout files).

Verification

  • npx vitest run scripts/__tests__/857 passed
  • concept unit tests (concept-detail-render, concept-list-page, publish-concepts) → 29 passed
  • scripts/check-srv-qa-route-drift.ts → OK (17 srv / 11 srv-qa routes)
  • rebuild-content.yml YAML lint → OK
  • publish-content.ts imports cleanly via tsx (no dangling discoverConcepts ref)

DEV-only deploy posture unchanged; no schema/route changes. After merge, #1327 can be closed.

…DER (#1327 Task 6 Step 4)

The CAP-owned /concepts/ pipeline (#1327 Tasks 1-6) has been live and stable
on DEV and PROD since 2026-07-27 — verified 2026-08-09: /concepts/ serves the
virtualized SSR-shell (top-100 + embedded JSON + RecycleScroller) and detail
pages render data-render-source="cap". With the 2-week stability gate met, the
deferred legacy cleanup lands.

Deletes:
- scripts/fetch-concepts.ts (Hugo concept .md fetcher) + fetch-concepts npm
  script + its build:all reference
- hugo/layouts/concepts/{list,single}.html (Hugo concept templates)
- the LEGACY_CONCEPT_RENDER escape hatch: workflow input + fetch step + publish
  env in rebuild-content.yml, and the legacyConceptRender branch +
  discoverConcepts() walker in publish-content.ts

The render-concepts publish phase is now gated on (!opts.slug && channel==='prod')
only. publish-content-qa regression guard updated to match. Stale comments in
build-concepts.js, discovery-mission-categories.js, published-concepts-query.js,
concepts-filter/main.ts, knowledge-graph.md and testing-endpoints.md repointed
from the deleted script to the CAP render path. Plan Task 6 Step 4 marked done.

Net ~1,419 lines deleted. Tests: 857 script tests + 29 concept unit tests green,
route-drift guard OK, workflow YAML valid.
@jung-thomas
jung-thomas merged commit 21eb20d into main Aug 9, 2026
6 of 7 checks passed
@jung-thomas
jung-thomas deleted the worktree-1327-concepts-legacy-cleanup branch August 9, 2026 13:56
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