PBI-8: Sprint-flow MCP-orkestratie + verifier-fix
Schema sync vanaf upstream Scrum4Me (v77617e8): FAILED toegevoegd aan Task/Story/Pbi/SprintStatus, nieuw SprintRunStatus + PrStrategy enums, SprintRun model, ClaudeJob.sprint_run_id, Product.pr_strategy. T-18 — propagateStatusUpwards in src/lib/tasks-status-update.ts. Real-time cascade Task → Story → PBI → Sprint → SprintRun bij elke task-statuswijziging. Bij FAILED cancelt sibling-jobs in dezelfde SprintRun. PBI-status BLOCKED blijft handmatig. Houd deze helper bit- voor-bit synchroon met Scrum4Me/lib/tasks-status-update.ts. updateTaskStatusWithStoryPromotion blijft als BC-wrapper. T-19 — wait-for-job.ts claim-filter. Task-jobs worden alleen geclaimd als hun SprintRun status QUEUED of RUNNING heeft. Idea-jobs blijven ongefilterd. Bij eerste claim van een QUEUED SprintRun → RUNNING binnen dezelfde tx (race-safe). T-20 — update-job-status.ts roept propagateStatusUpwards aan na elke task DONE/FAILED. Bestaande cancelPbiOnFailure-aanroep blijft voor PR-cleanup; sibling-cancellation overlap is harmless (idempotent). T-21 — classify.ts (verifier) leest nu ook "--- a/<path>" zodat delete-only commits niet meer als EMPTY worden geclassificeerd. Bug had eerder geleid tot ten onrechte FAILED-status op cmotto5h en cmotto5i (06-05-2026); zou met cascade-flow een hele sprint laten falen. Cleanup: create-todo.ts en open_todos in get-claude-context.ts verwijderd (Todo-model is op main gedropt). Endpoint geeft nu open_ideas terug — ideeën die niet PLANNED zijn. Status-mappers (src/status.ts) uitgebreid met failed. Tests: 184/184 groen (180 → 184; vier nieuwe delete-only classify-tests en herwerkte propagate-status tests). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
c63e2c6730
commit
5c5ae20f10
14 changed files with 627 additions and 238 deletions
|
|
@ -4,12 +4,12 @@ const {
|
||||||
mockProductFindFirst,
|
mockProductFindFirst,
|
||||||
mockSprintFindFirst,
|
mockSprintFindFirst,
|
||||||
mockStoryFindFirst,
|
mockStoryFindFirst,
|
||||||
mockTodoFindMany,
|
mockIdeaFindMany,
|
||||||
} = vi.hoisted(() => ({
|
} = vi.hoisted(() => ({
|
||||||
mockProductFindFirst: vi.fn(),
|
mockProductFindFirst: vi.fn(),
|
||||||
mockSprintFindFirst: vi.fn(),
|
mockSprintFindFirst: vi.fn(),
|
||||||
mockStoryFindFirst: vi.fn(),
|
mockStoryFindFirst: vi.fn(),
|
||||||
mockTodoFindMany: vi.fn(),
|
mockIdeaFindMany: vi.fn(),
|
||||||
}))
|
}))
|
||||||
|
|
||||||
vi.mock('../src/auth.js', () => ({
|
vi.mock('../src/auth.js', () => ({
|
||||||
|
|
@ -21,7 +21,7 @@ vi.mock('../src/prisma.js', () => ({
|
||||||
product: { findFirst: mockProductFindFirst },
|
product: { findFirst: mockProductFindFirst },
|
||||||
sprint: { findFirst: mockSprintFindFirst },
|
sprint: { findFirst: mockSprintFindFirst },
|
||||||
story: { findFirst: mockStoryFindFirst },
|
story: { findFirst: mockStoryFindFirst },
|
||||||
todo: { findMany: mockTodoFindMany },
|
idea: { findMany: mockIdeaFindMany },
|
||||||
},
|
},
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
|
@ -55,7 +55,7 @@ beforeEach(() => {
|
||||||
})
|
})
|
||||||
mockSprintFindFirst.mockResolvedValue({ id: 'sprint-1', sprint_goal: 'Goal', status: 'ACTIVE' })
|
mockSprintFindFirst.mockResolvedValue({ id: 'sprint-1', sprint_goal: 'Goal', status: 'ACTIVE' })
|
||||||
mockStoryFindFirst.mockResolvedValue(null)
|
mockStoryFindFirst.mockResolvedValue(null)
|
||||||
mockTodoFindMany.mockResolvedValue([])
|
mockIdeaFindMany.mockResolvedValue([])
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('get_claude_context safety-net filter', () => {
|
describe('get_claude_context safety-net filter', () => {
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,24 @@ vi.mock('../src/prisma.js', () => ({
|
||||||
},
|
},
|
||||||
story: {
|
story: {
|
||||||
findUniqueOrThrow: vi.fn(),
|
findUniqueOrThrow: vi.fn(),
|
||||||
|
findMany: vi.fn(),
|
||||||
|
update: vi.fn(),
|
||||||
|
},
|
||||||
|
pbi: {
|
||||||
|
findUniqueOrThrow: vi.fn(),
|
||||||
|
findMany: vi.fn(),
|
||||||
|
update: vi.fn(),
|
||||||
|
},
|
||||||
|
sprint: {
|
||||||
|
findUniqueOrThrow: vi.fn(),
|
||||||
|
update: vi.fn(),
|
||||||
|
},
|
||||||
|
claudeJob: {
|
||||||
|
findFirst: vi.fn(),
|
||||||
|
updateMany: vi.fn(),
|
||||||
|
},
|
||||||
|
sprintRun: {
|
||||||
|
findUnique: vi.fn(),
|
||||||
update: vi.fn(),
|
update: vi.fn(),
|
||||||
},
|
},
|
||||||
$transaction: vi.fn(),
|
$transaction: vi.fn(),
|
||||||
|
|
@ -15,14 +33,47 @@ vi.mock('../src/prisma.js', () => ({
|
||||||
}))
|
}))
|
||||||
|
|
||||||
import { prisma } from '../src/prisma.js'
|
import { prisma } from '../src/prisma.js'
|
||||||
import { updateTaskStatusWithStoryPromotion } from '../src/lib/tasks-status-update.js'
|
import {
|
||||||
|
propagateStatusUpwards,
|
||||||
|
updateTaskStatusWithStoryPromotion,
|
||||||
|
} from '../src/lib/tasks-status-update.js'
|
||||||
|
|
||||||
const mockPrisma = prisma as unknown as {
|
type MockedPrisma = {
|
||||||
task: { update: ReturnType<typeof vi.fn>; findMany: ReturnType<typeof vi.fn> }
|
task: { update: ReturnType<typeof vi.fn>; findMany: ReturnType<typeof vi.fn> }
|
||||||
story: { findUniqueOrThrow: ReturnType<typeof vi.fn>; update: ReturnType<typeof vi.fn> }
|
story: {
|
||||||
|
findUniqueOrThrow: ReturnType<typeof vi.fn>
|
||||||
|
findMany: ReturnType<typeof vi.fn>
|
||||||
|
update: ReturnType<typeof vi.fn>
|
||||||
|
}
|
||||||
|
pbi: {
|
||||||
|
findUniqueOrThrow: ReturnType<typeof vi.fn>
|
||||||
|
findMany: ReturnType<typeof vi.fn>
|
||||||
|
update: ReturnType<typeof vi.fn>
|
||||||
|
}
|
||||||
|
sprint: {
|
||||||
|
findUniqueOrThrow: ReturnType<typeof vi.fn>
|
||||||
|
update: ReturnType<typeof vi.fn>
|
||||||
|
}
|
||||||
|
claudeJob: {
|
||||||
|
findFirst: ReturnType<typeof vi.fn>
|
||||||
|
updateMany: ReturnType<typeof vi.fn>
|
||||||
|
}
|
||||||
|
sprintRun: {
|
||||||
|
findUnique: ReturnType<typeof vi.fn>
|
||||||
|
update: ReturnType<typeof vi.fn>
|
||||||
|
}
|
||||||
$transaction: ReturnType<typeof vi.fn>
|
$transaction: ReturnType<typeof vi.fn>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const mockPrisma = prisma as unknown as MockedPrisma
|
||||||
|
|
||||||
|
const TASK_BASE = {
|
||||||
|
id: 'task-1',
|
||||||
|
title: 'Task',
|
||||||
|
story_id: 'story-1',
|
||||||
|
implementation_plan: null,
|
||||||
|
}
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
vi.clearAllMocks()
|
vi.clearAllMocks()
|
||||||
mockPrisma.$transaction.mockImplementation(
|
mockPrisma.$transaction.mockImplementation(
|
||||||
|
|
@ -30,107 +81,181 @@ beforeEach(() => {
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
const TASK_BASE = {
|
describe('propagateStatusUpwards — story-niveau', () => {
|
||||||
id: 'task-1',
|
it('zet story op DONE wanneer alle siblings DONE zijn', async () => {
|
||||||
title: 'Task',
|
|
||||||
story_id: 'story-1',
|
|
||||||
implementation_plan: null,
|
|
||||||
}
|
|
||||||
|
|
||||||
describe('updateTaskStatusWithStoryPromotion', () => {
|
|
||||||
it('promotes story to DONE when last sibling task transitions to DONE', async () => {
|
|
||||||
mockPrisma.task.update.mockResolvedValue({ ...TASK_BASE, status: 'DONE' })
|
mockPrisma.task.update.mockResolvedValue({ ...TASK_BASE, status: 'DONE' })
|
||||||
mockPrisma.task.findMany.mockResolvedValue([{ status: 'DONE' }, { status: 'DONE' }])
|
mockPrisma.task.findMany.mockResolvedValue([{ status: 'DONE' }, { status: 'DONE' }])
|
||||||
mockPrisma.story.findUniqueOrThrow.mockResolvedValue({ status: 'IN_SPRINT' })
|
mockPrisma.story.findUniqueOrThrow.mockResolvedValue({
|
||||||
|
id: 'story-1',
|
||||||
|
status: 'IN_SPRINT',
|
||||||
|
pbi_id: 'pbi-1',
|
||||||
|
sprint_id: null,
|
||||||
|
})
|
||||||
|
mockPrisma.pbi.findUniqueOrThrow.mockResolvedValue({ id: 'pbi-1', status: 'READY' })
|
||||||
|
mockPrisma.story.findMany.mockResolvedValue([{ status: 'DONE' }])
|
||||||
|
|
||||||
|
const result = await propagateStatusUpwards('task-1', 'DONE')
|
||||||
|
|
||||||
|
expect(result.storyChanged).toBe(true)
|
||||||
|
expect(mockPrisma.story.update).toHaveBeenCalledWith({
|
||||||
|
where: { id: 'story-1' },
|
||||||
|
data: { status: 'DONE' },
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
it('zet story op FAILED wanneer een task FAILED is, ongeacht andere tasks', async () => {
|
||||||
|
mockPrisma.task.update.mockResolvedValue({ ...TASK_BASE, status: 'FAILED' })
|
||||||
|
mockPrisma.task.findMany.mockResolvedValue([
|
||||||
|
{ status: 'FAILED' },
|
||||||
|
{ status: 'DONE' },
|
||||||
|
{ status: 'TO_DO' },
|
||||||
|
])
|
||||||
|
mockPrisma.story.findUniqueOrThrow.mockResolvedValue({
|
||||||
|
id: 'story-1',
|
||||||
|
status: 'IN_SPRINT',
|
||||||
|
pbi_id: 'pbi-1',
|
||||||
|
sprint_id: null,
|
||||||
|
})
|
||||||
|
mockPrisma.pbi.findUniqueOrThrow.mockResolvedValue({ id: 'pbi-1', status: 'READY' })
|
||||||
|
mockPrisma.story.findMany.mockResolvedValue([{ status: 'FAILED' }])
|
||||||
|
|
||||||
|
const result = await propagateStatusUpwards('task-1', 'FAILED')
|
||||||
|
|
||||||
|
expect(result.storyChanged).toBe(true)
|
||||||
|
expect(mockPrisma.story.update).toHaveBeenCalledWith({
|
||||||
|
where: { id: 'story-1' },
|
||||||
|
data: { status: 'FAILED' },
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
describe('propagateStatusUpwards — PBI BLOCKED met rust laten', () => {
|
||||||
|
it('overschrijft een handmatig BLOCKED PBI niet', async () => {
|
||||||
|
mockPrisma.task.update.mockResolvedValue({ ...TASK_BASE, status: 'DONE' })
|
||||||
|
mockPrisma.task.findMany.mockResolvedValue([{ status: 'DONE' }])
|
||||||
|
mockPrisma.story.findUniqueOrThrow.mockResolvedValue({
|
||||||
|
id: 'story-1',
|
||||||
|
status: 'IN_SPRINT',
|
||||||
|
pbi_id: 'pbi-1',
|
||||||
|
sprint_id: null,
|
||||||
|
})
|
||||||
|
mockPrisma.pbi.findUniqueOrThrow.mockResolvedValue({ id: 'pbi-1', status: 'BLOCKED' })
|
||||||
|
|
||||||
|
const result = await propagateStatusUpwards('task-1', 'DONE')
|
||||||
|
|
||||||
|
expect(result.pbiChanged).toBe(false)
|
||||||
|
expect(mockPrisma.pbi.update).not.toHaveBeenCalled()
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
describe('propagateStatusUpwards — sprint cascade tot SprintRun', () => {
|
||||||
|
it('zet bij FAILED de hele keten op FAILED en cancelt sibling-jobs', async () => {
|
||||||
|
mockPrisma.task.update.mockResolvedValue({ ...TASK_BASE, status: 'FAILED' })
|
||||||
|
mockPrisma.task.findMany.mockResolvedValue([{ status: 'FAILED' }, { status: 'DONE' }])
|
||||||
|
mockPrisma.story.findUniqueOrThrow.mockResolvedValue({
|
||||||
|
id: 'story-1',
|
||||||
|
status: 'IN_SPRINT',
|
||||||
|
pbi_id: 'pbi-1',
|
||||||
|
sprint_id: 'sprint-1',
|
||||||
|
})
|
||||||
|
mockPrisma.pbi.findUniqueOrThrow.mockResolvedValue({ id: 'pbi-1', status: 'READY' })
|
||||||
|
mockPrisma.story.findMany.mockImplementation(
|
||||||
|
async (args: { where?: { pbi_id?: string; sprint_id?: string } }) => {
|
||||||
|
if (args.where?.pbi_id) return [{ status: 'FAILED' }]
|
||||||
|
if (args.where?.sprint_id) return [{ pbi_id: 'pbi-1' }]
|
||||||
|
return []
|
||||||
|
},
|
||||||
|
)
|
||||||
|
mockPrisma.sprint.findUniqueOrThrow.mockResolvedValue({ id: 'sprint-1', status: 'ACTIVE' })
|
||||||
|
;(mockPrisma.pbi as unknown as { findMany: ReturnType<typeof vi.fn> }).findMany = vi
|
||||||
|
.fn()
|
||||||
|
.mockResolvedValue([{ status: 'FAILED' }])
|
||||||
|
mockPrisma.claudeJob.findFirst.mockResolvedValue({ id: 'job-1', sprint_run_id: 'run-1' })
|
||||||
|
mockPrisma.sprintRun.findUnique.mockResolvedValue({ id: 'run-1', status: 'RUNNING' })
|
||||||
|
|
||||||
|
const result = await propagateStatusUpwards('task-1', 'FAILED')
|
||||||
|
|
||||||
|
expect(result.sprintChanged).toBe(true)
|
||||||
|
expect(result.sprintRunChanged).toBe(true)
|
||||||
|
expect(mockPrisma.sprintRun.update).toHaveBeenCalledWith(
|
||||||
|
expect.objectContaining({
|
||||||
|
where: { id: 'run-1' },
|
||||||
|
data: expect.objectContaining({ status: 'FAILED', failed_task_id: 'task-1' }),
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
expect(mockPrisma.claudeJob.updateMany).toHaveBeenCalledWith(
|
||||||
|
expect.objectContaining({
|
||||||
|
where: expect.objectContaining({
|
||||||
|
sprint_run_id: 'run-1',
|
||||||
|
status: { in: ['QUEUED', 'CLAIMED', 'RUNNING'] },
|
||||||
|
id: { not: 'job-1' },
|
||||||
|
}),
|
||||||
|
data: expect.objectContaining({ status: 'CANCELLED' }),
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
describe('updateTaskStatusWithStoryPromotion (BC-wrapper)', () => {
|
||||||
|
it('mapt storyChanged + DONE-newStatus naar storyStatusChange="promoted"', async () => {
|
||||||
|
mockPrisma.task.update.mockResolvedValue({ ...TASK_BASE, status: 'DONE' })
|
||||||
|
mockPrisma.task.findMany.mockResolvedValue([{ status: 'DONE' }])
|
||||||
|
mockPrisma.story.findUniqueOrThrow.mockResolvedValue({
|
||||||
|
id: 'story-1',
|
||||||
|
status: 'IN_SPRINT',
|
||||||
|
pbi_id: 'pbi-1',
|
||||||
|
sprint_id: null,
|
||||||
|
})
|
||||||
|
mockPrisma.pbi.findUniqueOrThrow.mockResolvedValue({ id: 'pbi-1', status: 'READY' })
|
||||||
|
mockPrisma.story.findMany.mockResolvedValue([{ status: 'DONE' }])
|
||||||
|
|
||||||
const result = await updateTaskStatusWithStoryPromotion('task-1', 'DONE')
|
const result = await updateTaskStatusWithStoryPromotion('task-1', 'DONE')
|
||||||
|
|
||||||
expect(result.storyStatusChange).toBe('promoted')
|
expect(result.storyStatusChange).toBe('promoted')
|
||||||
expect(result.storyId).toBe('story-1')
|
expect(result.storyId).toBe('story-1')
|
||||||
expect(mockPrisma.story.update).toHaveBeenCalledWith({
|
|
||||||
where: { id: 'story-1' },
|
|
||||||
data: { status: 'DONE' },
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
|
||||||
it('does not promote when story is already DONE (idempotent)', async () => {
|
it('mapt storyChanged + non-DONE naar storyStatusChange="demoted"', async () => {
|
||||||
mockPrisma.task.update.mockResolvedValue({ ...TASK_BASE, status: 'DONE' })
|
|
||||||
mockPrisma.task.findMany.mockResolvedValue([{ status: 'DONE' }])
|
|
||||||
mockPrisma.story.findUniqueOrThrow.mockResolvedValue({ status: 'DONE' })
|
|
||||||
|
|
||||||
const result = await updateTaskStatusWithStoryPromotion('task-1', 'DONE')
|
|
||||||
|
|
||||||
expect(result.storyStatusChange).toBe(null)
|
|
||||||
expect(mockPrisma.story.update).not.toHaveBeenCalled()
|
|
||||||
})
|
|
||||||
|
|
||||||
it('does not promote when not all siblings are DONE', async () => {
|
|
||||||
mockPrisma.task.update.mockResolvedValue({ ...TASK_BASE, status: 'DONE' })
|
|
||||||
mockPrisma.task.findMany.mockResolvedValue([{ status: 'DONE' }, { status: 'IN_PROGRESS' }])
|
|
||||||
mockPrisma.story.findUniqueOrThrow.mockResolvedValue({ status: 'IN_SPRINT' })
|
|
||||||
|
|
||||||
const result = await updateTaskStatusWithStoryPromotion('task-1', 'DONE')
|
|
||||||
|
|
||||||
expect(result.storyStatusChange).toBe(null)
|
|
||||||
expect(mockPrisma.story.update).not.toHaveBeenCalled()
|
|
||||||
})
|
|
||||||
|
|
||||||
it('demotes story to IN_SPRINT when a task moves out of DONE on a DONE story', async () => {
|
|
||||||
mockPrisma.task.update.mockResolvedValue({ ...TASK_BASE, status: 'IN_PROGRESS' })
|
mockPrisma.task.update.mockResolvedValue({ ...TASK_BASE, status: 'IN_PROGRESS' })
|
||||||
mockPrisma.task.findMany.mockResolvedValue([{ status: 'IN_PROGRESS' }, { status: 'DONE' }])
|
mockPrisma.task.findMany.mockResolvedValue([{ status: 'IN_PROGRESS' }, { status: 'DONE' }])
|
||||||
mockPrisma.story.findUniqueOrThrow.mockResolvedValue({ status: 'DONE' })
|
mockPrisma.story.findUniqueOrThrow.mockResolvedValue({
|
||||||
|
id: 'story-1',
|
||||||
|
status: 'DONE',
|
||||||
|
pbi_id: 'pbi-1',
|
||||||
|
sprint_id: null,
|
||||||
|
})
|
||||||
|
mockPrisma.pbi.findUniqueOrThrow.mockResolvedValue({ id: 'pbi-1', status: 'DONE' })
|
||||||
|
mockPrisma.story.findMany.mockResolvedValue([{ status: 'OPEN' }])
|
||||||
|
|
||||||
const result = await updateTaskStatusWithStoryPromotion('task-1', 'IN_PROGRESS')
|
const result = await updateTaskStatusWithStoryPromotion('task-1', 'IN_PROGRESS')
|
||||||
|
|
||||||
expect(result.storyStatusChange).toBe('demoted')
|
expect(result.storyStatusChange).toBe('demoted')
|
||||||
expect(mockPrisma.story.update).toHaveBeenCalledWith({
|
|
||||||
where: { id: 'story-1' },
|
|
||||||
data: { status: 'IN_SPRINT' },
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
|
||||||
it('does not demote when story is not DONE', async () => {
|
it('null wanneer story niet verandert', async () => {
|
||||||
mockPrisma.task.update.mockResolvedValue({ ...TASK_BASE, status: 'IN_PROGRESS' })
|
mockPrisma.task.update.mockResolvedValue({ ...TASK_BASE, status: 'IN_PROGRESS' })
|
||||||
mockPrisma.task.findMany.mockResolvedValue([{ status: 'IN_PROGRESS' }])
|
mockPrisma.task.findMany.mockResolvedValue([{ status: 'IN_PROGRESS' }, { status: 'TO_DO' }])
|
||||||
mockPrisma.story.findUniqueOrThrow.mockResolvedValue({ status: 'IN_SPRINT' })
|
mockPrisma.story.findUniqueOrThrow.mockResolvedValue({
|
||||||
|
id: 'story-1',
|
||||||
|
status: 'IN_SPRINT',
|
||||||
|
pbi_id: 'pbi-1',
|
||||||
|
sprint_id: 'sprint-1',
|
||||||
|
})
|
||||||
|
mockPrisma.pbi.findUniqueOrThrow.mockResolvedValue({ id: 'pbi-1', status: 'READY' })
|
||||||
|
mockPrisma.story.findMany.mockImplementation(
|
||||||
|
async (args: { where?: { pbi_id?: string; sprint_id?: string } }) => {
|
||||||
|
if (args.where?.pbi_id) return [{ status: 'IN_SPRINT' }]
|
||||||
|
if (args.where?.sprint_id) return [{ pbi_id: 'pbi-1' }]
|
||||||
|
return []
|
||||||
|
},
|
||||||
|
)
|
||||||
|
mockPrisma.sprint.findUniqueOrThrow.mockResolvedValue({ id: 'sprint-1', status: 'ACTIVE' })
|
||||||
|
;(mockPrisma.pbi as unknown as { findMany: ReturnType<typeof vi.fn> }).findMany = vi
|
||||||
|
.fn()
|
||||||
|
.mockResolvedValue([{ status: 'READY' }])
|
||||||
|
|
||||||
const result = await updateTaskStatusWithStoryPromotion('task-1', 'IN_PROGRESS')
|
const result = await updateTaskStatusWithStoryPromotion('task-1', 'IN_PROGRESS')
|
||||||
|
|
||||||
expect(result.storyStatusChange).toBe(null)
|
expect(result.storyStatusChange).toBe(null)
|
||||||
expect(mockPrisma.story.update).not.toHaveBeenCalled()
|
|
||||||
})
|
|
||||||
|
|
||||||
it('updates the task regardless of story-status change', async () => {
|
|
||||||
mockPrisma.task.update.mockResolvedValue({ ...TASK_BASE, status: 'IN_PROGRESS' })
|
|
||||||
mockPrisma.task.findMany.mockResolvedValue([{ status: 'IN_PROGRESS' }])
|
|
||||||
mockPrisma.story.findUniqueOrThrow.mockResolvedValue({ status: 'IN_SPRINT' })
|
|
||||||
|
|
||||||
await updateTaskStatusWithStoryPromotion('task-1', 'IN_PROGRESS')
|
|
||||||
|
|
||||||
expect(mockPrisma.task.update).toHaveBeenCalledWith({
|
|
||||||
where: { id: 'task-1' },
|
|
||||||
data: { status: 'IN_PROGRESS' },
|
|
||||||
select: expect.any(Object),
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
it('uses the provided transaction client when passed', async () => {
|
|
||||||
const tx = {
|
|
||||||
task: { update: vi.fn(), findMany: vi.fn() },
|
|
||||||
story: { findUniqueOrThrow: vi.fn(), update: vi.fn() },
|
|
||||||
}
|
|
||||||
tx.task.update.mockResolvedValue({ ...TASK_BASE, status: 'DONE' })
|
|
||||||
tx.task.findMany.mockResolvedValue([{ status: 'DONE' }])
|
|
||||||
tx.story.findUniqueOrThrow.mockResolvedValue({ status: 'IN_SPRINT' })
|
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
||||||
const result = await updateTaskStatusWithStoryPromotion('task-1', 'DONE', tx as any)
|
|
||||||
|
|
||||||
expect(result.storyStatusChange).toBe('promoted')
|
|
||||||
expect(mockPrisma.$transaction).not.toHaveBeenCalled()
|
|
||||||
expect(tx.story.update).toHaveBeenCalledWith({
|
|
||||||
where: { id: 'story-1' },
|
|
||||||
data: { status: 'DONE' },
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -124,3 +124,42 @@ describe('classifyDiffAgainstPlan — DIVERGENT (scope creep)', () => {
|
||||||
expect(r.reasoning).toMatch(/extra/i)
|
expect(r.reasoning).toMatch(/extra/i)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// Helper voor pure-delete diffs: +++ /dev/null betekent dat het bestand
|
||||||
|
// volledig verwijderd is. Pad zit alleen nog in de "--- a/<path>" regel.
|
||||||
|
function makeDeleteDiff(files: string[], linesPerFile = 5): string {
|
||||||
|
return files
|
||||||
|
.map(
|
||||||
|
(f) =>
|
||||||
|
`diff --git a/${f} b/${f}\ndeleted file mode 100644\n--- a/${f}\n+++ /dev/null\n` +
|
||||||
|
Array.from({ length: linesPerFile }, (_, i) => `-removed line ${i}`).join('\n'),
|
||||||
|
)
|
||||||
|
.join('\n')
|
||||||
|
}
|
||||||
|
|
||||||
|
describe('classifyDiffAgainstPlan — delete-only commits', () => {
|
||||||
|
it('herkent delete-only diff (geen +++ b/, wel --- a/) als ALIGNED bij matchend plan', () => {
|
||||||
|
const plan = 'Verwijder `src/old-helper.ts` — niet meer gebruikt.'
|
||||||
|
const diff = makeDeleteDiff(['src/old-helper.ts'])
|
||||||
|
const r = classifyDiffAgainstPlan({ diff, plan })
|
||||||
|
expect(r.result).toBe('ALIGNED')
|
||||||
|
})
|
||||||
|
|
||||||
|
it('retourneert PARTIAL wanneer plan meer paden noemt dan zijn verwijderd', () => {
|
||||||
|
const plan = 'Verwijder `src/a.ts` en `src/b.ts`.'
|
||||||
|
const diff = makeDeleteDiff(['src/a.ts'])
|
||||||
|
const r = classifyDiffAgainstPlan({ diff, plan })
|
||||||
|
expect(r.result).toBe('PARTIAL')
|
||||||
|
})
|
||||||
|
|
||||||
|
it('retourneert ALIGNED voor delete-only diff zonder plan-baseline', () => {
|
||||||
|
const diff = makeDeleteDiff(['src/old.ts'])
|
||||||
|
const r = classifyDiffAgainstPlan({ diff, plan: null })
|
||||||
|
expect(r.result).toBe('ALIGNED')
|
||||||
|
})
|
||||||
|
|
||||||
|
it('retourneert nog steeds EMPTY voor echt lege diff', () => {
|
||||||
|
const r = classifyDiffAgainstPlan({ diff: '', plan: 'Verwijder `src/x.ts`.' })
|
||||||
|
expect(r.result).toBe('EMPTY')
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
|
||||||
4
package-lock.json
generated
4
package-lock.json
generated
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "scrum4me-mcp",
|
"name": "scrum4me-mcp",
|
||||||
"version": "0.5.0",
|
"version": "0.7.0",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "scrum4me-mcp",
|
"name": "scrum4me-mcp",
|
||||||
"version": "0.5.0",
|
"version": "0.7.0",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
||||||
|
|
@ -18,11 +18,13 @@ enum StoryStatus {
|
||||||
OPEN
|
OPEN
|
||||||
IN_SPRINT
|
IN_SPRINT
|
||||||
DONE
|
DONE
|
||||||
|
FAILED
|
||||||
}
|
}
|
||||||
|
|
||||||
enum PbiStatus {
|
enum PbiStatus {
|
||||||
READY
|
READY
|
||||||
BLOCKED
|
BLOCKED
|
||||||
|
FAILED
|
||||||
DONE
|
DONE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -54,6 +56,7 @@ enum TaskStatus {
|
||||||
IN_PROGRESS
|
IN_PROGRESS
|
||||||
REVIEW
|
REVIEW
|
||||||
DONE
|
DONE
|
||||||
|
FAILED
|
||||||
}
|
}
|
||||||
|
|
||||||
enum LogType {
|
enum LogType {
|
||||||
|
|
@ -70,6 +73,21 @@ enum TestStatus {
|
||||||
enum SprintStatus {
|
enum SprintStatus {
|
||||||
ACTIVE
|
ACTIVE
|
||||||
COMPLETED
|
COMPLETED
|
||||||
|
FAILED
|
||||||
|
}
|
||||||
|
|
||||||
|
enum SprintRunStatus {
|
||||||
|
QUEUED
|
||||||
|
RUNNING
|
||||||
|
PAUSED
|
||||||
|
DONE
|
||||||
|
FAILED
|
||||||
|
CANCELLED
|
||||||
|
}
|
||||||
|
|
||||||
|
enum PrStrategy {
|
||||||
|
SPRINT
|
||||||
|
STORY
|
||||||
}
|
}
|
||||||
|
|
||||||
enum IdeaStatus {
|
enum IdeaStatus {
|
||||||
|
|
@ -123,7 +141,6 @@ model User {
|
||||||
roles UserRole[]
|
roles UserRole[]
|
||||||
api_tokens ApiToken[]
|
api_tokens ApiToken[]
|
||||||
products Product[]
|
products Product[]
|
||||||
todos Todo[]
|
|
||||||
ideas Idea[]
|
ideas Idea[]
|
||||||
product_members ProductMember[]
|
product_members ProductMember[]
|
||||||
assigned_stories Story[] @relation("StoryAssignee")
|
assigned_stories Story[] @relation("StoryAssignee")
|
||||||
|
|
@ -132,6 +149,7 @@ model User {
|
||||||
answered_questions ClaudeQuestion[] @relation("ClaudeQuestionAnswerer")
|
answered_questions ClaudeQuestion[] @relation("ClaudeQuestionAnswerer")
|
||||||
claude_jobs ClaudeJob[]
|
claude_jobs ClaudeJob[]
|
||||||
claude_workers ClaudeWorker[]
|
claude_workers ClaudeWorker[]
|
||||||
|
started_sprint_runs SprintRun[] @relation("SprintRunStartedBy")
|
||||||
|
|
||||||
@@index([active_product_id])
|
@@index([active_product_id])
|
||||||
@@map("users")
|
@@map("users")
|
||||||
|
|
@ -172,6 +190,7 @@ model Product {
|
||||||
repo_url String?
|
repo_url String?
|
||||||
definition_of_done String
|
definition_of_done String
|
||||||
auto_pr Boolean @default(false)
|
auto_pr Boolean @default(false)
|
||||||
|
pr_strategy PrStrategy @default(SPRINT)
|
||||||
archived Boolean @default(false)
|
archived Boolean @default(false)
|
||||||
created_at DateTime @default(now())
|
created_at DateTime @default(now())
|
||||||
updated_at DateTime @updatedAt
|
updated_at DateTime @updatedAt
|
||||||
|
|
@ -179,7 +198,6 @@ model Product {
|
||||||
sprints Sprint[]
|
sprints Sprint[]
|
||||||
stories Story[]
|
stories Story[]
|
||||||
tasks Task[]
|
tasks Task[]
|
||||||
todos Todo[]
|
|
||||||
members ProductMember[]
|
members ProductMember[]
|
||||||
active_for_users User[] @relation("UserActiveProduct")
|
active_for_users User[] @relation("UserActiveProduct")
|
||||||
claude_questions ClaudeQuestion[]
|
claude_questions ClaudeQuestion[]
|
||||||
|
|
@ -275,11 +293,36 @@ model Sprint {
|
||||||
completed_at DateTime?
|
completed_at DateTime?
|
||||||
stories Story[]
|
stories Story[]
|
||||||
tasks Task[]
|
tasks Task[]
|
||||||
|
sprint_runs SprintRun[]
|
||||||
|
|
||||||
@@index([product_id, status])
|
@@index([product_id, status])
|
||||||
@@map("sprints")
|
@@map("sprints")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
model SprintRun {
|
||||||
|
id String @id @default(cuid())
|
||||||
|
sprint Sprint @relation(fields: [sprint_id], references: [id], onDelete: Cascade)
|
||||||
|
sprint_id String
|
||||||
|
started_by User @relation("SprintRunStartedBy", fields: [started_by_id], references: [id])
|
||||||
|
started_by_id String
|
||||||
|
status SprintRunStatus @default(QUEUED)
|
||||||
|
pr_strategy PrStrategy
|
||||||
|
branch String?
|
||||||
|
pr_url String?
|
||||||
|
started_at DateTime?
|
||||||
|
finished_at DateTime?
|
||||||
|
failure_reason String?
|
||||||
|
failed_task Task? @relation("SprintRunFailedTask", fields: [failed_task_id], references: [id], onDelete: SetNull)
|
||||||
|
failed_task_id String?
|
||||||
|
created_at DateTime @default(now())
|
||||||
|
updated_at DateTime @updatedAt
|
||||||
|
jobs ClaudeJob[]
|
||||||
|
|
||||||
|
@@index([sprint_id, status])
|
||||||
|
@@index([started_by_id, status])
|
||||||
|
@@map("sprint_runs")
|
||||||
|
}
|
||||||
|
|
||||||
model Task {
|
model Task {
|
||||||
id String @id @default(cuid())
|
id String @id @default(cuid())
|
||||||
story Story @relation(fields: [story_id], references: [id], onDelete: Cascade)
|
story Story @relation(fields: [story_id], references: [id], onDelete: Cascade)
|
||||||
|
|
@ -306,6 +349,7 @@ model Task {
|
||||||
updated_at DateTime @updatedAt
|
updated_at DateTime @updatedAt
|
||||||
claude_questions ClaudeQuestion[]
|
claude_questions ClaudeQuestion[]
|
||||||
claude_jobs ClaudeJob[]
|
claude_jobs ClaudeJob[]
|
||||||
|
sprint_run_failures SprintRun[] @relation("SprintRunFailedTask")
|
||||||
|
|
||||||
@@unique([product_id, code])
|
@@unique([product_id, code])
|
||||||
@@index([story_id, priority, sort_order])
|
@@index([story_id, priority, sort_order])
|
||||||
|
|
@ -324,6 +368,8 @@ model ClaudeJob {
|
||||||
task_id String?
|
task_id String?
|
||||||
idea Idea? @relation(fields: [idea_id], references: [id], onDelete: Cascade)
|
idea Idea? @relation(fields: [idea_id], references: [id], onDelete: Cascade)
|
||||||
idea_id String?
|
idea_id String?
|
||||||
|
sprint_run SprintRun? @relation(fields: [sprint_run_id], references: [id], onDelete: SetNull)
|
||||||
|
sprint_run_id String?
|
||||||
kind ClaudeJobKind @default(TASK_IMPLEMENTATION)
|
kind ClaudeJobKind @default(TASK_IMPLEMENTATION)
|
||||||
status ClaudeJobStatus @default(QUEUED)
|
status ClaudeJobStatus @default(QUEUED)
|
||||||
claimed_by_token ApiToken? @relation(fields: [claimed_by_token_id], references: [id], onDelete: SetNull)
|
claimed_by_token ApiToken? @relation(fields: [claimed_by_token_id], references: [id], onDelete: SetNull)
|
||||||
|
|
@ -350,6 +396,7 @@ model ClaudeJob {
|
||||||
@@index([user_id, status])
|
@@index([user_id, status])
|
||||||
@@index([task_id, status])
|
@@index([task_id, status])
|
||||||
@@index([idea_id, status])
|
@@index([idea_id, status])
|
||||||
|
@@index([sprint_run_id, status])
|
||||||
@@index([status, claimed_at])
|
@@index([status, claimed_at])
|
||||||
@@index([status, finished_at])
|
@@index([status, finished_at])
|
||||||
@@map("claude_jobs")
|
@@map("claude_jobs")
|
||||||
|
|
@ -399,24 +446,6 @@ model ProductMember {
|
||||||
@@map("product_members")
|
@@map("product_members")
|
||||||
}
|
}
|
||||||
|
|
||||||
model Todo {
|
|
||||||
id String @id @default(cuid())
|
|
||||||
user User @relation(fields: [user_id], references: [id], onDelete: Cascade)
|
|
||||||
user_id String
|
|
||||||
product Product? @relation(fields: [product_id], references: [id], onDelete: SetNull)
|
|
||||||
product_id String?
|
|
||||||
title String
|
|
||||||
description String? @db.VarChar(2000)
|
|
||||||
done Boolean @default(false)
|
|
||||||
archived Boolean @default(false)
|
|
||||||
created_at DateTime @default(now())
|
|
||||||
updated_at DateTime @updatedAt
|
|
||||||
|
|
||||||
@@index([user_id, done, archived])
|
|
||||||
@@index([user_id, product_id])
|
|
||||||
@@map("todos")
|
|
||||||
}
|
|
||||||
|
|
||||||
model Idea {
|
model Idea {
|
||||||
id String @id @default(cuid())
|
id String @id @default(cuid())
|
||||||
user User @relation(fields: [user_id], references: [id], onDelete: Cascade)
|
user User @relation(fields: [user_id], references: [id], onDelete: Cascade)
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,6 @@ import { registerUpdateTaskPlanTool } from './tools/update-task-plan.js'
|
||||||
import { registerLogImplementationTool } from './tools/log-implementation.js'
|
import { registerLogImplementationTool } from './tools/log-implementation.js'
|
||||||
import { registerLogTestResultTool } from './tools/log-test-result.js'
|
import { registerLogTestResultTool } from './tools/log-test-result.js'
|
||||||
import { registerLogCommitTool } from './tools/log-commit.js'
|
import { registerLogCommitTool } from './tools/log-commit.js'
|
||||||
import { registerCreateTodoTool } from './tools/create-todo.js'
|
|
||||||
import { registerCreatePbiTool } from './tools/create-pbi.js'
|
import { registerCreatePbiTool } from './tools/create-pbi.js'
|
||||||
import { registerCreateStoryTool } from './tools/create-story.js'
|
import { registerCreateStoryTool } from './tools/create-story.js'
|
||||||
import { registerCreateTaskTool } from './tools/create-task.js'
|
import { registerCreateTaskTool } from './tools/create-task.js'
|
||||||
|
|
@ -71,7 +70,6 @@ async function main() {
|
||||||
registerLogImplementationTool(server)
|
registerLogImplementationTool(server)
|
||||||
registerLogTestResultTool(server)
|
registerLogTestResultTool(server)
|
||||||
registerLogCommitTool(server)
|
registerLogCommitTool(server)
|
||||||
registerCreateTodoTool(server)
|
|
||||||
registerCreatePbiTool(server)
|
registerCreatePbiTool(server)
|
||||||
registerCreateStoryTool(server)
|
registerCreateStoryTool(server)
|
||||||
registerCreateTaskTool(server)
|
registerCreateTaskTool(server)
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,11 @@
|
||||||
import type { Prisma, TaskStatus } from '@prisma/client'
|
// **HOUD SYNC** met Scrum4Me/lib/tasks-status-update.ts.
|
||||||
|
// Beide repos delen dezelfde DB; deze helper moet bit-voor-bit gelijke
|
||||||
|
// statusovergangen produceren als de Scrum4Me-versie. Bij wijziging hier
|
||||||
|
// ook in de Scrum4Me-repo updaten en omgekeerd.
|
||||||
|
import type { Prisma, TaskStatus, StoryStatus, PbiStatus, SprintStatus } from '@prisma/client'
|
||||||
import { prisma } from '../prisma.js'
|
import { prisma } from '../prisma.js'
|
||||||
|
|
||||||
export type StoryStatusChange = 'promoted' | 'demoted' | null
|
export interface PropagationResult {
|
||||||
|
|
||||||
export interface UpdateTaskStatusResult {
|
|
||||||
task: {
|
task: {
|
||||||
id: string
|
id: string
|
||||||
title: string
|
title: string
|
||||||
|
|
@ -11,21 +13,33 @@ export interface UpdateTaskStatusResult {
|
||||||
story_id: string
|
story_id: string
|
||||||
implementation_plan: string | null
|
implementation_plan: string | null
|
||||||
}
|
}
|
||||||
storyStatusChange: StoryStatusChange
|
|
||||||
storyId: string
|
storyId: string
|
||||||
|
storyChanged: boolean
|
||||||
|
pbiChanged: boolean
|
||||||
|
sprintChanged: boolean
|
||||||
|
sprintRunChanged: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update task.status atomically and auto-promote/demote the parent story:
|
// Real-time status-propagatie: bij elke task-statuswijziging wordt de keten
|
||||||
// - All sibling tasks DONE → story.status = DONE
|
// Task → Story → PBI → Sprint → SprintRun herevalueerd binnen één transactie.
|
||||||
// - Story was DONE and a task moves out of DONE → story.status = IN_SPRINT
|
//
|
||||||
// Demote target is IN_SPRINT (not OPEN): OPEN means "back in product backlog",
|
// Regels:
|
||||||
// which is a sprint-management action, not a status side-effect.
|
// Story: ANY task FAILED → FAILED, ELSE ALL DONE → DONE,
|
||||||
export async function updateTaskStatusWithStoryPromotion(
|
// ELSE IN_SPRINT (mits story.sprint_id != null), anders OPEN
|
||||||
|
// PBI: ANY story FAILED → FAILED, ELSE ALL DONE → DONE, ELSE READY
|
||||||
|
// (BLOCKED is handmatig en wordt niet overschreven door deze helper)
|
||||||
|
// Sprint: ANY PBI van een story-in-sprint FAILED → FAILED,
|
||||||
|
// ELSE ALL PBIs van die stories DONE → COMPLETED,
|
||||||
|
// ELSE ACTIVE
|
||||||
|
// SprintRun: Sprint→FAILED → SprintRun=FAILED + cancel openstaand werk +
|
||||||
|
// zet failed_task_id; Sprint→COMPLETED → SprintRun=DONE; anders
|
||||||
|
// blijft SprintRun ongewijzigd.
|
||||||
|
export async function propagateStatusUpwards(
|
||||||
taskId: string,
|
taskId: string,
|
||||||
newStatus: TaskStatus,
|
newStatus: TaskStatus,
|
||||||
client?: Prisma.TransactionClient,
|
client?: Prisma.TransactionClient,
|
||||||
): Promise<UpdateTaskStatusResult> {
|
): Promise<PropagationResult> {
|
||||||
const run = async (tx: Prisma.TransactionClient): Promise<UpdateTaskStatusResult> => {
|
const run = async (tx: Prisma.TransactionClient): Promise<PropagationResult> => {
|
||||||
const task = await tx.task.update({
|
const task = await tx.task.update({
|
||||||
where: { id: taskId },
|
where: { id: taskId },
|
||||||
data: { status: newStatus },
|
data: { status: newStatus },
|
||||||
|
|
@ -38,35 +52,199 @@ export async function updateTaskStatusWithStoryPromotion(
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// Story herevalueren
|
||||||
const siblings = await tx.task.findMany({
|
const siblings = await tx.task.findMany({
|
||||||
where: { story_id: task.story_id },
|
where: { story_id: task.story_id },
|
||||||
select: { status: true },
|
select: { status: true },
|
||||||
})
|
})
|
||||||
const allDone = siblings.every((s) => s.status === 'DONE')
|
const anyTaskFailed = siblings.some((s) => s.status === 'FAILED')
|
||||||
|
const allTasksDone =
|
||||||
|
siblings.length > 0 && siblings.every((s) => s.status === 'DONE')
|
||||||
|
|
||||||
const story = await tx.story.findUniqueOrThrow({
|
const story = await tx.story.findUniqueOrThrow({
|
||||||
where: { id: task.story_id },
|
where: { id: task.story_id },
|
||||||
select: { status: true },
|
select: { id: true, status: true, pbi_id: true, sprint_id: true },
|
||||||
})
|
})
|
||||||
|
|
||||||
let storyStatusChange: StoryStatusChange = null
|
const defaultActive: StoryStatus = story.sprint_id ? 'IN_SPRINT' : 'OPEN'
|
||||||
if (newStatus === 'DONE' && allDone && story.status !== 'DONE') {
|
let nextStoryStatus: StoryStatus
|
||||||
|
if (anyTaskFailed) nextStoryStatus = 'FAILED'
|
||||||
|
else if (allTasksDone) nextStoryStatus = 'DONE'
|
||||||
|
else nextStoryStatus = defaultActive
|
||||||
|
|
||||||
|
let storyChanged = false
|
||||||
|
if (nextStoryStatus !== story.status) {
|
||||||
await tx.story.update({
|
await tx.story.update({
|
||||||
where: { id: task.story_id },
|
where: { id: story.id },
|
||||||
data: { status: 'DONE' },
|
data: { status: nextStoryStatus },
|
||||||
})
|
})
|
||||||
storyStatusChange = 'promoted'
|
storyChanged = true
|
||||||
} else if (newStatus !== 'DONE' && story.status === 'DONE') {
|
|
||||||
await tx.story.update({
|
|
||||||
where: { id: task.story_id },
|
|
||||||
data: { status: 'IN_SPRINT' },
|
|
||||||
})
|
|
||||||
storyStatusChange = 'demoted'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return { task, storyStatusChange, storyId: task.story_id }
|
// PBI herevalueren — BLOCKED met rust laten
|
||||||
|
const pbi = await tx.pbi.findUniqueOrThrow({
|
||||||
|
where: { id: story.pbi_id },
|
||||||
|
select: { id: true, status: true },
|
||||||
|
})
|
||||||
|
|
||||||
|
let pbiChanged = false
|
||||||
|
if (pbi.status !== 'BLOCKED') {
|
||||||
|
const pbiStories = await tx.story.findMany({
|
||||||
|
where: { pbi_id: pbi.id },
|
||||||
|
select: { status: true },
|
||||||
|
})
|
||||||
|
const anyStoryFailed = pbiStories.some((s) => s.status === 'FAILED')
|
||||||
|
const allStoriesDone =
|
||||||
|
pbiStories.length > 0 && pbiStories.every((s) => s.status === 'DONE')
|
||||||
|
|
||||||
|
let nextPbiStatus: PbiStatus
|
||||||
|
if (anyStoryFailed) nextPbiStatus = 'FAILED'
|
||||||
|
else if (allStoriesDone) nextPbiStatus = 'DONE'
|
||||||
|
else nextPbiStatus = 'READY'
|
||||||
|
|
||||||
|
if (nextPbiStatus !== pbi.status) {
|
||||||
|
await tx.pbi.update({
|
||||||
|
where: { id: pbi.id },
|
||||||
|
data: { status: nextPbiStatus },
|
||||||
|
})
|
||||||
|
pbiChanged = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Sprint herevalueren — alleen als deze story aan een sprint hangt
|
||||||
|
let sprintChanged = false
|
||||||
|
let nextSprintStatus: SprintStatus | null = null
|
||||||
|
if (story.sprint_id) {
|
||||||
|
const sprint = await tx.sprint.findUniqueOrThrow({
|
||||||
|
where: { id: story.sprint_id },
|
||||||
|
select: { id: true, status: true },
|
||||||
|
})
|
||||||
|
|
||||||
|
const sprintPbiRows = await tx.story.findMany({
|
||||||
|
where: { sprint_id: sprint.id },
|
||||||
|
select: { pbi_id: true },
|
||||||
|
distinct: ['pbi_id'],
|
||||||
|
})
|
||||||
|
const sprintPbis = await tx.pbi.findMany({
|
||||||
|
where: { id: { in: sprintPbiRows.map((s) => s.pbi_id) } },
|
||||||
|
select: { status: true },
|
||||||
|
})
|
||||||
|
const anyPbiFailed = sprintPbis.some((p) => p.status === 'FAILED')
|
||||||
|
const allPbisDone =
|
||||||
|
sprintPbis.length > 0 && sprintPbis.every((p) => p.status === 'DONE')
|
||||||
|
|
||||||
|
let nextStatus: SprintStatus
|
||||||
|
if (anyPbiFailed) nextStatus = 'FAILED'
|
||||||
|
else if (allPbisDone) nextStatus = 'COMPLETED'
|
||||||
|
else nextStatus = 'ACTIVE'
|
||||||
|
|
||||||
|
if (nextStatus !== sprint.status) {
|
||||||
|
await tx.sprint.update({
|
||||||
|
where: { id: sprint.id },
|
||||||
|
data: {
|
||||||
|
status: nextStatus,
|
||||||
|
...(nextStatus === 'COMPLETED' ? { completed_at: new Date() } : {}),
|
||||||
|
},
|
||||||
|
})
|
||||||
|
sprintChanged = true
|
||||||
|
nextSprintStatus = nextStatus
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// SprintRun herevalueren — via ClaudeJob.sprint_run_id van deze task
|
||||||
|
let sprintRunChanged = false
|
||||||
|
if (nextSprintStatus === 'FAILED' || nextSprintStatus === 'COMPLETED') {
|
||||||
|
const job = await tx.claudeJob.findFirst({
|
||||||
|
where: { task_id: taskId, sprint_run_id: { not: null } },
|
||||||
|
orderBy: { created_at: 'desc' },
|
||||||
|
select: { id: true, sprint_run_id: true },
|
||||||
|
})
|
||||||
|
|
||||||
|
if (job?.sprint_run_id) {
|
||||||
|
const sprintRun = await tx.sprintRun.findUnique({
|
||||||
|
where: { id: job.sprint_run_id },
|
||||||
|
select: { id: true, status: true },
|
||||||
|
})
|
||||||
|
if (
|
||||||
|
sprintRun &&
|
||||||
|
(sprintRun.status === 'QUEUED' ||
|
||||||
|
sprintRun.status === 'RUNNING' ||
|
||||||
|
sprintRun.status === 'PAUSED')
|
||||||
|
) {
|
||||||
|
if (nextSprintStatus === 'FAILED') {
|
||||||
|
await tx.sprintRun.update({
|
||||||
|
where: { id: sprintRun.id },
|
||||||
|
data: {
|
||||||
|
status: 'FAILED',
|
||||||
|
finished_at: new Date(),
|
||||||
|
failed_task_id: taskId,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
await tx.claudeJob.updateMany({
|
||||||
|
where: {
|
||||||
|
sprint_run_id: sprintRun.id,
|
||||||
|
status: { in: ['QUEUED', 'CLAIMED', 'RUNNING'] },
|
||||||
|
id: { not: job.id },
|
||||||
|
},
|
||||||
|
data: {
|
||||||
|
status: 'CANCELLED',
|
||||||
|
finished_at: new Date(),
|
||||||
|
error: `Cancelled: task ${taskId} failed in same sprint run`,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
sprintRunChanged = true
|
||||||
|
} else {
|
||||||
|
// COMPLETED
|
||||||
|
await tx.sprintRun.update({
|
||||||
|
where: { id: sprintRun.id },
|
||||||
|
data: { status: 'DONE', finished_at: new Date() },
|
||||||
|
})
|
||||||
|
sprintRunChanged = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
task,
|
||||||
|
storyId: task.story_id,
|
||||||
|
storyChanged,
|
||||||
|
pbiChanged,
|
||||||
|
sprintChanged,
|
||||||
|
sprintRunChanged,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (client) return run(client)
|
if (client) return run(client)
|
||||||
return prisma.$transaction(run)
|
return prisma.$transaction(run)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ─── Backwards-compat wrapper ────────────────────────────────────────────────
|
||||||
|
// Bestaande tools (update-task-status, log-implementation, etc.) verwachten
|
||||||
|
// de oude { task, storyStatusChange, storyId } shape. We mappen storyChanged
|
||||||
|
// op promoted/demoted via een eenvoudige heuristiek op nieuwe TaskStatus.
|
||||||
|
|
||||||
|
export type StoryStatusChange = 'promoted' | 'demoted' | null
|
||||||
|
|
||||||
|
export interface UpdateTaskStatusResult {
|
||||||
|
task: PropagationResult['task']
|
||||||
|
storyStatusChange: StoryStatusChange
|
||||||
|
storyId: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function updateTaskStatusWithStoryPromotion(
|
||||||
|
taskId: string,
|
||||||
|
newStatus: TaskStatus,
|
||||||
|
client?: Prisma.TransactionClient,
|
||||||
|
): Promise<UpdateTaskStatusResult> {
|
||||||
|
const result = await propagateStatusUpwards(taskId, newStatus, client)
|
||||||
|
let storyStatusChange: StoryStatusChange = null
|
||||||
|
if (result.storyChanged) {
|
||||||
|
storyStatusChange = newStatus === 'DONE' ? 'promoted' : 'demoted'
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
task: result.task,
|
||||||
|
storyStatusChange,
|
||||||
|
storyId: result.storyId,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ const TASK_DB_TO_API = {
|
||||||
IN_PROGRESS: 'in_progress',
|
IN_PROGRESS: 'in_progress',
|
||||||
REVIEW: 'review',
|
REVIEW: 'review',
|
||||||
DONE: 'done',
|
DONE: 'done',
|
||||||
|
FAILED: 'failed',
|
||||||
} as const satisfies Record<TaskStatus, string>
|
} as const satisfies Record<TaskStatus, string>
|
||||||
|
|
||||||
const TASK_API_TO_DB: Record<string, TaskStatus> = {
|
const TASK_API_TO_DB: Record<string, TaskStatus> = {
|
||||||
|
|
@ -12,18 +13,21 @@ const TASK_API_TO_DB: Record<string, TaskStatus> = {
|
||||||
in_progress: 'IN_PROGRESS',
|
in_progress: 'IN_PROGRESS',
|
||||||
review: 'REVIEW',
|
review: 'REVIEW',
|
||||||
done: 'DONE',
|
done: 'DONE',
|
||||||
|
failed: 'FAILED',
|
||||||
}
|
}
|
||||||
|
|
||||||
const STORY_DB_TO_API = {
|
const STORY_DB_TO_API = {
|
||||||
OPEN: 'open',
|
OPEN: 'open',
|
||||||
IN_SPRINT: 'in_sprint',
|
IN_SPRINT: 'in_sprint',
|
||||||
DONE: 'done',
|
DONE: 'done',
|
||||||
|
FAILED: 'failed',
|
||||||
} as const satisfies Record<StoryStatus, string>
|
} as const satisfies Record<StoryStatus, string>
|
||||||
|
|
||||||
const STORY_API_TO_DB: Record<string, StoryStatus> = {
|
const STORY_API_TO_DB: Record<string, StoryStatus> = {
|
||||||
open: 'OPEN',
|
open: 'OPEN',
|
||||||
in_sprint: 'IN_SPRINT',
|
in_sprint: 'IN_SPRINT',
|
||||||
done: 'DONE',
|
done: 'DONE',
|
||||||
|
failed: 'FAILED',
|
||||||
}
|
}
|
||||||
|
|
||||||
export type TaskStatusApi = (typeof TASK_DB_TO_API)[TaskStatus]
|
export type TaskStatusApi = (typeof TASK_DB_TO_API)[TaskStatus]
|
||||||
|
|
|
||||||
|
|
@ -1,42 +0,0 @@
|
||||||
import { z } from 'zod'
|
|
||||||
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'
|
|
||||||
import { prisma } from '../prisma.js'
|
|
||||||
import { requireWriteAccess } from '../auth.js'
|
|
||||||
import { userCanAccessProduct } from '../access.js'
|
|
||||||
import { toolError, toolJson, withToolErrors } from '../errors.js'
|
|
||||||
|
|
||||||
const inputSchema = z.object({
|
|
||||||
title: z.string().min(1),
|
|
||||||
description: z.string().max(2000).optional(),
|
|
||||||
product_id: z.string().min(1).optional(),
|
|
||||||
})
|
|
||||||
|
|
||||||
export function registerCreateTodoTool(server: McpServer) {
|
|
||||||
server.registerTool(
|
|
||||||
'create_todo',
|
|
||||||
{
|
|
||||||
title: 'Create todo',
|
|
||||||
description:
|
|
||||||
'Add a todo for the authenticated user, optionally scoped to a product. ' +
|
|
||||||
'Forbidden for demo accounts.',
|
|
||||||
inputSchema,
|
|
||||||
},
|
|
||||||
async ({ title, description, product_id }) =>
|
|
||||||
withToolErrors(async () => {
|
|
||||||
const auth = await requireWriteAccess()
|
|
||||||
if (product_id && !(await userCanAccessProduct(product_id, auth.userId))) {
|
|
||||||
return toolError(`Product ${product_id} not found or not accessible`)
|
|
||||||
}
|
|
||||||
const todo = await prisma.todo.create({
|
|
||||||
data: {
|
|
||||||
user_id: auth.userId,
|
|
||||||
product_id: product_id ?? null,
|
|
||||||
title,
|
|
||||||
description: description ?? null,
|
|
||||||
},
|
|
||||||
select: { id: true, title: true, description: true, created_at: true },
|
|
||||||
})
|
|
||||||
return toolJson(todo)
|
|
||||||
}),
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
@ -99,19 +99,21 @@ export function registerGetClaudeContextTool(server: McpServer) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const openTodos = await prisma.todo.findMany({
|
const openIdeas = await prisma.idea.findMany({
|
||||||
where: {
|
where: {
|
||||||
user_id: auth.userId,
|
user_id: auth.userId,
|
||||||
done: false,
|
|
||||||
archived: false,
|
archived: false,
|
||||||
|
status: { not: 'PLANNED' },
|
||||||
OR: [{ product_id: product_id }, { product_id: null }],
|
OR: [{ product_id: product_id }, { product_id: null }],
|
||||||
},
|
},
|
||||||
orderBy: { created_at: 'asc' },
|
orderBy: { created_at: 'asc' },
|
||||||
take: 50,
|
take: 50,
|
||||||
select: {
|
select: {
|
||||||
id: true,
|
id: true,
|
||||||
|
code: true,
|
||||||
title: true,
|
title: true,
|
||||||
description: true,
|
description: true,
|
||||||
|
status: true,
|
||||||
created_at: true,
|
created_at: true,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
@ -120,7 +122,7 @@ export function registerGetClaudeContextTool(server: McpServer) {
|
||||||
product,
|
product,
|
||||||
active_sprint: activeSprint,
|
active_sprint: activeSprint,
|
||||||
next_story: nextStory,
|
next_story: nextStory,
|
||||||
open_todos: openTodos,
|
open_ideas: openIdeas,
|
||||||
})
|
})
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ import { resolveRepoRoot } from './wait-for-job.js'
|
||||||
import { pushBranchForJob } from '../git/push.js'
|
import { pushBranchForJob } from '../git/push.js'
|
||||||
import { createPullRequest } from '../git/pr.js'
|
import { createPullRequest } from '../git/pr.js'
|
||||||
import { cancelPbiOnFailure } from '../cancel/pbi-cascade.js'
|
import { cancelPbiOnFailure } from '../cancel/pbi-cascade.js'
|
||||||
|
import { propagateStatusUpwards } from '../lib/tasks-status-update.js'
|
||||||
|
|
||||||
const inputSchema = z.object({
|
const inputSchema = z.object({
|
||||||
job_id: z.string().min(1),
|
job_id: z.string().min(1),
|
||||||
|
|
@ -420,6 +421,25 @@ export function registerUpdateJobStatusTool(server: McpServer) {
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// PBI-46 sprint-flow: propageer Task → Story → PBI → Sprint → SprintRun
|
||||||
|
// bij elke task-statusovergang (DONE of FAILED). De helper handelt ook
|
||||||
|
// sibling-cancel binnen dezelfde SprintRun af bij FAILED.
|
||||||
|
// Idea-jobs hebben geen task_id en worden hier overgeslagen.
|
||||||
|
if (
|
||||||
|
(actualStatus === 'done' || actualStatus === 'failed') &&
|
||||||
|
job.kind === 'TASK_IMPLEMENTATION' &&
|
||||||
|
job.task_id
|
||||||
|
) {
|
||||||
|
try {
|
||||||
|
await propagateStatusUpwards(job.task_id, actualStatus === 'done' ? 'DONE' : 'FAILED')
|
||||||
|
} catch (err) {
|
||||||
|
console.warn(
|
||||||
|
`[update_job_status] propagateStatusUpwards error for task ${job.task_id}:`,
|
||||||
|
err,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// M12: bij failed voor IDEA_*-jobs: zet idea.status op
|
// M12: bij failed voor IDEA_*-jobs: zet idea.status op
|
||||||
// GRILL_FAILED / PLAN_FAILED + log JOB_EVENT. Bij done laten we de
|
// GRILL_FAILED / PLAN_FAILED + log JOB_EVENT. Bij done laten we de
|
||||||
// idea-status met rust — die wordt door update_idea_*_md gezet.
|
// idea-status met rust — die wordt door update_idea_*_md gezet.
|
||||||
|
|
|
||||||
|
|
@ -247,29 +247,47 @@ export async function tryClaimJob(
|
||||||
tokenId: string,
|
tokenId: string,
|
||||||
productId?: string,
|
productId?: string,
|
||||||
): Promise<string | null> {
|
): Promise<string | null> {
|
||||||
// Atomic claim in a single transaction — also captures plan_snapshot from task
|
// Atomic claim in a single transaction — also captures plan_snapshot from task.
|
||||||
|
//
|
||||||
|
// Sprint-flow filter (PBI-46):
|
||||||
|
// Idea-jobs (task_id IS NULL) blijven onafhankelijk claimable.
|
||||||
|
// Task-jobs zijn alleen claimable wanneer ze aan een actieve SprintRun
|
||||||
|
// hangen (status QUEUED of RUNNING). Legacy task-jobs zonder sprint_run_id
|
||||||
|
// en jobs in PAUSED/FAILED/CANCELLED/DONE SprintRuns worden overgeslagen.
|
||||||
|
// Bij eerste claim van een nog QUEUED SprintRun → status RUNNING.
|
||||||
const rows = await prisma.$transaction(async (tx) => {
|
const rows = await prisma.$transaction(async (tx) => {
|
||||||
// SELECT FOR UPDATE OF claude_jobs SKIP LOCKED — LEFT JOIN tasks zodat
|
|
||||||
// idea-jobs (task_id IS NULL, M12) ook gevonden worden. plan_snapshot
|
|
||||||
// blijft dan NULL/'' voor idea-jobs — niet nodig (geen verify-flow).
|
|
||||||
const found = productId
|
const found = productId
|
||||||
? await tx.$queryRaw<Array<{ id: string; implementation_plan: string | null }>>`
|
? await tx.$queryRaw<
|
||||||
SELECT cj.id, t.implementation_plan
|
Array<{ id: string; implementation_plan: string | null; sprint_run_id: string | null }>
|
||||||
|
>`
|
||||||
|
SELECT cj.id, t.implementation_plan, cj.sprint_run_id
|
||||||
FROM claude_jobs cj
|
FROM claude_jobs cj
|
||||||
LEFT JOIN tasks t ON t.id = cj.task_id
|
LEFT JOIN tasks t ON t.id = cj.task_id
|
||||||
|
LEFT JOIN sprint_runs sr ON sr.id = cj.sprint_run_id
|
||||||
WHERE cj.user_id = ${userId}
|
WHERE cj.user_id = ${userId}
|
||||||
AND cj.product_id = ${productId}
|
AND cj.product_id = ${productId}
|
||||||
AND cj.status = 'QUEUED'
|
AND cj.status = 'QUEUED'
|
||||||
|
AND (
|
||||||
|
cj.task_id IS NULL
|
||||||
|
OR (cj.sprint_run_id IS NOT NULL AND sr.status IN ('QUEUED', 'RUNNING'))
|
||||||
|
)
|
||||||
ORDER BY cj.created_at ASC
|
ORDER BY cj.created_at ASC
|
||||||
LIMIT 1
|
LIMIT 1
|
||||||
FOR UPDATE OF cj SKIP LOCKED
|
FOR UPDATE OF cj SKIP LOCKED
|
||||||
`
|
`
|
||||||
: await tx.$queryRaw<Array<{ id: string; implementation_plan: string | null }>>`
|
: await tx.$queryRaw<
|
||||||
SELECT cj.id, t.implementation_plan
|
Array<{ id: string; implementation_plan: string | null; sprint_run_id: string | null }>
|
||||||
|
>`
|
||||||
|
SELECT cj.id, t.implementation_plan, cj.sprint_run_id
|
||||||
FROM claude_jobs cj
|
FROM claude_jobs cj
|
||||||
LEFT JOIN tasks t ON t.id = cj.task_id
|
LEFT JOIN tasks t ON t.id = cj.task_id
|
||||||
|
LEFT JOIN sprint_runs sr ON sr.id = cj.sprint_run_id
|
||||||
WHERE cj.user_id = ${userId}
|
WHERE cj.user_id = ${userId}
|
||||||
AND cj.status = 'QUEUED'
|
AND cj.status = 'QUEUED'
|
||||||
|
AND (
|
||||||
|
cj.task_id IS NULL
|
||||||
|
OR (cj.sprint_run_id IS NOT NULL AND sr.status IN ('QUEUED', 'RUNNING'))
|
||||||
|
)
|
||||||
ORDER BY cj.created_at ASC
|
ORDER BY cj.created_at ASC
|
||||||
LIMIT 1
|
LIMIT 1
|
||||||
FOR UPDATE OF cj SKIP LOCKED
|
FOR UPDATE OF cj SKIP LOCKED
|
||||||
|
|
@ -279,6 +297,7 @@ export async function tryClaimJob(
|
||||||
|
|
||||||
const jobId = found[0].id
|
const jobId = found[0].id
|
||||||
const snapshot = found[0].implementation_plan ?? ''
|
const snapshot = found[0].implementation_plan ?? ''
|
||||||
|
const sprintRunId = found[0].sprint_run_id
|
||||||
await tx.$executeRaw`
|
await tx.$executeRaw`
|
||||||
UPDATE claude_jobs
|
UPDATE claude_jobs
|
||||||
SET status = 'CLAIMED',
|
SET status = 'CLAIMED',
|
||||||
|
|
@ -287,6 +306,19 @@ export async function tryClaimJob(
|
||||||
plan_snapshot = ${snapshot}
|
plan_snapshot = ${snapshot}
|
||||||
WHERE id = ${jobId}
|
WHERE id = ${jobId}
|
||||||
`
|
`
|
||||||
|
|
||||||
|
// SprintRun QUEUED → RUNNING bij eerste claim, in dezelfde tx zodat
|
||||||
|
// concurrent claims dezelfde overgang niet dubbel doen (UPDATE skipt
|
||||||
|
// rows die al RUNNING zijn).
|
||||||
|
if (sprintRunId) {
|
||||||
|
await tx.$executeRaw`
|
||||||
|
UPDATE sprint_runs
|
||||||
|
SET status = 'RUNNING',
|
||||||
|
started_at = COALESCE(started_at, NOW()),
|
||||||
|
updated_at = NOW()
|
||||||
|
WHERE id = ${sprintRunId} AND status = 'QUEUED'
|
||||||
|
`
|
||||||
|
}
|
||||||
return [{ id: jobId }]
|
return [{ id: jobId }]
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,12 +5,16 @@ export interface ClassifyResult {
|
||||||
reasoning: string
|
reasoning: string
|
||||||
}
|
}
|
||||||
|
|
||||||
// Extract changed file paths from a unified diff ("+++ b/<path>" lines).
|
// Extract changed file paths from a unified diff. Reads both "+++ b/<path>"
|
||||||
|
// (created/modified files) and "--- a/<path>" (deleted/modified files), so
|
||||||
|
// pure-delete commits (where +++ is /dev/null) are still recognised.
|
||||||
function extractDiffPaths(diff: string): string[] {
|
function extractDiffPaths(diff: string): string[] {
|
||||||
const paths = new Set<string>()
|
const paths = new Set<string>()
|
||||||
for (const line of diff.split('\n')) {
|
for (const line of diff.split('\n')) {
|
||||||
const m = line.match(/^\+\+\+ b\/(.+)$/)
|
const plus = line.match(/^\+\+\+ b\/(.+)$/)
|
||||||
if (m && m[1].trim() !== '/dev/null') paths.add(m[1].trim())
|
if (plus && plus[1].trim() !== '/dev/null') paths.add(plus[1].trim())
|
||||||
|
const minus = line.match(/^--- a\/(.+)$/)
|
||||||
|
if (minus && minus[1].trim() !== '/dev/null') paths.add(minus[1].trim())
|
||||||
}
|
}
|
||||||
return [...paths]
|
return [...paths]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
2
vendor/scrum4me
vendored
2
vendor/scrum4me
vendored
|
|
@ -1 +1 @@
|
||||||
Subproject commit 555ed8fe89f0a3c9e52098fa0590ab8ba16e357a
|
Subproject commit 77617e89ac830bc4a86fa7d41f16a5122a1d9689
|
||||||
Loading…
Add table
Add a link
Reference in a new issue