@bli-cockpit/cli 0.2.24 → 0.2.25

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.
@@ -2530,6 +2530,31 @@ async function runSyncLocked(command, io) {
2530
2530
  writeLine(io.stdout, rawEvidenceGcSummary(gc));
2531
2531
  return syncResult(run);
2532
2532
  }
2533
+ // Zero worktrees is a legitimate steady state, not a failure: an approved
2534
+ // root can hold no git repos, and sessions upload independently of
2535
+ // worktrees (session-first, BLI-2581). This used to throw "Sync produced no
2536
+ // result", which painted ~90 false-red sync_failed receipts per day on one
2537
+ // fleet machine with a single empty root and taught people to ignore
2538
+ // sync_failed (BLI-2722). A genuinely broken run still fails via run.ok.
2539
+ if (run.outcomes.length === 0) {
2540
+ const runStatus = attributedSyncRunStatus(run);
2541
+ const gc = run.ok ? await runSyncRawEvidenceGc(command, io) : null;
2542
+ if (command.json) {
2543
+ writeLine(io.stdout, JSON.stringify({
2544
+ mode: "no_worktrees",
2545
+ status: runStatus,
2546
+ collection_complete: run.ok,
2547
+ codex_sessions: run.summary,
2548
+ raw_evidence_gc: gc,
2549
+ }, null, 2));
2550
+ return syncResult(run);
2551
+ }
2552
+ writeLine(run.ok ? io.stdout : io.stderr, `Cockpit sync ${runStatus}: no git worktrees under this root; session scan ran.`);
2553
+ writeAgentSessionSummary(io, run.summary);
2554
+ if (gc && !gc.skipped)
2555
+ writeLine(io.stdout, rawEvidenceGcSummary(gc));
2556
+ return syncResult(run);
2557
+ }
2533
2558
  const result = run.outcomes[0]?.sync;
2534
2559
  if (!result) {
2535
2560
  throw new Error("Sync produced no result for the repo worktree.");
@@ -15,7 +15,7 @@ export async function runCockpitCli(argv, io) {
15
15
  }
16
16
 
17
17
  if (command === "--version" || command === "-V" || command === "version") {
18
- writeLine(io?.stdout ?? process.stdout, "0.2.24");
18
+ writeLine(io?.stdout ?? process.stdout, "0.2.25");
19
19
  return 0;
20
20
  }
21
21
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bli-cockpit/cli",
3
- "version": "0.2.24",
3
+ "version": "0.2.25",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "bin": {