Fact gate: no +-1 slack on integers; BNB Smart Chain hint; sample screenshot

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-11-16 11:10:04 -06:00
parent 85b2b7334a
commit 9e19a9ed9a
3 changed files with 3 additions and 4 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

+2 -3
View File
@@ -137,9 +137,8 @@ function factcheck(report, evidenceText, keyNums) {
if (!n.raw.includes('.') && !n.raw.includes(',') && v >= 1990 && v <= 2035) continue; // years
if (allowed.has(v) || allowed.has(Number(v.toFixed(2)))) continue;
// a rounded form of an allowed value (3,632 for 3,632.30, 29.06k style excluded)
let near = false;
if (v >= 100) for (const a of [v - 1, v, v + 1]) if (allowed.has(Math.round(a))) { near = true; break; }
if (!near && n.raw.includes('.')) { const d = n.raw.split('.')[1].length; for (const x of [v - Math.pow(10, -d), v + Math.pow(10, -d)]) if (allowed.has(Number(x.toFixed(d)))) near = true; }
let near = false; // integers: allowed already holds every allowed value rounded to 0 decimals (3,632 for 3,632.30)
if (n.raw.includes('.')) { const d = n.raw.split('.')[1].length; for (const x of [v - Math.pow(10, -d), v + Math.pow(10, -d)]) if (allowed.has(Number(x.toFixed(d)))) near = true; }
if (near) continue;
const i = stripped.indexOf(n.raw); bad.push({ kind: 'number', item: n.raw, context: stripped.slice(Math.max(0, i - 60), i + 40).replace(/\s+/g, ' ') });
}
+1 -1
View File
@@ -7,7 +7,7 @@ const dns = require('dns').promises;
const net = require('net');
const EXPLORERS = { 'bscscan.com': 'bsc', 'polygonscan.com': 'polygon', 'etherscan.io': 'eth', 'basescan.org': 'base' };
const CHAIN_WORDS = { bsc: /\b(bnb ?chain|bsc|binance smart chain|bep-?20|pancakeswap)\b/gi, polygon: /\b(polygon|matic|\bpol\b|polygonscan)\b/gi,
const CHAIN_WORDS = { bsc: /\b(bnb ?(smart )?chain|bsc|binance smart chain|bep-?20|pancakeswap)\b/gi, polygon: /\b(polygon|matic|\bpol\b|polygonscan)\b/gi,
eth: /\b(ethereum|erc-?20|etherscan|mainnet eth)\b/gi, base: /\b(base chain|on base|base network|basescan|coinbase base)\b/gi };
const ADDR_RE = /0x[a-fA-F0-9]{40}(?![a-fA-F0-9])/g;
const COMMON = new Set(['0x0000000000000000000000000000000000000000', '0x000000000000000000000000000000000000dead',