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
fix(cli): os validate runs the four authoring lints os build runs (#3782) (#3789)
`os validate` is documented, and used in CI, as the read-only superset of
the gates `os build` runs. It wasn't: four authoring lints were wired into
`compile.ts` only, and two of them already emit `severity: 'error'`
(`lintAutonumberFormats`, `lintViewRefs`). So an autonumber format naming a
nonexistent field passed `os validate` and then failed `os build` — the
exact trap this command exists to prevent, worst for CI gating on validate.
The drift was structural: every other gate on both commands is a shared
`@objectstack/lint` import, while these four are CLI-local `../utils/lint-*`
modules only `compile.ts` imported. Nothing made adding a gate to the build
also add it to validate.
- validate.ts runs all four, mirroring compile.ts's per-lint severity
handling (error -> exit 1, else advisory + into the --json warnings array).
- New source-level test asserts every lint*/validate* call site in
compile.ts also appears in validate.ts, listing any that are missing.
This is the fix for the class of bug; the wiring is today's instance.
- FlowLintFinding gains an optional `severity`, honoured by both surfaces.
No rule sets it today, so flow findings stay advisory — it is the seam
that lets #3760's blocking `flow-runas-unscoped` gate both surfaces at
once when it lands.
Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
0 commit comments