MotirBuilding in public
MOTIR · moooon
onMotir
You’re viewing a public project. Anyone can view it — no account needed. Sign in to submit, upvote, or comment on requests.View-only — you can’t edit work items
MOTIR-73

2.1.4 Tests — type metadata, validation, key concurrency

Done
Description

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.ts truncate helper
  • The 2.1.1–2.1.3 implementations