fix(orchestration): expose queued Gate1 expiry and audited renewal
Deploy Canina / deploy (push) Successful in 4m51s

This commit is contained in:
devops authored and devops committed 2026-10-24 09:53:07 +00:00
1 parent 6e465663bd
commit 60a4e14b4b
12 files changed
+162 -12

No files matched your search

@@ -252,7 +252,13 @@ export class EditorialExecutionService {
throw new ForbiddenException('Artifact binding mismatch');
result = { kind, sha256: artifact.sha256, bytes, brief: parsed.brief };
}
const approval = await tx.orchestrationApprovalDecision.findFirst({
where: { taskId: t.id, gate: 1 }, orderBy: { createdAt: 'desc' },
});
const valid = approval?.decision === 'APPROVED' && approval.actorId !== 'pmo' && approval.expiresAt > new Date();
return {
displayState: t.state === 'READY' && !valid ? (approval?.decision === 'APPROVED' && approval.actorId !== 'pmo' && approval.expiresAt <= new Date() ? 'GATE1_RENEWAL_REQUIRED' : 'BLOCKED') : t.state,
gate1Validity: valid ? 'VALID' : 'BLOCKED',
taskId: t.id,
pilotKind: EDITORIAL_PILOT_KIND,
state: t.state,