fix(cli): include readonly flow-write warnings in os validate --json (#3465 follow-up)#3480
Merged
Merged
Conversation
#3465 follow-up) `validateReadonlyFlowWrites` warnings (the `readonlyWhen` advisory added in #3465) were printed in human mode but left out of the `--json` summary's `warnings` array, where every other advisory category is aggregated. So `os validate --json` consumers (CI, editors) silently missed them. Add `...readonlyWriteWarnings` to the summary array so JSON and human output agree. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
📓 Docs Drift CheckThis PR changes 1 package(s): 18 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
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.
Small follow-up to #3465 (spotted while merging #3472).
Problem
validateReadonlyFlowWrites(added in #3465) surfaces two things: errors for a static-readonly+ literal write (a certain silent no-op — these gate and exit), and warnings for areadonlyWhenfield (per-record-state → advisory). The warnings are printed in human mode:…but
readonlyWriteWarningswas omitted from the--jsonsummary'swarningsarray, where every other advisory category is aggregated:So
os validate --jsonconsumers (CI gates, editor integrations) silently never saw the readonlyreadonlyWhenwarnings, while human output showed them — the two modes disagreed.Fix
Add
...readonlyWriteWarningsto the JSON summary array, positioned by execution order (right after...flowTemplateWarnings, before the security advisories). One line; mirrors the nine existing warning spreads exactly.Testing
@objectstack/cli:tsc --noEmitclean.warningsaggregation has no dedicated test seam — none of the other nine categories is asserted there either; each underlying validator, includingvalidateReadonlyFlowWrites, is unit-tested in@objectstack/lint.)🤖 Generated with Claude Code