From ea2a82f70368a55cf845fc55a86797eae0991155 Mon Sep 17 00:00:00 2001 From: martbost Date: Mon, 16 Nov 2026 11:22:13 -0600 Subject: [PATCH] Chain scan scratch moves out of DATA_DIR: docstore routes *.json reads under DATA_DIR to MySQL, so evidence.json was unreadable (ENOENT) on staging Co-Authored-By: Claude Opus 5.5 --- jobs.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jobs.js b/jobs.js index ef3b971..9b56906 100644 --- a/jobs.js +++ b/jobs.js @@ -17,7 +17,9 @@ const STEPS = ['website', 'contract', 'chain', 'scoring', 'factcheck']; const STEP_NAMES = { website: 'Reading the website', contract: 'Finding the contract', chain: 'Reading the chain', scoring: 'Scoring', factcheck: 'Fact-checking' }; const CONCURRENCY = Number(process.env.JOBS || 2); const CHAIN_BUDGET = Number(process.env.CHAIN_BUDGET_S || 420); -const WORK = () => path.join(process.env.DATA_DIR || path.join(__dirname, 'data'), 'work'); +// Scratch for chain scans lives OUTSIDE DATA_DIR: docstore.js routes every *.json read/write under DATA_DIR to MySQL, +// so evidence.json written there by scan.py was invisible to fs.readFileSync (ENOENT on staging, 2026-11-16). +const WORK = () => path.join(require('os').tmpdir(), 'wwi-work'); let running = 0; const queue = []; async function getCode(chain, a) {