mirror of
https://github.com/garrytan/gbrain.git
synced 2026-08-14 00:48:18 +00:00
The dead-link branch in cmdAuto called logSkip() (writing to integrity.log.jsonl) but incremented bucketReview, the same counter fed by the bare-tweet path's appendReview() calls (which write to integrity-review.md). The printed "Review queue" summary line therefore included findings that were never written to the review file, so `gbrain integrity review` silently disagreed with `integrity auto`'s own summary. Give dead-link findings their own counter (bucketDeadLink) and print it as a separate line. No change to bare-tweet bucketing or CLI surface.
This commit is contained in:
@@ -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()}`);
|
||||
|
||||
Reference in New Issue
Block a user