GLOBALGRID2050 / EXPLORE CODE

Part of: Explore Code / Electricity markets and data pipelines / globalgrid2050 / uk_renewables_pipeline/v9

Check V9 3 and 3 more files (part 2)

A JavaScript module in the tests folder of GlobalGrid2050 that tests major project news, homepage catalogue and the Renewable Energy Planning Database (REPD) register, using SHA-256.

681 lines of JavaScript and Python and HTML from globalgrid2050, globalgrid2050-homepage, globalgrid2050-ip-and-mac-addresses, in 4 files. Topic: Electricity markets and data pipelines. Section 975 of 2044.

Cut 2026-12-06T03:07:51+00:00. A copy for reading; the repository at the stated commit is the source.

In the State lines below, domain stage, users and canonical status are rule-based first approximations from code and path evidence (rules explore-agent-rules-v1), not observed facts: the rules.

In this section

  1. UK Renewables Pipeline — V9 Page render · globalgrid2050 / uk_renewables_pipeline/v9/index.html lines 1–147
  2. Check V9 3 test · globalgrid2050 / uk_renewables_pipeline/v9/tests/check_v9_3.mjs lines 1–221
  3. Dashboard render · globalgrid2050-homepage / assets/dashboard.js lines 1–159
  4. Registry storage · globalgrid2050-ip-and-mac-addresses / registry.py lines 1–154

UK Renewables Pipeline — V9 Page

A web page in GlobalGrid2050 that reads inputs for news, county and sort projects, covering the Renewable Energy Planning Database (REPD) register, solar and battery storage (BESS). Published at https://globalgrid2050.com/uk_renewables_pipeline/v9/.

renderglobalgrid2050 / uk_renewables_pipeline/v9/index.html · lines 1–147 of 147 · Entry point

