GLOBALGRID2050 / EXPLORE CODE

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

Check V9 5 1 and 4 more files (part 2)

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

674 lines of JavaScript and HTML and Shell from globalgrid2050, in 5 files. Topic: Electricity markets and data pipelines. Section 971 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. Check V9 5 1 test · globalgrid2050 / uk_renewables_pipeline/v9.6.1/tests/check_v9_5_1.mjs lines 1–218
  2. Check V9 6 1 test · globalgrid2050 / uk_renewables_pipeline/v9.6.1/tests/check_v9_6_1.mjs lines 1–140
  3. Run V9 6 1 test · globalgrid2050 / uk_renewables_pipeline/v9.6.1/tests/run_v9_6_1.sh lines 1–50
  4. UK Renewables Pipeline — V9 6 2 Page render · globalgrid2050 / uk_renewables_pipeline/v9.6.2/index.html lines 1–163
  5. Check V9 6 2 test · globalgrid2050 / uk_renewables_pipeline/v9.6.2/tests/check_v9_6_2.mjs lines 1–103

Check V9 5 1

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

Set aside from the main view: 90% of its lines are the same as uk_renewables_pipeline/v9.5.1/tests/check_v9_5_1.mjs (globalgrid2050), which stays. (near-copy-of, proposed by families.py). 90% of lines shared with Check V9 5 1; read that one first. All set-aside files, with reasons. Nothing was deleted.

Evidence
  • line-jaccard 0.9009 to globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 uk_renewables_pipeline/v9.5.1/tests/check_v9_5_1.mjs:1-229 4a332d0d7aaf68818aeb5f6c2bc5ed233d78e658
  • sha256 e82fd469c85a22585bccb6df04581ae20e92e3498cc4570b995b975ecade9dd3
  • target sha256 bc9aff1e7c1e1fd38da5b84d15c4edf4fd1ae4b4e6a78d744402158bbd727206
  • group of 2 (identity.json near-copy edges >= 0.9)
  • canonical rule: reachable, newest stamp, core repo, most lines

testglobalgrid2050 / uk_renewables_pipeline/v9.6.1/tests/check_v9_5_1.mjs · lines 1–218 of 218 · Not reached from any entry point (candidate for review) · pattern gitTree (shared by 16 files)

What it does
It tests major project news and the REPD register. Defines readText, readJson, sha256, gitBlob, gitTree. 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.5.1.json; JSON file release.v9.5.json; JSON file release.v9.1.json; JSON file v9_manifest.json; JSON file build_manifest.json; JSON file major_project_news_v9_5_1.json.
What it achieves
It reads text (`readText`) and reads JSON (`readJson`). Defines `readText`, `readJson`, `sha256` and 2 more. It reads `contracts/release.v9.5.1.json`.
Why it matters
No other file in the estate was found to import it.
Application
globalgrid2050 · uk_renewables_pipeline/v9.6.1/tests · JavaScript module
Uses
Project Filter V9 2 (import), Projects V9 5 1 (import), UK Renewables Pipeline — V9 6 1 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, gitTree
Defines here
readText, readJson, sha256, gitBlob, gitTree
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.6.1/tests/check_v9_5_1.mjs:1-218 · blob 2cd070c14d8edc3f00d9b5049e9df56756f6784a · 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 { atlasUrlV9_5_1, compareProjectUpdatesV9_5_1 } from "../scripts/plugins/projects-v9-5-1.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 gitTree = (revisionPath) => execFileSync("git", ["-C", rootPath, "rev-parse", revisionPath], { encoding: "utf8" }).trim();

const contract = await readJson("contracts/release.v9.5.1.json");
const parentContract = await readJson("contracts/release.v9.5.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_v9_5_1.json", root), "utf8"));

