summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorClaude <noreply@anthropic.com>2026-10-08 16:33:07 +0000
committerClaude <noreply@anthropic.com>2026-10-08 16:33:07 +0000
commit0baf7d19f0b2ad785746af2c868adbbf46d47f24 (patch)
tree9f97c1d56fdec456fd9bb3a4378678fae5927222 /plugins
parent4da1090e76e4512e0382be51becc11186e0fd90d (diff)
receipts: report git unavailable when a clone errored and none found commitsclaude/receipts-query-all-clones
Diffstat (limited to 'plugins')
-rw-r--r--plugins/receipts/skills/receipts/scripts/mine-transcripts.mjs15
1 files changed, 8 insertions, 7 deletions
diff --git a/plugins/receipts/skills/receipts/scripts/mine-transcripts.mjs b/plugins/receipts/skills/receipts/scripts/mine-transcripts.mjs
index dfb00cd9..43ab5547 100644
--- a/plugins/receipts/skills/receipts/scripts/mine-transcripts.mjs
+++ b/plugins/receipts/skills/receipts/scripts/mine-transcripts.mjs
@@ -922,14 +922,15 @@ for (const [name, agg] of Object.entries(byRepo)) {
for (const c of raw) byShaForRepo.set(c.sha, c.date);
}
}
- // Only fall back to "couldn't tell" when NO clone produced usable data —
- // one stale or broken clone must not hide the answer another clone already
- // gave for the same project.
- const gitFailed = sawFailedClone && !sawUsableClone;
+ // A clone that errored may hold exactly the commits the others lack, so a
+ // zero alongside a failure is "couldn't tell", not "none". Commits found in
+ // a clone that answered still count: a broken sibling must not hide them.
+ const gitFailed = sawFailedClone && byShaForRepo.size === 0;
if (gitFailed) anyGitError = true;
- const commits = sawUsableClone
- ? [...byShaForRepo].map(([sha, date]) => ({ sha, date }))
- : null;
+ const commits =
+ sawUsableClone && !gitFailed
+ ? [...byShaForRepo].map(([sha, date]) => ({ sha, date }))
+ : null;
let gitActiveDayOverlap = null;
if (commits) {