feat(dispatch): idea_link op dispatch_review (IDEA-251, T-253) #220
No reviewers
Labels
No labels
severity/s2
severity/s3
severity/s4
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
janpeter/scrum4me-mcp!220
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "claude/idea-251-idea-link"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
IDEA-251 · T3 (T-253):
dispatch_reviewaccepts an optionalidea_link. The tool checks the caller's own idea before submitting and writes the link after submitting, and the dispatch result always comes back.Change
vendor/scrum4me-sharedbumped from6109a4atof1e78df(S1). The only schema change is the modelDispatchIdeaLinkplus its back-relations.prisma/schema.prismawas regenerated.CURRENT_SHARED_COMMITpin in__tests__/ppe-bundle1-parity.test.tsmoves along, as in earlier bumps.dispatch-common.ts:submitis split intosubmitRaw(returns{ idempotency_key, dispatch }) andsubmit, which wraps it intoolJson.dispatch_taskis unchanged.dispatch-review.ts:idea_link: { idea_id, idea_phase: z.enum(UsageIdeaPhase) }, strict and optional. It never reaches the dispatch input.idea_link: exactly the old path.idea_link, in this order:requireWriteAccess+prisma.idea.findFirst({ where: { id, user_id, product_id }, select: { id: true } }); no row →DISPATCH_FORBIDDENand no submit.submitRaw.INSERT … ON CONFLICT (request_id) DO NOTHING, then a read-back.linked; different stored values →conflictwith those values.auth.userId. A completed lookup with no row →failed/IDEA_GONE; otherwisefailed/LINK_ERROR.withDispatchErrors.buildInputruns before the ownership check, so invalid input fails withDISPATCH_INVALID_INPUTbefore any lookup, and still before any submit.console.error('dispatch_idea_link_write_failed', <message>).Tests (
__tests__/dispatch/tools.test.ts)fetchis called once, the body has noidea_link, and the status islinked. ThefindFirstwhere args{ id, user_id, product_id }are asserted.DISPATCH_FORBIDDEN, nofetchand no insert.linked. The insert SQL containsON CONFLICT (request_id) DO NOTHING.conflictwith the stored values.dispatchandidempotency_keyremain andrequireWriteAccessis called once:IDEA_GONE;LINK_ERROR;LINK_ERROR;LINK_ERROR;LINK_ERROR.idea_link: the body is identical, with no auth and no prisma calls.idea_idor an extra key →inputSchema.safeParsefails.Verification (local)
npm test, includingtypecheck:tests: 271 files and 2692 tests passed, 84 skipped.npm run build: green.Rollout (JP authorizes each step separately)
idea_link.References
claude/idea-251-spec.Merge by JP.
🤖 Generated with Claude Code
APPROVED
Findings:
plan gekoppeld via pr_refs (product scrum4me-workers): T-253 (scrum4me-workers), onder ST-078. Er is niets weggelaten (omitted is leeg).
De diff voldoet aan de T-253-scope: eigendomscheck op gebruiker én product vóór submit, idea_link buiten de dispatch-input, idempotente insert en teruglezing, conflict met opgeslagen waarden en behoud van dispatch/idempotency_key bij koppelfouten. Het pad zonder idea_link en dispatch_task blijven conform hun bestaande contract. De shared-bump bevat uitsluitend het geplande DispatchIdeaLink-model, terugrelaties en bijbehorende schematest; het gegenereerde consumerschema sluit daarop aan.
Architectuur en patronen getoetst aan de productdocs over schema-sync, shared-runtime en typecheck-scope. Tool- en schemabeschrijvingen zijn bijgewerkt. De overige storycriteria (database-uitrol, verwijderen van ideeën en Scrum Usage) vallen buiten deze PR; de PR claimt uitsluitend T-253 en documenteert de T2 apply/check als uitrolvoorwaarde.
Verificatie op commit
7adc138132:De live database-uitrol is niet uitgevoerd of gevalideerd binnen deze review.