style: format paired stepdone telemetry files
This commit is contained in:
@@ -1,7 +1,5 @@
|
|||||||
import { getPairedTurnOutputs } from './db.js';
|
import { getPairedTurnOutputs } from './db.js';
|
||||||
import {
|
import { type VisibleVerdict } from './paired-execution-context-shared.js';
|
||||||
type VisibleVerdict,
|
|
||||||
} from './paired-execution-context-shared.js';
|
|
||||||
import { resolveStoredVisibleVerdict } from './paired-verdict.js';
|
import { resolveStoredVisibleVerdict } from './paired-verdict.js';
|
||||||
import {
|
import {
|
||||||
matchesExpectedPairedFollowUpIntent,
|
matchesExpectedPairedFollowUpIntent,
|
||||||
@@ -59,7 +57,9 @@ export function resolveLatestPairedTurnOutputContext(args: {
|
|||||||
resolveStoredVisibleVerdict({
|
resolveStoredVisibleVerdict({
|
||||||
verdict: latestOutput?.verdict ?? null,
|
verdict: latestOutput?.verdict ?? null,
|
||||||
outputText: latestOutput?.output_text ?? null,
|
outputText: latestOutput?.output_text ?? null,
|
||||||
}) ?? args.fallbackLastTurnOutputVerdict ?? null,
|
}) ??
|
||||||
|
args.fallbackLastTurnOutputVerdict ??
|
||||||
|
null,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -401,7 +401,10 @@ export function createMessageRuntime(deps: MessageRuntimeDeps): {
|
|||||||
: null;
|
: null;
|
||||||
let openWorkItem = getOpenWorkItemForChat(chatJid, SERVICE_SESSION_SCOPE);
|
let openWorkItem = getOpenWorkItemForChat(chatJid, SERVICE_SESSION_SCOPE);
|
||||||
if (openWorkItem?.delivery_role === 'owner' && pendingTask) {
|
if (openWorkItem?.delivery_role === 'owner' && pendingTask) {
|
||||||
const freshHumanMessages = getFreshHumanPreflightMessages(chatJid, channel);
|
const freshHumanMessages = getFreshHumanPreflightMessages(
|
||||||
|
chatJid,
|
||||||
|
channel,
|
||||||
|
);
|
||||||
if (
|
if (
|
||||||
pendingTask.status === 'merge_ready' &&
|
pendingTask.status === 'merge_ready' &&
|
||||||
freshHumanMessages.length > 0
|
freshHumanMessages.length > 0
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ function handleOwnerFinalizeCompletion(args: {
|
|||||||
const nextFinalizeStepDoneCount =
|
const nextFinalizeStepDoneCount =
|
||||||
ownerVerdict === 'step_done'
|
ownerVerdict === 'step_done'
|
||||||
? (task.finalize_step_done_count ?? 0) + 1
|
? (task.finalize_step_done_count ?? 0) + 1
|
||||||
: task.finalize_step_done_count ?? 0;
|
: (task.finalize_step_done_count ?? 0);
|
||||||
const nextEmptyStepDoneStreak =
|
const nextEmptyStepDoneStreak =
|
||||||
ownerVerdict === 'step_done' && hasNewChanges === false
|
ownerVerdict === 'step_done' && hasNewChanges === false
|
||||||
? (task.empty_step_done_streak ?? 0) + 1
|
? (task.empty_step_done_streak ?? 0) + 1
|
||||||
|
|||||||
@@ -3,10 +3,7 @@ import { execFileSync } from 'child_process';
|
|||||||
import { isArbiterEnabled } from './config.js';
|
import { isArbiterEnabled } from './config.js';
|
||||||
import { updatePairedTaskIfUnchanged } from './db.js';
|
import { updatePairedTaskIfUnchanged } from './db.js';
|
||||||
import { logger } from './logger.js';
|
import { logger } from './logger.js';
|
||||||
import {
|
import { parseVisibleVerdict, type VisibleVerdict } from './paired-verdict.js';
|
||||||
parseVisibleVerdict,
|
|
||||||
type VisibleVerdict,
|
|
||||||
} from './paired-verdict.js';
|
|
||||||
import type { PairedTaskStatus } from './types.js';
|
import type { PairedTaskStatus } from './types.js';
|
||||||
|
|
||||||
export type CompletionSignal =
|
export type CompletionSignal =
|
||||||
|
|||||||
@@ -15,8 +15,7 @@ export function parseVisibleVerdict(
|
|||||||
if (!cleaned) return 'continue';
|
if (!cleaned) return 'continue';
|
||||||
const firstLine = cleaned.split('\n')[0].trim();
|
const firstLine = cleaned.split('\n')[0].trim();
|
||||||
if (/^\*{0,2}BLOCKED\*{0,2}\b/i.test(firstLine)) return 'blocked';
|
if (/^\*{0,2}BLOCKED\*{0,2}\b/i.test(firstLine)) return 'blocked';
|
||||||
if (/^\*{0,2}NEEDS_CONTEXT\*{0,2}\b/i.test(firstLine))
|
if (/^\*{0,2}NEEDS_CONTEXT\*{0,2}\b/i.test(firstLine)) return 'needs_context';
|
||||||
return 'needs_context';
|
|
||||||
if (/^\*{0,2}STEP_DONE\*{0,2}\b/i.test(firstLine)) return 'step_done';
|
if (/^\*{0,2}STEP_DONE\*{0,2}\b/i.test(firstLine)) return 'step_done';
|
||||||
if (/^\*{0,2}TASK_DONE\*{0,2}\b/i.test(firstLine)) return 'task_done';
|
if (/^\*{0,2}TASK_DONE\*{0,2}\b/i.test(firstLine)) return 'task_done';
|
||||||
if (/^\*{0,2}DONE_WITH_CONCERNS\*{0,2}\b/i.test(firstLine))
|
if (/^\*{0,2}DONE_WITH_CONCERNS\*{0,2}\b/i.test(firstLine))
|
||||||
|
|||||||
Reference in New Issue
Block a user