Skip to content

fix(tools): the ADR index keeps a wrapped Resolves or Amends bullet whole - #53

Merged
sebastian-iancu merged 1 commit into
mainfrom
fix/adr-index-wrapped-labels
Oct 10, 2026
Merged

sebastian-iancu merged 1 commit into
mainfrom
fix/adr-index-wrapped-labels

Conversation

@sebastian-iancu

Copy link
Copy Markdown
Contributor

Summary

sdd-check generate fills the ADR index's Resolves / amends column from each ADR's Traceability list, one line per label. A bullet wrapped over two or more lines lost its continuation: the cell ended mid-list, on a dangling comma or semicolon, and dropped whatever the later lines named. With 0.11.1 reading emphasised labels, these cells started filling in, so the truncation became visible; on one real ADR set, six of thirty-one cells were cut short.

The value is now the list item's whole first paragraph. Indented and lazy continuation lines join it with single spaces; a blank line, the next item (nested or not), a heading or a code fence ends it. A label whose value starts on the line after it (- **Amends:** then an indented line) is read too, where it was skipped.

  • Not taken: keeping each continuation line's own line break (a table cell cannot hold one), and reading a second paragraph after a blank line, which Markdown places in the same item but which is commentary rather than a reference list.

Docs

  • CHANGELOG.md: one Fixed line under Unreleased.
  • No reference restates how the cell is read, so none changes.

Verification

  • ./scripts/validate.sh — passes (validate.py, then hooks-test: OK); python3 scripts/validate.py alone exits 0.
  • python3 -m unittest discover -s tools/tests — OK; python3 tools/sdd-check.py selftest — OK — 26 cases.
  • claude plugin validate . — Validation passed.
  • red before green: the new test_a_wrapped_label_keeps_its_continuation_lines fails against the parser on main (the cell reads change),; Resolves: STRAND-02;; Amends: …) and passes with the fix; the three existing ADR-index tests are unchanged and pass.
  • generate --verify with the fixed tool on a repository with six wrapped bullets: each of the six cells now carries its full list, and no other cell changes.

Notes for review

  • Where to look: _traceability_refs and _ITEM_END_RE in tools/sdd-check.py.
  • A repository that vendors the gate gets the fix at its next /sdd-scaffold --upgrade, followed by sdd-check generate.

Checklist

  • Scoped to one logical change
  • The gates above pass locally and their output was read
  • CHANGELOG entry under Unreleased, when the change is user-visible; version bumped per docs/versioning.md at release (no bump here)
  • Both manifests kept in sync, and AGENTS.md, README.md, the Cursor rule and hooks/session-start.sh synced when components changed (no component changed)
  • No internal or private repository names, absolute paths or organisation-private details; disclosure grep clean over the tree, CHANGELOG.md and this branch's commit messages

🤖 Generated with Claude Code

…hole

The Resolves / amends column read one line per label, so a Traceability bullet
wrapped over two lines lost its continuation, and the cell ended mid-list on a
dangling comma or semicolon. The value is now the list item's whole first
paragraph: indented and lazy continuation lines join it with single spaces, and
a blank line, the next item (nested or not), a heading or a code fence ends it.
A label whose value starts on the next line is read too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sebastian-iancu
sebastian-iancu merged commit bfb6573 into main Oct 10, 2026
2 checks passed
@sebastian-iancu
sebastian-iancu deleted the fix/adr-index-wrapped-labels branch October 19, 2026 14:20
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