v3 Designer: validation line numbers + Phase 7 test hardening (v0.12)#78
Merged
Merged
Conversation
- collectBlockingErrors now reports source line numbers for anchor errors (e.g. 'Duplicate anchor name: "&dup" declared 2 times (lines 5, 6)'). It re-parses _doc.toString() with a YAML.LineCounter and maps node.range[0] to a line. Structural validateReferences errors stay line-less (model-based); dangling-alias errors are line-less by nature (a dangling alias makes the doc non-serializable, so the re-parse falls back gracefully and still reports the error). New _linesSuffix helper formats "(line N)" / "(lines N, M)". - Fixed a double-bullet in the confirm-modal list (callers prefix "• ", so the <li> disc marker is now suppressed via list-style: none). - Suite 31 (21 checks): comment preservation at strategic positions (head/section/inline/between), anchor edge cases (two anchors same value, binding isolation), randomized-block semantics (randomize true/false round-trip), and validation line-number coverage. Full suite 467/467. - Footer bumped v0.11 -> v0.12. Browser-verified: the validation modal renders line numbers and a single clean bullet. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Two quick follow-ups after the Phase 5/6 merge (#77), both browser-verified.
Validation error line numbers
collectBlockingErrorsnow reports source line numbers for anchor errors — e.g.Duplicate anchor name: "&dup" declared 2 times (lines 5, 6). It re-parses_doc.toString()(the exact text export will write) with aYAML.LineCounterand maps each node'srange[0]to a line, so positions stay accurate even after edits.Honest scope:
validateReferences, e.g. duplicate condition names) stay line-less — they're model-based and have no CST node handle.toString()throws "Unresolved alias"), so the re-parse can't run. The check falls back to a range-less scan and still reports the error — just without a line. (Such a doc can't be exported anyway.)Also fixed a cosmetic double-bullet in the modal list (callers prefix
•, so the<li>disc marker is now suppressed).Phase 7 test hardening (Suite 31, 21 checks)
randomize: truesurvives; explicitrandomize: falseis not dropped; repetitions preserved.Testing
npm test→ 467/467 (arena 10, v2 137, v3 467 — 21 new in Suite 31).(lines 5, 6)and a single clean bullet (screenshots in session).Footer bumped to v0.12.
🤖 Generated with Claude Code