What it does
It draws the REPD register, solar and battery storage (BESS). Uses libraries styles/v7.css?v=9.3.1. Side effects: changes the web page (DOM).
Why it exists in the grid workflow
Domain stage upstream_foresight (path word 'renewables'): upstream engineering foresight over GB transmission and distribution topology (TSO/DNO, 132kV and above, the REPD pipeline, data centres), which Ventus Ltd states it models for foresight. Domain terms in the code: the REPD register, solar, battery storage (BESS).
Inputs & outputs
In: form fields (user input). Out: web page.
Downstream impact
Used directly by 73 files: GlobalGrid2050 — PipelineNews Intelligence Page (globalgrid2050, https://globalgrid2050.com/pipelinenews_intelligence/202609050309/); Testcode — Pipeline Page (globalgrid2050, https://globalgrid2050.com/testcode/202609060345/pipeline/); UK Renewables Pipeline — V9 4 Page (globalgrid2050, https://globalgrid2050.com/uk_renewables_pipeline/v9.4/); UK Renewables Pipeline — V9 5 1 Page (globalgrid2050, https://globalgrid2050.com/uk_renewables_pipeline/v9.5.1/); and 69 more. Reached from 114 other entry points, including GlobalGrid2050 Historical Builds (globalgrid2050, https://globalgrid2050.com/historical_builds.html); GlobalGrid2050 Homepage Before Four Nests (globalgrid2050, https://globalgrid2050.com/homepage-before-four-nests-20260925.html); Grid Engine — Compute Against Charging Page (globalgrid2050, https://globalgrid2050.com/grid_engine/202609060324-compute-against-charging/). It is itself an entry point, published at https://globalgrid2050.com/uk_renewables_pipeline/v9/.
What it achieves
UK Renewables Pipeline V9.3.1. Its code works with 1 MW.
Why it matters
Loaded by the PipelineNews Intelligence page at https://globalgrid2050.com/pipelinenews_intelligence/202609050309/ and 68 other pages. Also imported by Compile V8 Fast, Compile Index and Estate Menu, from PipelineNews and Spiders. Checked by Check V9 3.
Application
globalgrid2050 · uk_renewables_pipeline/v9 · page
Uses
Mobile (stylesheet), V9 3 (stylesheet), UK Renewables Pipeline — V8 Page (link), UK Renewables Pipeline — V7 Page (link), Dashboard V6 Live (link), Dashboard V5 Live (link), Dashboard V4 Live (link), Dashboard V2 2026 08 22 (link), and 4 more, styles/v7.css?v=9.3.1, https://cdn.jsdelivr.net/npm/chart.js
Used by
linked from GlobalGrid2050 — PipelineNews Intelligence Page (link), linked from Testcode — Pipeline Page (link), linked from UK Renewables Pipeline — V9 4 Page (link), linked from UK Renewables Pipeline — V9 5 1 Page (link), linked from UK Renewables Pipeline — V9 5 Page (link), linked from UK Renewables Pipeline — V9 6 1 Page (link), linked from UK Renewables Pipeline — V9 6 2 Page (link), linked from UK Renewables Pipeline — V9 6 Page (link), and 65 more
Produces
none declared
Defines here
none
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 uk_renewables_pipeline/v9/index.html:1-147 · blob f297166b0c74866350a73148966ee570d616d761 · GitHub at these lines
State
achieves: comment · context: readme_derived · stage: output · effects: dom · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: production_core
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width,initial-scale=1">
  <title>GlobalGrid2050 | UK Renewables Pipeline V9.3.1</title>
  <link rel="stylesheet" href="styles/v7.css?v=9.3.1">
  <link rel="stylesheet" href="styles/mobile.css?v=9.3.1">
  <link rel="stylesheet" href="styles/v9-3.css?v=9.3.1">
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
</head>
<body>
  <aside class="sidebar">
    <div class="brand">
      <b>GLOBALGRID2050</b>
      <small>UK RENEWABLES PIPELINE · V9.3.1</small>
    </div>
    <nav class="nav">
      <a class="active" href="#">V9.3.1 LIVE</a>
      <a href="https://github.com/Ventusltd/globalgrid2050/tree/eee4cf7d854bf44235c249d337c2aad3916bcdc0/uk_renewables_pipeline/v9" target="_blank" rel="noopener">V9.3 CHECKPOINT</a>
      <a href="https://github.com/Ventusltd/globalgrid2050/tree/77085a5dc8a8ce42cd4de7dad927eaf9aaf785ee/uk_renewables_pipeline/v9" target="_blank" rel="noopener">V9.2 CHECKPOINT</a>
      <a href="https://github.com/Ventusltd/globalgrid2050/tree/59f74e319fbaad62abdb995107dba5759d7f3ca2/uk_renewables_pipeline/v9" target="_blank" rel="noopener">V9.1 CHECKPOINT</a>
      <a href="../v8/">V8.1 FALLBACK</a>
      <a href="../v7/">V7 FALLBACK</a>
      <a href="../dashboard_v6_live.html">V6</a>
      <a href="../dashboard_v5_live.html">V5</a>
      <a href="../dashboard_v4_live.html">V4</a>
      <a href="../dashboard_v3_live_2026-08-22.html">V3</a>
      <a href="../dashboard_v2_2026-08-22.html">V2</a>
      <a href="../dashboard.html">V1 LEGACY</a>
      <a href="../../index.html">DIRECTORY</a>
      <a href="../../repd_grid_atlasv8/">MAP ATLAS</a>
      <a href="#" id="export">EXPORT CSV</a>
    </nav>
  </aside>
  <main class="main">
    <div class="header">
      <h1>UK RENEWABLES PIPELINE V9.3.1</h1>
      <div class="status">● REPD IDS + UPDATE DATES · FULL ≥1 MW PIPELINE</div>
    </div>
    <div class="meta">
      <strong>V9.3.1 · 23 August 2026</strong>
      <span>Canonical DESNZ REPD Q2 2026: 7,680 solar, BESS and wind records at ≥1 MW.</span>
      <span id="releaseMeta" class="release-meta">Loading canonical release contract…</span>
      <a href="https://www.gov.uk/government/publications/renewable-energy-planning-database-quarterly-extract" target="_blank" rel="noopener">Official REPD source</a>
    </div>

    <section class="newspaper">
      <div class="masthead">
        <h2>GLOBALGRID2050 <span>ENERGY DAILY</span></h2>
        <div class="strap">
          <span>Legacy V5 feed · V9.2 relevance screen retained · all project bindings remain unverified</span>
          <span id="newsMeta">loading daily edition…</span>
        </div>
      </div>
      <div class="news-tools" id="newsTools">
        <button class="active" data-news="ALL">ALL</button>
        <button data-news="RELEVANT">RELEVANT</button>
        <button data-news="SOLAR">SOLAR</button>
        <button data-news="BESS">BESS</button>
        <button data-news="CONSENT">CONSENT</button>
        <button data-news="CONSTRUCTION">CONSTRUCTION</button>
        <button data-news="OPERATIONAL">OPERATIONAL</button>
        <button data-news="FINANCE">FINANCE / M&amp;A</button>
        <input id="newsSearch" placeholder="SEARCH HEADLINES / PROJECT / OPERATOR">
      </div>
      <div class="paper">
        <div class="stories" id="stories">
          <div class="news-empty">Loading today’s major-project newspaper…</div>
        </div>
      </div>
    </section>

    <h2 class="section-title">REPD PIPELINE ANALYTICS</h2>
    <div class="gauges">
      <div class="card">
        <h3>FILTERED CAPACITY (MW)</h3>
        <div class="chart"><canvas id="g1"></canvas><div class="value" id="v1">0</div></div>
      </div>
      <div class="card">
        <h3>FILTERED PROJECTS (≥1MW)</h3>
        <div class="chart"><canvas id="g2"></canvas><div class="value" id="v2">0</div></div>
      </div>
      <div class="card">
        <h3>LARGEST SINGLE SITE (MW)</h3>
        <div class="chart"><canvas id="g3"></canvas><div class="value" id="v3">0</div></div>
      </div>
    </div>

    <div class="filters" id="tech">
      <button class="btn active" data-technology="all" aria-pressed="true">ALL TECH</button>
      <button class="btn" data-technology="solar" aria-pressed="false">SOLAR</button>
      <button class="btn" data-technology="bess" aria-pressed="false">BATTERY</button>
      <button class="btn" data-technology="wind_onshore" aria-pressed="false">ONSHORE</button>
      <button class="btn" data-technology="wind_offshore" aria-pressed="false">OFFSHORE</button>
    </div>
    <div class="filters" id="status">
      <button class="btn active" data-official-status="All" aria-pressed="true">ALL STATUS</button>
      <button class="btn" data-official-status="Operational" aria-pressed="false">OPERATIONAL</button>
      <button class="btn" data-official-status="Under Construction" aria-pressed="false">CONSTRUCTING</button>
      <button class="btn" data-official-status="Awaiting Construction" aria-pressed="false">AWAITING</button>
      <button class="btn" data-official-status="Application Submitted" aria-pressed="false">SUBMITTED</button>
    </div>
    <div class="filters">
      <select id="county"><option value="All">🌍 ALL COUNTIES</option></select>
      <select id="sortProjects" aria-label="Sort projects">
        <option value="capacity_desc">SORT: CAPACITY (DEFAULT)</option>
        <option value="updated_desc">SORT: REPD UPDATED — NEWEST</option>
        <option value="updated_asc">SORT: REPD UPDATED — OLDEST</option>
      </select>
      <input id="search" class="asset-search" placeholder="🔍 SEARCH PROJECT / REPD / GLOBALGRID / PLANNING..." autocomplete="off">
      <button class="btn clear-filters" id="clearFilters">CLEAR FILTERS</button>
      <button class="btn export-inline" id="exportInline">EXPORT FILTERED CSV</button>
      <span id="resultsMeta" class="results-meta">Loading all qualifying records…</span>
      <span id="exportMeta" class="export-meta">CSV contains the current filtered rows only</span>
    </div>
    <div class="meta">
      <strong>STATUS DISCIPLINE</strong>
      <span><b>DEFAULT:</b> every qualifying ≥1 MW record is loaded. Filters are user controls; they never redefine or truncate the pipeline.</span>
      <span><b>NEWS:</b> relevance scores are algorithmic screening only and never change an official REPD fact.</span>
      <span><b>ATLAS:</b> valid geometry resolves the exact REPD Ref. Missing geometry remains in search and CSV and is labelled NO MAP.</span>
    </div>
    <div class="tablewrap">
      <table>
        <thead>
          <tr>
            <th>SITE NAME</th>
            <th class="hide-mobile">COUNTY</th>
            <th class="hide-mobile">OPERATOR</th>
            <th>TECHNOLOGY</th>
            <th>OFFICIAL REPD STATUS</th>
            <th>OFFICIAL CAPACITY</th>
            <th class="hide-mobile">REPD REF</th>
            <th class="hide-mobile">GLOBALGRID REF</th>
            <th class="hide-mobile">REPD UPDATED</th>
            <th>NEWS SIGNAL</th>
            <th>ACTIONS</th>
          </tr>
        </thead>
        <tbody id="tbody"></tbody>
      </table>
    </div>
  </main>
  <script type="module" src="scripts/app-v9-3.js?v=9.3.1"></script>
  <script type="module" src="scripts/plugins/capacity-presentation-v9-3.js?v=9.3.1"></script>
</body>
</html>

Check V9 3

A JavaScript module in the tests folder of GlobalGrid2050 that tests major project news, homepage catalogue and the Renewable Energy Planning Database (REPD) register, using SHA-256.

testglobalgrid2050 / uk_renewables_pipeline/v9/tests/check_v9_3.mjs · lines 1–221 of 221 · Not reached from any entry point (candidate for review) · pattern reachable (shared by 4 files)

What it does
It tests major project news, homepage catalogue and the REPD register. Defines readText, readJson, sha256, gitBlob, reachable. Uses libraries node:assert/strict, node:child_process, node:crypto, node:fs/promises, node:url. Side effects: changes the web page (DOM); reads or writes files; starts processes.
Why it exists in the grid workflow
Domain stage upstream_foresight (path word 'renewables'): upstream engineering foresight over GB transmission and distribution topology (TSO/DNO, 132kV and above, the REPD pipeline, data centres), which Ventus Ltd states it models for foresight. Domain terms in the code: the REPD register.
Inputs & outputs
In: JSON file release.v9.3.json; JSON file release.v9.2.json; JSON file release.v9.1.json; JSON file v9_manifest.json; JSON file build_manifest.json; JSON file major_project_news_v5.json; JSON file homepage-catalogue.json.
What it achieves
It reads text (`readText`) and reads JSON (`readJson`). Defines `readText`, `readJson`, `sha256` and 2 more. It reads `contracts/release.v9.3.json`.
Why it matters
No other file in the estate was found to import it.
Application
globalgrid2050 · uk_renewables_pipeline/v9/tests · JavaScript module
Uses
Project Filter V9 2 (import), News Relevance V9 2 (import), Projects V9 3 (import), UK Renewables Pipeline — V9 Page (new URL import.meta.url), node:assert/strict, node:child_process, node:crypto, node:fs/promises, node:url
Used by
none found
Produces
readText, readJson, sha256, gitBlob, reachable
Defines here
readText, readJson, sha256, gitBlob, reachable
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 uk_renewables_pipeline/v9/tests/check_v9_3.mjs:1-221 · blob e9e6d1b47ad0520af08d16c4a2856be6e31e97df · GitHub at these lines
State
achieves: name · context: readme_derived · stage: output · effects: dom, filesystem, process · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: unreached_review
import assert from "node:assert/strict";
import { execFileSync } from "node:child_process";
import { createHash } from "node:crypto";
import { readFile } from "node:fs/promises";
import { fileURLToPath } from "node:url";
import {
  buildProjectSearchTextV9_2,
  projectMatchesV9_2,
  summariseProjectsV9_2,
  tokeniseSearchV9_2,
} from "../scripts/core/project-filter-v9-2.js";
import { assessNewsItemV9_2 } from "../scripts/core/news-relevance-v9-2.js";
import { atlasUrlV9_3, compareProjectUpdatesV9_3 } from "../scripts/plugins/projects-v9-3.js";

const base = new URL("../", import.meta.url);
const root = new URL("../../../", import.meta.url);
const rootPath = fileURLToPath(root);
const readText = (path) => readFile(new URL(path, base), "utf8");
const readJson = async (path) => JSON.parse(await readText(path));
const sha256 = (value) => createHash("sha256").update(value).digest("hex");
const gitBlob = (path) => execFileSync("git", ["-C", rootPath, "hash-object", path], { encoding: "utf8" }).trim();

const contract = await readJson("contracts/release.v9.3.json");
const parentContract = await readJson("contracts/release.v9.2.json");
const dataContract = await readJson("contracts/release.v9.1.json");
const releaseManifest = await readJson("data/v9_manifest.json");
const payload = await readJson("data/v9.1/build_manifest.json");
const projectParts = await Promise.all(payload.project_partitions.map(({ path }) => readJson(path)));
const projects = projectParts.flatMap((part) => part.projects);
const news = JSON.parse(await readFile(new URL("dist/major_project_news_v5.json", root), "utf8"));

assert.equal(contract.release, "9.3");
assert.equal(contract.frozen_parent.commit, "77085a5dc8a8ce42cd4de7dad927eaf9aaf785ee");
assert.equal(contract.frozen_parent.tree, "3807968dbf5c73e4499c6de9157464e3185dd241");
assert.equal(contract.behaviour_parent.release, "9.2");
assert.equal(contract.behaviour_parent.application_logic_changed, true);
assert.equal(contract.behaviour_parent.interface_changed, true);
assert.equal(contract.v9_3_1_patch.version, "9.3.1");
assert.equal(contract.v9_3_1_patch.data_changed, false);
assert.equal(contract.data_parent.release, "9.1");
assert.equal(contract.data_parent.data_changed, false);
assert.equal(parentContract.release, "9.2");
assert.equal(dataContract.release, "9.1");
assert.equal(releaseManifest.version, "9.3");
assert.equal(releaseManifest.status, "LIVE_VALIDATED");
assert.equal(releaseManifest.promotion_basis.candidate_commit, "2e4662226d4a82b8b071e31480a362f91ad5f66b");
assert.equal(releaseManifest.promotion_basis.live_custom_domain_proof, true);
assert.deepEqual(contract.ui_contract.intermediate_header_wrap_range_px, [769, 920]);
assert.deepEqual(contract.ui_contract.intermediate_test_widths_px, [769, 800, 900, 920]);
assert.equal(contract.ui_contract.desktop_header_row_from_px, 921);
assert.equal(contract.ui_contract.intermediate_header_direction, "column");
assert.equal(contract.ui_contract.intermediate_status_wrap, true);

const frozenV92Blobs = {
  "uk_renewables_pipeline/v9/scripts/core/project-filter-v9-2.js": "dceee01d0f51e85b071aef275250c1fb223eeba7",
  "uk_renewables_pipeline/v9/scripts/core/news-relevance-v9-2.js": "f8374bfd6f0c47e98ca1e7f2f3312c9281a34e8a",
  "uk_renewables_pipeline/v9/scripts/data/canonical-projects-v9-2.js": "e3d9b7bb0f39b813cf3b1f125467efbd6a021dda",
  "uk_renewables_pipeline/v9/scripts/plugins/gauges-v9-2.js": "1d081d2d9e1630912b912953cf18f431754f9e19",
  "uk_renewables_pipeline/v9/scripts/plugins/newspaper-v9-2.js": "6c72de9e9bd8f41bf525a32ca2436e53ddb466b0",
  "uk_renewables_pipeline/v9/scripts/plugins/projects-v9-2.js": "0e222ea75e9db8dc3e9f1e829a15ac3ee1ca0acf",
  "uk_renewables_pipeline/v9/styles/v9-2.css": "f4ac1a09145b0f4824e333ac2acbc767d84f2da6",
};
for (const [path, expected] of Object.entries(frozenV92Blobs)) {
  assert.equal(gitBlob(path), expected, `${path} changed after the frozen V9.2 checkpoint`);
}

assert.equal(payload.project_count, 7680);
assert.equal(payload.capacity_mw, 356474.09);
assert.equal(payload.largest_mw, 4100);
assert.equal(payload.geometry_count, 7652);
assert.equal(payload.missing_geometry_count, 28);
assert.equal(payload.solar_count, 3563);
assert.equal(payload.bess_count, 1609);
assert.equal(payload.wind_onshore_count, 2399);
assert.equal(payload.wind_offshore_count, 109);
assert.equal(projects.length, 7680);
assert.equal(new Set(projects.map((project) => project.repd_ref)).size, 7680);
assert.ok(projects.every((project) => project.capacity_mw >= 1));
assert.deepEqual(summariseProjectsV9_2(projects), { count: 7680, capacity_mw: 356474.09, largest_mw: 4100 });

const datedProjects = projects.filter((project) => project.repd_record_updated);
const undatedProjects = projects.filter((project) => !project.repd_record_updated);
assert.ok(datedProjects.length > 1);
assert.ok(datedProjects.every((project) => /^\d{4}-\d{2}-\d{2}$/.test(project.repd_record_updated)));
const newestFirst = [...projects].sort((left, right) => compareProjectUpdatesV9_3(left, right, "desc"));
const oldestFirst = [...projects].sort((left, right) => compareProjectUpdatesV9_3(left, right, "asc"));
assert.ok(newestFirst[0].repd_record_updated >= newestFirst[1].repd_record_updated);
assert.ok(oldestFirst[0].repd_record_updated <= oldestFirst[1].repd_record_updated);
if (undatedProjects.length) {
  assert.equal(newestFirst.at(-1).repd_record_updated, null);
  assert.equal(oldestFirst.at(-1).repd_record_updated, null);
}

const berwick = projects.find((project) => project.repd_ref === "9873");
assert.ok(berwick);
const searchText = buildProjectSearchTextV9_2(berwick);
assert.equal(projectMatchesV9_2(berwick, {
  technology: "wind_offshore",
  status: "All",
  county: "All",
  tokens: tokeniseSearchV9_2("GG2050-REPD-9873 Berwick"),
}, searchText), true);
assert.equal(projectMatchesV9_2(berwick, {
  technology: "solar",
  status: "All",
  county: "All",
  tokens: [],
}, searchText), false);

const validAtlas = new URL(atlasUrlV9_3(berwick));
assert.equal(validAtlas.searchParams.get("repd_ref"), "9873");
assert.equal(validAtlas.searchParams.get("technology"), "wind_offshore");
const missingGeometry = projects.find((project) => project.geometry_status !== "valid");
assert.ok(missingGeometry);
assert.equal(atlasUrlV9_3(missingGeometry), "");

const beacon = news.items.find((item) => /Beacon Fen Energy Park development consent decision announced/i.test(item.headline));
const grange = news.items.find((item) => /The Grange celebrates Forest Healthcare/i.test(item.headline));
const wilton = news.items.find((item) => /New Jersey Board of Public Utilities/i.test(item.headline));
const stonestreet = news.items.find((item) => /Evolution Mining/i.test(item.headline));
assert.ok(beacon && grange && wilton && stonestreet);
assert.equal(assessNewsItemV9_2(beacon).strong, true);
assert.equal(assessNewsItemV9_2(grange).strong, false);
assert.equal(assessNewsItemV9_2(wilton).strong, false);
assert.equal(assessNewsItemV9_2(stonestreet).strong, false);

const html = await readText("index.html");
const mobileCss = await readText("styles/mobile.css");
const additiveCss = await readText("styles/v9-3.css");
const parentAdditiveCss = await readText("styles/v9-2.css");
const projectsV92 = await readText("scripts/plugins/projects-v9-2.js");
const projectsV93 = await readText("scripts/plugins/projects-v9-3.js");
const app = await readText("scripts/app-v9-3.js");
const catalogue = JSON.parse(await readFile(new URL("catalogue/homepage-catalogue.json", root), "utf8"));
const packageJson = await readJson("package.json");

assert.match(html, /UK RENEWABLES PIPELINE V9\.3\.1/);
assert.match(html, />V9\.3\.1 LIVE</);
assert.doesNotMatch(html, /V9\.3 CANDIDATE/);
const styleOrder = [
  html.indexOf("styles/v7.css?v=9.3.1"),
  html.indexOf("styles/mobile.css?v=9.3.1"),
  html.indexOf("styles/v9-3.css?v=9.3.1"),
];
assert.ok(styleOrder.every((value) => value >= 0));
assert.ok(styleOrder[0] < styleOrder[1] && styleOrder[1] < styleOrder[2]);
assert.doesNotMatch(html, /styles\/v8\.css/);
assert.doesNotMatch(html, /styles\/v9-2\.css/);
assert.equal((html.match(/<canvas id="g[1-3]"/g) || []).length, 3);
assert.doesNotMatch(html, /id="g4"/);
assert.equal((html.match(/<th(?:\s|>)/g) || []).length, 11);
assert.match(html, /<th class="hide-mobile">REPD REF<\/th>/);
assert.match(html, /<th class="hide-mobile">GLOBALGRID REF<\/th>/);
assert.match(html, /<th class="hide-mobile">REPD UPDATED<\/th>/);
assert.match(html, /data-technology="all"[^>]*aria-pressed="true"/);
assert.match(html, /data-official-status="All"[^>]*aria-pressed="true"/);
assert.match(html, /data-news="RELEVANT"/);
assert.match(html, /id="clearFilters"/);
assert.match(html, /id="resultsMeta"/);
assert.match(html, /id="sortProjects"/);
assert.match(html, /value="updated_desc"/);
assert.match(html, /value="updated_asc"/);
assert.match(html, /scripts\/app-v9-3\.js\?v=9\.3\.1/);

assert.equal(sha256(mobileCss), "9855b9c11255a85f477873d07cca45b057aedcdc8a6cc4aab2d29a0ffaac9b85");
assert.match(mobileCss, /flex-direction:\s*column/);
assert.match(mobileCss, /white-space:\s*normal/);
const parentCssPrefix = parentAdditiveCss.trimEnd();
assert.ok(additiveCss.startsWith(parentCssPrefix), "V9.3 additive CSS no longer preserves the complete V9.2 prefix");
const tabletPatch = additiveCss.slice(parentCssPrefix.length);
assert.match(tabletPatch, /@media\s*\(min-width:\s*769px\)\s*and\s*\(max-width:\s*920px\)/);
assert.equal((tabletPatch.match(/\.header\s*\{/g) || []).length, 1);
assert.equal((tabletPatch.match(/\.status\s*\{/g) || []).length, 1);
assert.match(tabletPatch, /\.header\s*\{[^}]*align-items:\s*flex-start[^}]*flex-direction:\s*column[^}]*\}/s);
assert.match(tabletPatch, /\.status\s*\{[^}]*width:\s*100%[^}]*white-space:\s*normal[^}]*\}/s);
assert.doesNotMatch(additiveCss, /\.gauges\s*\{/);
assert.doesNotMatch(additiveCss, /min-width:\s*(?:1500|1850)px/);

assert.match(app, /gauges-v9-2\.js/);
assert.match(app, /newspaper-v9-2\.js/);
assert.match(app, /projects-v9-3\.js/);

assert.ok(projectsV92.length > 0);
assert.match(projectsV93, /filtered\.map/);
assert.doesNotMatch(projectsV93, /filtered\.length\s*\?\s*filtered\s*:\s*all/);
assert.match(projectsV93, /geometry_status !== "valid"/);
assert.match(projectsV93, /globalgrid2050_uk_renewables_pipeline_v9_3_/);
assert.match(projectsV93, /compareProjectUpdatesV9_3/);
assert.match(projectsV93, /repd-updated/);
assert.match(projectsV93, /sortProjects/);

/* A version's gate must not depend on the homepage's WORDING.
   This asserted the front page still said "V9.3.1 LIVE ·". That sentence was
   removed on purpose when the homepage was rebuilt to timestamp-and-title, and
   this gate went red on a release nobody had touched - the gate was asserting
   someone else's editorial copy as if it were this version's contract.
   What is durable is that the published directory is REACHABLE from the front
   page. The name on the link is the homepage's business; the link existing is
   this version's.

   REACHABILITY IS ASSERTED AGAINST THE CATALOGUE, NOT AGAINST index.html.

   On 2026-09-08 the homepage stopped being a document that names versions and
   became a VIEW over catalogue/homepage-catalogue.json: index.html now ships a
   nest renderer and fetches its rows at runtime, so it contains no version path
   and no version name at all. Matching index.html for either has failed on
   every push since, on releases nobody has touched.

   The catalogue is the front door's own data - generated from the tree and git
   by scripts/build_homepage_catalogue.py, never typed - so asserting against it
   is asserting the same claim against the thing that now carries it. If this
   version's published directory is dropped from the catalogue, the reader
   cannot reach it, and this goes red exactly as it should. */
const reachable = (url) => catalogue.entries.some((e) => e.url === url);
assert.ok(reachable("./uk_renewables_pipeline/v9/"),
  "V9.3.1 is not listed in catalogue/homepage-catalogue.json; the reader cannot reach it");
assert.equal(packageJson.version, "9.3.1");
assert.equal(packageJson.scripts.validate, "bash tests/run_v9_3.sh");
assert.equal(packageJson.scripts["validate:browser"], "V9_BROWSER_SMOKE=1 bash tests/run_v9_3.sh");

console.log("V9.3.1: PASS (official references and REPD update-date sorting; 7,680-record data retained)");

Dashboard

A JavaScript file in the assets folder of GlobalGrid2050 Homepage that draws catalog and uses data from the registry_of_all_content_in_repos_and_dependencies repository. It searches key (`searchKey`) and applies search (`applySearch`).

Set aside from the main view: 91% of its lines are the same as assets/dashboard.js (globalgrid2050), which stays. (near-copy-of, proposed by families.py). 90% of lines shared with GlobalGrid2050 Dashboard; read that one first. All set-aside files, with reasons. Nothing was deleted.

Evidence
  • line-jaccard 0.906 to globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 assets/dashboard.js:1-164 56c296f389ff7a34be48d1e4c681c74160c2e240
  • sha256 003abd4cdfb83bb4b1cd5873e50a68182f45f9123b0ea122886616d5681c97b6
  • target sha256 9c9fd16f505a277d4fa8b7a823701c79715ca9850b83765edba6f060cdde37d9
  • group of 2 (identity.json near-copy edges >= 0.9)
  • canonical rule: reachable, newest stamp, core repo, most lines

renderglobalgrid2050-homepage / assets/dashboard.js · lines 1–159 of 159 · Not reached from any entry point (candidate for review) · pattern initRegistryAccess (shared by 2 files)

What it does
It draws catalog. Defines 11 functions or classes, including esc, normalise, searchKey, flatten, build. Side effects: changes the web page (DOM); makes network requests; uses storage (browser storage, DuckDB or Parquet).
Why it exists in the grid workflow
Domain stage upstream_foresight (topic 'markets-data'): upstream engineering foresight over GB transmission and distribution topology (TSO/DNO, 132kV and above, the REPD pipeline, data centres), which Ventus Ltd states it models for foresight. README: "`assets/dashboard.js` loads the catalogue, renders the menu and runs the search."
Inputs & outputs
In: data source: registry_of_all_content_in_repos_and_dependencies data; JSON file catalog.json; browser storage (getItem). Out: browser storage (setItem).
What it achieves
The README says: `assets/dashboard.js` loads the catalogue, renders the menu and runs the search. It responds to change, input and keydown events.
Why it matters
No other file in the estate was found to import it.
Application
globalgrid2050-homepage · assets · script
Uses
Registry of All Content in Repos and Dependencies — Index Page (estate URL)
Used by
none found
Produces
esc, normalise, searchKey, flatten, build, applySearch, initChecklist, initSessionNotes, initRegistryAccess, reveal, init
Defines here
esc, normalise, searchKey, flatten, build, applySearch, initChecklist, initSessionNotes, initRegistryAccess, reveal, init
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
globalgrid2050-homepage@551a7625b02ddb7b3e6e0181cc643b8114c7fc06 assets/dashboard.js:1-159 · blob 17bdb230ccc1018785606002518cad6c6ad4ed4e · GitHub at these lines
State
achieves: readme · context: readme_derived · stage: output · effects: dom, network, storage · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: duplicate_candidate
(function () {
  const CATALOG_URL = './data/catalog.json';
  const REGISTRY_URL = 'https://ventusltd.github.io/registry_of_all_content_in_repos_and_dependencies/';
  const menu = document.getElementById('menu');
  const searchInput = document.getElementById('gridSearch');

  function esc(s) {
    return String(s).replace(/[&<>"']/g, c => ({
      '&': '&amp;',
      '<': '&lt;',
      '>': '&gt;',
      '"': '&quot;',
      "'": '&#39;'
    }[c]));
  }

  function normalise(s) {
    return String(s || '').toLowerCase().trim();
  }

  function searchKey(parts) {
    return normalise(parts.filter(Boolean).join(' '));
  }

  function flatten(catalog) {
    const areas = Array.isArray(catalog.areas) ? catalog.areas : [];
    const rows = [];

    for (const area of areas) {
      const areaName = area.name || '';
      const children = Array.isArray(area.children) ? area.children : [];

      if (children.length) {
        for (const child of children) {
          rows.push({
            name: `${areaName} - ${child.name || ''}`,
            url: child.url || '#',
            note: child.note || '',
            key: searchKey([areaName, child.name, child.note, area.tags && area.tags.join(' '), child.tags && child.tags.join(' '), child.repo, child.status])
          });
        }
      } else if (area.url) {
        rows.push({
          name: areaName,
          url: area.url,
          note: area.note || '',
          key: searchKey([areaName, area.note, area.tags && area.tags.join(' '), area.repo, area.status])
        });
      }
    }

    return rows.sort((a, b) => a.name.localeCompare(b.name, 'en-GB'));
  }

  function build(catalog) {
    const rows = flatten(catalog);

    if (!rows.length) {
      menu.innerHTML = `<p class="noresult">No launch-ready pages added yet. Working board is below the red line.</p>`;
      return;
    }

    menu.innerHTML = rows.map(row => {
      const note = row.note ? ` <span class="dev-status">(${esc(row.note)})</span>` : '';
      return `<a class="toplink" data-name="${esc(row.key)}" href="${encodeURI(row.url)}">${esc(row.name)}</a>${note}`;
    }).join('') + `<p class="noresult" id="noresult" style="display:none">No match.</p>`;
  }

  function applySearch(raw) {
    const q = normalise(raw);
    let anyVisible = false;

    document.querySelectorAll('.toplink').forEach(el => {
      const show = !q || el.dataset.name.includes(q);
      el.style.display = show ? '' : 'none';
      const note = el.nextElementSibling && el.nextElementSibling.classList.contains('dev-status') ? el.nextElementSibling : null;
      if (note) note.style.display = show ? '' : 'none';
      if (show) anyVisible = true;
    });

    const noresult = document.getElementById('noresult');
    if (noresult) noresult.style.display = anyVisible ? 'none' : '';
  }

  function initChecklist() {
    document.querySelectorAll('.task-check').forEach(box => {
      const id = box.dataset.sessionItem;
      const key = `gg2050-check-${id}`;
      box.checked = sessionStorage.getItem(key) === 'checked';
      box.addEventListener('change', () => {
        if (box.checked) {
          sessionStorage.setItem(key, 'checked');
        } else {
          sessionStorage.removeItem(key);
        }
      });
    });
  }

  function initSessionNotes() {
    const box = document.getElementById('sessionNotes');
    if (!box) return;
    const key = 'gg2050-session-notes-checklist-1';
    const saved = sessionStorage.getItem(key);
    if (saved !== null) box.value = saved;
    box.addEventListener('input', () => sessionStorage.setItem(key, box.value));
  }

  function initRegistryAccess() {
    const footer = document.querySelector('.footer');
    if (!footer || document.getElementById('registryAccess')) return;

    const row = document.createElement('p');
    row.id = 'registryAccess';
    row.style.display = 'none';
    row.style.fontSize = '13px';
    row.style.opacity = '0.75';
    row.innerHTML = `<a href="${REGISTRY_URL}">Registry of all content, repos and dependencies</a>`;
    footer.appendChild(row);

    let typed = '';
    function reveal() {
      row.style.display = '';
      row.scrollIntoView({ block: 'nearest' });
    }

    document.addEventListener('keydown', event => {
      if (event.ctrlKey && event.shiftKey && event.key.toLowerCase() === 'r') {
        reveal();
        return;
      }
      typed = (typed + event.key.toLowerCase()).slice(-8);
      if (typed === 'registry') reveal();
    });
  }

  async function init() {
    initChecklist();
    initSessionNotes();
    initRegistryAccess();

    try {
      const response = await fetch(CATALOG_URL, { cache: 'no-store' });
      if (!response.ok) throw new Error(`HTTP ${response.status}`);
      const catalog = await response.json();
      build(catalog);
      searchInput.addEventListener('input', e => applySearch(e.target.value));
    } catch (err) {
      menu.innerHTML = `<p class="noresult">Launch-ready page index failed to load.</p>`;
      console.error('GlobalGrid2050 dashboard catalog load failed:', err);
    }
  }

  if (document.readyState === 'loading') {
    document.addEventListener('DOMContentLoaded', init);
  } else {
    init();
  }
})();

