fd48f7fc098d8ac5e69b8e2280ac1930adbbdc3a
BUG (blocked the supervised live re-import): /import/execute threw Npgsql 23503 FK_Litters_Gerbils_FatherId and rolled back. Root cause was INSERT ORDERING — synthesized derived litters were SaveChanges()'d BEFORE the parent gerbils (created later in the animal loop), so the litter's Father/MotherId pointed at rows that didn't exist yet. The dry-run and the EF in-memory test provider don't enforce FKs, so it slipped through. Fix: - Stage synthesized litters in the context but DON'T save them early; the single SaveChanges after the animal loop lets EF order parents → litters → offspring (all FKs nullable). Saving litters first was the fault. - FK-integrity guard (god's spec): compute the persisted set (existing DB + this run's loadable) and null out any litter parent FK not in it; SKIP a derived litter whose BOTH parents are unresolvable (offspring loads with LitterId=null). Quarantined parents already resolve to null via ResolveParentGid; this is defense-in-depth + makes the invariant explicit. - Report litterParentFksDropped + derivedLittersSkipped (LitterSummary) + a German note — so a green dry-run (0/0) GUARANTEES execute won't FK-fault. Tests: two SQLite-backed regressions (SQLite enforces FKs, unlike the in-memory provider) — a derived litter with NEW chart parents executes without throwing, and a quarantined parent leaves that FK null. 120 C# tests + python green; no schema change (has-pending clean). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
GerbilManager
GerbilManagerWebAPI/— ASP.NET Core backend (Swagger unter/swagger)gerbil-manager-web/— React-Frontend (Vite + TypeScript), siehegerbil-manager-web/README.md
Requirements
Install ef:
dotnet tool install --global dotnet-ef
Used cmd´s
Start containers
docker compose up
Create the initial database
dotnet ef database update
Create an migration script
dotnet ef migrations add
Docker
force compose rebuild
docker-compose build --no-cache
Frontend (gerbil-manager-web)
cd gerbil-manager-web npm install npm run dev
TODO:
- Backup docker volume database
- run "dotnet ef database update" if no database exist.
Description
Languages
C#
43%
TypeScript
34.5%
Python
18%
CSS
3.7%
Shell
0.5%
Other
0.1%