Plan frontmatter parsing lets plan-overlap clear two plans that collide #232

Closed
opened 2026-08-22 19:12:58 +00:00 by john · 0 comments
Owner

Two defects in plan frontmatter parsing, both reproduced by execution against the
current tree. Filed 2026-08-08, archived unread in .planning/CAPTURE.md,
re-verified 2026-08-22.

Both undermine plan-overlap's ability to prove file-list independence before a
parallel dispatch, which is the check that decides whether two plans can run in
separate worktrees without colliding.

1. Frontmatter issues leak across keys

readFrontmatterList (lib/planning-files.mjs:2098-2101) returns the
whole-document issues array from parseFrontmatter regardless of which key the
caller asked for. Observed: parsePlanFiles on a document whose goal: scalar is
backtick-wrapped returns a backtick-wrapped-value issue on the files: read,
where nothing is wrong with the file list at all.

2. Markdown decoration other than a boundary backtick is not caught

parsePlanFiles('files:\n - **src/shared.rs**\n') returns
{"files":["**src/shared.rs**"],"issues":[]}. The link form
[src/shared.rs](src/shared.rs) is likewise clean. plan-overlap compares
exact strings, so a decorated path in one plan will not match a sibling plan's
plain src/shared.rs, and two plans that DO collide are cleared to run in
parallel.

The existing backtick-wrapped-value detection only fires on a boundary
backtick, so it catches the narrowest case and misses the rest.

Two defects in plan frontmatter parsing, both reproduced by execution against the current tree. Filed 2026-08-08, archived unread in `.planning/CAPTURE.md`, re-verified 2026-08-22. Both undermine `plan-overlap`'s ability to prove file-list independence before a parallel dispatch, which is the check that decides whether two plans can run in separate worktrees without colliding. ### 1. Frontmatter issues leak across keys `readFrontmatterList` (`lib/planning-files.mjs:2098-2101`) returns the whole-document `issues` array from `parseFrontmatter` regardless of which key the caller asked for. Observed: `parsePlanFiles` on a document whose `goal:` scalar is backtick-wrapped returns a `backtick-wrapped-value` issue on the `files:` read, where nothing is wrong with the file list at all. ### 2. Markdown decoration other than a boundary backtick is not caught `parsePlanFiles('files:\n - **`src/shared.rs`**\n')` returns `{"files":["**`src/shared.rs`**"],"issues":[]}`. The link form `[`src/shared.rs`](src/shared.rs)` is likewise clean. `plan-overlap` compares exact strings, so a decorated path in one plan will not match a sibling plan's plain `src/shared.rs`, and two plans that DO collide are cleared to run in parallel. The existing `backtick-wrapped-value` detection only fires on a boundary backtick, so it catches the narrowest case and misses the rest.
john closed this issue 2026-08-23 02:38:29 +00:00
john added this to the v3.5.9 milestone 2026-08-23 20:51:29 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: crenshawdev/cadence-archived#232
No description provided.