From 5a460e1d48b4b91a79afd77b1a88ddd3d1cf11a4 Mon Sep 17 00:00:00 2001 From: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com> Date: Sat, 25 Jul 2026 09:29:53 +0800 Subject: [PATCH] fix(cli): include readonly flow-write warnings in `os validate --json` (#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 --- .changeset/readonly-flow-write-json-warning.md | 11 +++++++++++ packages/cli/src/commands/validate.ts | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 .changeset/readonly-flow-write-json-warning.md diff --git a/.changeset/readonly-flow-write-json-warning.md b/.changeset/readonly-flow-write-json-warning.md new file mode 100644 index 000000000..da016cade --- /dev/null +++ b/.changeset/readonly-flow-write-json-warning.md @@ -0,0 +1,11 @@ +--- +"@objectstack/cli": patch +--- + +fix(cli): include readonly flow-write warnings in `os validate --json` output + +The `readonlyWhen` flow-write advisory (`validateReadonlyFlowWrites`, #3465) was +printed in human mode but omitted from the `--json` summary's `warnings` array, +where every other advisory category is aggregated. `os validate --json` +consumers (CI, editors) therefore never saw those warnings. Added +`...readonlyWriteWarnings` to the summary array so JSON and human output agree. diff --git a/packages/cli/src/commands/validate.ts b/packages/cli/src/commands/validate.ts index 75a5a608b..bead03cf1 100644 --- a/packages/cli/src/commands/validate.ts +++ b/packages/cli/src/commands/validate.ts @@ -562,7 +562,7 @@ export default class Validate extends Command { valid: true, manifest: config.manifest, stats, - warnings: [...exprWarnings, ...widgetWarnings, ...actionRefWarnings, ...styleWarnings, ...jsxWarnings, ...capWarnings, ...flowReadinessWarnings, ...flowTemplateWarnings, ...securityAdvisories, ...capProviderWarnings], + warnings: [...exprWarnings, ...widgetWarnings, ...actionRefWarnings, ...styleWarnings, ...jsxWarnings, ...capWarnings, ...flowReadinessWarnings, ...flowTemplateWarnings, ...readonlyWriteWarnings, ...securityAdvisories, ...capProviderWarnings], conversions: conversionNotices, specVersionGap: specGap, duration: timer.elapsed(),