fix: Fix review task completion bug + add initiative-level Request Changes
Critical: review/merge tasks hit an early return in handleTaskCompleted() that skipped the phase completion check, leaving phases stuck in in_progress forever. Changed to an if-block wrapping only the merge step. Also adds requestChangesOnInitiative() which creates/reuses a "Finalization" phase for initiative-level review feedback, with dedup guards for both phase and initiative request-changes flows.
This commit is contained in:
@@ -52,6 +52,7 @@ export type {
|
||||
AccountCredentialsValidatedEvent,
|
||||
InitiativePendingReviewEvent,
|
||||
InitiativeReviewApprovedEvent,
|
||||
InitiativeChangesRequestedEvent,
|
||||
DomainEventMap,
|
||||
DomainEventType,
|
||||
} from './types.js';
|
||||
|
||||
@@ -591,6 +591,15 @@ export interface InitiativeReviewApprovedEvent extends DomainEvent {
|
||||
};
|
||||
}
|
||||
|
||||
export interface InitiativeChangesRequestedEvent extends DomainEvent {
|
||||
type: 'initiative:changes_requested';
|
||||
payload: {
|
||||
initiativeId: string;
|
||||
phaseId: string;
|
||||
taskId: string;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Chat Session Events
|
||||
*/
|
||||
@@ -668,7 +677,8 @@ export type DomainEventMap =
|
||||
| ChatMessageCreatedEvent
|
||||
| ChatSessionClosedEvent
|
||||
| InitiativePendingReviewEvent
|
||||
| InitiativeReviewApprovedEvent;
|
||||
| InitiativeReviewApprovedEvent
|
||||
| InitiativeChangesRequestedEvent;
|
||||
|
||||
/**
|
||||
* Event type literal union for type checking
|
||||
|
||||
Reference in New Issue
Block a user