fix: idea-jobs cannot mark done — skip verify-gate (v0.6.2)
T-505 in v0.6.0 wired the idea-failure side-effects but missed the
'skip verify-gate for IDEA_*-kinds on done' branch from the M12 plan.
Reproduced live on IDEA-002: agent answered 5 questions, called
update_idea_grill_md (status → GRILLED, grill_md persisted), but
update_job_status('done') was rejected by the verify-gate because
idea-jobs have no task → no plan_snapshot → verify_task_against_plan
cannot run. Job got marked FAILED + idea reverted to GRILL_FAILED
even though the grill itself succeeded.
Fix: in update_job_status, when status='done' AND kind in
[IDEA_GRILL, IDEA_MAKE_PLAN]: skip checkVerifyGate AND
prepareDoneUpdate (no git push, no branch). The idea-status was
already moved to GRILLED/PLAN_READY by update_idea_*_md; the job
just needs to flip to DONE.
Tests: 153/153 still green.
Bump 0.6.1 → 0.6.2.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
dc43351831
commit
536a27592c
2 changed files with 24 additions and 14 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "scrum4me-mcp",
|
"name": "scrum4me-mcp",
|
||||||
"version": "0.6.1",
|
"version": "0.6.2",
|
||||||
"description": "MCP server for Scrum4Me — exposes dev-flow tools and prompts via the Model Context Protocol",
|
"description": "MCP server for Scrum4Me — exposes dev-flow tools and prompts via the Model Context Protocol",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"bin": {
|
"bin": {
|
||||||
|
|
|
||||||
|
|
@ -306,20 +306,30 @@ export function registerUpdateJobStatusTool(server: McpServer) {
|
||||||
let skipWorktreeCleanup = false
|
let skipWorktreeCleanup = false
|
||||||
|
|
||||||
if (status === 'done') {
|
if (status === 'done') {
|
||||||
const gate = checkVerifyGate(
|
// M12: idea-jobs hebben geen task/plan_snapshot/branch — skip de
|
||||||
job.verify_result ?? null,
|
// verify-gate én de prepareDoneUpdate (die doet git push). Voor
|
||||||
job.task?.verify_only ?? false,
|
// idea-jobs is `done` direct geldig: de bijhorende update_idea_*_md
|
||||||
(job.task?.verify_required ?? 'ALIGNED_OR_PARTIAL') as VerifyRequired,
|
// heeft de idea-status al naar GRILLED/PLAN_READY gezet.
|
||||||
summary,
|
if (job.kind === 'IDEA_GRILL' || job.kind === 'IDEA_MAKE_PLAN') {
|
||||||
)
|
actualStatus = 'done'
|
||||||
if (!gate.allowed) return toolError(gate.error)
|
// pushedAt blijft undefined, branch/error overrides ook
|
||||||
|
skipWorktreeCleanup = true
|
||||||
|
} else {
|
||||||
|
const gate = checkVerifyGate(
|
||||||
|
job.verify_result ?? null,
|
||||||
|
job.task?.verify_only ?? false,
|
||||||
|
(job.task?.verify_required ?? 'ALIGNED_OR_PARTIAL') as VerifyRequired,
|
||||||
|
summary,
|
||||||
|
)
|
||||||
|
if (!gate.allowed) return toolError(gate.error)
|
||||||
|
|
||||||
const plan = await prepareDoneUpdate(job_id, branch)
|
const plan = await prepareDoneUpdate(job_id, branch)
|
||||||
actualStatus = plan.dbStatus === 'DONE' ? 'done' : 'failed'
|
actualStatus = plan.dbStatus === 'DONE' ? 'done' : 'failed'
|
||||||
pushedAt = plan.pushedAt
|
pushedAt = plan.pushedAt
|
||||||
if (plan.branchOverride !== undefined) branchToWrite = plan.branchOverride
|
if (plan.branchOverride !== undefined) branchToWrite = plan.branchOverride
|
||||||
if (plan.errorOverride !== undefined) errorToWrite = plan.errorOverride
|
if (plan.errorOverride !== undefined) errorToWrite = plan.errorOverride
|
||||||
skipWorktreeCleanup = plan.skipWorktreeCleanup
|
skipWorktreeCleanup = plan.skipWorktreeCleanup
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Auto-PR: best-effort, only when push actually happened.
|
// Auto-PR: best-effort, only when push actually happened.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue