Scrum4Me/__tests__
Madhura68 6fee0394c5 actions: materializeIdeaPlanAction + relinkIdeaPlanAction (M12 T-498)
actions/ideas.ts:
- materializeIdeaPlanAction(id):
  - guard: status===PLAN_READY, plan_md present, product linked, demo-403
  - parsePlanMd → 422 with line-info on fail
  - Prisma.\$transaction:
    - SELECT max(code) for PBI/Story/Task within product
    - INSERT PBI with sort_order = lastPbi+1 within priority
    - per story: INSERT (sequential ST-NNN), per task: INSERT (T-N)
    - UPDATE idea SET pbi_id, status=PLANNED
    - INSERT IdeaLog{PLAN_RESULT, metadata}
  - returns 409 on P2002 (concurrent-materialize race)
- relinkIdeaPlanAction(id):
  - guard: status===PLANNED && pbi_id===null (PBI manually deleted via SetNull FK)
  - reverts to PLAN_READY + IdeaLog{NOTE}

Tests: 39 cases total (8 new for materialize + relink): happy creates entities,
status-mismatch-422, parse-fail-422 with details, demo-403, P2002→409,
relink happy + invalid-precondition guards.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-04 19:51:18 +02:00
..
actions actions: materializeIdeaPlanAction + relinkIdeaPlanAction (M12 T-498) 2026-05-04 19:51:18 +02:00
api M13: Veilige Claude-agent-workflow (Scrum4Me-side) (#26) 2026-05-01 13:42:18 +02:00
app feat(ST-1138): mobile Solo-pagina + verify TaskDetailDialog (T-331/T-332/T-333) 2026-05-04 10:52:41 +02:00
components feat(dashboard): pencil-icoon edit-trigger op product-card (todo cmoq3ox51) 2026-05-04 11:21:14 +02:00
lib lib: idea-code generator + plan_md yaml-frontmatter parser (M12 T-494) 2026-05-04 19:40:39 +02:00
proxy M12 / ST-1110: Demo gebruiker read-only (#17) 2026-04-29 18:44:14 +02:00
realtime End-to-end smoke-test: PBI/Story/Task verschijnen zonder refresh (#57) 2026-05-02 21:09:37 +02:00
stores Verify-gate uitbreiden: DIVERGENT/PARTIAL vereist agent-acknowledgement (#53) 2026-05-02 17:45:19 +02:00
lars-flow-checklist.md docs(ST-612): update Lars-flow checklist met todo Data Table stappen 2026-04-25 20:10:16 +02:00