assert.equal(contract.release, "9.5.1");
assert.equal(contract.frozen_parent.release, "9.5");
assert.equal(contract.frozen_parent.commit, "3acd56386d0bf2952f8f26754d615d20a7345e35");
assert.equal(contract.frozen_parent.subtree, "c4024d08340528a57f7b890a1d96a0ca0a343916");
assert.equal(contract.frozen_parent.tree_listing_sha256, "ddb147828316c7fba73cd7af4c7bb5c63280fb77b5410a66483b9618d460e15e");
assert.equal(contract.frozen_parent.must_remain_unchanged, true);
assert.equal(gitTree("HEAD:uk_renewables_pipeline/v9.5"), contract.frozen_parent.subtree, "V9.5 subtree changed while building V9.5.1");
assert.equal(gitTree("HEAD:uk_renewables_pipeline/v9.4"), contract.frozen_v9_4.subtree, "V9.4 subtree changed while building V9.5.1");
assert.equal(contract.data_parent.release, "9.1");
assert.equal(contract.data_parent.data_changed, false);
assert.equal(parentContract.release, "9.5");
assert.equal(dataContract.release, "9.1");
assert.equal(releaseManifest.version, "9.5.1");
assert.ok(["CANDIDATE", "LIVE_VALIDATED"].includes(releaseManifest.status));
assert.equal(releaseManifest.frozen_v9_5_commit, contract.frozen_parent.commit);
assert.equal(releaseManifest.frozen_v9_5_subtree, contract.frozen_parent.subtree);
assert.equal(contract.ui_contract.first_click, "updated_desc");
assert.equal(contract.ui_contract.second_click, "updated_asc");
assert.equal(contract.ui_contract.aria_sort_default, "none");
assert.equal(contract.ui_contract.aria_sort_newest, "descending");
assert.equal(contract.ui_contract.aria_sort_oldest, "ascending");
assert.equal(contract.ui_contract.project_table_columns, 11);
assert.equal(contract.news_contract.all_headline_count, 133);
assert.equal(contract.news_contract.relevant_headline_count, 45);
assert.equal(contract.news_contract.v9_4_baseline_headline_count, 125);
assert.equal(contract.news_contract.relevant_filter_is_functional, true);
assert.equal(contract.news_contract.discovery_only_drives_project_signal, false);
assert.equal(contract.news_contract.beacon_fen.repd_ref, "13599");
assert.equal(contract.news_contract.beacon_fen.official_capacity_mw, 400);

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_5_1(left, right, "desc"));
const oldestFirst = [...projects].sort((left, right) => compareProjectUpdatesV9_5_1(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_5_1(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_5_1(missingGeometry), "");

assert.equal(news.schema, "globalgrid2050.major-project-news.v9.5.1");
assert.equal(news.all_headline_count, news.all_items.length);
assert.equal(news.relevant_headline_count, news.canonical_items.length);
assert.equal(news.all_items.length, 133);
assert.equal(news.canonical_items.length, 45);
assert.equal(news.v9_4_baseline_headline_count, 125);
assert.ok(news.canonical_items.every((item) => item.role === "PRIMARY_MATCH"));
assert.ok(news.canonical_items.every((item) => item.eligible_for_news_signal === true));
assert.ok(news.canonical_items.every((item) => item.gg_project_id === `GG2050-REPD-${item.repd_ref}`));
assert.equal(news.all_items.filter((item) => item.canonical_relevant).length, 45);
const beacon = news.canonical_items.find((item) => item.headline === "Beacon Fen Energy Park development consent decision announced");
assert.ok(beacon);
assert.equal(beacon.repd_ref, "13599");
assert.equal(beacon.capacity_mw, 400);
assert.equal(beacon.operator, "Low Carbon Limited");
const brecks = news.canonical_items.filter((item) => item.repd_ref === "10087");
assert.ok(brecks.length > 0);
assert.ok(brecks.every((item) => item.gg_development_id));

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 headerCss = await readText("styles/v9-4.css");
const responsiveCss = await readText("styles/v9-5-1.css");
const frozenParentCss = await readFile(new URL("uk_renewables_pipeline/v9/styles/v9-3.css", root), "utf8");
const projectsV95 = await readText("scripts/plugins/projects-v9-5-1.js");
const newspaperV95 = await readText("scripts/plugins/newspaper-v9-5-1.js");
const app = await readText("scripts/app-v9-5-1.js");
const rootIndex = await readFile(new URL("index.html", root), "utf8");
const packageJson = await readJson("package.json");

assert.match(html, /UK RENEWABLES PIPELINE V9\.5\.1/);
assert.match(html, />V9\.5\.1 (?:CANDIDATE|LIVE)</);
assert.match(html, /V9\.5 FROZEN APP/);
assert.match(html, /V9\.4 FROZEN APP/);
const styleOrder = [
  html.indexOf("styles/v7.css?v=9.5.1"),
  html.indexOf("styles/mobile.css?v=9.5.1"),
  html.indexOf("styles/v9-3.css?v=9.5.1"),
  html.indexOf("styles/v9-4.css?v=9.5.1"),
  html.indexOf("styles/v9-5-1.css?v=9.5.1"),
];
assert.ok(styleOrder.every((value) => value >= 0));
assert.ok(styleOrder.every((value, index) => index === 0 || value > styleOrder[index - 1]));
assert.equal((html.match(/<canvas id="g[1-3]"/g) || []).length, 3);
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, /id="repdUpdatedHeader" aria-sort="none"/);
assert.match(html, /id="sortUpdated"/);
assert.match(html, /id="updatedSortIndicator"[^>]*>↕<\/span>/);
assert.match(html, /id="sortProjects"/);
assert.match(html, /value="updated_desc"/);
assert.match(html, /value="updated_asc"/);
assert.match(html, /scripts\/app-v9-5-1\.js\?v=9\.5\.1/);

assert.equal(sha256(mobileCss), "9855b9c11255a85f477873d07cca45b057aedcdc8a6cc4aab2d29a0ffaac9b85");
assert.equal(additiveCss, frozenParentCss, "V9.4 changed its inherited V9.3.1 stylesheet copy");
const parentCssPrefix = parentAdditiveCss.trimEnd();
assert.ok(additiveCss.startsWith(parentCssPrefix), "V9.3 additive CSS no longer preserves the complete V9.2 prefix");
assert.match(headerCss, /\.repd-updated-heading button/);
assert.match(headerCss, /#updatedSortIndicator/);
assert.match(headerCss, /focus-visible/);
assert.match(responsiveCss, /@media\s*\(min-width:\s*921px\)\s*and\s*\(max-width:\s*1100px\)/);
assert.match(responsiveCss, /\.header\s*\{[^}]*flex-direction:\s*column[^}]*\}/s);
assert.match(responsiveCss, /\.status\s*\{[^}]*width:\s*100%[^}]*white-space:\s*normal[^}]*\}/s);

