ci: add metadata test/lint gates (vitest + validate); fix broken lint step#367
Merged
Conversation
… step CI called `pnpm run lint` but the repo had no `lint` script, so the "Build and Test" workflow failed at the lint step on every commit (pre-existing, also red on main). Aligns the scripts/CI with the @objectstack metadata-app conventions (see framework examples). package.json scripts: - validate: `objectstack validate` — protocol/schema gate (blocking). - lint: `objectstack lint --skip-i18n` — metadata conventions (advisory). - test: `vitest run` — structural metadata smoke test (was the no-op `objectstack test`, which needs qa/*.test.json + a live server → kept as `test:qa`). - verify: validate && typecheck && build && test. test/smoke.test.ts (vitest, no server — mirrors framework app-crm): asserts manifest, core objects, all 16 flows incl. the 6 workflows[]-migrated ones, and guards the 7.7 migration (no object `workflows[]`; every notify `severity` ∈ info|warning|critical). CI (ci.yml + code-quality.yml): blocking gates are now validate + typecheck + build + test; `objectstack lint` runs advisory (`continue-on-error`) because its `required/label` rule false-positives on standard list-views (checks top-level `view.label`, but the view schema only supports `list.label`) — filed upstream. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
Author
|
Upstream lint false-positive filed as objectstack-ai/framework#1554 (the |
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.
Summary
Fixes the pre-existing red CI ("Build and Test" / "Quality Checks") and adds the basic test/lint gates an ObjectStack metadata app should have, aligned with the framework's example apps.
Why it was red
Both workflows ran
pnpm run lint, but the repo had nolintscript →Missing script: lintfailed the lint step on every commit (red onmaintoo — not introduced by any feature PR).What this does
package.jsonscripts (matchingcreate-objectstack+examples/app-crm):validate→objectstack validate— protocol/schema gate (blocking)lint→objectstack lint --skip-i18n— metadata conventions (advisory)test→vitest run— structural metadata smoke test (the oldobjectstack testneedsqa/*.test.json+ a live server; kept astest:qa)verify→validate && typecheck && build && testtest/smoke.test.ts(vitest, no server — mirrors frameworkapp-crm): asserts the manifest, core objects, all 16 flows incl. the 6 migrated from objectworkflows[], and guards the 7.7 migration (no objectworkflows[]; every notifyseverity∈info|warning|critical).CI (
ci.yml+code-quality.yml): blocking gates are now validate + typecheck + build + test;objectstack lintruns advisory (continue-on-error).Note:
objectstack lintis advisoryIts
required/labelrule false-positives on standard list-views — it checks top-levelview.label, but the supported view schema only allowslist.label(a top-levellabelis rejected by the type checker and stripped by the compiler), so even the framework's own example views would trip it. Filed upstream. Kept advisory so genuine convention issues stay visible without blocking.Verification
pnpm verifygreen locally:objectstack validate✓,tsc --noEmit✓,objectstack build✓ (16 flows / 15 objects),vitest run✓ (6/6).🤖 Generated with Claude Code