// ── Static locks (fast, no network) ── const src = fs.readFileSync(BRIDGE, 'utf8'); assert.ok(/v-agent-bridge-lock-v0|bridge-lock-v0/.test(src), 'marker in bridge'); assert.ok(/server\.listen\(\s*PORT\s*,\s*BRIDGE_HOST\b/.test(src) && /const BRIDGE_HOST = '127\.0\.0\.1';/.test(src), 'listen on 127.0.0.1 only'); assert.ok(!/['"]0\.0\.0\.0['"]|['"]::['"]/.test(src), 'no 0.0.0.0 / :: bind literal'); assert.ok(!/Access-Control-Allow-Origin['"]\s*,\s*['"]\*['"]/.test(src), 'no bare * CORS'); assert.ok(!/\bexecSync\s*\(/.test(src), 'no execSync( calls (shell strings) remain'); assert.ok(!/\bexec\s*\(/.test(src), 'no exec( calls'); assert.ok(/execFileSync\('git'/.test(src), 'git runs through execFileSync argument arrays'); assert.ok(/MAX_BODY_BYTES/.test(src), 'body cap present'); assert.ok(/bridge-ledger\.jsonl/.test(src), 'commit ledger present'); ## Exact source excerpt, characters 64431–66022 const opt = (rel) => { try { return fs.readFileSync(path.join(repo, rel), 'utf8'); } catch (e) { return null; } }; const client = opt('docs/modules/agent-bridge-client.js'); const propose = opt('docs/modules/propose.js'); const workshop = opt('docs/modules/workshop.js'); const app = opt('docs/app.html'); const rootIndex = opt('index.html'); if (client) { assert.ok(/X-FL-Bridge-Token/.test(client), 'client sends token header'); assert.ok(!/innerHTML/.test(client), 'client renders with textContent only'); execFileSync(process.execPath, ['--check', path.join(repo, 'docs/modules/agent-bridge-client.js')]); } if (propose) { assert.strictEqual((propose.match(/commitViaBridge\s*\(/g) || []).length, 3, 'CRITICAL LOCK 1A count unchanged'); assert.strictEqual((propose.match(/\/code\/git\/commit/g) || []).length, 1, 'CRITICAL LOCK 1B count unchanged'); assert.ok(/FLAgentBridge/.test(propose), 'propose routes bridge calls through FLAgentBridge when present'); } if (workshop) { assert.ok(/http:\/\/localhost:3141/.test(workshop) && /runCodeTask/.test(workshop), 'v5.71.8 workshop lock still true'); assert.ok(/FLAgentBridge/.test(workshop), 'workshop routes bridge calls through FLAgentBridge when present'); } if (app) { assert.ok(/