MOTIR-73Done
2.1.4 Tests — type metadata, validation, key concurrency
Estimate: 12m · Depends on: 2.1.1, 2.1.2, 2.1.3
Consolidated test coverage for the type layer: the canParent matrix, service-layer rejection of illegal parents (+ the DB-constraint backstop), and the key-assignment concurrency guarantee. Most assertions live with their Subtasks; this Subtask owns the cross-cutting integration test that exercises create → validate → key end to end against real Postgres, and is the Story's CI gate.
Acceptance criteria
- Integration test: create an epic, a child story, a child task, a bug — all succeed and get sequential keys.
- Illegal parents rejected at the service (422) AND the DB (constraint) layer.
- Concurrency: parallel creates yield distinct keys.
- All 4 quality gates green; suite green.
Context refs
tests/helpers/db.tstruncate helper- The 2.1.1–2.1.3 implementations