claude/reprocess-bracket-scoring-mbkfa4 #128

Merged
chrisp merged 3 commits from claude/reprocess-bracket-scoring-mbkfa4 into main 2026-07-04 04:09:10 +00:00
Showing only changes of commit 12c165a481 - Show all commits

View file

@ -772,12 +772,16 @@ export async function action({ request, params }: Route.ActionArgs) {
if (event.isPrimary && event.tournamentId) {
try {
const report = await syncMajorFromPrimaryEvent(event.id, { markComplete: false });
let fanout = ` Synced ${report.windowsSynced} mirror window(s).`;
// Surface a partial fan-out as an error so it renders as a warning
// banner, not a green success the admin might skim past while some
// mirror windows are left stale.
if (report.windowsFailed > 0) {
const reasons = report.failures.map((f) => f.error).join("; ");
fanout = ` Synced ${report.windowsSynced} mirror window(s); ${report.windowsFailed} failed: ${reasons}`;
return {
error: `${baseMessage} Synced ${report.windowsSynced} mirror window(s), but ${report.windowsFailed} failed (those windows may be stale): ${reasons}`,
};
}
return { success: `${baseMessage}${fanout}` };
return { success: `${baseMessage} Synced ${report.windowsSynced} mirror window(s).` };
} catch (error) {
return {
error: `Primary window recomputed, but mirror fan-out failed (mirror windows may be stale): ${error instanceof Error ? error.message : String(error)}`,