assert.match(app, /gauges-v9-2\.js/);
assert.match(app, /projects-v9-5-1\.js/);
assert.match(app, /newspaper-v9-5-1\.js/);
assert.match(projectsV95, /globalgrid2050_uk_renewables_pipeline_v9_5_1_/);
assert.match(projectsV95, /compareProjectUpdatesV9_5_1/);
assert.match(projectsV95, /function updateSortHeader\(\)/);
assert.match(projectsV95, /sortMode === "updated_desc" \? "updated_asc" : "updated_desc"/);
assert.match(projectsV95, /document\.getElementById\("sortUpdated"\)\.onclick/);
assert.match(projectsV95, /header\.setAttribute\("aria-sort", "descending"\)/);
assert.match(projectsV95, /header\.setAttribute\("aria-sort", "ascending"\)/);
assert.match(newspaperV95, /item\.role === "PRIMARY_MATCH"/);
assert.match(newspaperV95, /newsIndex\.get\(String\(project\.repd_ref\)\)/);
assert.match(newspaperV95, /major_project_news_v9_5_1\.json/);
assert.match(newspaperV95, /state\.newsMode === "RELEVANT" && item\.canonical_relevant !== true/);
assert.match(newspaperV95, /payload\.v9_4_baseline_headline_count === 125/);
assert.doesNotMatch(newspaperV95, /normaliseProject\(project\.name\)/);

assert.match(rootIndex, /UK Renewables Pipeline V9\.3\.1/);
assert.match(rootIndex, /UK Renewables Pipeline V9\.4/);
assert.match(rootIndex, /UK Renewables Pipeline V9\.5/);
assert.match(rootIndex, /UK Renewables Pipeline V9\.5\.1/);
assert.equal(packageJson.version, "9.5.1");
assert.equal(packageJson.scripts.validate, "bash tests/run_v9_5_1.sh");
assert.equal(packageJson.scripts["validate:browser"], "V9_BROWSER_SMOKE=1 bash tests/run_v9_5_1.sh");

console.log("V9.5.1: PASS (133 ALL, 45 RELEVANT, Beacon Fen REPD 13599; V9.5/V9.4 frozen)");

Check V9 6 1

A JavaScript module in the tests folder of GlobalGrid2050 that tests major project news, using SHA-256.

Set aside from the main view: 96% of its lines are the same as uk_renewables_pipeline/202609051156/tests/check_v9_6_1.mjs (globalgrid2050), which stays. (near-copy-of, proposed by families.py). 96% of lines shared with Check V9 6 1; read that one first. All set-aside files, with reasons. Nothing was deleted.

Evidence
  • line-jaccard 0.9649 to globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 uk_renewables_pipeline/202609051156/tests/check_v9_6_1.mjs:1-140 d8b4991ddf2eaafd4c169b61afa06c0f5eed2866
  • sha256 cdb4828290672f942a3c6683d6990a630480a604b71f6d8d4163b5e260d45516
  • target sha256 f627bbc53dd6e6f2edc81ad3865821949b3c65a38ee3b14dc2b1b0730994d818
  • group of 2 (identity.json near-copy edges >= 0.9)
  • canonical rule: reachable, newest stamp, core repo, most lines

testglobalgrid2050 / uk_renewables_pipeline/v9.6.1/tests/check_v9_6_1.mjs · lines 1–140 of 140 · pattern filesBelow (shared by 2 files)

What it does
It tests major project news. Defines 6 functions or classes, including text, json, sha256, gitTree, filesBelow. Uses libraries node:assert/strict, node:child_process, node:crypto, node:fs/promises, node:url. Side effects: 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.
Inputs & outputs
In: JSON file release.v9.6.1.json; JSON file v9_manifest.json; JSON file build_manifest.json; JSON file major_project_news_v9_5_1.json.
Downstream impact
Used directly by 1 file: Run V9 6 1 (globalgrid2050). Reached from 1 other entry point, including GlobalGrid2050 V9 6 1 Validate Workflow (globalgrid2050).
What it achieves
It is built from the git tree helper (`gitTree`), the files below helper (`filesBelow`) and the digest map helper (`digestMap`). Defines `text`, `json`, `sha256` and 3 more.
Why it matters
Checked by Run V9 6 1.
Application
globalgrid2050 · uk_renewables_pipeline/v9.6.1/tests · JavaScript module
Uses
UK Renewables Pipeline — V9 6 1 Page (new URL import.meta.url), UK Renewables Pipeline — V9 5 1 Page (new URL import.meta.url), node:assert/strict, node:child_process, node:crypto, node:fs/promises, node:url
Used by
run by Run V9 6 1 (script call)
Produces
text, json, sha256, gitTree, filesBelow, digestMap
Defines here
text, json, sha256, gitTree, filesBelow, digestMap
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.6.1/tests/check_v9_6_1.mjs:1-140 · blob 0bb0c3686bfe2466214b560b7ddb32d0a72f9cdd · GitHub at these lines
State
achieves: name · context: readme_derived · stage: ingest · effects: filesystem, process · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: production_core
import assert from "node:assert/strict";
import { execFileSync } from "node:child_process";
import { createHash } from "node:crypto";
import { access, readdir, readFile } from "node:fs/promises";
import { fileURLToPath } from "node:url";

