Skip to content

app/: the public demo reset (sc-8900) - #88

Merged
ndbroadbent merged 1 commit into
mainfrom
laravel-demo
Dec 2, 2026
Merged

ndbroadbent merged 1 commit into
mainfrom
laravel-demo

Conversation

@ndbroadbent

Copy link
Copy Markdown
Member

Ports the public demo reset to the Laravel Rust app (sc-8900): server/src/tasks/demo_reset.rs, and the part of screenshots_seed.rs its builds use. Based on laravel-render.

domain::demo::reset rebuilds visualci/demo from scratch, as today:

  • It creates the owner demo@visualci.com if missing (create!(User …)), and sets signup_notified_at when it's NULL, so no sign-up email goes out and /status doesn't wait on it.
  • It creates the visualci organization (the owner as admin) and the demo project if missing. A visualci organization the owner isn't a member of is refused.
  • It makes the project public, deletes its builds, and sends the demo's four builds through the real path: registration, finalizing, processing. That's a baseline, an unchanged build, PR Landing: remove the agents' notes for now #42 with every kind of change, and PR Deterministic screenshots: scroll position, and timestamps in PNGs #41, approved by the owner. As today, PDF renders are recorded as done with pages drawn here.
  • ORG and PROJECT keep today's values.

Two differences from today:

  • The builds read groups from each other (build_groups.source_build_id, which has no ON DELETE on purpose). So the reset deletes the project's group rows and its builds together, in one transaction.
  • Builds are processed directly under their lock, not by the ProcessBuild job. The job charges credits, and a nightly reset would use up the demo organization's allowance; today's task didn't charge either.

demo:reset runs daily at 05:00 (named demo-reset, one runner, without overlapping). It pushes its result to VISUALCI_DEMO_HEARTBEAT, failing with the error.

The rest of screenshots_seed (the visual job's seeded app data) isn't ported. demo_builds used only web_builds and its drawing and content helpers.

Tests (tests/demo.rs):

The full app suite passes with --locked on docspring-dev; clippy and fmt are clean.

@visualci-com

visualci-com Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

VisualCI

docspring/visualci · build #395 · 333 unchanged · no changes

This PR vs base: 22 changed, 2 added since #360, across 6 builds

Updated as builds change. Agents can review with VisualCI's MCP tools.

…isualci/demo through the real pipeline (its owner, organization and public project made if missing, a visualci organization that isn't the demo's refused, the builds and their group rows deleted, the demo's four builds sent again with one approved, not charged); demo:reset runs daily with its heartbeat
@ndbroadbent
ndbroadbent merged commit 4f26f3d into main Dec 2, 2026
11 checks passed
@ndbroadbent
ndbroadbent deleted the laravel-demo branch December 2, 2026 21:33
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