Repository navigation
feat(demo): start every live boot from a fresh demo - #42
Merged
Merged
Conversation
A shared demo stays resolved after its first visitor and ages out of the dashboard's windows. reset-demo drops the schema (the audit trail's triggers block deleting rows, not dropping them) so the boot can migrate and seed it fresh. It needs DEMO_RESET_ON_BOOT=true and APP_ENV=production, and refuses any database holding a lab or event that is not simulated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 16, 2026
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.
Why
The live demo's data lives in Neon and persisted across boots. The first reviewer to approve resolved the 12-lab incident for everyone after them, and the seeded events would age out of the dashboard's 7-day window around 2026-10-23.
What
modules/demo/reset.ts:resetAllowed(env)(needs bothDEMO_RESET_ON_BOOT=trueandAPP_ENV=production) andresetDemoDatabase(db):empty)sourceis notsimulated: refused, nothing touchedreset-demo.tsentrypoint;deploy/render/start.shruns it before migrating when the flag is set;render.yamlsets it. Nothing else sets it: local, compose and the VM stack never reset.Consequence: every boot of the live site (redeploy, or waking from sleep) wipes the Neon database and reseeds. Neon must never hold anything worth keeping.
Verified
1/TRUE).empty→ 8 incidents, 0 resolved; approve → 1 resolved; boot 2reset→ 8 incidents, 0 resolved, audit back to 90; with a planted provider lab the reset refused, the container exited 1, and all 41 labs and 90 audit entries were untouched.🤖 Generated with Claude Code