Skip to content

[Bug]: approvals with status "needs-revision" are not deleted during cleanup #114

Description

@yshrsmz

What happened?

When an approval request goes through multiple revision cycles, old approval requests with needs-revision status remain in the system and cannot be deleted, even after the final revised version is approved. This clutters the approval history with obsolete revision requests.

Current Behavior

  1. Create an approval request → gets needs-revision status
  2. Revise and create a new approval request → gets needs-revision status
  3. Revise again and create final approval request → gets approved status
  4. Try to clean up old needs-revision requests → BLOCKED, cannot delete

Component

MCP Server

Steps to Reproduce

  1. Request approval for a document: approvals action:"request"
  2. Mark it as needs-revision in dashboard
  3. Create a new approval request for the revised document
  4. Repeat steps 2-3 a few times
  5. Finally approve one version
  6. Try to delete old needs-revision requests: approvals action:"delete"
  7. Result: Deletion blocked for needs-revision requests

Expected Behavior

Option 1 (Automatic Cleanup):

When a final revision of an approval request is approved, automatically clean up all
previous needs-revision versions for the same document/category.

Option 2 (Allow Manual Cleanup):

Allow deletion of needs-revision approval requests without blocking, especially when:

  • A newer version for the same document exists and is approved
  • The workflow has progressed past that phase

Option 3 (Cascade Status):

When a final revision is approved, update the status of all previous revisions to
something like superseded or obsolete, and allow their deletion.

Error Output (if any)

**Error when attempting to delete:**


{
  "success": false,
  "message": "BLOCKED: Cannot proceed - status is \"needs-revision\". VERBAL APPROVAL NOT ACCEPTED.",
  "data": {
    "approvalId": "approval_1759676951468_wkcxtkb1m",
    "currentStatus": "needs-revision",
    "title": "Product Overview Document",
    "blockProgress": true,
    "canProceed": false
  }
}

Version

1.0.1

Operating System

macOS

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions