Repository navigation
fix(adf): preserve section boundaries and generate canonical core scaffolds - #407
Merged
Merged
Conversation
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.
adf fmt --writepreviously treated multi-word uppercase headers and decorations containing repeated U+FE0F selectors as body text. It could report success while moving an entire section inside the previous section, hiding constraints from later processing.Extend the tolerant parser's header recognition to retain these sections. The formatter keeps its existing canonical ordering and decoration normalization, and indented entries/prose remain body content. No API is removed, CLI result shape changes, or LOC ceilings increase.
Fresh
adf initalso suggested a formatting check that failed on its own core scaffold. Move the unchanged CONSTRAINTS block before GUIDE inCORE_SCAFFOLDso new output is canonical. Existing complete old-order files are not reformatted under plain init or--force, and populate still recognizes their unchanged per-section fingerprints.Closes #389.
Validation (Windows Node 24.19.0 / pnpm 9.15.9):
pnpm install --frozen-lockfile: passed in the isolated issue worktree.pnpm run build: passed.pnpm run typecheck: passed.b7c0253:pnpm exec vitest run packages/adf/src/__tests__ packages/cli/src/__tests__/adf-fmt-headers.test.tspassed 317/317 across 17 files, including the first 13 new cases.3e9f928: init/fmt/populate/bootstrap merge/no-overwrite/reset suites passed 253/253 across six files. Three additional tests execute the JSON next action successfully, preserve complete old-order core bytes under plain init and--force(including CRLF and no final newline), and check populate fingerprints still recognize template sections while rejecting custom context.--check/--write, byte-preserving check mode, and default stdout mode.git diff --checkand smart-commit pre-commit TypeScript/ADF evidence gates: passed. Existing parser LF line endings preserved; new tests use LF.pnpm run testatb7c0253: 1,938 passed / four failed (1,942 total, 89 files), exactly the four existing Windows baseline cases listed below. Log:issue-389-full-tests.login the issue worktree. Final3e9f928full-suite rerun: 1,941 passed and four known Windows baseline failures (1,945 total), 168.79 seconds. Log:.release-389-scaffold-full-final.login the worktree. All three additional scaffold tests pass.Main CI already fails
pnpm run supply-chain:checkbefore build/tests; its dependency remediation is coordinated separately under #397/#310. Four existing Windows full-suite failures concern a POSIX-path premise, context-refresh/serve-context path separators, and Ctrl-D fake-TTY behavior. No audit gate is changed or bypassed.The scaffold change only reorders two unchanged core sections; it does not re-render existing user files or rewrite the other templates. Source LF endings and LOC ceilings are preserved. No merge, publishing, deployment, production write, or remote branch deletion performed.