Skip to content

Feature: Create demo dataset schema validators #1288

Open
wolfyres wants to merge 3 commits into
Stellar-Mail:mainfrom
wolfyres:feature/dataset-validators
Open

Feature: Create demo dataset schema validators #1288
wolfyres wants to merge 3 commits into
Stellar-Mail:mainfrom
wolfyres:feature/dataset-validators

Conversation

@wolfyres

@wolfyres wolfyres commented Jun 27, 2026

Copy link
Copy Markdown

Closes #169

🎯 Context

This PR introduces pure TypeScript runtime validators to catch malformed demo data before it reaches the preview or publish flows. To ensure zero risk to the core product, all validation logic, custom error types, and tests have been strictly isolated to the demo admin tooling, completely bypassing production mail flows.

🛠️ Key Changes

Created DemoDataValidationError as a custom error type to cleanly aggregate validation failures.

Built formatValidationErrors to transform arrays of validation issues into readable logs for the admin UI.

Implemented validateDemoDataset, a dependency-free runtime schema validator that enforces the expected structure of mock emails and versioning.

Added a comprehensive local test suite (validators.test.ts) using deterministic mock data to verify acceptance and rejection behaviors.

Confirmed all files are scoped exclusively to src/features/demo-admin-dashboard/.

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.

Create demo dataset schema validators

1 participant