Repository navigation
Conversation
…ecks check-plan only recognized fences indented 0-3 spaces. A fence inside a nested list item sits at the item's content indent (4+ spaces or a tab), which CommonMark and GitHub still render as a code block, so the checker read its contents as plan prose: style rules fired on the code and `- [ ]` lines inside it were counted as boxes. Accept any leading whitespace on opening and closing fences, and cover both nested-fence plans and prose after them in the CLI tests. The harness mirror is regenerated.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
check-plan.mjstreats a fenced code block inside a nested list item as plan prose. Its style rules then fire on the code, and- [ ]lines inside the code are counted as boxes. A valid plan can fail the check because of an example inside it.This follows #536, which taught the checker about fences but only matched fences indented 0–3 spaces:
A fence inside a nested list item sits at the item's content indent, which is 4+ spaces (or a tab), and CommonMark and GitHub still render it as a code block. For example:
Run on unfixed
mainwith Node 22.23.5. The input is the plan skeleton with the model filled in, which passes with 0 problems, plus the block above under Build.:retry: 3is read as prose and fails the mid-sentence-colon rule. Box counts are also inflated, because- [ ]lines inside such a block count as boxes.Fix
Accept any leading spaces or tabs on opening and closing fences (
^ {0,3}→^[ \t]*). Everything else is unchanged: fence character and length matching, and the backtick info-string rule.Tests
The new tests are in
check-plan.test.ts:- [ ]line, is accepted. This fails on unfixedmain(Expected: 0, Received: 1).mid-sentence colon, exit 1).Unfixed vs patched, on the test file's valid plan plus each case (Node 22.23.5):
The last row is the one intended change in behavior. An unclosed indented fence now runs to the end of the file, the same way an unclosed unindented fence already does (the row above it).
I also ran the checker before and after the change on all 314 tracked
.mdfiles underpstack/,dyl-stack/andharness/. The output is identical for every one.Checks (darwin arm64, Node 22.23.5, bun 1.3.13)
bun test watch-pr check-plan.test.ts: 63 pass, 0 fail (61 before, plus 2 new)bun run typecheck: cleannode scripts/validate-plugins.mjs: "All plugins validated successfully."node scripts/generate-pstack-harness-trees.mjs --check: "harness/pstack is up to date." (the mirror is regenerated in this PR)node --test pstack/skills/*/scripts/test/*.test.ts: 340 tests, 269 pass, 70 skipped (no Java), 1 fail. This matchesmainexactly; the failure is the macOS relative-symlink launcher test from statechart: relative-symlink launcher test fails on macOS because /var is a symlink #1164.🤖 Generated with Claude Code