Skip to content

fix: deploy-readiness gate + Sentry/PostHog foundation guidance#228

Merged
gregario merged 1 commit into
mainfrom
fix/sentry-posthog-deploy-gate
May 5, 2026
Merged

fix: deploy-readiness gate + Sentry/PostHog foundation guidance#228
gregario merged 1 commit into
mainfrom
fix/sentry-posthog-deploy-gate

Conversation

@gregario

@gregario gregario commented May 5, 2026

Copy link
Copy Markdown
Owner

Summary

Three systemic fixes from Irish Planning's deploy failures:

  • Deploy gate (rouge-loop.js): After foundation-eval passes, check foundation_completion.deploy_ready. If false, escalate immediately instead of building stories that can't be evaluated. Irish Planning built 7 stories, then milestone-check had no URL → product walk skipped → degraded evaluation.

  • Sentry guidance (00-foundation-building.md): withSentryConfig wraps route files and injects conflicting runtime exports. Foundation must use the instrumentation.ts pattern instead, or disable autoInstrumentServerFunctions.

  • PostHog/analytics guidance: Either provision the project + set env vars during foundation, or defer entirely. Don't add dead SDK + consent banner that looks done but is non-functional.

Test plan

  • 2,011 tests pass, 0 failures
  • Foundation and building prompt behavioral tests pass (33/33)
  • Deploy gate uses existing escalate() helper with informative summary

🤖 Generated with Claude Code

Three systemic fixes:

1. Deploy gate (rouge-loop.js): after foundation-eval passes and
   provisioning completes, check foundation_completion.deploy_ready.
   If false, escalate immediately — don't build stories that can't be
   evaluated. Irish Planning built 7 stories before discovering at
   milestone-check that there was no staging URL.

2. Sentry guidance (foundation-building.md): withSentryConfig wraps
   route files and injects runtime exports that conflict with explicit
   declarations. Foundation must use instrumentation.ts pattern instead,
   or set autoInstrumentServerFunctions:false. Verify build passes with
   a route declaring runtime='nodejs' before committing.

3. PostHog/analytics guidance: either provision the project + set env
   vars during foundation, or defer the integration entirely. Don't add
   dead SDK code that looks "done" but needs manual configuration.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@gregario gregario merged commit 707c4bb into main May 5, 2026
1 of 3 checks passed
@gregario gregario deleted the fix/sentry-posthog-deploy-gate branch May 5, 2026 11:58
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