File size: 1,936 Bytes
65d68f5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import {
  createPhysicsBatchCurationReport,
  type PhysicsSeedFactoryReport,
} from "./physicsLessonSeedFactory";

export type { PhysicsSeedFactoryReport };

export function buildPhysicsSeedFactoryReport(): PhysicsSeedFactoryReport {
  return createPhysicsBatchCurationReport();
}

export function formatPhysicsSeedFactoryReport(report: PhysicsSeedFactoryReport): string {
  const lines: string[] = [];
  lines.push(`Total Physics chapters: ${report.totalPhysicsChapters}`);
  lines.push(`Curated chapters (teachable): ${report.curatedChapters.join(", ") || "none"}`);
  lines.push(`Uncurated chapters: ${report.uncuratedChapters.join(", ") || "none"}`);
  lines.push(`Source-repaired chapters: ${report.sourceRepairedChapters.join(", ") || "none"}`);
  lines.push(
    `Curation-ready (source repaired, final seeds MISSING, NOT teachable): ${
      report.curationReadyChapters.join(", ") || "none"
    }`,
  );
  lines.push(`Draftable chapters: ${report.draftableChapters.join(", ") || "none"}`);
  lines.push(
    `Blocked chapters: ${
      report.blockedChapters.map((chapter) => `${chapter.chapterId} (${chapter.reason})`).join(", ") || "none"
    }`,
  );
  lines.push(`Next recommended batch: ${report.nextRecommendedBatch.join(", ") || "none"}`);
  lines.push(`Next recommended action: ${report.nextRecommendedAction}`);
  lines.push("Coverage by chapter:");
  for (const chapter of report.coverageByChapter) {
    lines.push(
      `- ${chapter.chapterId} ${chapter.chapterTitle}: [${chapter.curationStatus}] ${chapter.sourceConfidence}` +
        `${chapter.sourceRepaired ? ", source_repaired" : ""}, curated=${chapter.curatedSeedCount}` +
        `, finalSeeds=${chapter.finalSeedsPresent ? "present" : "missing"}, missing=${chapter.missingMissionTypes.join(", ") || "none"}`,
    );
    if (chapter.warnings.length) {
      lines.push(`  warnings: ${chapter.warnings.join("; ")}`);
    }
  }
  return lines.join("\n");
}