Skip to content

Plugin-host parse-fidelity API + semantic-validation tier#213

Merged
fuzzzerd merged 5 commits into
masterfrom
fuzzz/plugin-fidelity-and-semval
May 17, 2026
Merged

Plugin-host parse-fidelity API + semantic-validation tier#213
fuzzzerd merged 5 commits into
masterfrom
fuzzz/plugin-fidelity-and-semval

Conversation

@fuzzzerd
Copy link
Copy Markdown
Owner

@fuzzzerd fuzzzerd commented May 17, 2026

Closes #202.

Bundles the four follow-up items from #202:

  1. ClipParseReport on ClipData — plugins can now read fidelity diagnostics without re-parsing via the new ClipData.ParseReport init-only property. PluginHost populates it at every new ClipData site from the live Clip aggregate's cached parse.

  2. IPluginHost.ValidateClipXml(clipType, xml) → ClipParseReport — pure pre-flight validator routed through ClipTypeRegistry.For(clipType).Parse(xml).Report. No mutation, no UI-thread gating. Lets external callers inspect lossiness before pushing XML through UpdateClipXml / UpdateSelectedClipXml.

  3. Semantic-validator framework (no rules) — new SharpFM.Model.Validation namespace with IClipSemanticValidator and SemanticValidatorRegistry. Wired into Clip.FromXml and Clip.FromEditor so diagnostics fold into a separate ClipParseReport.SemanticDiagnostics list. Structural and semantic axes stay distinct — IsLossless keeps its existing meaning, and a new IsSemanticallyValid mirrors it on the semantic side. Ships with BuiltIns = []; concrete rules land in follow-ups.

  4. Clip.Rename wired to a UI command — new "Rename..." context-menu item on the clip tree, backed by MainWindowViewModel.RenameSelectedClip. Adds the SharpFM.Dialogs namespace (IInputPrompt + InputDialog) and fills in the previously-stubbed IPluginHost.ShowInputDialogAsync via the same plumbing.

Also fixes a pre-existing UX gap: right-clicking a clip in the tree now promotes that node into the active selection before the context menu opens, so Rename / Delete / Copy operate on the right-clicked clip rather than whatever was previously focused.

1345 tests pass (dotnet test SharpFM.sln).

@github-actions
Copy link
Copy Markdown

Test Results

✔️ Tests 1345 / 1345 - passed in 16.2s
✔️ Coverage 78.9% - passed with 70% threshold
📏 14810 / 17242 lines covered 🌿 4993 / 7858 branches covered
🔍 click here for more details

✏️ updated for commit 7a3cf3e

@fuzzzerd fuzzzerd merged commit bf74ffc into master May 17, 2026
6 checks passed
@fuzzzerd fuzzzerd deleted the fuzzz/plugin-fidelity-and-semval branch May 17, 2026 17:47
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.

Plugin-host parse-fidelity API + semantic validation tier

1 participant