Repository navigation
feat!: ValidationResult is a list of issues, each with its severity - #217
Merged
Merged
Conversation
validateSpace returned per-check arrays (nodeErrors, refErrors, duplicateErrors,
hierarchyViolations, ruleViolations, unresolvedContentLinks, parseIssues), and
only some carried a severity. nodeIssues() then derived a second, node-keyed
shape with severities for validateFile and validate --json, which every
consumer read instead.
ValidationResult now has one `issues` list. Each ValidationIssue has a kind,
key, severity and message, the node or file it is about, and its kind's own
fields (a rule's ruleId and category, a duplicate's sources, a broken link's
ref). Core decides severity once, as it builds the list. validate --json
prints the result as it is, plus space/valid/errorCount, and validateFile
returns one node's issues in the same shape.
Removed: nodeIssues, FileValidationIssue, ValidationResult's per-check arrays
and nodeErrorCount. `orphans` is now { nodeId, title }[]. 'parse' joins
VALIDATION_ISSUE_KINDS.
The map pane converts the list for structured-context-map-views 0.5's
annotationsFrom until a map-views release takes the list itself.
Closes #198
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019Xphpde5yiQF1dWi3KfETS
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
mindsocket
commented
Nov 10, 2026
mindsocket
left a comment
Owner
Author
There was a problem hiding this comment.
Small improvements needed
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019Xphpde5yiQF1dWi3KfETS
This was referenced Nov 10, 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.
Requested by Rog · project thread
Closes #198.
Why
validateSpacereturned one array per check (nodeErrors,refErrors,duplicateErrors,hierarchyViolations,ruleViolations,unresolvedContentLinks,parseIssues), and only some of them carried a severity.nodeIssues()then built a second shape, keyed by node and with severities, forvalidateFileandvalidate --json. Every consumer read that second shape. So there were two shapes, and an extra function and type to keep them in step.What
ValidationResult.issues: ValidationIssue[]replaces the per-check arrays. Every issue has akind, akey(stable within its node or file), aseverity, amessage, and itsnodeId/source. Each kind adds its own fields as a discriminated union: a rule'sruleId/category/evidence, a duplicate'ssources, a broken link'sref/reason, a gate'sgatedBy, and so on. Nothing is flattened into the message any more.issuesOf, private).validate --jsonprints the result as it is, plusspace,validanderrorCount.validateFilereturns one node's issues in the same shape.nodeIssues,FileValidationIssue, the per-check arrays andnodeErrorCount.orphansis now{ nodeId, title }[], so the result serialises without whole nodes.'parse'is added toVALIDATION_ISSUE_KINDS.validCount,coverageGates,contextTrimmed,skippedByDepth,depthLimit.Consumers
state.ts) group the list bynodeId(or file for parse issues) and key bykey. They still skip parse warnings (untyped notes), as before.PaneValidationis now{ issues }. The map pane has a smallPROTOTYPE:adapter that converts the list for map-views 0.5'sannotationsFrom. It goes away once a map-views release takes the list itself.annotationsFromtakesValidationIssue[]), then Obsidian.Checks
bun run typecheck,bun run lint,bun run test(902 pass),bun run test:hook(55 pass),bun run test:mod(12 pass),claude plugin validate plugin, plus the pre-push tree check.Breaking for API consumers. Pre-1.0, so this should be a minor release (0.23.0).
Generated by Claude Code