forked from anomalyco/opencode
-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
Task Description
taskctl verdict fails with:
Cannot update immutable fields: pipeline. Use specialized methods for comments and pipeline events.
The adversarial agent calls taskctl verdict to submit its review, but the verdict command handler in tool.ts (line 976) calls Store.updateTask without the allowImmutable=true third argument, hitting the immutability guard on the pipeline field.
Root Cause
Same class of bug as #265 (retry/override). PR #266 fixed retry and override but missed verdict.
// Line 976 — missing true as third argument
await Store.updateTask(projectId, taskId, {
status: "review",
pipeline: { ...task!.pipeline, adversarial_verdict: verdictData, stage: "reviewing" }
})Fix
Add true as the third argument:
await Store.updateTask(projectId, taskId, {
status: "review",
pipeline: { ...task!.pipeline, adversarial_verdict: verdictData, stage: "reviewing" }
}, true)Quality Gates (Non-Negotiable)
- TDD: Write failing test first
- Coverage: test that verdict command succeeds on a task in adversarial-running stage
- Linting passes
- Local verification: all tests pass
Acceptance Criteria
taskctl verdictsuccessfully records an APPROVED verdict without throwing- Test in
packages/opencode/test/tasks/verifies the verdict is stored and task transitions toreviewing
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels