Skip to content

ci: validation hardening (test:all, svelte-check in CI, shared setup)#249

Merged
jamesdabbs merged 3 commits into
mainfrom
chore/ci-validation-hardening
Jun 28, 2026
Merged

ci: validation hardening (test:all, svelte-check in CI, shared setup)#249
jamesdabbs merged 3 commits into
mainfrom
chore/ci-validation-hardening

Conversation

@jamesdabbs

@jamesdabbs jamesdabbs commented Jun 28, 2026

Copy link
Copy Markdown
Member

Why

Tighten the validation feedback loop so type errors and CI drift get caught automatically. Notably, svelte-check wasn't run anywhere in CI, and Vite's build doesn't type-check — so 7 Svelte/TS type errors had accumulated undetected.

What

  • pnpm test:all — one command to validate work: builds core + compile, runs lint:check, unit tests (core/compile/viewer), and svelte-check.
  • Fix pre-existing svelte-check errors in the viewer.
  • Run svelte-check in CI (added to the unit-test workflow).
  • Share CI setup via a new .github/actions/setup composite action (Node + pnpm + store cache + install), used by both test.yaml and e2e.yaml; resolves the long-standing TODO: share setup comment.
  • Standardize versions: actions/cache@v3@v4, unified pnpm-store cache key. Also ignore the peggy-generated Grammar.ts in Prettier.

Notes for reviewers

  • No end-user-visible behavior changes — this is infra/tooling only.
  • Related.svelte's Boolean(...) wrappers are equivalent to the original truthy returns used by .filter.
  • The e2e composite refactor moves pnpm install slightly earlier relative to the Cypress cache restore; the explicit cypress install step still runs after the cache is restored, so binary caching is unaffected.
  • Verified locally: pnpm test:all and pnpm lint:check are green. The CI/e2e workflow wiring is validated by inspection + Prettier.

- models/index.ts: import Theorem as a type (re-export doesn't bind locally)
- deduction.ts: use a type guard so filter narrows (Theorem | null)[] -> Theorem[]
- Related.svelte: extract matchesFilter helper so the full filterMode union
  type governs the switch (was narrowed to the 'known' literal)

These were invisible because Vite's build does not type-check.
Single command for validating work: builds core + compile, runs lint:check,
unit tests (core/compile/viewer), and svelte-check. Also ignore the
peggy-generated Grammar.ts in Prettier (regenerated unformatted on build).
- Add a svelte-check (viewer validate) step to the unit-test workflow
- Extract Node/pnpm/cache/install into .github/actions/setup, used by both
  the test and e2e workflows (resolves the 'share setup' TODO)
- Standardize actions/cache to @v4 and unify the pnpm-store cache key
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
pi-base-topology c63d7f8 Commit Preview URL

Branch Preview URL
Jun 28 2026, 03:11 AM

@jamesdabbs jamesdabbs merged commit 7a5f85b into main Jun 28, 2026
4 checks passed
@jamesdabbs jamesdabbs deleted the chore/ci-validation-hardening branch June 28, 2026 03:15
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