Skip to content

ci: add metadata test/lint gates (vitest + validate); fix broken lint step#367

Merged
xuyushun441-sys merged 1 commit into
mainfrom
chore/ci-lint-test
Jun 3, 2026
Merged

ci: add metadata test/lint gates (vitest + validate); fix broken lint step#367
xuyushun441-sys merged 1 commit into
mainfrom
chore/ci-lint-test

Conversation

@xuyushun441-sys
Copy link
Copy Markdown
Contributor

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 no lint scriptMissing script: lint failed the lint step on every commit (red on main too — not introduced by any feature PR).

What this does

package.json scripts (matching create-objectstack + examples/app-crm):

  • validateobjectstack validate — protocol/schema gate (blocking)
  • lintobjectstack lint --skip-i18n — metadata conventions (advisory)
  • testvitest run — structural metadata smoke test (the old objectstack test needs qa/*.test.json + a live server; kept as test:qa)
  • verifyvalidate && typecheck && build && test

test/smoke.test.ts (vitest, no server — mirrors framework app-crm): asserts the manifest, core objects, all 16 flows incl. the 6 migrated from object workflows[], and guards the 7.7 migration (no object workflows[]; every notify severityinfo|warning|critical).

CI (ci.yml + code-quality.yml): blocking gates are now validate + typecheck + build + test; objectstack lint runs advisory (continue-on-error).

Note: objectstack lint is advisory

Its required/label rule false-positives on standard list-views — it checks top-level view.label, but the supported view schema only allows list.label (a top-level label is 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 verify green locally: objectstack validate ✓, tsc --noEmit ✓, objectstack build ✓ (16 flows / 15 objects), vitest run ✓ (6/6).

🤖 Generated with Claude Code

… 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>
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 3, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
hotcrm Ignored Ignored Jun 3, 2026 2:56am

Request Review

@xuyushun441-sys
Copy link
Copy Markdown
Contributor Author

Upstream lint false-positive filed as objectstack-ai/framework#1554 (the required/label on views) — that's why objectstack lint runs advisory here.

@xuyushun441-sys xuyushun441-sys merged commit b0231ea into main Jun 3, 2026
6 of 8 checks passed
@xuyushun441-sys xuyushun441-sys deleted the chore/ci-lint-test branch June 3, 2026 03:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants