Skip to content

Add multi-zone asset scoping CI check#910

Open
SakshiKekre wants to merge 1 commit intomainfrom
feat/multizone-ci-check
Open

Add multi-zone asset scoping CI check#910
SakshiKekre wants to merge 1 commit intomainfrom
feat/multizone-ci-check

Conversation

@SakshiKekre
Copy link
Copy Markdown
Collaborator

Summary

  • Adds a GitHub Actions workflow (check-multizone.yaml) that triggers only when website/next.config.ts changes
  • Script (scripts/check-multizone-assets.sh) curls each external app in our rewrites and checks that their CSS/JS asset paths are properly scoped
  • Bare /_next/ paths → FAIL (will collide with host website's assets)
  • Absolute URL paths → WARN (works but not ideal)
  • basePath or /_zones/ scoped paths → OK

Why

The API docs app broke twice due to unscoped assets. Non-technical teammates using AI coding tools don't know about multi-zone requirements. This CI check catches the problem automatically when someone adds a new rewrite.

What it checks

Fetches HTML from every external app destination in website/next.config.ts and verifies src/href attributes containing _next are scoped (not bare /_next/...). Skips non-Next.js apps (GitHub Pages, Modal) automatically.

Current results

OK   california-wealth-tax.vercel.app
OK   household-api-docs-policy-engine.vercel.app
OK   keep-your-pay-act.vercel.app
OK   oregon-kicker-refund.vercel.app
WARN policyengine-model-phi.vercel.app (absolute URL assetPrefix)
OK   policyengine-slides.vercel.app
OK   policyengine-taxsim-policy-engine.vercel.app
SKIP policyengine.github.io (not Next.js)
OK   working-americans-tax-cut-act-one.vercel.app

Test plan

  • Script runs locally and passes
  • Model correctly gets WARN (absolute assetPrefix)
  • Non-Next.js apps correctly skipped
  • Duplicate domains (e.g. Model via /us and /uk) checked only once
  • Workflow triggers on PR that changes website/next.config.ts

Adds a GitHub Actions workflow that runs when website/next.config.ts
changes and verifies external Next.js apps have properly scoped asset
paths (basePath or assetPrefix). Bare /_next/ paths fail the check;
absolute URLs get a warning.

Prevents CSS/JS collisions when new external apps are added via rewrites.
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 3, 2026

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

Project Deployment Actions Updated (UTC)
policyengine-app-v2 Ready Ready Preview, Comment Apr 3, 2026 2:11pm
policyengine-calculator Ready Ready Preview, Comment Apr 3, 2026 2:11pm
policyengine-calculator-next Ready Ready Preview, Comment Apr 3, 2026 2:11pm
policyengine-website Ready Ready Preview, Comment Apr 3, 2026 2:11pm

Request Review

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