# UpdatePipelineItemComment

## Permission Scope

itemComment

## Overview

Updates the body of an existing item comment. Only the original author may update their own comment.

## Business Rules

- Comment must exist
- Calling user must be the original author of the comment
- New body must be non-empty
- `updatedAt` is set to the current timestamp on success
- Consumer extension fields (declared via the `fields` extension point) are passed through to the update; module-managed columns (`id`, `itemId`, `authorUserId`, timestamps) are stripped and cannot be set this way

## Process Flow

```mermaid
flowchart TD
    A[Receive updatePipelineItemComment input] --> B{Comment exists?}
    B -->|No| C[Return COMMENT_NOT_FOUND]
    B -->|Yes| D{Caller is original author?}
    D -->|No| E[Return FORBIDDEN]
    D -->|Yes| F{New body non-empty?}
    F -->|No| G[Return INVALID_BODY]
    F -->|Yes| H[Update body and updatedAt]
    H --> I[Return updated PipelineItemComment]
```

## External Dependencies

- None

## Error Scenarios

- **COMMENT_NOT_FOUND**: Specified comment ID does not exist
- **FORBIDDEN**: Calling user is not the original author
- **INVALID_BODY**: Body is empty

## Test Cases

- author can update the body of their own comment
- passes extension fields through but strips reserved model columns
- non-author update is rejected with FORBIDDEN
- empty body update is rejected with INVALID_BODY
- updatedAt advances to the current timestamp on success
- returns error when comment does not exist
