(args: {
handoffBody: string;
runBranches: ReadonlyArray<{ branch?: string | null }>;
fallback: string;
})
| 32 | * before the first successful handoff). |
| 33 | */ |
| 34 | export function resolveRunBranch(args: { |
| 35 | handoffBody: string; |
| 36 | runBranches: ReadonlyArray<{ branch?: string | null }>; |
| 37 | fallback: string; |
| 38 | }): string { |
| 39 | const fromBody = parseHandoffBranch(args.handoffBody); |
| 40 | if (fromBody) return fromBody; |
| 41 | for (const b of args.runBranches) { |
| 42 | const trimmed = b.branch?.trim(); |
| 43 | if (trimmed) return trimmed; |
| 44 | } |
| 45 | return args.fallback; |
| 46 | } |
| 47 | |
| 48 | /** |
| 49 | * Extract a verification verdict from a handoff body. Reads the canonical |
no test coverage detected