Honor value/element nullability in JSON schema; make child-process environment configurable#289
Merged
rdeago merged 14 commits intoMay 31, 2026
Conversation
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The exception type and the JsonSchemaValidator.ValidateAndThrow() method had no callers and are unlikely to be needed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
System.Text.Json marks every reference-type dictionary value and collection element nullable regardless of the model's annotation, so the generator stripped null everywhere and a genuinely nullable value (e.g. IReadOnlyDictionary<string, string?>) lost its null. Read the declared nullability from the owning property or field via NullabilityInfoContext and reconcile the exporter's output against it, recursing through nested generics. Value and element nodes no longer strip null themselves; the owning property decides, since the exporter gives no usable signal there. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Make DotNetInvocationConfig.Env values nullable so a configured variable can carry an explicit null, and regenerate buildvana.schema.json, whose additionalProperties now permits ["string", "null"]. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Apparently ReSharper in VS Code does not honor .globalconfig at design time.
Some diagnostics are better relaxed or suppressed in tests: consistency among tests is more important that some style rules.
Remove some properties that TUnit provides for us.
Suppress some diagnostics via .editorconfig files; fix what remains.
Member
Author
|
This PR has been reviewed locally. |
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.
Preparatory work for #269 (Config Phase 2). No CLI surface changes; sets up the schema and process-runner plumbing that #269 will wire to
buildvana.json.JSON schema value nullability
System.Text.Json's exporter forces onto every reference-type dictionary value and collection element against the model's declared nullability (stringvsstring?), read from the owning member viaNullabilityInfoContext.nullis now kept only where the model actually declares it, recursing through nested generics.nullvalues fordotnetenvironment variables (DotNetInvocationConfig.Env→IReadOnlyDictionary<string, string?>?); the generated schema now accepts["string","null"]for those values.JsonSchemaValidationExceptionandJsonSchemaValidator.ValidateAndThrow.Configurable child-process environment
environmentargument throughIProcessRunner.RunAsync→ProcessRunner(CliWrapWithEnvironmentVariables, overlaying the inherited environment; anullvalue unsets a variable) →DotNetService.RunDotNetAsync. Not yet sourced from config — Config Phase 2 — wire existingbvoptions tobuildvana.json#269 connects it.Static analysis & tooling
.globalconfiginto.editorconfig, with a test-specific overlay; refresh ReSharper settings; addJetBrains.Annotations.Sourcesto all C# projects; resolve/suppress the remaining ReSharper diagnostics; set JSON language mode for SARIF files in VS Code.Fixes
dotnet nuget pushhas no--verbosityoption; routeNuGetPushAllAsyncthrough an invocation kind that streams output without appending verbosity, so package pushes don't fail.No CHANGELOG entry: nothing here changes released behavior (the push fix corrects a regression introduced earlier on this same branch), and the
envconfig knob has no effect until #269 wires it.