Files
msd-core/.changeset/1993-milestone-ws-requirements-header.md
Tom Boucher e2bfe4dc67 fix(#1993): milestone --ws requirements archive header points at workstream path (#2015)
* fix(#1993): milestone --ws requirements archive header points at workstream path

The requirements archive header hardcoded the root .planning/REQUIREMENTS.md
path, so a workstream (--ws) archive pointed readers at the wrong file even
though #1917 fixed the archive LOCATIONS to land inside the workstream.

Derive the display path from the same workstream-aware reqPath the writer
already uses (path.relative(cwd, reqPath)). Root behavior is byte-identical
('.planning/REQUIREMENTS.md'); the --ws case now correctly reads
'.planning/workstreams/<ws>/REQUIREMENTS.md'.

- src/milestone.cts: reqDisplay interpolation in the archive header.
- tests/milestone.test.cjs: #1993 regression in the #1911 --ws block — header
  references the workstream path, not the root literal.

Closes #1993

* docs(#1993): backfill changeset pr 2015

* fix(#1993): use posix separators in archive header (Windows CI) + CRLF-safe test split

- src/milestone.cts: normalize path.relative output to POSIX separators so
  the workstream archive header renders forward slashes on Windows too
  (path.relative yields backslashes there; the original literal was posix).
- tests/milestone.test.cjs: .split(/\r?\n/) for the CRLF-fragile lint rule.
2026-07-05 14:03:43 -04:00

631 B

type, pr
type pr
Fixed 2015

milestone complete --ws requirements archive header now points at the workstream REQUIREMENTS.md — the archive header string hardcoded the root path (`…see .planning/REQUIREMENTS.md`), so a workstream archive directed readers at the wrong file even though #1917 had already fixed the archive locations to land inside the workstream. The display path is now derived from the same workstream-aware reqPath the writer uses (path.relative(cwd, reqPath)), so root behavior is byte-identical and the workstream case correctly reads .planning/workstreams/<ws>/REQUIREMENTS.md. (#1993)