Skip to content

Testing & Data Seeding Protocol

Overview

This protocol aligns our Testing and Data Seeding strategies with the "Airspace" Environment Pipeline (LOC -> TST -> STG -> MAIN). Strict adherence ensures that verification logic scales safely from a developer's laptop to production.


The 4-Tier Environment Model

Tier 1: LOC/... (The Workbench)

  • Purpose: Rapid iteration, unit logic, UI prototyping.
  • Target: Local Machine / localhost:3000.
  • Testing Scope:
  • Unit Tests: npm run test (Vitest).
  • Smoke Tests: Manual verification of specific features.
  • Data Strategy: "Mock State" (InMemory, rapid reset).
  • Seeding Command:
npm run seed:local
  • Payload: Minimal viable dataset (1 admin, 1 resident, 1 property).

Tier 2: TST (Integration)

  • Purpose: System integration, regression verification, merge validation.
  • Target: tst branch / CI Pipeline.
  • Testing Scope:
  • E2E Suite: npx playwright test (Full Suite).
  • Regression: Automated checks against known bugs.
  • Data Strategy: "Golden State" (Deterministic, complex).
  • Seeding Command:
npm run dataseeder:gold
  • Payload: The "Golden Dataset" - A fully hydrated, complex community with pre-defined edge cases (e.g., "The Overdue Ledger", "The Conflict Proposal").

Tier 3: STG (Staging)

  • Purpose: User Acceptance Testing (UAT), Pilot Review, Performance.
  • Target: stg branch / Staging Environment.
  • Testing Scope:
  • UAT: Human verification by stakeholders.
  • Performance: Smoke tests under load.
  • Data Strategy: "Anonymized Prod".
  • Seeding Command:
  • Cloud Native Restore: Restore from a sanitized production snapshot.

Tier 4: MAIN (Production)

  • Purpose: Public availability.
  • Target: main branch / singulardream.org.
  • Testing Scope:
  • Health Checks: Read-only uptime verification.
  • Canary Checks: Non-destructive "Ping" (e.g., verifying login page loads).
  • Data Strategy: "Live State".
  • Seeding Command:
  • â›” FORBIDDEN: Never run seeders against Production.

Matrix: Testing vs. Environment

Environment Branch Test Scope Data Source Seeder Command
Workbench LOC/... Unit, Smoke Mocks npm run seed:local
Integration tst E2E, Regress Golden npm run dataseeder:gold
Staging stg UAT, Perf Anon-Prod infrastructure-restore
Production main Health Live NONE

Cross-References


Version History

Version Date Author Change
1.0.0 2026-01-29 Antigravity Initial Ratification (ISO-SD-2026)