fix(build): stop regenerating help data during Vercel build#333
Merged
Conversation
Cache-bust after prod DB password rotation 2026-05-08. Server-side getSession() failed with login-blink despite correct env vars and Supabase auth returning 200. Suspected stale prisma generate binary in Vercel build cache. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Brings in: - equinet-staging-app Vercel project + 17 env-vars (S67-1, S67-2) - ssoProtection verified as Standard Protection (S67-3) - Stripe webhook deferred (S67-4) - DNS cutover: equinet-staging.johanlindengard.com → new project (S67-5) - iOS staging end-to-end verified (S67-7) - Cron disable guard via DISABLE_CRONS=true + STAGING_PROJECT flag - iOS APIClient cache-policy fix (.reloadIgnoringLocalCacheData) - Documentation: walkthrough, environments.md, staging-cleanup-followups - Story: ios-api-cache-policy-hardening - Xcode: DEVELOPMENT_TEAM + -STAGING default in scheme Sprint 67 done 2026-05-09. 8 done + 1 deferred + 1 follow-up. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Both equinet-app and equinet-staging-app now have Ignored Build Step configured. Each project builds only its designated branch. Includes bash syntax learning: ';' mandatory between 'fi' and 'exit'. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Tekniska och process-lärdomar från staging-cutover, iOS-verifiering, prod-incident-postmortem och branch isolation. Inkluderar URLSession cache-policy, Vercel CDN 4xx-caching, env+branch-isolation, samt "production" som olika betydelser i olika Vercel-projekt. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Build-scriptet anropade `tsx scripts/generate-help-data.ts` före `next build`. På Vercel kör generatorn i `vercel build`-miljön där `.vercelignore` (`*.md`) filtrerar bort markdown-källorna i `src/lib/help/articles/<role>/`. Generatorn hittade noll filer och skrev en tom `articles-data.ts` som överskrev den committade versionen, vilket resulterade i tomma hjälp-sidor på staging (och även prod, sannolikt sedan tidigare). Verifierat i build-log för dpl_6orNJPAh4YBfhZ8rwtPEU2oRTHtn: "Generated /vercel/path0/src/lib/help/articles-data.ts with 0 articles". Fixen tar bort regenereringen ur build-pipelinen. `articles-data.ts` är redan committed (56 artiklar) och importeras synkront i klient- bundlen. `generate:help` (npm run generate:help) finns kvar för lokal regenerering när markdown-källor ändras. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
cola500
added a commit
that referenced
this pull request
May 13, 2026
Lägger till story som dokumenterar skydd mot återfall efter PR #333 (stop regenerating help data during Vercel build). Föreslår CI-validation som diffar regenererad articles-data.ts mot committed version som MVP. Bakgrund: 2026-05-13 hade staging tom hjälpsektion eftersom Vercel-build körde generatorn medan .vercelignore filtrerade bort markdown-källor. Build var "grön" men data var tom. Vi vill ha automatisk detektering om articles-data.ts blir out-of-sync med markdown-filerna i framtiden. - docs/stories/help-data-drift-protection.md: full story med A/B/C/D- alternativ, rekommendation, acceptanskriterier, prioritet - docs/sprints/backlog.md: backlog-rad under Kvalitet och säkerhet, effort 15-30 min, pekare till story Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
tsx scripts/generate-help-data.ts &&frånbuild-scriptet ipackage.json.articles-data.tsär redan committad (56 artiklar) och importeras synkront i klient-bundlen.npm run generate:help(separat script) finns kvar för lokal regenerering när markdown-källor ändras.Root cause
Build-scriptet anropade
tsx scripts/generate-help-data.tsförenext build. På Vercel kör generatorn ivercel build-miljön där.vercelignore(*.md) filtrerar bort markdown-källfilerna isrc/lib/help/articles/<role>/. Generatorn hittade noll filer och skrev en tomarticles-data.ts, vilket överskrev den committade versionen. Resultat: tomma hjälp-sidor på staging (och troligen även prod).Bekräftat i build-log för
dpl_6orNJPAh4YBfhZ8rwtPEU2oRTHtn(rad 1078):Test plan
/customer/helpvisar artikel-listan (inte "Inga artiklar matchade din sökning")/customer/help/boka-en-tjanst→ 200 (inte 404)curl -sL https://equinet-staging.johanlindengard.com/customer/helpreturnerar HTML som innehålleraterkommande-bokningFollow-ups (separata stories)
src/lib/help/articles-data.tsär out-of-sync medsrc/lib/help/articles/*.md.mainså även prod får funkande hjälpsektion.🤖 Generated with Claude Code