Skip to content

spec: the review page drops a scope section when a later section title also contains "scope" #257

In progress

Description

@ogalenia

Summary

render() in scripts/render-spec.mjs keeps one scope section. Each ## section whose title matches /scope/i and has ### subsections is assigned to scopeSection, so a later match replaces the earlier one. The earlier section is not added to genericSections either, so its heading and content are missing from the review page.

Where

scripts/render-spec.mjs:724-727, the same in v1.7.0 and in main at db031fe:

for (const section of spec.sections) {
  if (/scope/i.test(section.title) && section.subs.length) {
    scopeSection = section;
  } else if (isRequirementSection(section)) {

#254 does not change these lines.

Measured

Rendered with the 1.7.0 script and no view-model. The spec has the template's ## 3. Scope and Boundaries with ### In-Scope and ### Out-of-Scope, followed by one more section that has a ### subsection:

Title of the later section ## 3. Scope and Boundaries on the page
## 4. Out of Scope for the first release Missing: the heading and both lists
## 4. Telescope integration Missing: the heading and both lists

The second row shows that the test is a substring match: any title that contains "scope" takes the slot.

The script exits 0 and the page renders, so nothing tells the reviewer that a section is absent.

Suggested fix

Keep the first match as the scope section and send a later match to genericSections, or render every match. Matching the whole word (/\bscope\b/i) would also keep unrelated titles out.

Activity

  1. barley-github commented on Dec 2, 2026

    @barley-github

    Reviewed this issue against open and closed issues, PRs, Slack and call notes. It is not a duplicate: no existing issue covers the scopeSection overwrite in scripts/render-spec.mjs.

    Related PR (not a fix for this issue)

    Earlier context

    Status: the issue is valid and well described. It gives the exact lines, a measured reproduction with two titles, and a suggested fix, so no more information is needed. I took no automated action beyond this comment. Tracking the fix in a separate PR, or adding it to #254, is for the maintainers to decide.

    Posted by Barley for scenario "AWOS Issue Triage & Auto-Response", set up by Heorhii Luzhanskyi (Z1ksS)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions