Skip to content

ci: add Biome + Vitest + git-hook quality gates - #15

Merged
rep0x merged 2 commits into
mainfrom
chore/quality-gates
Jun 20, 2026
Merged

ci: add Biome + Vitest + git-hook quality gates#15
rep0x merged 2 commits into
mainfrom
chore/quality-gates

Conversation

@rep0x

@rep0x rep0x commented Jun 20, 2026

Copy link
Copy Markdown
Member

🎯 What this does

Adds the standard quality-gate stack to shell — the pilot for fleet-wide rollout to the other @mind-studio/ui consumers.

  • Biome (lint + format, one binary) replaces next lint (removed in Next 16). Config in biome.json: recommended + React/Next domains, 2-space / width-100, scoped to app source.
  • Vitest (--passWithNoTests for now; real tests land per-app later).
  • husky + lint-staged hooks:
    • pre-commit → lint-staged (biome check --write on staged files, fast)
    • pre-push → lint + typecheck + test (skips typecheck when WASM bindings absent so non-Rust contributors aren't blocked; CI typechecks for real)
  • CI (ci.yml): now builds the Rust→WASM crypto core before typecheck, then runs biome ci + tsc + test + build.

🩹 Also fixes red CI

main's CI has been red since #12tsc couldn't resolve ./pkg/crypto_core because CI never built the WASM bindings. This PR builds them in CI, so this should be the first fully-green CI since #12.

🛠 Adoption pattern (no behavior change)

Format + safe Biome fixes only. Rules existing code violates are set to warn (a visible baseline to ratchet per-app), so the gate is green without risky autofixes. --unsafe was never applied broadly (it rewrites React hook dep arrays — dangerous given single-flight OIDC + autosave invariants).

✅ Verified locally

npm run wasmbiome ci (0 errors, 60 warns baseline) → tsc --noEmit (0) → test (0) → build (0). All green.

📦 Commits

  • ci: tooling (biome.json, hooks, ci.yml, package.json) — rebased onto current main, kept core ^0.7.0 / ui ^0.4.0
  • style: 69-file Biome formatting sweep, regenerated fresh against current main

rep0x and others added 2 commits June 20, 2026 20:20
Adopt one fast quality-gate stack for shell (template to scale to the other
Mind apps):

- Biome 2.5 for lint + format (one binary; replaces eslint/prettier, and
  `next lint` was removed in Next 16). Recommended ruleset + React/Next
  domains. Rules currently violated by existing code are set to "warn" (a
  visible baseline to ratchet to error per-app) so the gate goes green
  without behavior-changing autofixes.
- Vitest runner (passWithNoTests for now; real tests land per-app).
- husky hooks: pre-commit runs lint-staged (format + lint staged files,
  fast); pre-push runs lint + typecheck + test, skipping typecheck when the
  WASM bindings aren't built locally.
- CI: build the Rust->WASM crypto bindings (`npm run wasm`) before tsc/build.
  Fixes the red `tsc --noEmit` gate (couldn't resolve ./pkg/crypto_core) and
  verifies the crypto FFI contract for real. Adds `biome ci` + test steps.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@rep0x
rep0x merged commit 3d9ba73 into main Jun 20, 2026
3 checks passed
@rep0x
rep0x deleted the chore/quality-gates branch June 20, 2026 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant