fix(ci): run svelte-kit sync before lint to fix cache-hit tsconfig miss #568

Merged
marcel merged 1 commits from worktree-fix+ci-svelte-kit-sync-before-lint into main 2026-05-14 12:09:04 +02:00
Owner

Problem

CI lint fails on main (and all branches sharing the same package-lock.json hash) with:

1:1  error  Resolve error: Tsconfig not found .../frontend/.svelte-kit/tsconfig.json

frontend/tsconfig.json extends .svelte-kit/tsconfig.json, which is generated by svelte-kit sync. In CI, svelte-kit sync only runs as a side-effect of npm ci (via the prepare lifecycle script). But npm ci is gated:

if: steps.node-modules-cache.outputs.cache-hit != 'true'

On a cache miss (first run for a given package-lock.json hash): npm ci runs → preparesvelte-kit sync.svelte-kit/tsconfig.json exists → lint passes.

On a cache hit (every subsequent run across all branches): npm ci is skipped → svelte-kit sync never runs → .svelte-kit/tsconfig.json missing → ESLint fails at tsconfig resolution.

This explains why the previous PR was green (cache-miss run) but main and all other branches are now broken (cache-warm runs).

Fix

Add an unconditional svelte-kit sync step after Paraglide compile and before Lint. It always runs regardless of cache state, takes ~1 second, and is idempotent.

Test plan

  • CI on this PR passes the Lint step with a warm node_modules cache
## Problem CI lint fails on main (and all branches sharing the same `package-lock.json` hash) with: ``` 1:1 error Resolve error: Tsconfig not found .../frontend/.svelte-kit/tsconfig.json ``` `frontend/tsconfig.json` extends `.svelte-kit/tsconfig.json`, which is generated by `svelte-kit sync`. In CI, `svelte-kit sync` only runs as a side-effect of `npm ci` (via the `prepare` lifecycle script). But `npm ci` is gated: ```yaml if: steps.node-modules-cache.outputs.cache-hit != 'true' ``` **On a cache miss** (first run for a given `package-lock.json` hash): `npm ci` runs → `prepare` → `svelte-kit sync` → `.svelte-kit/tsconfig.json` exists → lint passes. **On a cache hit** (every subsequent run across all branches): `npm ci` is skipped → `svelte-kit sync` never runs → `.svelte-kit/tsconfig.json` missing → ESLint fails at tsconfig resolution. This explains why the previous PR was green (cache-miss run) but main and all other branches are now broken (cache-warm runs). ## Fix Add an unconditional `svelte-kit sync` step after Paraglide compile and before Lint. It always runs regardless of cache state, takes ~1 second, and is idempotent. ## Test plan - [ ] CI on this PR passes the Lint step with a warm node_modules cache
marcel added 1 commit 2026-05-14 12:08:05 +02:00
fix(ci): run svelte-kit sync before lint to fix cache-hit tsconfig miss
All checks were successful
CI / Unit & Component Tests (pull_request) Successful in 3m8s
CI / OCR Service Tests (pull_request) Successful in 17s
CI / Backend Unit Tests (pull_request) Successful in 4m25s
CI / fail2ban Regex (pull_request) Successful in 38s
CI / Compose Bucket Idempotency (pull_request) Successful in 57s
CI / Unit & Component Tests (push) Successful in 3m7s
CI / OCR Service Tests (push) Successful in 17s
CI / Backend Unit Tests (push) Successful in 4m15s
CI / fail2ban Regex (push) Successful in 39s
CI / Compose Bucket Idempotency (push) Successful in 58s
5646e739c2
When the node_modules cache hits, npm ci is skipped and the prepare
lifecycle (svelte-kit sync) never runs. frontend/tsconfig.json extends
.svelte-kit/tsconfig.json which only exists after svelte-kit sync —
so ESLint fails at tsconfig resolution on every cache-warm run.

Adding an unconditional svelte-kit sync step after Paraglide compile
and before Lint ensures .svelte-kit/tsconfig.json is always present
regardless of cache state.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
marcel merged commit 5646e739c2 into main 2026-05-14 12:09:04 +02:00
marcel deleted branch worktree-fix+ci-svelte-kit-sync-before-lint 2026-05-14 12:09:04 +02:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: marcel/familienarchiv#568