Registry

A Python command-line tool in GlobalGrid2050 IP and MAC Addresses. It is built from the require step (`require`), the identifier step (`identifier`) and the number step (`number`).

storageglobalgrid2050-ip-and-mac-addresses / registry.py · lines 1–154 of 154 · Entry point · pattern identifier (shared by 2 files)

What it does
It loads data. Defines 13 functions or classes, including require, identifier, number, timestamp, text. Uses libraries argparse, copy, datetime, json, pathlib. Side effects: reads or writes files.
Why it exists in the grid workflow
Domain stage upstream_foresight (topic 'markets-data'): upstream engineering foresight over GB transmission and distribution topology (TSO/DNO, 132kV and above, the REPD pipeline, data centres), which Ventus Ltd states it models for foresight.
Inputs & outputs
In: JSON file registry.json; command-line arguments. Out: JSON file.
Downstream impact
Used directly by 3 files: Test Registry (globalgrid2050-ip-and-mac-addresses); Publish Workflow (globalgrid2050-ip-and-mac-addresses); Build (globalgrid2050-ip-and-mac-addresses, https://ventusltd.github.io/globalgrid2050-ip-and-mac-addresses/). Reached from 1 other entry point, including Test Labels (globalgrid2050-ip-and-mac-addresses). It is itself an entry point, published at https://ventusltd.github.io/globalgrid2050-ip-and-mac-addresses/.
What it achieves
Small public identity registry. UUIDs identify assets, not network interfaces. It accepts `--file`, `--previous` and `--title`.
Why it matters
Imported by Build. Run by Publish Workflow. Checked by Test Registry.
Application
globalgrid2050-ip-and-mac-addresses · / · Python CLI
Uses
argparse, copy, datetime, json, pathlib, re, tempfile, os
Used by
imported by Test Registry (import), run by Publish Workflow (workflow run), imported by Build (import)
Produces
require, identifier, number, timestamp, text, https, validate, load, append, extends, save, main
Defines here
require, identifier, number, timestamp, text, https, validate, load, unique, append, extends, save, main
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
globalgrid2050-ip-and-mac-addresses@2ba77a48351e70648ab8d122c187a87c47d0f6fc registry.py:1-154 · blob 81beac64063ca20f5801273e6e1e55e846398ecb · GitHub at these lines
State
achieves: comment · context: readme_derived · stage: output · effects: filesystem · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: supporting_data
"""Small public identity registry. UUIDs identify assets, not network interfaces."""
import argparse
import copy
from datetime import datetime, timezone
import json
from pathlib import Path
import re
import tempfile
import os
from urllib.parse import urlsplit
import uuid
import ipaddress

ROOT = Path(__file__).resolve().parent
DEFAULT = ROOT / 'data' / 'registry.json'
KINDS = {'solar-panel', 'cable', 'transformer', 'substation', 'inverter', 'site', 'software'}
SCHEMA = 'globalgrid.identity.v1'

def require(condition, message):
    if not condition:
        raise ValueError(message)

def identifier(value):
    require(isinstance(value, str), 'UUID must be text')
    parsed = uuid.UUID(value)
    require(str(parsed) == value and parsed.version == 4 and parsed.variant == uuid.RFC_4122, 'Canonical UUID4 required')
    return parsed

def number(value):
    return str(identifier(value).int).zfill(39)

def timestamp(value):
    require(isinstance(value, str) and bool(re.fullmatch(r'\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z', value)), 'UTC timestamp required')
    datetime.strptime(value, '%Y-%m-%dT%H:%M:%SZ')

def text(value):
    require(isinstance(value, str) and 0 < len(value.strip()) <= 240 and not any(ord(c) < 32 for c in value), 'Expected bounded nonempty text')

def https(value):
    require(isinstance(value, str) and len(value) <= 2048 and not any(c.isspace() or ord(c) < 32 for c in value) and '\\' not in value, 'Invalid address')
    parsed = urlsplit(value)
    require(parsed.scheme == 'https' and parsed.hostname and parsed.username is None and parsed.password is None and '%' not in parsed.netloc, 'HTTPS address without credentials required')
    try:
        ipaddress.ip_address(parsed.hostname)
    except ValueError:
        host = parsed.hostname.encode('idna').decode('ascii')
        require(len(host) <= 253 and all(re.fullmatch(r'[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?', label) for label in host.rstrip('.').split('.')), 'Invalid hostname')
    if parsed.port is not None:
        require(0 < parsed.port <= 65535, 'Invalid port')

def validate(data):
    require(isinstance(data, dict) and set(data) == {'schema', 'records', 'events'}, 'Invalid registry fields')
    require(data['schema'] == SCHEMA and isinstance(data['records'], list) and isinstance(data['events'], list), 'Invalid schema')
    state, event_ids = {}, set()
    for event in data['events']:
        require(isinstance(event, dict) and set(event) == {'id', 'asset_id', 'action', 'at', 'changes'}, 'Invalid event fields')
        identifier(event['id']); identifier(event['asset_id']); timestamp(event['at'])
        require(event['id'] not in event_ids, 'Duplicate event ID'); event_ids.add(event['id'])
        asset, changes = event['asset_id'], event['changes']
        require(isinstance(changes, dict), 'Changes must be an object')
        if event['action'] == 'registered':
            require(asset not in state, 'Asset ID already issued')
            require(set(changes) == {'title', 'kind', 'record_url', 'demonstration'}, 'Registration fields invalid')
            require(changes['kind'] in KINDS and type(changes['demonstration']) is bool, 'Invalid kind/demo flag')
            text(changes['title']); https(changes['record_url'])
            state[asset] = {'id': asset, 'barcode_number': number(asset), **changes, 'status': 'active', 'created_at': event['at'], 'updated_at': event['at']}
        else:
            require(asset in state, 'Unknown asset')
            record = state[asset]
            require(record['status'] == 'active', 'Retired identity is terminal')
            require(event['at'] >= record['updated_at'], 'Event time moved backwards')
            if event['action'] == 'updated':
                require(bool(changes) and set(changes) <= {'title', 'record_url'}, 'Only title and record_url can change')
                if 'title' in changes: text(changes['title'])
                if 'record_url' in changes: https(changes['record_url'])
                record.update(changes)
            elif event['action'] == 'retired':
                require(set(changes) == {'reason'}, 'Retirement reason required'); text(changes['reason'])
                record['status'] = 'retired'
            else:
                raise ValueError('Unknown event action')
            record['updated_at'] = event['at']
    require(data['records'] == list(state.values()), 'Records must exactly equal event replay; identity and history cannot drift')
    return data

def load(path):
    def unique(pairs):
        result = {}
        for key, value in pairs:
            require(key not in result, 'Duplicate JSON property: ' + key); result[key] = value
        return result
    return validate(json.loads(Path(path).read_text(encoding='utf-8'), object_pairs_hook=unique))

def append(data, asset, action, changes):
    validate(data)
    result = copy.deepcopy(data)
    now = datetime.now(timezone.utc).strftime('%Y-%m-%dT%H:%M:%SZ')
    result['events'].append({'id': str(uuid.uuid4()), 'asset_id': asset, 'action': action, 'at': now, 'changes': changes})
    if action == 'registered':
        result['records'].append({'id': asset, 'barcode_number': number(asset), **changes, 'status': 'active', 'created_at': now, 'updated_at': now})
    else:
        record = next((r for r in result['records'] if r['id'] == asset), None)
        require(record is not None, 'Unknown asset')
        if action == 'updated': record.update(changes)
        if action == 'retired': record['status'] = 'retired'
        record['updated_at'] = now
    return validate(result)

def extends(previous, current):
    validate(previous); validate(current)
    require(current['events'][:len(previous['events'])] == previous['events'], 'Published event history cannot be rewritten or truncated')

def save(path, data):
    validate(data)
    path = Path(path); path.parent.mkdir(parents=True, exist_ok=True)
    with tempfile.NamedTemporaryFile(mode='w', encoding='utf-8', newline='\n', dir=path.parent, delete=False) as handle:
        temporary = Path(handle.name); json.dump(data, handle, indent=2); handle.write('\n')
    try:
        load(temporary)
        os.replace(temporary, path)
    finally:
        if temporary.exists(): temporary.unlink()

def main():
    parser = argparse.ArgumentParser(description=__doc__)
    parser.add_argument('--file', type=Path, default=DEFAULT)
    commands = parser.add_subparsers(dest='command', required=True)
    check = commands.add_parser('validate'); check.add_argument('--previous', type=Path)
    register = commands.add_parser('register')
    register.add_argument('--title', required=True); register.add_argument('--kind', choices=sorted(KINDS), required=True)
    register.add_argument('--url', required=True); register.add_argument('--demo', action='store_true')
    register.add_argument('--public', action='store_true', required=True, help='Acknowledge this record is suitable for public publication')
    update = commands.add_parser('update'); update.add_argument('id'); update.add_argument('--title'); update.add_argument('--url')
    retire = commands.add_parser('retire'); retire.add_argument('id'); retire.add_argument('--reason', required=True)
    args = parser.parse_args()
    data = load(args.file) if args.file.exists() else {'schema': SCHEMA, 'records': [], 'events': []}
    if args.command == 'validate':
        require(args.file.exists(), 'Registry missing')
        if args.previous: extends(load(args.previous), data)
        print(json.dumps({'status': 'pass', 'records': len(data['records']), 'distinct_ids': len({r['id'] for r in data['records']}), 'events': len(data['events'])})); return
    if args.command == 'register':
        asset = str(uuid.uuid4())
        result = append(data, asset, 'registered', {'title': args.title, 'kind': args.kind, 'record_url': args.url, 'demonstration': args.demo})
    elif args.command == 'update':
        asset = args.id; changes = {}
        if args.title is not None: changes['title'] = args.title
        if args.url is not None: changes['record_url'] = args.url
        result = append(data, asset, 'updated', changes)
    else:
        asset = args.id; result = append(data, asset, 'retired', {'reason': args.reason})
    save(args.file, result); print(asset)

if __name__ == '__main__':
    main()