The problem
A clean sample file rarely exercises the failures an importer needs to handle. A repeated ID, a missing key and an explicit null can trigger different behavior, but hand-editing test files makes those cases hard to reproduce.
FixtureLang makes the fixture source the reproducible test case: a small, readable program describes related tables and intentional edge cases.
What it does
Write typed fields and generators, declare a seed, and run the program in the browser playground or Node.js CLI. FixtureLang can deliberately omit properties, insert nulls and repeat IDs while generating related tables.
For example:
fixture shop seed 42 {
table customers rows 3 {
id: id = seq(1) duplicate every 3;
name: string = text("Customer ");
email: string = pick("[email protected]", "[email protected]") missing every 2;
}
table orders rows 5 {
id: id = seq(100);
customer_id: id = ref(customers.id);
total_cents: int = int(0, 9999);
note: string = pick("new", "rush") null every 3;
}
}
The same unchanged source and seed reproduce the same output. Relations draw from the final eligible parent IDs. An id is a relation type, not an implicit uniqueness guarantee: repeated IDs are intentional test data.
The playground shows tables and JSON, reports positioned diagnostics, supports cancellation and downloads the complete result. Four executable examples cover importer edge cases, related orders, CSV boundaries and a bounded workload.
Try it in a minute
- Open the live playground and run the importer-edge example.
- Compare a missing property with an explicit null in JSON, and find a repeated ID in the table.
- Run the unchanged program again and compare the downloaded JSON.
- Introduce a syntax error, use the line/column diagnostic to correct it, and rerun.
- Choose a CSV mode explicitly before downloading.
Raw CSV preserves intentional payload strings, including formula-like text. Spreadsheet-safe CSV changes selected strings by prefixing an apostrophe and reports the number changed. It is a limited convenience, not a universal spreadsheet-security guarantee. CSV collapses missing keys, nulls and empty strings into empty fields; use JSON when that distinction matters.
How it was built
FixtureLang is an original JavaScript DSL implementation: bounded lexer, recursive-descent parser, semantic validator and deterministic interpreter. Source is parsed as data, never evaluated as JavaScript. A Web Worker handles browser execution; cancellation terminates the active worker, and run-identity checks prevent stale results from replacing newer ones.
The implementation uses the established Mulberry32 PRNG, native ES modules, Web Workers, HTML/CSS and Node.js built-ins. The application has no third-party runtime package dependencies and requires no remote model or API.
The project was built during the Syntax Summit period in October 2026. This entry describes the published v0.1.0 release.
Challenges and lessons
The important design work was making edge cases explicit without quietly repairing them. Missing, null and empty are distinct in JSON but not CSV. Raw test payloads and spreadsheet-oriented exports have different goals. References must use actual generated parent values after mutations, and cancellation must never expose a partial dataset.
Keeping the language finite also makes its limits understandable. It has five types and seven generators, flat tables and references to earlier tables. It does not support arbitrary expressions, loops, nested objects or streaming multi-gigabyte output. One global random stream means changing earlier declarations can change later generated values.
Verification and next steps
The published release records 39 passing automated tests, syntax/build checks and 12 Chromium browser scenarios, including deterministic exports, diagnostic recovery, cancellation, keyboard use, mobile layouts and reduced motion. Those checks are scoped evidence, not a security certification or proof of every browser's behavior. The repository includes the grammar, implementation notes, reproducible commands and limitations.
Potential next work includes stable per-field random streams and richer constraints, while preserving explicit fault semantics. These are future directions, not current features.
Development credits
OpenAI Codex assisted with language design, implementation, tests, examples and documentation; automated agent review contributed checks. Runtime generation uses the implemented interpreter, not an AI model. Full provenance and limitations are in the repository.
Log in or sign up for Devpost to join the conversation.