Repository navigation
feat(csharp): run the model authoring lints in dotnet meta verify - #635
Merged
Merged
Conversation
fixtures/model-lint-conformance/ (18 cases) pins the codes, addresses and message text of the three advisory model authoring lints verify prints: WARN_OVERLAY_IMPLICIT, WARN_NAME_SURROUNDING_WHITESPACE / WARN_NAME_INTERNAL_WHITESPACE and WARN_DEPRECATED_REFERENCE. The corpus is byte-identical to the Python lane's copy, so whichever lands second rebases cleanly. The corpora count moves to 44 and CONFORMANCE.md gains its row.
dotnet meta verify now prints the three model authoring lints Node meta verify has: WARN_OVERLAY_IMPLICIT, WARN_NAME_SURROUNDING_WHITESPACE / WARN_NAME_INTERNAL_WHITESPACE and WARN_DEPRECATED_REFERENCE, in the Node order (overlays, names, deprecations) before the field lint. They are advisory, never change the exit code, and each is muted by its own --no-*-lint flag or META_NO_*_LINT=1. The raw-document reader moves out of FieldLint into RawDocument and now reads booleans (overlay: true), keeping the text YAML wrote so a field literally named true still reads as a name. ModelLintConformanceTests runs the shared fixtures/model-lint-conformance/ corpus; VerifyModelLintTests drives the built CLI for the order, the flags and the variables.
# Conflicts: # AGENTS.md # CHANGELOG.md # docs/CONFORMANCE.md # examples/showcase/site-payload.json
# Conflicts: # CHANGELOG.md
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.
What Changed
dotnet meta verifynow prints the three advisory model authoring lints to stderr, before the field lint, in the same order as Nodemeta verify: overlay (WARN_OVERLAY_IMPLICIT), node names (WARN_NAME_SURROUNDING_WHITESPACE,WARN_NAME_INTERNAL_WHITESPACE) and deprecated references (WARN_DEPRECATED_REFERENCE). They never change the exit code. Each is muted by--no-overlay-lint,--no-name-lint,--no-deprecation-lintor itsMETA_NO_*_LINT=1variable.FieldLint.csintoRawDocument.cs, and the new lints use it withLintFindingandModelLints. The field lint's output is unchanged.Replaced by …when the reason has no terminal punctuation. The overlay lint accepts aPickof the collection instead of the full type.fixtures/model-lint-conformance/is a new corpus that both the C# and TS ports run, and the CLI docs and CHANGELOG are updated to match.Validation
Risk Assessment
✅ Low: The change adds advisory-only lints that never reach the exit code, backed by a shared corpus and CLI-level tests. The merge in this run only resolved CHANGELOG, AGENTS, CONFORMANCE and site-payload conflicts, and the corpus count of 46 matches the fixture directories.
Testing
Baseline configured test command passed at the target commit and was not re-run because no source changed this turn. The strict-load fix from test round 1 is in HEAD (ed1e603). Drove the freshly built C#
dotnet meta verifyCLI on three disposable synthetic models: clean strict load prints all three advisory lints and exits 0; strict load failure on an unregistered attr exits 1 with the name and deprecation lints silent, as the contract requires;--laxon the same model prints all three lints and exits 0. Overall result: all three pass live.Evidence: Live model-lint transcript: strict clean (S1), strict load failure (S2), lax (S3)
Pipeline
Updates from git push no-mistakes
✅ **Intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
🔧 **Test** - 1 issue found → no changes applied ✅
scripts/ci-local.sh --affected --strict-toolchainsBuilt dotnet meta CLI:dotnet build server/csharp/MetaObjects.Cli/MetaObjects.Cli.csproj -c Release -o $DEV_SCRATCH/mo-cliS3 live:dotnet mo-cli/MetaObjects.Cli.dll verify <bogus-model> --templates --prompts <templates>(strict default) on a disposable model with @bogusAttr, overlay, name-whitespace and deprecated-reference findingsS1 live: same model with--laxS2 live:verifyon a clean disposable model (overlay flagged, no whitespace, no deprecation)dotnet test server/csharp/MetaObjects.Cli.Tests/MetaObjects.Cli.Tests.csproj(464 passed, 0 failed, includes VerifyModelLintTests strict-load case)Full regression:dotnet test server/csharp/MetaObjects.sln(exit 0: Render 367, Conformance 2906, Codegen 1895 + 1 skipped, Cli 464; 0 failed)Scratch fixtures and build output removed under $DEV_SCRATCH; worktree git status clean.🔧 No changes applied.
✅ Re-checked - no issues remain.
scripts/ci-local.sh --affected --strict-toolchainsBaseline:scripts/ci-local.sh --affected --strict-toolchains(configured test command, passed at target commit 20a38b282f; not re-run, no source changed)Confirmed fix commit ed1e6036ac is an ancestor of HEAD; read server/csharp/MetaObjects.Cli/ModelLints.cs (RunAdvisory strict param, meta.Load(strict)) and Program.cs:677 (strict: !lax)dotnet build server/csharp/MetaObjects.Cli/MetaObjects.Cli.csproj -c Release -o /mnt/scratch/mo130-lint/cli(built CLI into scratch, 0 errors)S1:dotnet MetaObjects.Cli.dll verify <clean-model> --templates <t> --prompts <t>-> exit 0, overlays/names/deprecations sections printedS2: same verify on model with unregistered@bogusAttr(strict default) -> exit 1, ERR_UNKNOWN_ATTR load error, names and deprecations sections absent, overlay section still printedS3: same model with--lax-> exit 0, all three advisory sections printedTranscript saved to evidence dir; scratch build and fixtures removed; worktree git status clean✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.