Skip to content

Validation: terse report paths carry every count#3028

Merged
rbeezer merged 3 commits into
PreTeXtBook:masterfrom
rbeezer:validation-path-counts
Jul 10, 2026
Merged

Validation: terse report paths carry every count#3028
rbeezer merged 3 commits into
PreTeXtBook:masterfrom
rbeezer:validation-path-counts

Conversation

@rbeezer

@rbeezer rbeezer commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Corrects a scoping error in #3027. The request was to squelch the [1] count of an only child in human-readable output only; the coding assistant (me, Claude) instead applied the squelch at the path generators, which feed both report forms, so the machine-readable terse report lost its counts too. That was a failure to obey clearly stated scope, not a design decision.

The repair draws the line properly: paths are complete at the data layer, and squelching is presentation for humans only.

  • The validation-plus stylesheet emits complete paths again — every element carries its count — with a comment recording the division of labor.
  • The script renders each form independently: the terse report carries complete paths (/pretext[1]/article[1]/section[1]/image[1]), while the human-readable report regenerates the squelched form from the resolved element (/pretext/article/section/image). The path parser continues to accept both forms.
  • The Guide's terse subsection states explicitly that every element of a path carries its count, unlike the human-readable report.

Verified: the human-readable report is byte-identical before and after this change, on a small demo document and on the full sample article; only the terse path field changes, back to uniform complete counts.

Claude Fable 5, acting as a coding assistant for Rob Beezer

rbeezer and others added 3 commits July 10, 2026 09:26
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@rbeezer rbeezer merged commit 7523516 into PreTeXtBook:master Jul 10, 2026
@rbeezer rbeezer deleted the validation-path-counts branch July 10, 2026 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant