fix(FN-4092): resolve lint/typecheck issues from verification
Fusion-Task-Id: FN-4092 Fusion-Task-Lineage: fcee3a44-5c36-4899-bf9d-835d36abdf2e
This commit is contained in:
@@ -4639,20 +4639,22 @@ export class TaskExecutor {
|
||||
break;
|
||||
}
|
||||
default:
|
||||
if (reviewType === "plan" || reviewType === "spec") {
|
||||
const isAdvisoryReview = reviewType === "plan" || reviewType === ("spec" as typeof reviewType);
|
||||
if (isAdvisoryReview) {
|
||||
const key = `${reviewType}:${step}`;
|
||||
const count = (planSpecUnavailableCounts.get(key) ?? 0) + 1;
|
||||
planSpecUnavailableCounts.set(key, count);
|
||||
const advisoryMessage = `${reviewType} review Step ${step}: UNAVAILABLE — proceeding advisory after fallback retry exhausted`;
|
||||
const advisoryType = reviewType === "plan" ? "plan" : "spec";
|
||||
const advisoryMessage = `${advisoryType} review Step ${step}: UNAVAILABLE — proceeding advisory after fallback retry exhausted`;
|
||||
await store.logEntry(taskId, advisoryMessage);
|
||||
reviewerLog.warn(`${taskId}: ${advisoryMessage}`);
|
||||
if (count >= 2) {
|
||||
await store.logEntry(
|
||||
taskId,
|
||||
`${reviewType} review Step ${step}: repeated UNAVAILABLE (${count}) — advisory continuation active; operator may inspect reviewer logs in dashboard`,
|
||||
`${advisoryType} review Step ${step}: repeated UNAVAILABLE (${count}) — advisory continuation active; operator may inspect reviewer logs in dashboard`,
|
||||
);
|
||||
}
|
||||
text = `UNAVAILABLE (advisory) — reviewer could not produce a verdict after fallback retry. ${reviewType === "plan" ? "Plan" : "Spec"} reviews are advisory; proceed with implementation. Do NOT re-call fn_review_step for the ${reviewType} of Step ${step}.`;
|
||||
text = `UNAVAILABLE (advisory) — reviewer could not produce a verdict after fallback retry. ${advisoryType === "plan" ? "Plan" : "Spec"} reviews are advisory; proceed with implementation. Do NOT re-call fn_review_step for the ${advisoryType} of Step ${step}.`;
|
||||
} else {
|
||||
const blockingMessage = `code review Step ${step}: UNAVAILABLE — blocking until reviewer returns a usable verdict`;
|
||||
await store.logEntry(taskId, blockingMessage);
|
||||
|
||||
@@ -634,7 +634,7 @@ export async function reviewStep(
|
||||
return { verdict, review: reviewText, summary };
|
||||
};
|
||||
|
||||
const fallbackReviewRequest = `${request}\n\nIMPORTANT: Respond with exactly one of: APPROVE | REVISE | RETHINK on a line starting with \"Verdict:\".`;
|
||||
const fallbackReviewRequest = `${request}\n\nIMPORTANT: Respond with exactly one of: APPROVE | REVISE | RETHINK on a line starting with "Verdict:".`;
|
||||
|
||||
const logFallbackRetry = async (reason: string, mode: string): Promise<void> => {
|
||||
const message = `${reviewType} review retry with fallback model after ${reason} (${mode})`;
|
||||
|
||||
Reference in New Issue
Block a user