@oss-autopilot/core 3.33.1 → 3.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -54,7 +54,7 @@ export function handleCommandError(err, json) {
54
54
  * interface and its `*.contract.test.ts` golden snapshot is the only
55
55
  * shape gate. Nothing fires at runtime if the producer drifts after
56
56
  * the goldens were last updated.
57
- * Commands: state (show/sync/unlink), vet, vet-list, track, comments,
57
+ * Commands: state (show/sync/unlink), vet, vet-list, ledger-backfill, eval, track, comments,
58
58
  * startup, dismiss, undismiss, stats, and the five
59
59
  * guidelines subcommands (list/view/store/reset/fetch-corpus/mark-extracted).
60
60
  *
@@ -578,6 +578,43 @@ export const commands = [
578
578
  }));
579
579
  },
580
580
  },
581
+ // ── Ledger Backfill ────────────────────────────────────────────────────
582
+ {
583
+ name: 'ledger-backfill',
584
+ register(program) {
585
+ program
586
+ .command('ledger-backfill')
587
+ .description('Fill missing outcome-ledger fields: opened date, closing issue, close reason, list vet score (#1824)')
588
+ .option('--path <file>', 'Path to issue list file (auto-detected if not specified)')
589
+ .option('--json', 'Output as JSON')
590
+ .action((options) => executeAction(options, async () => {
591
+ const { runLedgerBackfill } = await import('./commands/ledger-backfill.js');
592
+ return runLedgerBackfill({ issueListPath: options.path });
593
+ }, (data) => {
594
+ console.log(`\nQueried ${data.queried} ledger PRs (${data.unresolved} unresolved).`);
595
+ const f = data.filled;
596
+ console.log(` Filled: openedAt ${f.openedAt}, issueUrl ${f.issueUrl}, closeReason ${f.closeReason}, pick ${f.pick}`);
597
+ console.log(` List files scanned: ${data.listFiles.length}`);
598
+ if (data.gistSyncWarning)
599
+ console.log(` Warning: ${data.gistSyncWarning}`);
600
+ }));
601
+ },
602
+ },
603
+ // ── Eval ───────────────────────────────────────────────────────────────
604
+ {
605
+ name: 'eval',
606
+ localOnly: true,
607
+ register(program) {
608
+ program
609
+ .command('eval')
610
+ .description('Calibration and outcome report from the outcome ledger (#1825)')
611
+ .option('--json', 'Output as JSON')
612
+ .action((options) => executeAction(options, async () => {
613
+ const { runEval } = await import('./commands/eval.js');
614
+ return runEval();
615
+ }, (data) => console.log(data.markdown)));
616
+ },
617
+ },
581
618
  // ── Skip Add ───────────────────────────────────────────────────────────
582
619
  {
583
620
  name: 'skip-add',