LearnNewsExamplesServices
Frontmatter
id12176
titleRelease notes index broken — release.mjs not migrated to chunk-N
stateClosed
labels
bugairegressionbuild
assigneesneo-opus-ada
createdAtMay 29, 2026, 8:43 PM
updatedAtMay 29, 2026, 10:01 PM
githubUrlhttps://github.com/neomjs/neo/issues/12176
authorneo-opus-ada
commentsCount0
parentIssue11372
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtMay 29, 2026, 10:01 PM

Release notes index broken — release.mjs not migrated to chunk-N

Closed v13.0.0/archive-v13-0-0-chunk-14 bugairegressionbuild
neo-opus-ada
neo-opus-ada commented on May 29, 2026, 8:43 PM

Context

Epic #11372 / ADR 0004 migrated resources/content/release-notes/ to the universal ordinal-100 chunk-N/ shape via the new ReleaseNotesSyncer (#11405). The portal's ticket index generator was updated for the new archive/chunk shape in #11287/#11295, but the sibling release index generator buildScripts/docs/index/release.mjs was never updated. Surfaced during an ADR-0004 Phase-2 consumer audit on 2026-05-29.

The Problem

release.mjs scans release notes with a non-recursive glob and emits flat paths. After #11405 chunked the release-notes directory, both assumptions are now false:

  • Files now live at release-notes/chunk-1/… and release-notes/chunk-2/…, not at the top level.
  • The committed apps/portal/resources/data/releases.json still carries flat paths like resources/content/release-notes/v12.1.0.md, but that file now physically lives at resources/content/release-notes/chunk-2/v12.1.0.md.

Net effect:

  1. The portal release-notes view fetches path literally (Component.mjsawait fetch(path)); the flat paths now 404.
  2. Re-running the generator would produce an empty releases.json (the non-recursive fg('*.md') matches zero files under chunk-N/).

This is a regression introduced by the otherwise-correct #11405 chunking, because the release-index consumer was out of scope for the #11287 ticket-consumer migration.

The Architectural Reality

  • buildScripts/docs/index/release.mjs:62fg('*.md', { cwd: inputDir, absolute: true }) is non-recursive. The sibling tickets.mjs:64 correctly uses fg('**/*.md', …).
  • buildScripts/docs/index/release.mjs:101 — emits path: resources/content/release-notes/${path.basename(filePath)} (flat). Must preserve the chunk segment.
  • Consumers of releases.json[].path: apps/portal/view/news/release/* (path-agnostic fetch(path)), and downstream middleware-v2 SSR (Phase-2 item 14, out of scope here).
  • apps/portal/model/Release.mjs:26 carries a doubly-stale path comment (/.github/RELEASE_NOTES/v11.18.0.md); apps/portal/model/Ticket.mjs:33 carries a stale flat comment too.

The Fix

  1. release.mjs: change the glob to recursive (**/*.md) so it finds files under chunk-N/.
  2. release.mjs: emit the real relative path including the chunk segment (use path.relative(ROOT_DIR, filePath), mirroring tickets.mjs:130), not a reconstructed flat path.
  3. Regenerate apps/portal/resources/data/releases.json and commit the corrected output.
  4. Fix the stale path field comments in Release.mjs:26 and Ticket.mjs:33.

Contract Ledger

Target Surface Source of Authority Proposed Behavior Fallback Docs Evidence
releases.json[].path ADR 0004 §2.1 + on-disk layout resources/content/release-notes/chunk-N/vX.Y.Z.md none (path read verbatim by fetch) release.mjs JSDoc v12.1.0.md verified at chunk-2/ on disk

Decision Record impact

aligned-with ADR 0004 — completes the Phase-2 consumer migration for the release index (sibling to #11287's ticket-index migration). Does not amend or challenge.

Acceptance Criteria

  • release.mjs finds all release-note .md files under release-notes/chunk-*/.
  • Generated releases.json paths resolve to files that exist on disk (spot-check v12.1.0chunk-2/v12.1.0.md).
  • releases.json is non-empty and preserves the major-version tree grouping + descending semver sort.
  • Stale path comments corrected in Release.mjs + Ticket.mjs.
  • No change required to the portal view/controller layer (path-agnostic) — verified, not assumed.

Out of Scope

  • The larger ADR §9 items 11–12 "tree-folder lazy-load index + portal lazy-consume-on-expand" refactor (separate Phase-2 sub).
  • middleware-v2 SSR / ticketPaths.json rewire (Phase-2 item 14, separate repo).
  • issue-archive/pr-archive code-ref cleanup (sibling cleanup ticket).

Avoided Traps

  • Reconstructing a flat path from the filename (the current bug) — must preserve the chunk segment via path.relative, not path.basename.
  • Hardcoding a single chunk-1 — the generator must be chunk-count-agnostic (release-notes already spans chunk-1 + chunk-2).

Related

  • Parent epic: #11372 (ADR 0004)
  • Sibling consumer migration (tickets): #11287, #11295
  • Release-notes chunking that surfaced the gap: #11405
  • Authority: learn/agentos/decisions/0004-github-content-architecture.md §2.1, §9 item 11

Retrieval Hint: query_raw_memories("release.mjs chunk-N release-notes index migration ADR 0004 phase 2"); commit anchors: #11405 (release-notes chunking), #11295 (tickets.mjs migration this mirrors).

tobiu referenced in commit ec34408 - "fix(docs): release index recursive scan for chunk-N release-notes (#12176) (#12178) on May 29, 2026, 10:01 PM
tobiu closed this issue on May 29, 2026, 10:01 PM