chore(stammbaum): add /api/network capture script + canonical fixture (#361)
Local-only developer utility that authenticates against the running backend, captures the current /api/network snapshot, and writes it to src/lib/person/genealogy/__fixtures__/stammbaum.json. Sanity gates exit non-zero on a vacuous capture (< 50 nodes, < 5 generations, 0 SPOUSE_OF edges). Fixture and script land together so the fixture is reproducible from the script that generated it. Captured snapshot: 62 nodes, 43 edges, 28 SPOUSE_OF (0 with fromYear), generations G0-G4. Albert de Gruyter is the canonical multi-spouse case with 4 marriages. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
25
frontend/src/lib/person/genealogy/__fixtures__/README.md
Normal file
25
frontend/src/lib/person/genealogy/__fixtures__/README.md
Normal file
@@ -0,0 +1,25 @@
|
||||
# `__fixtures__/`
|
||||
|
||||
Pinned real-data fixtures used by Stammbaum layout tests.
|
||||
|
||||
## `stammbaum.json`
|
||||
|
||||
Snapshot of `GET /api/network` against the canonical Familienarchiv dataset.
|
||||
Captured by `frontend/scripts/capture-network-fixture.mjs`.
|
||||
|
||||
### Lifecycle
|
||||
|
||||
The fixture is **pinned**, not auto-tracked. Tests assert _structural_
|
||||
properties (e.g. "a person with ≥ 2 spouses exists") rather than identity
|
||||
("Albert has exactly 4 spouses"), so the fixture survives data growth without
|
||||
mechanical edits.
|
||||
|
||||
Re-capture and update the affected tests in a single intentional commit when a
|
||||
new structural case appears in the production graph (new edge type, new
|
||||
marriage configuration, new generation range).
|
||||
|
||||
### PII
|
||||
|
||||
The repository is private and the fixture contains real family names. If the
|
||||
repository ever opens, scrubbing is a one-shot migration commit, not a
|
||||
permanent test-authoring constraint.
|
||||
1147
frontend/src/lib/person/genealogy/__fixtures__/stammbaum.json
Normal file
1147
frontend/src/lib/person/genealogy/__fixtures__/stammbaum.json
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user