const base = new URL("../", import.meta.url);
const parent = new URL("../../v9.5.1/", import.meta.url);
const root = new URL("../../../", import.meta.url);
const rootPath = fileURLToPath(root);
const text = (url) => readFile(url, "utf8");
const json = async (url) => JSON.parse(await text(url));
const sha256 = (value) => createHash("sha256").update(value).digest("hex");
const gitTree = (revisionPath) => execFileSync(
  "git", ["-C", rootPath, "rev-parse", revisionPath], { encoding: "utf8" },
).trim();

async function filesBelow(directory, prefix = "") {
  const entries = await readdir(directory, { withFileTypes: true });
  const files = [];
  for (const entry of entries.sort((a, b) => a.name.localeCompare(b.name))) {
    if (["__pycache__", "node_modules"].includes(entry.name) || entry.name.endsWith(".pyc")) continue;
    const relative = prefix ? `${prefix}/${entry.name}` : entry.name;
    const url = new URL(`${entry.name}${entry.isDirectory() ? "/" : ""}`, directory);
    if (entry.isDirectory()) files.push(...await filesBelow(url, relative));
    else files.push(relative);
  }
  return files;
}

async function digestMap(directory) {
  const files = await filesBelow(directory);
  const rows = await Promise.all(files.map(async (path) => [
    path,
    sha256(await readFile(new URL(path, directory))),
  ]));
  return new Map(rows);
}

const allowedModified = new Set([
  "README.md",
  "index.html",
  "package-lock.json",
  "package.json",
]);
const allowedAdded = new Set([
  "contracts/release.v9.6.1.json",
  "docs/releases/9.6.1.md",
  "styles/v9-6-1.css",
  "tests/browser_smoke_v9_6_1.mjs",
  "tests/check_v9_6_1.mjs",
  "tests/run_v9_6_1.sh",
]);

assert.equal(
  gitTree("HEAD:uk_renewables_pipeline/v9.5.1"),
  "20b8f6fa97390f2f9897ca23031d3fdc1dd203e7",
  "the validated V9.5.1 parent subtree changed",
);

const [parentFiles, targetFiles] = await Promise.all([digestMap(parent), digestMap(base)]);
assert.deepEqual(
  [...targetFiles.keys()].filter((path) => !parentFiles.has(path)).sort(),
  [...allowedAdded].sort(),
  "V9.6.1 contains an unapproved added or missing file",
);
assert.deepEqual(
  [...parentFiles.keys()].filter((path) => !targetFiles.has(path)),
  [],
  "V9.6.1 omitted a V9.5.1 parent file",
);
for (const [path, digest] of parentFiles) {
  if (!allowedModified.has(path)) {
    assert.equal(targetFiles.get(path), digest, `${path} differs from frozen V9.5.1`);
  }
}

const [contract, manifest, html, css, packageJson] = await Promise.all([
  json(new URL("contracts/release.v9.6.1.json", base)),
  json(new URL("data/v9_manifest.json", base)),
  text(new URL("index.html", base)),
  text(new URL("styles/v9-6-1.css", base)),
  json(new URL("package.json", base)),
]);

assert.equal(contract.release, "9.6.1");
assert.ok(["CANDIDATE", "LIVE_VALIDATED"].includes(contract.status));
assert.equal(contract.frozen_parent.commit, "8b2432be75f224562fc1c416dbcc3319e31a47a8");
assert.equal(contract.frozen_parent.subtree, "20b8f6fa97390f2f9897ca23031d3fdc1dd203e7");
assert.equal(contract.runtime.app, "scripts/app-v9-5-1.js");
assert.equal(contract.runtime.data_changed, false);
assert.equal(contract.runtime.javascript_changed, false);
assert.equal(contract.runtime.news_changed, false);
assert.equal(contract.ui_contract.desktop_changed, false);
assert.equal(contract.ui_contract.project_table_inherited_min_width_px, 1280);
assert.equal(contract.ui_contract.capacity_range_filter, false);
assert.equal(contract.ui_contract.forced_table_width_px, null);
assert.equal(manifest.version, "9.5.1", "the V9.5.1 runtime manifest must remain unchanged");
assert.equal(packageJson.version, "9.6.1");

