Symphony / Local staging E2E timed job

Nightly local staging E2E

A deterministic Playwright route that seeds local Supabase, checks the VPS staging stack, runs ac-frontend E2E, uploads evidence when needed, and files grouped bug tickets.

Cadence 01:00 Europe/LondonMode Playwright reportScope local stack + ac-frontendOutput bugs, Slack, cleanup
systemd timer->seed local Supabase->Playwright E2E->grouped bug tickets
00

Operating model

The service has an ExecStartPre seed step, then creates a dated Linear issue with qa:local-staging-e2e. Symphony runs the report-only route from ac-frontend against the local staging stack and cleans local artifacts after evidence upload.

01:00
Nightly start
Europe/London timer
1
Seed gate
local Supabase baseline
0
Code edits
test and report only
3
Evidence types
screens, traces, videos
KEYUse per-workspace frontend ports

Do not hard-code 5173. Symphony derives SYMPHONY_FRONTEND_PORT, SYMPHONY_FRONTEND_URL, and PLAYWRIGHT_BASE_URL per workspace so concurrent frontend runs do not collide.

01

System shape

This job is the deterministic counterpart to broad staging QA. It validates the local stack before Playwright and treats cleanup as part of the run contract.

local staging route boundarysystemd timer01:00 nightlySupabase seedExecStartPreLinear issueqa:local-staging-e2eSymphony routePlaywright policyLocal stackAPI + frontendE2E suiteac-frontendArtifactstrace + videoCleanuplocal onlyReport outputsLinear + Slack
02

Cadence design

Each timed job has a small set of modes that decide whether the run is healthy, degraded, or ready to create follow-up work. Use the controls to compare the operating contract.

Seed

Make the local stack testable

The seed step prevents blank local data from masquerading as an E2E failure or auth issue.

  • E2E auth user exists
  • organization and owner membership exists
  • baseline CRM rows exist
  • seed can run idempotently after db reset
E2E confidence threshold82%

Keep the report degraded and create a run-health or stack follow-up instead of calling the suite healthy.

03

Execution tracks

The tracks make each run inspectable. They separate inputs, outputs, and failure modes so reports do not collapse into vague status updates.

Local staging services

Stack health

Verify the local API, Supabase, frontend URL, and Celery worker dependencies before Playwright.

Inputs
  • health endpoints
  • systemd services
  • seed script
Outputs
  • service health summary
  • blocked setup rows
  • stack follow-ups
04

Failure risk map

When the suite fails, the report should quickly show whether the issue is stack setup, test coverage, product behavior, or evidence handling.

Auth and local Supabase seedinvalid credentials or blank data can block every browser test
96
API and Celery healthworkflows and background jobs must be registered before frontend tests
90
Frontend server portshared ports create false failures across concurrent workspaces
86
Playwright base URLwrong target means clean-looking failures are meaningless
82
Evidence upload verificationlocal artifacts are not durable evidence
72
Artifact cleanupnightly traces and videos can fill disk quickly
64
A failed seed or local stack health check is a blocked run, not a product regression. Keep those separated so bug tickets stay actionable.
05

Output rubric

The run should create follow-up work only when the output is concrete. Use the rubric to keep reports, bug tickets, and operational follow-ups separated.

Critical

Use for total E2E outage caused by product behavior after the stack and seed are proven healthy.

  • login always fails
  • core app shell blank
  • data save path loses records
06

Run contract

The local E2E issue must prove stack health, test execution, evidence upload, and cleanup before it moves to Symphony Complete.

Issue seed

Timed issue

Title format is Nightly local staging E2E - YYYY-MM-DD with qa:local-staging-e2e, staging, frontend, and e2e labels.

Allowed writes

Report-only route

No code edits, commits, pushes, PRs, or attempted fixes. Writes are report comments, bug tickets, evidence attachments, Slack output, and state updates.

App URL and PLAYWRIGHT_BASE_URL
Local staging service health
E2E command
E2E start, end, and duration
E2E result summary
Native Linear evidence attachments
Bug tickets
Run-health retrospective
Slack summary
Local artifact cleanup
Frontend/dev-server cleanup
07

Command plan

Use these commands to dry-run, install, and inspect the timer path.

Dry-run issuesudo -u symphony /opt/symphony/elixir/scripts/create_local_staging_e2e_issue.sh --dry-run --date 2026-05-21
Seed checksudo /opt/symphony/elixir/scripts/seed_local_supabase.sh --check
Timer installsudo systemctl enable --now symphony-local-staging-e2e.timer
API healthcurl -fsS http://127.0.0.1:8008/health
!Preserve reusable caches

Cleanup removes per-run artifacts and managed servers only. It must not delete node_modules, the Playwright browser cache, npm cache, or other reusable setup.

08

Rollout path

1

Dry-run and seed preflight

Verify the issue body, labels, cycle, local Supabase seed, and local API health.

2

Install companion services stack

Ensure the ac-python-api Celery worker and beat services are enabled with the same environment files.

3

Enable nightly E2E report-only

Run Playwright nightly and create grouped bugs only for actionable failures with evidence.

4

Watch residue disk hygiene

Confirm cleanup rows stay green so traces, videos, HARs, and temp logs do not accumulate.

AgencyCore / Symphony / Nightly local staging E2EDesign draft / 2026-06-12