Skip to content

fix: bake site UUID into generated guards#86

Merged
mariojgt merged 1 commit into
mainfrom
agent/bake-site-uuid-into-guards
Jul 15, 2026
Merged

fix: bake site UUID into generated guards#86
mariojgt merged 1 commit into
mainfrom
agent/bake-site-uuid-into-guards

Conversation

@ejntaylor

Copy link
Copy Markdown
Contributor

What changed

  • centralize site UUID baking for generated runtime guards
  • propagate the UUID from .patchstackrc.json into generic, Express, Fastify, NestJS, Next.js, SvelteKit, and Astro guards
  • preserve the environment-variable fallback when the project has not been scanned
  • keep protect --demo on its bundled local rule set

Why

Only the TanStack + Supabase adapter previously embedded the site UUID created by patchstack-connect scan. Other generated guards silently fell back to starter rules unless PATCHSTACK_SITE_UUID was configured separately, so Host-provisioned Bolt projects did not automatically load their live Pulse rules.

Impact

Running patchstack-connect protect after Bolt Host setup now connects managed guards to the same Patchstack site without additional deployment configuration.

Validation

  • npm run typecheck
  • npm test — 41 files, 470 tests passed
  • added UUID propagation coverage across every managed adapter and demo-mode coverage

@coderbuds

coderbuds Bot commented Jul 15, 2026

Copy link
Copy Markdown

Adds bakeSiteUuid helper to embed site UUID into all generated guards.

🎯 Quality: 100% Elite · 📦 Size: Medium

📈 This month: Your 232nd PR — above team average · Averaging Excellent

See how your team is trending →

@ejntaylor

Copy link
Copy Markdown
Contributor Author

/review

@ejntaylor ejntaylor marked this pull request as ready for review July 15, 2026 18:34
@mariojgt mariojgt merged commit 43579eb into main Jul 15, 2026
4 checks passed
@mariojgt mariojgt deleted the agent/bake-site-uuid-into-guards branch July 15, 2026 18:59
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.

4 participants