assert.match(html, /UK RENEWABLES PIPELINE V9\.6\.1/);
assert.match(html, /styles\/v9-6-1\.css\?v=9\.6\.1/);
assert.match(html, /scripts\/app-v9-5-1\.js\?v=9\.6\.1/);
assert.match(html, /V9\.6 DISCONTINUED/);
assert.doesNotMatch(html, /minCapacity|maxCapacity|capacity-controls/);
assert.doesNotMatch(html, /app-v9-6\.js|project-filter-v9-6|projects-v9-6/);
assert.equal((html.match(/class="card"/g) || []).length, 3);
assert.equal((html.match(/<th(?:\s|>)/g) || []).length, 11);

assert.match(css, /@media\s*\(max-width:\s*768px\)/);
assert.match(css, /-webkit-overflow-scrolling:\s*touch/);
assert.match(css, /overflow-x:\s*auto/);
assert.match(css, /\.tablewrap \.hide-mobile\s*\{[^}]*display:\s*table-cell/s);
assert.doesNotMatch(css, /\bmin-width\s*:|\n\s*width\s*:|1850|1500/);
assert.doesNotMatch(css, /gauges|stories|header|sidebar|newspaper|filters|display:\s*grid/);

for (const forbidden of [
  "scripts/app-v9-6.js",
  "scripts/core/project-filter-v9-6.js",
  "scripts/plugins/projects-v9-6.js",
]) {
  await assert.rejects(access(new URL(forbidden, base)), `${forbidden} must not exist in V9.6.1`);
}

const buildManifest = await json(new URL("data/v9.1/build_manifest.json", base));
const parts = await Promise.all(buildManifest.project_partitions.map(({ path }) => json(new URL(path, base))));
const projects = parts.flatMap((part) => part.projects);
assert.equal(projects.length, 7680);
assert.equal(Number(projects.reduce((sum, project) => sum + project.capacity_mw, 0).toFixed(2)), 356474.09);
assert.equal(Math.max(...projects.map((project) => project.capacity_mw)), 4100);

const news = await json(new URL("dist/major_project_news_v9_5_1.json", root));
assert.equal(news.all_items.length, 133);
assert.equal(news.canonical_items.length, 45);
const beacon = news.canonical_items.find((item) => item.headline === "Beacon Fen Energy Park development consent decision announced");
assert.equal(beacon.repd_ref, "13599");
assert.equal(beacon.operator, "Low Carbon Limited");
assert.equal(beacon.capacity_mw, 400);

console.log("V9.6.1 static gate: PASS (V9.5.1 byte parity plus mobile-only scroll CSS)");

Run V9 6 1

A shell script in the tests folder of GlobalGrid2050.

Set aside from the main view: 95% of its lines are the same as uk_renewables_pipeline/202609051156/tests/run_v9_6_1.sh (globalgrid2050), which stays. (near-copy-of, proposed by families.py). 94% of lines shared with Run V9 6 1; read that one first. All set-aside files, with reasons. Nothing was deleted.

Evidence
  • line-jaccard 0.9487 to globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 uk_renewables_pipeline/202609051156/tests/run_v9_6_1.sh:1-50 145f9f3d6ada74f6102e6d11fd3db3049372be2c
  • sha256 7f3be97fa398196d050b2f9680775a9fca862f14e119acee46ca3a673ad42f60
  • target sha256 19d832b39ab03fd11d5da3fde4518206de8caa02c958898ce2da17a3b40e0f03
  • group of 2 (identity.json near-copy edges >= 0.9)
  • canonical rule: reachable, newest stamp, core repo, most lines

testglobalgrid2050 / uk_renewables_pipeline/v9.6.1/tests/run_v9_6_1.sh · lines 1–50 of 50 · Entry point

What it does
It tests its inputs. Side effects: makes network requests; 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.
Downstream impact
Used directly by 1 file: GlobalGrid2050 V9 6 1 Validate Workflow (globalgrid2050).
What it achieves
No statement of purpose was found in the file, a README line naming it, or its name.
Why it matters
Run by GlobalGrid2050 V9 6 1 Validate Workflow.
Application
globalgrid2050 · uk_renewables_pipeline/v9.6.1/tests · shell script
Uses
Check V9 6 1 (script call)
Used by
run by GlobalGrid2050 V9 6 1 Validate Workflow (workflow run)
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.6.1/tests/run_v9_6_1.sh:1-50 · blob d5a3b05560da7d7af60dbf2782d2f402af8b1a40 · GitHub at these lines
State
achieves: name · context: readme_derived · stage: ingest · effects: network, process · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: production_core
#!/usr/bin/env bash
set -euo pipefail

HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
V961="$(cd "$HERE/.." && pwd)"
V951="$(cd "$V961/../v9.5.1" && pwd)"
ROOT="$(cd "$V961/../.." && pwd)"

test "$(git -C "$ROOT" rev-parse 'HEAD:uk_renewables_pipeline/v9.5.1')" = "20b8f6fa97390f2f9897ca23031d3fdc1dd203e7"

