-
Notifications
You must be signed in to change notification settings - Fork 16
Description
Bug
pipeline.stage.record with status in_progress is rejected by Layer 1 schema validation, even though in_progress is a valid LIFECYCLE_STAGE_STATUSES value.
Root Cause
The Layer 1 validator checks all status fields against TASK_STATUSES (pending, active, blocked, done, cancelled, archived) regardless of domain. The sanitizer middleware is correctly domain-aware — for pipeline.stage.record it routes to LIFECYCLE_STAGE_STATUSES (not_started, in_progress, blocked, completed, skipped, failed). But Layer 1 runs first and rejects before the sanitizer ever sees it.
Reproduction
cleo_mutate({ domain: "pipeline", operation: "stage.record", params: { epicId: "T067", stage: "research", status: "in_progress" }})
Returns:
E_INVALID_STATUS: Invalid status: in_progress
Must be one of: pending, active, blocked, done, cancelled, archived
Expected
in_progress should be accepted for pipeline.stage.record since it's a valid lifecycle stage status per ADR-018.
Suggested Fix
Make the Layer 1 status check domain-aware, same pattern the sanitizer already uses:
const isLifecycleStage = context.domain === 'pipeline' &&
context.operation?.startsWith('stage.');
const validStatuses = isLifecycleStage
? LIFECYCLE_STAGE_STATUSES
: TASK_STATUSES;Environment
- CLEO MCP server (installed via npm)
- Claude Code 2.1.52