Open-source release: pipeline code, raw logs, derived data, licences, tests

Adds src/ (scripts, raw measurement logs, derived data, report source),
tests/, LICENSE (MIT, code) and LICENSE-DATA.md (CC BY 4.0 for the survey's
data; third-party terms). The report is updated to the current site; the
v1 and v2 data hand-off files are unchanged.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Toby
2026-10-27 20:09:54 -04:00
parent 75da69fc31
commit c094eb88fa
81 changed files with 249210 additions and 127 deletions
+21
View File
@@ -0,0 +1,21 @@
import { chromium } from 'playwright-core';
import fs from 'fs';
import { PAGE, HAND } from './paths.mjs';
const d = JSON.parse(fs.readFileSync(HAND('cable_latency_survey_data.json'), 'utf8'));
const b = await chromium.launch({ executablePath: process.env.CH });
const errs = [], blocked = [];
for (const [w, h] of [[1440, 900], [390, 844]]) {
const p = await b.newPage({ viewport: { width: w, height: h } });
await p.route('**/*', r => { const u = r.request().url(); if (u.startsWith('file:')) return r.continue(); blocked.push(u); return r.abort(); });
p.on('pageerror', e => errs.push(`${w}: ${e.message}`)); p.on('console', m => { if (m.type() === 'error' && !/ERR_FAILED|net::/.test(m.text())) errs.push(`${w}: ${m.text()}`) });
await p.goto(PAGE('site/index.html'), { waitUntil: 'load' }); await p.waitForTimeout(2500);
const r = await p.evaluate(() => ({ d3: typeof d3, drawn: hits.length, routes: LP.length, ae: [liveBad('ae'), liveVac('ae')], sw: document.documentElement.scrollWidth, doctype: document.doctype && document.doctype.name, title: document.title }));
const f = d.summary.all_live.cable_route.ae;
console.log(w, JSON.stringify(r), r.routes === d.summary.all_live.routes && r.ae[0] === f.impossible_total && r.ae[1] === f.beats_vacuum ? 'matches data file' : 'MISMATCH');
for (const src of ['ours', 'gp', 'home']) { await p.selectOption('#srcsel', src); await p.waitForTimeout(200); }
await p.selectOption('#srcsel', 'all'); await p.waitForTimeout(300);
await p.screenshot({ path: `out/offline_${w}.png` });
await p.close();
}
console.log('blocked external requests:', [...new Set(blocked.map(u => new URL(u).host))]);
console.log('ERRORS', JSON.stringify(errs)); await b.close();