Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

fix(integrity): stop counting dead-link findings as review-queue entries (#3750) (#3751)

Masad92f0dc86fc0
diff --git a/src/commands/integrity.ts b/src/commands/integrity.ts
index 42bfdef3db..fd74c74834 100644
--- a/src/commands/integrity.ts
+++ b/src/commands/integrity.ts
@@ -449,6 +449,7 @@ async function cmdAuto(args: string[]): Promise<void> {
let bucketReview = 0;
let bucketSkip = 0;
let bucketErr = 0;
+ let bucketDeadLink = 0;
let pagesProcessed = 0;
const { createProgress } = await import('../core/progress.ts');
@@ -549,7 +550,13 @@ async function cmdAuto(args: string[]): Promise<void> {
hit: { slug, line: hit.line, rawLine: hit.url, phrase: 'dead-link' },
reason: `dead link: ${result.value.reason ?? 'unknown'}`,
});
- bucketReview++;
+ // Dead links have no confidence score and are never written to
+ // the review file (appendReview() is only called from the
+ // bare-tweet path above) — they land in the skip log via
+ // logSkip() a few lines up. Count them separately so the
+ // printed "Review queue" total only ever reflects what's
+ // actually in ~/.gbrain/integrity-review.md.
+ bucketDeadLink++;
}
} catch {
/* transient; don't fail the run */
@@ -568,6 +575,7 @@ async function cmdAuto(args: string[]): Promise<void> {
console.log(`Review queue (≥${reviewLower} <${confidenceThreshold}): ${bucketReview}`);
console.log(`Skipped (<${reviewLower}): ${bucketSkip}`);
if (bucketErr > 0) console.log(`Resolver errors: ${bucketErr}`);
+ if (bucketDeadLink > 0) console.log(`Dead links surfaced (see skipped log): ${bucketDeadLink}`);
console.log(`\nReview queue: ${getReviewFile()}`);
console.log(`Skipped log: ${getLogFile()}`);
console.log(`Progress: ${getProgressFile()}`);