# Prove the requested clone boundary before testing behaviour.
diff -qr -x __pycache__ -x '*.pyc' "$V951/data" "$V961/data"
diff -qr -x __pycache__ -x '*.pyc' "$V951/scripts" "$V961/scripts"
diff -qr -x __pycache__ -x '*.pyc' "$V951/fixtures" "$V961/fixtures"

# Re-run the complete frozen-parent data, news, identity and static suite.
# Do not leak V9.6.1's browser flag into the frozen parent: Playwright is
# installed in the V9.6.1 package and its browser proof below covers both apps.
V9_BROWSER_SMOKE=0 bash "$V951/tests/run_v9_5_1.sh"

# Run the stricter allowed-delta gate against the V9.6.1 clone. The complete
# inherited runtime behaviour is exercised by the browser proof below.
node "$HERE/check_v9_6_1.mjs"

while IFS= read -r source; do
  node --check "$source"
done < <(find "$V961/scripts" -type f -name '*.js' -print | sort)

if [[ "${V9_BROWSER_SMOKE:-0}" == "1" ]]; then
  browser_base_url="${V9_BASE_URL:-http://127.0.0.1:8765/uk_renewables_pipeline/v9.6.1/}"
  if [[ "$browser_base_url" == http://127.0.0.1:* ]]; then
    python3 -m http.server 8765 --directory "$ROOT" >/tmp/globalgrid2050-v9-6-1-http.log 2>&1 &
    server_pid=$!
    trap 'kill "$server_pid" 2>/dev/null || true' EXIT
    for _ in {1..20}; do
      if curl --fail --silent --output /dev/null "$browser_base_url"; then
        break
      fi
      sleep 0.25
    done
    curl --fail --silent --output /dev/null "$browser_base_url"
  fi
  V9_BASE_URL="$browser_base_url" node "$HERE/browser_smoke_v9_6_1.mjs"
  if [[ -n "${server_pid:-}" ]]; then
    kill "$server_pid" 2>/dev/null || true
    trap - EXIT
  fi
fi

echo "V9.6.1 validation suite: PASS ($ROOT)"

UK Renewables Pipeline — V9 6 2 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.6.2/.

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

What it does
It draws the REPD register, solar and battery storage (BESS). Uses libraries styles/v7.css?v=9.6.2. 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 59 files: Check V9 6 2 (globalgrid2050); UK Renewables Pipeline — V9 7 Page (globalgrid2050, https://globalgrid2050.com/uk_renewables_pipeline/v9.7/); PipelineNews — PipelineNews Page (pipelinenews, https://ventusltd.github.io/pipelinenews/archive/202608261547-pipelinenews/202608260159-pipelinenews/); PipelineNews — News v1 Page (pipelinenews, https://ventusltd.github.io/pipelinenews/archive/202608261547-pipelinenews/newsv1/); and 55 more. Reached from 32 other entry points, including Grid Engine — Compute Against Charging Page (globalgrid2050, https://globalgrid2050.com/grid_engine/202609060324-compute-against-charging/); Grid Engine — Connection Cap Page (globalgrid2050, https://globalgrid2050.com/grid_engine/202609060212-connection-cap/); Grid Engine — Corridor Estimate Page (globalgrid2050, https://globalgrid2050.com/grid_engine/202609060237-corridor-estimate/). It is itself an entry point, published at https://globalgrid2050.com/uk_renewables_pipeline/v9.6.2/.
What it achieves
Its code works with 1 MW.
Why it matters
Loaded by the V9 7 page at https://globalgrid2050.com/uk_renewables_pipeline/v9.7/ and 56 other pages. Also imported by Estate Menu, from Spiders. Checked by Check V9 6 2.
Application
globalgrid2050 · uk_renewables_pipeline/v9.6.2 · page
Uses
Mobile (stylesheet), V9 3 (stylesheet), V9 4 (stylesheet), V9 5 1 (stylesheet), V9 6 1 (stylesheet), UK Renewables Pipeline — V9 6 1 Page (link), UK Renewables Pipeline — V9 6 Page (link), UK Renewables Pipeline — V9 5 1 Page (link), and 13 more, styles/v7.css?v=9.6.2, https://cdn.jsdelivr.net/npm/chart.js
Used by
referenced by Check V9 6 2 (new URL import.meta.url), linked from UK Renewables Pipeline — V9 7 Page (link), linked from PipelineNews — PipelineNews Page (link), linked from PipelineNews — News v1 Page (link), linked from PipelineNews — News v7 Page (link), named by URL in Estate Menu (estate URL), linked from Homepage V037 (link), linked from Homepage V038 (link), and 51 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.6.2/index.html:1-163 · blob fe2b8e6eb9fb588e953d16c050df235c0d7c4b10 · GitHub at these lines
State
achieves: name · 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.6.2</title>
  <link rel="stylesheet" href="styles/v7.css?v=9.6.2">
  <link rel="stylesheet" href="styles/mobile.css?v=9.6.2">
  <link rel="stylesheet" href="styles/v9-3.css?v=9.6.2">
  <link rel="stylesheet" href="styles/v9-4.css?v=9.6.2">
  <link rel="stylesheet" href="styles/v9-5-1.css?v=9.6.2">
  <link rel="stylesheet" href="styles/v9-6-1.css?v=9.6.2">
  <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.6.2</small>
    </div>
    <nav class="nav">
      <a class="active" href="#">V9.6.2 LIVE VALIDATED</a>
      <a href="../v9.6.1/">V9.6.1 FROZEN APP</a>
      <a href="../v9.6/">V9.6 DISCONTINUED</a>
      <a href="../v9.5.1/">V9.5.1 FROZEN APP</a>
      <a href="../v9.5/">V9.5 FROZEN APP</a>
      <a href="../v9.4/">V9.4 FROZEN APP</a>
      <a href="../v9/">V9.3.1 FROZEN APP</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.6.2</h1>
      <div class="status">● 133 HEADLINES · 45 UK · 19 INTERNATIONAL · FULL ≥1 MW</div>
    </div>
    <div class="meta">
      <strong>V9.6.2 · UK + INTERNATIONAL NEWS · LIVE VALIDATED · 24 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>UK requires canonical REPD binding · INTERNATIONAL requires explicit non-UK geography plus solar or battery context · international items never drive REPD project signals</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="UK">UK</button>
        <button data-news="INTERNATIONAL">INTERNATIONAL</button>
        <button data-news="US">US</button>
        <button data-news="EUROPE">EUROPE</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-heading" id="repdUpdatedHeader" aria-sort="none">
              <button id="sortUpdated" type="button" aria-label="Sort by REPD updated date, newest first">
                REPD UPDATED <span id="updatedSortIndicator" aria-hidden="true">↕</span>
              </button>
            </th>
            <th>NEWS SIGNAL</th>
            <th>ACTIONS</th>
          </tr>
        </thead>
        <tbody id="tbody"></tbody>
      </table>
    </div>
  </main>
  <script type="module" src="scripts/app-v9-6-2.js?v=9.6.2"></script>
  <script type="module" src="scripts/plugins/capacity-presentation-v9-3.js?v=9.6.2"></script>
</body>
</html>

Check V9 6 2

A JavaScript module in the tests folder of GlobalGrid2050 that tests major project news, battery storage (BESS) and solar.

Set aside from the main view: 95% of its lines are the same as uk_renewables_pipeline/202609051156/tests/check_v9_6_2.mjs (globalgrid2050), which stays. (near-copy-of, proposed by families.py). 95% of lines shared with Check V9 6 2; read that one first. All set-aside files, with reasons. Nothing was deleted.

Evidence
  • line-jaccard 0.9506 to globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 uk_renewables_pipeline/202609051156/tests/check_v9_6_2.mjs:1-103 68b39ffccaa8b4fcea00004af9a50704e51ab0fb
  • sha256 27477483bf37e39b8f8e3fe813a604215972f1b65f1dfd19bba0bc0f5f57d00b
  • target sha256 f61987efea8adcd11c5194ea20511d5c92f735d06785464cf6ee65ab6805790a
  • group of 2 (identity.json near-copy edges >= 0.9)
  • canonical rule: reachable, newest stamp, core repo, most lines

testglobalgrid2050 / uk_renewables_pipeline/v9.6.2/tests/check_v9_6_2.mjs · lines 1–103 of 103 · pattern story (shared by 6 files)

What it does
It tests major project news, battery storage (BESS) and solar. Defines text, json, gitTree, story. Uses libraries node:assert/strict, node:child_process, node:fs/promises, node:url. Side effects: 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: battery storage (BESS), solar.
Inputs & outputs
In: JSON file release.v9.6.2.json; JSON file major_project_news_v9_5_1.json.
Downstream impact
Used directly by 1 file: Run V9 6 2 (globalgrid2050). Reached from 1 other entry point, including GlobalGrid2050 V9 6 2 Validate Workflow (globalgrid2050).
What it achieves
It is built from the git tree helper (`gitTree`) and the story step (`story`). Defines `text`, `json`, `gitTree` and 1 more. Its code works with 150 MW, 160 MWh and 170 MW.
Why it matters
Checked by Run V9 6 2.
Application
globalgrid2050 · uk_renewables_pipeline/v9.6.2/tests · JavaScript module
Uses
News Regions V9 6 2 (import), UK Renewables Pipeline — V9 6 2 Page (new URL import.meta.url), node:assert/strict, node:child_process, node:fs/promises, node:url
Used by
run by Run V9 6 2 (script call)
Produces
text, json, gitTree, story
Defines here
text, json, gitTree, story
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.6.2/tests/check_v9_6_2.mjs:1-103 · blob 9b69a5e6d20733e15858dcb87b4e46890426019a · GitHub at these lines
State
achieves: name · context: readme_derived · stage: ingest · effects: filesystem, process · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: production_core
import assert from "node:assert/strict";
import { execFileSync } from "node:child_process";
import { readFile } from "node:fs/promises";
import { fileURLToPath } from "node:url";
import {
  classifyInternationalV9_6_2,
  regionalCountsV9_6_2,
  ukEvidenceV9_6_2,
} from "../scripts/core/news-regions-v9-6-2.js";

const base = new URL("../", import.meta.url);
const root = new URL("../../../", import.meta.url);
const rootPath = fileURLToPath(root);
const text = (url) => readFile(url, "utf8");
const json = async (url) => JSON.parse(await text(url));
const gitTree = (revisionPath) => execFileSync(
  "git", ["-C", rootPath, "rev-parse", revisionPath], { encoding: "utf8" },
).trim();

assert.equal(
  gitTree("HEAD:uk_renewables_pipeline/v9.6.1"),
  "530856b50a726511dd1ded7a9c20ac03777e690e",
  "the validated V9.6.1 parent subtree changed",
);

const [contract, html, packageJson, feed] = await Promise.all([
  json(new URL("contracts/release.v9.6.2.json", base)),
  text(new URL("index.html", base)),
  json(new URL("package.json", base)),
  json(new URL("dist/major_project_news_v9_5_1.json", root)),
]);

assert.equal(contract.release, "9.6.2");
assert.ok(["CANDIDATE", "LIVE_VALIDATED"].includes(contract.status));
assert.equal(contract.frozen_parent.subtree, "530856b50a726511dd1ded7a9c20ac03777e690e");
assert.equal(contract.runtime.project_data_changed, false);
assert.equal(contract.runtime.uk_matching_changed, false);
assert.equal(contract.runtime.regional_project_signal_eligible, false);
assert.equal(packageJson.version, "9.6.2");

assert.match(html, /UK RENEWABLES PIPELINE V9\.6\.2/);
for (const mode of ["UK", "INTERNATIONAL", "US", "EUROPE"]) {
  assert.match(html, new RegExp(`data-news="${mode}"`));
}
assert.doesNotMatch(html, /data-news="RELEVANT"/);
assert.match(html, /scripts\/app-v9-6-2\.js\?v=9\.6\.2/);
assert.equal((html.match(/<th(?:\s|>)/g) || []).length, 11);

assert.equal(feed.all_items.length, 133);
assert.equal(feed.canonical_items.length, 45);
assert.equal(feed.all_items.filter((item) => item.canonical_relevant === true).length, 45);
for (const item of feed.canonical_items) {
  assert.equal(item.role, "PRIMARY_MATCH");
  assert.equal(item.eligible_for_news_signal, true);
  assert.equal(item.gg_project_id, `GG2050-REPD-${item.repd_ref}`);
}

const counts = regionalCountsV9_6_2(feed.all_items);
assert.deepEqual(counts, { international: 19, us: 4, europe: 9, other: 6 });
assert.deepEqual(counts, {
  international: contract.expected.international_headline_count,
  us: contract.expected.us_headline_count,
  europe: contract.expected.europe_headline_count,
  other: contract.expected.international_other_headline_count,
});

const regional = feed.all_items.flatMap((item) => {
  const classification = classifyInternationalV9_6_2(item);
  return classification ? [{ item, classification }] : [];
});
assert.equal(regional.length, 19);
for (const { item, classification } of regional) {
  assert.equal(item.canonical_relevant, false);
  assert.equal(classification.project_signal_eligible, false);
  assert.equal(classification.canonical_identity, false);
  assert.ok(["SOLAR", "BESS", "SOLAR + BESS"].includes(classification.technology));
  assert.equal(ukEvidenceV9_6_2(item), "");
}

function story(headline) {
  return feed.all_items.find((item) => item.headline === headline);
}

assert.equal(classifyInternationalV9_6_2(story(
  "New Jersey Board of Public Utilities releases 150MW BTM energy storage proposal - Energy-Storage.News",
)).region, "US");
assert.equal(classifyInternationalV9_6_2(story(
  "Capital Dynamics acquires 170MW/680MWh BESS in County Kerry, Ireland",
)).region, "EUROPE");
assert.equal(classifyInternationalV9_6_2(story(
  "‘One market into many’: AER says battery storage systems are reshaping Australia’s NEM - Energy-Storage.News",
)).region, "INTERNATIONAL_OTHER");
assert.equal(classifyInternationalV9_6_2(story(
  "Canadian Solar says patent dispute with Maxeon is formally terminated",
)), null, "company name alone must not establish geography");
assert.equal(classifyInternationalV9_6_2(story(
  "EDF to optimise Chinese lithium giant Ganfeng’s 160MWh Kintore battery storage system",
)), null, "the Kintore UK project must not leak into INTERNATIONAL");
assert.equal(classifyInternationalV9_6_2(story(
  "Beacon Fen Energy Park development consent decision announced",
)), null, "canonical UK stories must not leak into INTERNATIONAL");

console.log("V9.6.2 static gate: PASS (45 UK; 19 international = 4 US + 9 Europe + 6 other)");