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
+37
View File
@@ -0,0 +1,37 @@
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 p = await b.newPage({ viewport: { width: 1440, height: 900 } });
await p.goto(PAGE('web/index.html'), { waitUntil: 'load' }); await p.waitForTimeout(2000);
const page = await p.evaluate(() => {
const out = {}, M = [["globe","globe"],["ae","ae"],["dp","dualpole"],["merc","mercator"]];
for (const [src, key] of [["gp","globalping"],["ours","vultr"],["home","home"],["all","all_live"]]) {
out[key] = { routes: LPS[src].length };
for (const [mode, kind] of [["cable","cable_route"],["line","straight"]]) { out[key][kind] = {};
for (const [m, mk] of M) { const L = LPS[src]; out[key][kind][mk] = [L.filter(q => q.r[mode][m].bad).length, L.filter(q => q.r[mode][m].vac).length]; } }
}
out.wondernetwork = { routes: WN.n }; for (const [mode, kind] of [["cable","cable_route"],["line","straight"]]) { out.wondernetwork[kind] = {}; for (const [m, mk] of M) out.wondernetwork[kind][mk] = [wnBad(m, mode), wnVac(m, mode)]; }
out.crossings = Object.fromEntries(M.map(([m, mk]) => [mk, [xBad(m), xVac(m)]]));
out.cables = Object.fromEntries(M.map(([m, mk]) => [mk, CAB.filter(c => cabBad(c, m)).length]));
return out;
});
let diffs = [];
for (const g of ["globalping", "vultr", "home", "all_live", "wondernetwork"]) {
const f = d.summary[g];
if (g !== "wondernetwork" && f.routes !== page[g].routes) diffs.push(`${g} routes file ${f.routes} page ${page[g].routes}`);
for (const kind of ["cable_route", "straight"]) for (const m of ["globe","ae","dualpole","mercator"]) {
const fv = [f[kind][m].impossible_total, f[kind][m].beats_vacuum], pv = page[g][kind][m];
if (fv[0] !== pv[0] || fv[1] !== pv[1]) diffs.push(`${g} ${kind} ${m}: file ${fv} page ${pv}`);
}
}
for (const m of ["globe","ae","dualpole","mercator"]) {
const fc = d.cable_crossings.filter(x => x.verdict_along_drawn_route).map(x => x.verdict_along_drawn_route[m]);
const fv = [fc.filter(v => v !== "ok").length, fc.filter(v => v === "vacuum").length];
if (fv[0] !== page.crossings[m][0] || fv[1] !== page.crossings[m][1]) diffs.push(`crossings ${m}: file ${fv} page ${page.crossings[m]}`);
const cb = d.cables.list.filter(c => c.too_short_for_map[m]).length;
if (cb !== page.cables[m]) diffs.push(`cables ${m}: file ${cb} page ${page.cables[m]}`);
}
console.log(diffs.length ? 'DIFFERENCES\n' + diffs.join('\n') : 'file and page agree on every count');
await b.close();