You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds structured Citations data alongside the existing free-text Suggestion string for STE100-DICT (dictionary) findings. Each citation pairs an approved alternative term with its
grammatical role (Pos), so an integrating tool can consume dictionary corrections as
structured data instead of parsing a formatted string.
This is the remaining half of feature #4 from the integrator write-up. The rule-catalog-level suggestionKind classification ("advice" vs "citationForm") was already shipped via --list-rules in an earlier PR; this PR adds the missing per-diagnostic structured citation
data itself.
Diagnostic.Citations (IReadOnlyList<DictionaryCitation>?, additive, defaults to null) -
new DictionaryCitation(Term, Pos) record.
DictionaryChecker.ConfidentDiagnostic/AmbiguousDiagnostic build Citations in parallel
with Suggestion, using identical filtering (excludes purely self-referential senses and
alternatives-less candidates), so the two representations never disagree.
DiagnosticReporter.WriteJson serializes Citations as a new JSON citations array
(JsonCitation: term, pos), null when the diagnostic has no citable alternative.
Suggestion is unchanged, preserving backward compatibility with existing text-mode CLI
output and all pre-existing test assertions.
Type of Change
Bug fix (non-breaking change which fixes an issue)
New feature (non-breaking change which adds functionality)
Breaking change (fix or feature that would cause existing functionality to not work as expected)
Documentation update
Code quality improvement
Related Issues
Closes #
Pre-Submission Checklist
Build and Test
Code builds successfully and all tests pass: pwsh ./build.ps1
Added code examples for new features (if applicable)
Updated requirements.yaml (if applicable)
Not applicable: no new requirement created; new/extended tests were added to the tests
list of the existing Ste100Mark-Linting-DictionaryPos and Ste100Mark-Linting-OutputFormats
requirements in docs/reqstream/ste100-mark/linting.yaml, whose scope already covers this
behavior.
Additional Notes
Design choice: kept Suggestion as-is rather than replacing it, to avoid a large,
low-value rewrite of ~15+ existing .Suggestion test assertions and to preserve
text-mode CLI output quality. Citations is null (not an empty array) whenever there
is no citable alternative (purely self-referential sense, or a sense/candidate with zero
alternatives), mirroring the cases where Suggestion itself carries no word list.
Add Diagnostic.Citations (IReadOnlyList<DictionaryCitation>) as an
additive, structured alternative to the free-text Suggestion string
for STE100-DICT findings. Each citation pairs an approved alternative
term with its grammatical role (Pos), letting integrators consume
dictionary corrections as data instead of parsing prose.
- DictionaryChecker.ConfidentDiagnostic/AmbiguousDiagnostic now build
Citations in parallel with Suggestion, using identical filtering
(excludes pure-self-referential senses and alternatives-less
candidates) so the two representations never disagree.
- DiagnosticReporter.WriteJson serializes Citations as a new
citations JSON array (JsonCitation: term, pos), null when absent.
- Suggestion is unchanged for backward compatibility with existing
text-mode CLI output and test assertions.
Extends feature #4 from the integrator write-up (structured
suggestionKind/citation data instead of a pre-formatted string);
the rule-catalog-level suggestionKind classification was already
shipped via --list-rules.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Addresses reviewer feedback on PR #29: the Diagnostic design doc still
described the record as ending at Suggestion, omitting the new
Citations field and DictionaryCitation record added alongside it.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Addresses reviewer feedback on PR #29:
- Add the two self-referential Citations tests
(Evaluate_PureSelfReferentialEntry_ConfidentDisallowedUsage_UsesRoleRestrictionMessage,
Evaluate_PureSelfReferentialCandidate_WithinAmbiguousResult_UsesRoleRestrictionClause)
to Ste100Mark-Linting-DictionaryPos's tests list in linting.yaml, closing the
traceability gap between the verification narrative and ReqStream.
- Correct linting.md wording that overstated coverage: the
alternatives-less-candidate and self-referential-candidate tests prove
Citations omits the non-citable candidate from a mixed result (non-null),
not that the whole Citations list is null; only the sole-self-referential-
candidate case is actually null.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The confident path now defines the Citations == null behavior for a sense with zero alternatives, but the updated tests only exercise that case through AmbiguousDiagnostic; the confident no-alternatives branch remains unverified. Please add a DictionaryChecker test for a confidently resolved, alternatives-less sense and assert both Suggestion and Citations are null.
Addresses reviewer feedback on PR #29: the confident (single-sense),
non-self-referential, alternatives-less path in DictionaryChecker sets
both Suggestion and Citations to null, but was previously only
exercised indirectly through AmbiguousDiagnostic's filtering. Add
Evaluate_ConfidentSingleSenseTermWithNoAlternatives_SuggestionAndCitationsAreNull
to verify this branch directly, and wire it into the verification
narrative and ReqStream traceability.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.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
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.
Pull Request
Description
Adds structured
Citationsdata alongside the existing free-textSuggestionstring forSTE100-DICT(dictionary) findings. Each citation pairs an approved alternative term with itsgrammatical role (
Pos), so an integrating tool can consume dictionary corrections asstructured data instead of parsing a formatted string.
This is the remaining half of feature #4 from the integrator write-up. The rule-catalog-level
suggestionKindclassification ("advice"vs"citationForm") was already shipped via--list-rulesin an earlier PR; this PR adds the missing per-diagnostic structured citationdata itself.
Diagnostic.Citations(IReadOnlyList<DictionaryCitation>?, additive, defaults tonull) -new
DictionaryCitation(Term, Pos)record.DictionaryChecker.ConfidentDiagnostic/AmbiguousDiagnosticbuildCitationsin parallelwith
Suggestion, using identical filtering (excludes purely self-referential senses andalternatives-less candidates), so the two representations never disagree.
DiagnosticReporter.WriteJsonserializesCitationsas a new JSONcitationsarray(
JsonCitation:term,pos),nullwhen the diagnostic has no citable alternative.Suggestionis unchanged, preserving backward compatibility with existing text-mode CLIoutput and all pre-existing test assertions.
Type of Change
Related Issues
Closes #
Pre-Submission Checklist
Build and Test
pwsh ./build.ps1pwsh ./build.ps1—total: 1350 succeeded: 1350 failed: 00 Warning(s),0 Error(s)Code Quality
Quality Checks
pwsh ./lint.ps1pwsh ./lint.ps1— exited 0,lint: no errors found.(YAML, markdown, cspell,reqstream, versionmark, reviewmark, sysml2tools,
dotnet format --verify-no-changesallclean)
Testing
Report_JsonFormat_WritesCitationsForDictionaryDiagnostic(new)Evaluate_MultiSenseTerm_NounContext_ReportsNounSense,Evaluate_MultiSenseTerm_VerbContext_ReportsVerbSense,Evaluate_MultiSenseTerm_AmbiguousContext_ReportsAllSensesAmbiguous,Evaluate_SingleSenseTerm_InconclusiveContext_ReportedWithoutPosLabel,Evaluate_PureSelfReferentialEntry_ConfidentDisallowedUsage_UsesRoleRestrictionMessage,Evaluate_PureSelfReferentialCandidate_WithinAmbiguousResult_UsesRoleRestrictionClause,Evaluate_AmbiguousTerm_CandidateWithNoAlternatives_SuggestionHasNoEmptyFragmentwithCitationsassertions covering the populated, self-referential (null), andalternatives-less (
null) cases.Documentation
docs/design/ste100-mark/linting/dictionary-checker.md,docs/design/ste100-mark/linting/diagnostic-reporter.md,docs/verification/ste100-mark/linting.md,docs/reqstream/ste100-mark/linting.yamllist of the existing
Ste100Mark-Linting-DictionaryPosandSte100Mark-Linting-OutputFormatsrequirements in
docs/reqstream/ste100-mark/linting.yaml, whose scope already covers thisbehavior.
Additional Notes
Design choice: kept
Suggestionas-is rather than replacing it, to avoid a large,low-value rewrite of ~15+ existing
.Suggestiontest assertions and to preservetext-mode CLI output quality.
Citationsisnull(not an empty array) whenever thereis no citable alternative (purely self-referential sense, or a sense/candidate with zero
alternatives), mirroring the cases where
Suggestionitself carries no word list.