fix: use nullish coalescing for confidence default + add 3 tests (round 85)

Fix confidence=0 showing 80% instead of 0% in patterns() (|| → ??).
Test evaluate-session.js config parse error catch, getSessionIdShort
fallback at root CWD, and precise confidence=0 assertion.
This commit is contained in:
Affaan Mustafa
2026-02-13 12:11:26 -08:00
parent cedcf9a701
commit 8cacf0f6a6
4 changed files with 95 additions and 1 deletions

View File

@@ -125,7 +125,7 @@ ${chalk.bold('Files Tracked:')} ${chalk.green(data.files)}
console.log(chalk.gray('─'.repeat(50)));
patterns.forEach((pattern, i) => {
const confidence = pattern.confidence || 0.8;
const confidence = pattern.confidence ?? 0.8;
const confidenceBar = progressBar(Math.round(confidence * 100), 15);
console.log(`
${chalk.bold(chalk.yellow(`${i + 1}.`))} ${chalk.bold(pattern.name)}