Include failures: surface inner parse errors, drop spurious Q-16-3 (bd-qpvoamvu) - #465
Merged
Merged
Conversation
…d-qpvoamvu) Move include diagnostics off the project subsystem's codes onto a new include subsystem (Q-17-1 circular, Q-17-2 not-found, Q-17-3 parse error, Q-17-4 not-expanded-here), report the included file's own parse errors with full snippets after the Q-17-3 wrapper, and remove failed include blocks from the AST so shortcode-resolve no longer misreports them as unknown shortcodes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This was referenced Aug 7, 2026
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.
Summary
Fixes two diagnostics defects around failing
{{< include >}}shortcodes, found while porting the Posit Connect docs (bd-qpvoamvu):Failed to parse included file '…': 1 error(s). The included file's own diagnostics — with precise locations — were discarded. Now the wrapper is followed by the inner diagnostics, remapped into the parent document'sSourceContextso they render full ariadne snippets in the included file.Q-16-3 Unknown shortcodefollowed every failure. The failed include's paragraph was left in the AST, so the shortcode-resolve transform reportedincludeas unrecognized. Failed include blocks are now removed; anyincludethat legitimately reaches shortcode-resolve (e.g. inline in a sentence) gets a dedicated "Include not expanded" warning instead.Along the way, the include diagnostics were found to be squatting on the project subsystem's catalog codes (Q-5-1/2/3 = resource-glob errors). This PR mints subsystem 17 (
include): Q-17-1 circular, Q-17-2 not found, Q-17-3 parse error, Q-17-4 not expanded here — with catalog entries and docs pages underdocs/errors/include/.Before/after on the motivating case: the Connect docs page went from "
_common.qmd: 1 error(s)" + "Shortcodeincludeis not recognized" to pointing directly at_common.qmd:383:31(an unescaped apostrophe) with the full two-label snippet.Plan + diagnosis:
claude-notes/plans/2026-08-07-include-error-diagnostics.md. Discovered follow-up (separate strand bd-1fz3vh99): includes nested inside container blocks are silently dropped.Test plan
include_expansion_diagnostics.rs) + 3 new unit tests, each verified failing before the fix (TDD).cargo nextest run --workspace: 11005 passed. Fullcargo xtask verify(incl. WASM + hub-client legs): green.docs/site render (186/186) — outputs recorded in the plan file.🤖 Generated with Claude Code