In this section
- Check V9 34 test · globalgrid2050 / uk_renewables_pipeline/202611171141/tests/check_v9_34.mjs lines 1–123
- Run V9 34 test · globalgrid2050 / uk_renewables_pipeline/202611171141/tests/run_v9_34.sh lines 1–97
- Check V9 35 test · globalgrid2050 / uk_renewables_pipeline/202611171217/tests/check_v9_35.mjs lines 1–123
- Run V9 35 test · globalgrid2050 / uk_renewables_pipeline/202611171217/tests/run_v9_35.sh lines 1–97
- Model transform · globalgrid2050 / uk_renewables_pipeline/202611171507/scripts/layers/model.mjs lines 1–59
- Pipeline Layers energy-data · globalgrid2050 / uk_renewables_pipeline/202611171507/scripts/layers/pipeline-layers.css lines 1–35
- Check V9 36 test · globalgrid2050 / uk_renewables_pipeline/202611171507/tests/check_v9_36.mjs lines 1–123
Check V9 34
A JavaScript module in the tests folder of GlobalGrid2050 that tests major project news, interconnectors and the Renewable Energy Planning Database (REPD) register, using SHA-256.
Set aside from the main view: 91% of its lines are the same as uk_renewables_pipeline/202611180520/tests/check_v9_45.mjs (globalgrid2050), which stays. (near-copy-of, proposed by families.py). 90% of lines shared with Check V9 45; read that one first. All set-aside files, with reasons. Nothing was deleted.
Evidence
- line-jaccard 0.9099 to globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 uk_renewables_pipeline/202611180520/tests/check_v9_45.mjs:1-123 41fe9e5b51a076d6ffbe2ce5a8afe5a5265f4d56
- sha256 e47c630c94dae6d7943359459bfc3a37d3f99ab4344197a51b6694f653f4848b
- target sha256 e8956eb33f4e20f2a38ba682b879bfbfb35a358854d686c40467140d601f9e5b
- group of 15 (identity.json near-copy edges >= 0.9)
- canonical rule: reachable, newest stamp, core repo, most lines
testglobalgrid2050 / uk_renewables_pipeline/202611171141/tests/check_v9_34.mjs · lines 1–123 of 123 · version 2026-11-17 11:41
- What it does
- It tests major project news, interconnectors and the REPD register. Defines text, json, sha256, fmt. Uses libraries node:assert/strict, node:crypto, node:fs/promises, node:url, node:path. Side effects: reads or writes files.
- 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: interconnectors, the REPD register.
- Inputs & outputs
- In: JSON file release.v9.1.json; JSON file release.v9.5.1.json; JSON file build_manifest.json; JSON file major_project_news_v9_5_1.json; JSON file interconnectors.v9.8.json; JSON file interconnectors.json; JSON file interconnectors_manifest.json.
- Downstream impact
- Used directly by 1 file: Run V9 34 (globalgrid2050).
- What it achieves
- It is built from the text step (`text`), the JSON step (`json`) and the sha256 step (`sha256`). Pipeline News V9.34, proven from the bytes and through the page's OWN loaders (the pattern of `check_v9_13.mjs`).
- Why it matters
- Checked by Run V9 34.
- Application
- globalgrid2050 · uk_renewables_pipeline/202611171141/tests · JavaScript module
- Uses
- Canonical Projects V9 5 1 (new URL import.meta.url), node:assert/strict, node:crypto, node:fs/promises, node:url, node:path
- Used by
- run by Run V9 34 (script call)
- Produces
- text, json, sha256, fmt
- Defines here
- text, json, sha256, fmt
- 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/202611171141/tests/check_v9_34.mjs:1-123 · blob a1fd60c80204f9b79eefb0536a17e8efdf3383d3 · GitHub at these lines
- State
- achieves: comment · context: readme_derived · stage: ingest · effects: filesystem · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: production_core
/* check_v9_34.mjs - Pipeline News V9.34, proven from the bytes and through the
* page's OWN loaders (the pattern of check_v9_13.mjs).
*
* 1. The contracts bind the fixtures held by 202611132345 by path and sha256.
* 2. The page's own loader chain is imported unmodified and executed against the
* files in this folder; every invariant the browser asserts is asserted here.
* 3. The spine partitions are what the manifest says (sha256 and counts).
* 4. The UK newspaper feed is unchanged and Beacon Fen still resolves.
* 5. The interconnector product and contract are the parent's, byte for byte.
* 6. The page states its own identity and version label.
*
* Run: node tests/check_v9_34.mjs
*/
import assert from "node:assert/strict";
import { createHash } from "node:crypto";
import { readFile } from "node:fs/promises";
import { fileURLToPath } from "node:url";
import { basename, dirname, join } from "node:path";
const HERE = dirname(fileURLToPath(import.meta.url));
const RELEASE = join(HERE, "..");
const ID = basename(RELEASE);
const ROOT = join(RELEASE, "..", "..");
const VERSION = "9.34";
const STATE = "RELEASE CANDIDATE";
const PARENT_ID = "202611170512";
const FIXTURE_OWNER = "202611132345";
const PARENT = join(RELEASE, "..", PARENT_ID);
const text = (p) => readFile(p, "utf8");
const json = async (p) => JSON.parse(await text(p));
const sha256 = (b) => createHash("sha256").update(b).digest("hex");
const NEWS_FEED_SHA256 = "cea104c3e9cfc07971680afdf5f64073e1d4825b63bfaf4e969266df8386ebbd";
// 1. contracts bind fixtures
const c91 = await json(join(RELEASE, "contracts", "release.v9.1.json"));
const c951 = await json(join(RELEASE, "contracts", "release.v9.5.1.json"));
assert.equal(c91.source.dataset, "DESNZ Renewable Energy Planning Database Q3 2026");
for (const [pathKey, shaKey] of [["identity_fixture", "identity_fixture_sha256"], ["coordinate_fixture", "coordinate_fixture_sha256"]]) {
const rel = c91.source[pathKey];
assert.ok(rel.startsWith(`uk_renewables_pipeline/${FIXTURE_OWNER}/fixtures/`), `${pathKey} must be the fixture owner's: ${rel}`);
assert.equal(sha256(await readFile(join(ROOT, rel))), c91.source[shaKey], `${pathKey} bytes`);
}
const coords = await json(join(ROOT, c91.source.coordinate_fixture));
assert.equal(coords.source_workbook_sha256, c91.source.workbook_sha256, "coordinate fixture names the contract workbook");
const identity = await json(join(ROOT, c91.source.identity_fixture));
assert.equal(identity.schema, "globalgrid2050.project-identity.v6");
assert.equal(identity.records.length, identity.raw_record_count);
assert.equal(coords.source_records, identity.raw_record_count, "workbook and identity hold the same refs");
// 2. the page's own loader, unmodified, against these bytes
const ORIGIN = "http://release.invalid";
const BASE = `${ORIGIN}/uk_renewables_pipeline/${ID}/`;
globalThis.window = { location: { origin: ORIGIN, href: BASE } };
globalThis.fetch = async (path) => {
const url = new URL(path, BASE);
assert.ok(url.pathname.startsWith(`/uk_renewables_pipeline/${ID}/`), `loader fetched outside the release: ${url}`);
const file = join(RELEASE, decodeURIComponent(url.pathname.slice(`/uk_renewables_pipeline/${ID}/`.length)));
const body = await text(file);
return { ok: true, status: 200, url: url.href, json: async () => JSON.parse(body) };
};
const loader = await import(new URL("../scripts/data/canonical-projects-v9-5-1.js", import.meta.url).href);
const model = await loader.loadCanonicalProjectsV9_5_1();
assert.equal(model.projects.length, c951.expected.project_count);
assert.equal(Math.round(model.metadata.capacity_mw), c951.expected.displayed_capacity_mw);
// 3. partitions are the manifest's bytes
const manifest = await json(join(RELEASE, "data", "v9.1", "build_manifest.json"));
for (const part of [...manifest.project_partitions, ...manifest.atlas_partitions]) {
assert.equal(sha256(await readFile(join(RELEASE, part.path))), part.sha256, `${part.path} hash`);
}
const atlasFeatures = manifest.atlas_partitions.reduce((n, p) => n + p.feature_count, 0);
assert.equal(atlasFeatures, manifest.geometry_count, "atlas features = valid geometries");
for (const key of Object.keys(c91.expected)) assert.equal(manifest[key], c91.expected[key], `manifest ${key}`);
assert.equal(manifest.source_dataset, c91.source.dataset);
assert.equal(manifest.source_record_count, identity.raw_record_count);
// 4. the newspaper: unchanged Q2 feed, every bound ref still resolves
const feedBytes = await readFile(join(ROOT, "dist", "major_project_news_v9_5_1.json"));
assert.equal(sha256(feedBytes), NEWS_FEED_SHA256, "dist/major_project_news_v9_5_1.json must not be rebuilt by this release");
const feed = JSON.parse(feedBytes);
const byRef = new Map(model.projects.map((p) => [p.repd_ref, p]));
const boundRefs = new Set(feed.canonical_items.map((item) => String(item.repd_ref)));
const unresolved = [...boundRefs].filter((ref) => !byRef.has(ref));
const beacon = byRef.get(feed.beacon_fen_contract.repd_ref);
assert.ok(beacon, "Beacon Fen must be in the spine");
assert.equal(beacon.capacity_mw, feed.beacon_fen_contract.official_capacity_mw, "Beacon Fen official capacity");
// 5. interconnectors are the parent's
for (const rel of ["contracts/interconnectors.v9.8.json", "data/v9.8/interconnectors.json", "data/v9.8/interconnectors_manifest.json"]) {
assert.equal(sha256(await readFile(join(RELEASE, rel))), sha256(await readFile(join(PARENT, rel))), `${rel} is the parent's`);
}
// 6. page identity
const fmt = (n) => n.toLocaleString("en-GB");
const html = await text(join(RELEASE, "index.html"));
const compact = html.includes(`data-edition="${ID}"`);
assert.ok(compact || html.includes(`UK RENEWABLES PIPELINE ${ID}`), "visible page identity names this release");
assert.ok(new RegExp(`Canonical DESNZ REPD Q3 2026[^<]*${fmt(manifest.project_count)} solar, BESS and wind records`).test(html), "index.html states the Q3 register count");
assert.ok(!html.includes("REPD Q2 2026: 7,680"), "index.html must not claim the Q2 register");
assert.ok(html.includes("scripts/app-v9-8.js"), "index.html loads the v9.8 app");
const label = html.slice(html.indexOf("<body>"), html.indexOf('<section class="newspaper">'));
assert.ok(!/CANDIDATE/.test(label.replaceAll("RELEASE CANDIDATE", "")), "brand, nav, h1 and meta carry no candidate label other than this version's own state");
if (compact) {
assert.ok(label.includes(`<small>PIPELINE NEWS · V${VERSION}</small>`), "compact brand names the version");
assert.ok(label.includes(`>V${VERSION} · PIPELINE NEWS</a>`), "compact nav names the version");
assert.ok(label.includes(`V${VERSION} · `) && label.includes(' · REPD OCTOBER 2026 · '), "compact stamp names the version and source vintage");
assert.ok(html.includes(`<title>GlobalGrid2050 | Pipeline News V${VERSION} · ${ID}</title>`), "compact title names this release");
assert.equal((html.match(/<section\b/g)||[]).length,2,"exactly two principal blocks");
for (const tab of ['solarTab','bessTab','gridTab','datacentreTab']) assert.ok(html.includes(`id="${tab}" role="tab"`),`category ${tab}`);
assert.ok(!html.includes('<th>NEWS SIGNAL</th>')&&!html.includes('id="solar1000Pilot"'),"withdrawn panels/column do not return");
} else {
assert.ok(label.includes(`<small>UK RENEWABLES PIPELINE · V${VERSION}</small>`), "brand names the version");
assert.ok(label.includes(`<a class="active" href="#">V${VERSION} ${STATE} · REPD Q3 2026</a>`), "nav names the version");
assert.ok(new RegExp(`<strong>V${VERSION.replace(".", "\\.")} · REPD OCTOBER 2026 \\(Q3\\) · [^<]+ · ${STATE} · \\d+ November 2026</strong>`).test(label), "meta line names the version and its date");
assert.ok(html.includes(`<title>GlobalGrid2050 | UK Renewables Pipeline ${ID}</title>`), "title names this release");
}
assert.ok(label.includes(`<a href="../${PARENT_ID}/">`), "nav links back to the parent");
assert.ok(label.includes('<a href="../versions.html">'), "nav links to the list of all versions");
console.log(`check_v9_34: ${ID} loader PASS - ${fmt(model.projects.length)} records, ${model.metadata.capacity_mw.toLocaleString("en-GB", { minimumFractionDigits: 2 })} MW, `
+ `${manifest.geometry_count} with geometry / ${manifest.missing_geometry_count} without; news feed unchanged, `
+ `${boundRefs.size - unresolved.length}/${boundRefs.size} bound refs resolve${unresolved.length ? ` (unresolved: ${unresolved.join(", ")})` : ""}`);Run V9 34
A shell script in the tests folder of GlobalGrid2050 that tests interconnectors.
Set aside from the main view: A comment at the top of the file says a tool wrote it. (noise-generated, proposed by noise.py). All set-aside files, with reasons. Nothing was deleted.
Evidence
- line 4 comment: # Written by automation/pipeline_release/new_version.py by the pattern of run_v9_13.sh.
testglobalgrid2050 / uk_renewables_pipeline/202611171141/tests/run_v9_34.sh · lines 1–97 of 97 · version 2026-11-17 11:41 · Entry point · pattern is_listed (shared by 38 files)
- What it does
- It tests interconnectors. Defines is_listed, walk. Side effects: 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: interconnectors.
- Inputs & outputs
- In: JSON file release.v9.1.json; command-line arguments.
- Downstream impact
- It is itself an entry point (shell script); no other file was found loading it.
- What it achieves
- Defines `is_listed` and `walk`.
- Why it matters
- No other file in the estate was found to import it; it is an entry point.
- Application
- globalgrid2050 · uk_renewables_pipeline/202611171141/tests · shell script
- Uses
- Check V9 34 (script call)
- Used by
- none found
- Produces
- is_listed, walk
- Defines here
- is_listed, walk
- 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/202611171141/tests/run_v9_34.sh:1-97 · blob ab7e78ccf2816d39a53be68bbd6730fd210cfcd3 · GitHub at these lines
- State
- achieves: name · context: readme_derived · stage: unknown · effects: process · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: production_core
#!/usr/bin/env bash
# run_v9_34.sh - Pipeline News V9.34: one visible step on its parent, same REPD
# October 2026 (Q3 2026) register. Offline, in a git checkout or a plain copy.
# Written by automation/pipeline_release/new_version.py by the pattern of run_v9_13.sh.
set -euo pipefail
HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
RELEASE="$(cd "$HERE/.." && pwd)"
ID="$(basename "$RELEASE")"
PARENT_ID="202611170512"
FIXTURE_OWNER="202611132345"
PARENT="$(cd "$RELEASE/../$PARENT_ID" && pwd)"
ROOT="$(cd "$RELEASE/../.." && pwd)"
# The parent by git tree of the bytes ON DISK.
PARENT_TREE="c1b03811671b8dfa221a9b4380adec1fbe10602c"
SCRATCH="$(mktemp -d)"
trap 'rm -rf "$SCRATCH"' EXIT
actual_tree="$(python - "$ROOT" "$PARENT_ID" <<'PYTREE'
import sys
sys.path.insert(0, sys.argv[1] + "/automation/pipeline_release")
from common import tree_hash
print(tree_hash(sys.argv[2]))
PYTREE
)"
test "$actual_tree" = "$PARENT_TREE" || { echo "parent $PARENT_ID tree is $actual_tree, expected $PARENT_TREE" >&2; exit 1; }
# WHAT THIS VERSION CHANGES FROM ITS PARENT, NAMED ONE FILE AT A TIME.
CHANGED_FROM_PARENT=(
CHANGES.md
README.md
contracts/date-controls.v934.json
index.html
scripts/plugins/projects-v9-8.js
tests/check_v9_34.mjs
tests/run_v9_34.sh
)
REMOVED_FROM_PARENT=(
tests/check_v9_33.mjs
tests/run_v9_33.sh
)
is_listed() {
local needle="$1"; shift
for entry in "$@"; do [[ "$entry" == "$needle" ]] && return 0; done
return 1
}
walk() { find "$1" -type f -not -path '*/__pycache__/*' -not -name '*.pyc' -not -path '*/node_modules/*' | sort; }
while IFS= read -r file; do
relative="${file#$PARENT/}"
is_listed "$relative" "${CHANGED_FROM_PARENT[@]}" && continue
if is_listed "$relative" "${REMOVED_FROM_PARENT[@]}"; then
test ! -e "$RELEASE/$relative" || { echo "should not be copied: $relative" >&2; exit 1; }
continue
fi
cmp -s "$file" "$RELEASE/$relative" || { echo "inherited file differs from parent: $relative" >&2; exit 1; }
done < <(walk "$PARENT")
while IFS= read -r file; do
relative="${file#$RELEASE/}"
is_listed "$relative" "${CHANGED_FROM_PARENT[@]}" && continue
test -e "$PARENT/$relative" || { echo "unlisted new file: $relative" >&2; exit 1; }
done < <(walk "$RELEASE")
for relative in "${CHANGED_FROM_PARENT[@]}"; do
test -f "$RELEASE/$relative" || { echo "listed but missing: $relative" >&2; exit 1; }
if [[ -f "$PARENT/$relative" ]] && cmp -s "$PARENT/$relative" "$RELEASE/$relative"; then
echo "listed as changed but identical to parent: $relative" >&2; exit 1
fi
done
# The register is the parent's: contract, spine and interconnector product byte for byte.
cmp -s "$PARENT/contracts/release.v9.1.json" "$RELEASE/contracts/release.v9.1.json"
grep -q "\"identity_fixture\": \"uk_renewables_pipeline/$FIXTURE_OWNER/fixtures/2026q3/project_identity_2026q3.json\"" "$RELEASE/contracts/release.v9.1.json"
diff -r "$PARENT/data/v9.1" "$RELEASE/data/v9.1"
diff -r "$PARENT/data/v9.8" "$RELEASE/data/v9.8"
# Spine and interconnector product rebuilt in a scratch root that holds this version
# and, at the fixture owner's path, only the two fixtures the contract binds. They
# must reproduce the committed bytes.
SROOT="$SCRATCH/root"
COPY="$SROOT/uk_renewables_pipeline/$ID"
mkdir -p "$SROOT/uk_renewables_pipeline/$FIXTURE_OWNER/fixtures"
cp -a "$ROOT/uk_renewables_pipeline/$FIXTURE_OWNER/fixtures/2026q3" "$SROOT/uk_renewables_pipeline/$FIXTURE_OWNER/fixtures/"
cp -a "$RELEASE" "$COPY"
rm -rf "$COPY/data/v9.1"
PYTHONDONTWRITEBYTECODE=1 python "$COPY/scripts/data/build_v9_1_spine.py"
diff -r "$RELEASE/data/v9.1" "$COPY/data/v9.1"
node "$COPY/scripts/build/interconnectors-v9-8.mjs" >/dev/null
diff -r "$RELEASE/data/v9.8" "$COPY/data/v9.8"
node "$HERE/check_v9_34.mjs"
node "$HERE/check_map_contract_all_rows.mjs"
while IFS= read -r source; do
node --check "$source"
done < <(find "$RELEASE/scripts" -type f \( -name '*.js' -o -name '*.mjs' \) -print | sort)
echo "V9.34 ($ID) validation suite: PASS ($ROOT)"Check V9 35
A JavaScript module in the tests folder of GlobalGrid2050 that tests major project news, interconnectors and the Renewable Energy Planning Database (REPD) register, using SHA-256.
Set aside from the main view: 91% of its lines are the same as uk_renewables_pipeline/202611180520/tests/check_v9_45.mjs (globalgrid2050), which stays. (near-copy-of, proposed by families.py). 90% of lines shared with Check V9 45; read that one first. All set-aside files, with reasons. Nothing was deleted.
Evidence
- line-jaccard 0.9099 to globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 uk_renewables_pipeline/202611180520/tests/check_v9_45.mjs:1-123 41fe9e5b51a076d6ffbe2ce5a8afe5a5265f4d56
- sha256 44e213a6ccab368e17492b0b52c9d6cb3c67a85a683303713d4f30f0f05aae00
- target sha256 e8956eb33f4e20f2a38ba682b879bfbfb35a358854d686c40467140d601f9e5b
- group of 15 (identity.json near-copy edges >= 0.9)
- canonical rule: reachable, newest stamp, core repo, most lines
testglobalgrid2050 / uk_renewables_pipeline/202611171217/tests/check_v9_35.mjs · lines 1–123 of 123 · version 2026-11-17 12:17
- What it does
- It tests major project news, interconnectors and the REPD register. Defines text, json, sha256, fmt. Uses libraries node:assert/strict, node:crypto, node:fs/promises, node:url, node:path. Side effects: reads or writes files.
- 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: interconnectors, the REPD register.
- Inputs & outputs
- In: JSON file release.v9.1.json; JSON file release.v9.5.1.json; JSON file build_manifest.json; JSON file major_project_news_v9_5_1.json; JSON file interconnectors.v9.8.json; JSON file interconnectors.json; JSON file interconnectors_manifest.json.
- Downstream impact
- Used directly by 1 file: Run V9 35 (globalgrid2050).
- What it achieves
- It is built from the text step (`text`), the JSON step (`json`) and the sha256 step (`sha256`). Pipeline News V9.35, proven from the bytes and through the page's OWN loaders (the pattern of `check_v9_13.mjs`).
- Why it matters
- Checked by Run V9 35.
- Application
- globalgrid2050 · uk_renewables_pipeline/202611171217/tests · JavaScript module
- Uses
- Canonical Projects V9 5 1 (new URL import.meta.url), node:assert/strict, node:crypto, node:fs/promises, node:url, node:path
- Used by
- run by Run V9 35 (script call)
- Produces
- text, json, sha256, fmt
- Defines here
- text, json, sha256, fmt
- 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/202611171217/tests/check_v9_35.mjs:1-123 · blob 2fca2377b5157770f0f8db1205614b30d5435f92 · GitHub at these lines
- State
- achieves: comment · context: readme_derived · stage: ingest · effects: filesystem · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: production_core
/* check_v9_35.mjs - Pipeline News V9.35, proven from the bytes and through the
* page's OWN loaders (the pattern of check_v9_13.mjs).
*
* 1. The contracts bind the fixtures held by 202611132345 by path and sha256.
* 2. The page's own loader chain is imported unmodified and executed against the
* files in this folder; every invariant the browser asserts is asserted here.
* 3. The spine partitions are what the manifest says (sha256 and counts).
* 4. The UK newspaper feed is unchanged and Beacon Fen still resolves.
* 5. The interconnector product and contract are the parent's, byte for byte.
* 6. The page states its own identity and version label.
*
* Run: node tests/check_v9_35.mjs
*/
import assert from "node:assert/strict";
import { createHash } from "node:crypto";
import { readFile } from "node:fs/promises";
import { fileURLToPath } from "node:url";
import { basename, dirname, join } from "node:path";
const HERE = dirname(fileURLToPath(import.meta.url));
const RELEASE = join(HERE, "..");
const ID = basename(RELEASE);
const ROOT = join(RELEASE, "..", "..");
const VERSION = "9.35";
const STATE = "RELEASE CANDIDATE";
const PARENT_ID = "202611171141";
const FIXTURE_OWNER = "202611132345";
const PARENT = join(RELEASE, "..", PARENT_ID);
const text = (p) => readFile(p, "utf8");
const json = async (p) => JSON.parse(await text(p));
const sha256 = (b) => createHash("sha256").update(b).digest("hex");
const NEWS_FEED_SHA256 = "cea104c3e9cfc07971680afdf5f64073e1d4825b63bfaf4e969266df8386ebbd";
// 1. contracts bind fixtures
const c91 = await json(join(RELEASE, "contracts", "release.v9.1.json"));
const c951 = await json(join(RELEASE, "contracts", "release.v9.5.1.json"));
assert.equal(c91.source.dataset, "DESNZ Renewable Energy Planning Database Q3 2026");
for (const [pathKey, shaKey] of [["identity_fixture", "identity_fixture_sha256"], ["coordinate_fixture", "coordinate_fixture_sha256"]]) {
const rel = c91.source[pathKey];
assert.ok(rel.startsWith(`uk_renewables_pipeline/${FIXTURE_OWNER}/fixtures/`), `${pathKey} must be the fixture owner's: ${rel}`);
assert.equal(sha256(await readFile(join(ROOT, rel))), c91.source[shaKey], `${pathKey} bytes`);
}
const coords = await json(join(ROOT, c91.source.coordinate_fixture));
assert.equal(coords.source_workbook_sha256, c91.source.workbook_sha256, "coordinate fixture names the contract workbook");
const identity = await json(join(ROOT, c91.source.identity_fixture));
assert.equal(identity.schema, "globalgrid2050.project-identity.v6");
assert.equal(identity.records.length, identity.raw_record_count);
assert.equal(coords.source_records, identity.raw_record_count, "workbook and identity hold the same refs");
// 2. the page's own loader, unmodified, against these bytes
const ORIGIN = "http://release.invalid";
const BASE = `${ORIGIN}/uk_renewables_pipeline/${ID}/`;
globalThis.window = { location: { origin: ORIGIN, href: BASE } };
globalThis.fetch = async (path) => {
const url = new URL(path, BASE);
assert.ok(url.pathname.startsWith(`/uk_renewables_pipeline/${ID}/`), `loader fetched outside the release: ${url}`);
const file = join(RELEASE, decodeURIComponent(url.pathname.slice(`/uk_renewables_pipeline/${ID}/`.length)));
const body = await text(file);
return { ok: true, status: 200, url: url.href, json: async () => JSON.parse(body) };
};
const loader = await import(new URL("../scripts/data/canonical-projects-v9-5-1.js", import.meta.url).href);
const model = await loader.loadCanonicalProjectsV9_5_1();
assert.equal(model.projects.length, c951.expected.project_count);
assert.equal(Math.round(model.metadata.capacity_mw), c951.expected.displayed_capacity_mw);
// 3. partitions are the manifest's bytes
const manifest = await json(join(RELEASE, "data", "v9.1", "build_manifest.json"));
for (const part of [...manifest.project_partitions, ...manifest.atlas_partitions]) {
assert.equal(sha256(await readFile(join(RELEASE, part.path))), part.sha256, `${part.path} hash`);
}
const atlasFeatures = manifest.atlas_partitions.reduce((n, p) => n + p.feature_count, 0);
assert.equal(atlasFeatures, manifest.geometry_count, "atlas features = valid geometries");
for (const key of Object.keys(c91.expected)) assert.equal(manifest[key], c91.expected[key], `manifest ${key}`);
assert.equal(manifest.source_dataset, c91.source.dataset);
assert.equal(manifest.source_record_count, identity.raw_record_count);
// 4. the newspaper: unchanged Q2 feed, every bound ref still resolves
const feedBytes = await readFile(join(ROOT, "dist", "major_project_news_v9_5_1.json"));
assert.equal(sha256(feedBytes), NEWS_FEED_SHA256, "dist/major_project_news_v9_5_1.json must not be rebuilt by this release");
const feed = JSON.parse(feedBytes);
const byRef = new Map(model.projects.map((p) => [p.repd_ref, p]));
const boundRefs = new Set(feed.canonical_items.map((item) => String(item.repd_ref)));
const unresolved = [...boundRefs].filter((ref) => !byRef.has(ref));
const beacon = byRef.get(feed.beacon_fen_contract.repd_ref);
assert.ok(beacon, "Beacon Fen must be in the spine");
assert.equal(beacon.capacity_mw, feed.beacon_fen_contract.official_capacity_mw, "Beacon Fen official capacity");
// 5. interconnectors are the parent's
for (const rel of ["contracts/interconnectors.v9.8.json", "data/v9.8/interconnectors.json", "data/v9.8/interconnectors_manifest.json"]) {
assert.equal(sha256(await readFile(join(RELEASE, rel))), sha256(await readFile(join(PARENT, rel))), `${rel} is the parent's`);
}
// 6. page identity
const fmt = (n) => n.toLocaleString("en-GB");
const html = await text(join(RELEASE, "index.html"));
const compact = html.includes(`data-edition="${ID}"`);
assert.ok(compact || html.includes(`UK RENEWABLES PIPELINE ${ID}`), "visible page identity names this release");
assert.ok(new RegExp(`Canonical DESNZ REPD Q3 2026[^<]*${fmt(manifest.project_count)} solar, BESS and wind records`).test(html), "index.html states the Q3 register count");
assert.ok(!html.includes("REPD Q2 2026: 7,680"), "index.html must not claim the Q2 register");
assert.ok(html.includes("scripts/app-v9-8.js"), "index.html loads the v9.8 app");
const label = html.slice(html.indexOf("<body>"), html.indexOf('<section class="newspaper">'));
assert.ok(!/CANDIDATE/.test(label.replaceAll("RELEASE CANDIDATE", "")), "brand, nav, h1 and meta carry no candidate label other than this version's own state");
if (compact) {
assert.ok(label.includes(`<small>PIPELINE NEWS · V${VERSION}</small>`), "compact brand names the version");
assert.ok(label.includes(`>V${VERSION} · PIPELINE NEWS</a>`), "compact nav names the version");
assert.ok(label.includes(`V${VERSION} · `) && label.includes(' · REPD OCTOBER 2026 · '), "compact stamp names the version and source vintage");
assert.ok(html.includes(`<title>GlobalGrid2050 | Pipeline News V${VERSION} · ${ID}</title>`), "compact title names this release");
assert.equal((html.match(/<section\b/g)||[]).length,2,"exactly two principal blocks");
for (const tab of ['solarTab','bessTab','gridTab','datacentreTab']) assert.ok(html.includes(`id="${tab}" role="tab"`),`category ${tab}`);
assert.ok(!html.includes('<th>NEWS SIGNAL</th>')&&!html.includes('id="solar1000Pilot"'),"withdrawn panels/column do not return");
} else {
assert.ok(label.includes(`<small>UK RENEWABLES PIPELINE · V${VERSION}</small>`), "brand names the version");
assert.ok(label.includes(`<a class="active" href="#">V${VERSION} ${STATE} · REPD Q3 2026</a>`), "nav names the version");
assert.ok(new RegExp(`<strong>V${VERSION.replace(".", "\\.")} · REPD OCTOBER 2026 \\(Q3\\) · [^<]+ · ${STATE} · \\d+ November 2026</strong>`).test(label), "meta line names the version and its date");
assert.ok(html.includes(`<title>GlobalGrid2050 | UK Renewables Pipeline ${ID}</title>`), "title names this release");
}
assert.ok(label.includes(`<a href="../${PARENT_ID}/">`), "nav links back to the parent");
assert.ok(label.includes('<a href="../versions.html">'), "nav links to the list of all versions");
console.log(`check_v9_35: ${ID} loader PASS - ${fmt(model.projects.length)} records, ${model.metadata.capacity_mw.toLocaleString("en-GB", { minimumFractionDigits: 2 })} MW, `
+ `${manifest.geometry_count} with geometry / ${manifest.missing_geometry_count} without; news feed unchanged, `
+ `${boundRefs.size - unresolved.length}/${boundRefs.size} bound refs resolve${unresolved.length ? ` (unresolved: ${unresolved.join(", ")})` : ""}`);Run V9 35
A shell script in the tests folder of GlobalGrid2050 that tests interconnectors.
Set aside from the main view: A comment at the top of the file says a tool wrote it. (noise-generated, proposed by noise.py). All set-aside files, with reasons. Nothing was deleted.
Evidence
- line 4 comment: # Written by automation/pipeline_release/new_version.py by the pattern of run_v9_13.sh.
testglobalgrid2050 / uk_renewables_pipeline/202611171217/tests/run_v9_35.sh · lines 1–97 of 97 · version 2026-11-17 12:17 · Entry point · pattern is_listed (shared by 38 files)
- What it does
- It tests interconnectors. Defines is_listed, walk. Side effects: 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: interconnectors.
- Inputs & outputs
- In: JSON file release.v9.1.json; command-line arguments.
- Downstream impact
- It is itself an entry point (shell script); no other file was found loading it.
- What it achieves
- Defines `is_listed` and `walk`.
- Why it matters
- No other file in the estate was found to import it; it is an entry point.
- Application
- globalgrid2050 · uk_renewables_pipeline/202611171217/tests · shell script
- Uses
- Check V9 35 (script call)
- Used by
- none found
- Produces
- is_listed, walk
- Defines here
- is_listed, walk
- 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/202611171217/tests/run_v9_35.sh:1-97 · blob eadd854564ad74171816a847f262328f84cd31cd · GitHub at these lines
- State
- achieves: name · context: readme_derived · stage: unknown · effects: process · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: production_core
#!/usr/bin/env bash
# run_v9_35.sh - Pipeline News V9.35: one visible step on its parent, same REPD
# October 2026 (Q3 2026) register. Offline, in a git checkout or a plain copy.
# Written by automation/pipeline_release/new_version.py by the pattern of run_v9_13.sh.
set -euo pipefail
HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
RELEASE="$(cd "$HERE/.." && pwd)"
ID="$(basename "$RELEASE")"
PARENT_ID="202611171141"
FIXTURE_OWNER="202611132345"
PARENT="$(cd "$RELEASE/../$PARENT_ID" && pwd)"
ROOT="$(cd "$RELEASE/../.." && pwd)"
# The parent by git tree of the bytes ON DISK.
PARENT_TREE="81428e4204072b10e1537f1d8aef89177b48e6ba"
SCRATCH="$(mktemp -d)"
trap 'rm -rf "$SCRATCH"' EXIT
actual_tree="$(python - "$ROOT" "$PARENT_ID" <<'PYTREE'
import sys
sys.path.insert(0, sys.argv[1] + "/automation/pipeline_release")
from common import tree_hash
print(tree_hash(sys.argv[2]))
PYTREE
)"
test "$actual_tree" = "$PARENT_TREE" || { echo "parent $PARENT_ID tree is $actual_tree, expected $PARENT_TREE" >&2; exit 1; }
# WHAT THIS VERSION CHANGES FROM ITS PARENT, NAMED ONE FILE AT A TIME.
CHANGED_FROM_PARENT=(
CHANGES.md
README.md
contracts/operational-date.v935.json
index.html
scripts/plugins/projects-v9-8.js
tests/check_v9_35.mjs
tests/run_v9_35.sh
)
REMOVED_FROM_PARENT=(
tests/check_v9_34.mjs
tests/run_v9_34.sh
)
is_listed() {
local needle="$1"; shift
for entry in "$@"; do [[ "$entry" == "$needle" ]] && return 0; done
return 1
}
walk() { find "$1" -type f -not -path '*/__pycache__/*' -not -name '*.pyc' -not -path '*/node_modules/*' | sort; }
while IFS= read -r file; do
relative="${file#$PARENT/}"
is_listed "$relative" "${CHANGED_FROM_PARENT[@]}" && continue
if is_listed "$relative" "${REMOVED_FROM_PARENT[@]}"; then
test ! -e "$RELEASE/$relative" || { echo "should not be copied: $relative" >&2; exit 1; }
continue
fi
cmp -s "$file" "$RELEASE/$relative" || { echo "inherited file differs from parent: $relative" >&2; exit 1; }
done < <(walk "$PARENT")
while IFS= read -r file; do
relative="${file#$RELEASE/}"
is_listed "$relative" "${CHANGED_FROM_PARENT[@]}" && continue
test -e "$PARENT/$relative" || { echo "unlisted new file: $relative" >&2; exit 1; }
done < <(walk "$RELEASE")
for relative in "${CHANGED_FROM_PARENT[@]}"; do
test -f "$RELEASE/$relative" || { echo "listed but missing: $relative" >&2; exit 1; }
if [[ -f "$PARENT/$relative" ]] && cmp -s "$PARENT/$relative" "$RELEASE/$relative"; then
echo "listed as changed but identical to parent: $relative" >&2; exit 1
fi
done
# The register is the parent's: contract, spine and interconnector product byte for byte.
cmp -s "$PARENT/contracts/release.v9.1.json" "$RELEASE/contracts/release.v9.1.json"
grep -q "\"identity_fixture\": \"uk_renewables_pipeline/$FIXTURE_OWNER/fixtures/2026q3/project_identity_2026q3.json\"" "$RELEASE/contracts/release.v9.1.json"
diff -r "$PARENT/data/v9.1" "$RELEASE/data/v9.1"
diff -r "$PARENT/data/v9.8" "$RELEASE/data/v9.8"
# Spine and interconnector product rebuilt in a scratch root that holds this version
# and, at the fixture owner's path, only the two fixtures the contract binds. They
# must reproduce the committed bytes.
SROOT="$SCRATCH/root"
COPY="$SROOT/uk_renewables_pipeline/$ID"
mkdir -p "$SROOT/uk_renewables_pipeline/$FIXTURE_OWNER/fixtures"
cp -a "$ROOT/uk_renewables_pipeline/$FIXTURE_OWNER/fixtures/2026q3" "$SROOT/uk_renewables_pipeline/$FIXTURE_OWNER/fixtures/"
cp -a "$RELEASE" "$COPY"
rm -rf "$COPY/data/v9.1"
PYTHONDONTWRITEBYTECODE=1 python "$COPY/scripts/data/build_v9_1_spine.py"
diff -r "$RELEASE/data/v9.1" "$COPY/data/v9.1"
node "$COPY/scripts/build/interconnectors-v9-8.mjs" >/dev/null
diff -r "$RELEASE/data/v9.8" "$COPY/data/v9.8"
node "$HERE/check_v9_35.mjs"
node "$HERE/check_map_contract_all_rows.mjs"
while IFS= read -r source; do
node --check "$source"
done < <(find "$RELEASE/scripts" -type f \( -name '*.js' -o -name '*.mjs' \) -print | sort)
echo "V9.35 ($ID) validation suite: PASS ($ROOT)"Model
A JavaScript module in the layers folder of GlobalGrid2050 that works with substations and uses data from the GridAtlas repository.
transformglobalgrid2050 / uk_renewables_pipeline/202611171507/scripts/layers/model.mjs · lines 1–59 of 59 · version 2026-11-17 15:07 · pattern publicationStamp (shared by 2 files)
- What it does
- It calculates substations. Defines 6 functions or classes, including assetRows, selectRows, voltageLabel, locationLink, publicationStamp.
- 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: substations.
- Downstream impact
- Used directly by 6 files: Views (globalgrid2050); Ticker (globalgrid2050); Contracts Test (globalgrid2050); Browser (globalgrid2050); and 2 more. Reached from 12 other entry points, including GlobalGrid2050 — UK Renewables Pipeline Page (globalgrid2050, https://globalgrid2050.com/uk_renewables_pipeline/202611280922/); GlobalGrid2050 Pipeline Legal Evidence Workflow (globalgrid2050); GlobalGrid2050 V929 Preview Acceptance Workflow (globalgrid2050).
- What it achieves
- It selects rows (`selectRows`) and is built from the asset rows helper (`assetRows`) and the voltage label helper (`voltageLabel`). Defines `assetRows`, `selectRows`, `voltageLabel` and 3 more.
- Why it matters
- Imported by Views, Ticker and Browser. Checked by 3 tests, including Contracts Test.
- Application
- globalgrid2050 · uk_renewables_pipeline/202611171507/scripts/layers · JavaScript module
- Uses
- URL Policy (import), GridAtlas — Atlas Page (estate URL)
- Used by
- imported by Views (import), imported by Ticker (import), imported by Contracts Test (import), imported by Browser (import), imported by Contracts Test (import), imported by Contracts Test (import)
- Produces
- assetRows, selectRows, voltageLabel, locationLink, latestHeadlines
- Defines here
- assetRows, selectRows, voltageLabel, locationLink, publicationStamp, latestHeadlines
- 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/202611171507/scripts/layers/model.mjs:1-59 · blob 13362f11b630b537d9b13614ed297bdf7fb17058 · GitHub at these lines
- State
- achieves: name · context: readme_derived · stage: transform · effects: none found · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: production_core
import {publicHttpsUrl} from './url-policy.mjs';
export function assetRows(payload, kind) {
if (payload?.type !== 'FeatureCollection' || !Array.isArray(payload.features)) throw Error('Invalid source collection');
const seen = new Set();
return payload.features.map(feature => {
const p = feature.properties || {};
const rawId = feature.id ?? p.id;
if (!['string','number'].includes(typeof rawId) || !String(rawId).trim() || String(rawId).length > 160
|| (typeof rawId === 'number' && (!Number.isSafeInteger(rawId) || rawId < 0))) throw Error('Missing source identity');
const id = `${kind}:${rawId}`;
if (seen.has(id)) throw Error('Duplicate source identity'); seen.add(id);
const c = feature.geometry?.type === 'Point' ? feature.geometry.coordinates : null;
const located = Array.isArray(c) && c.length >= 2 && typeof c[0] === 'number' && typeof c[1] === 'number' && Number.isFinite(c[0]) && Number.isFinite(c[1]) && Math.abs(c[0]) <= 180 && Math.abs(c[1]) <= 90;
return {id, sourceId: String(rawId), name: typeof p.name === 'string' && p.name.trim() ? p.name : null,
operator: typeof p.operator === 'string' ? p.operator : null,
category: p.class_label || p.type || null, voltage: p.voltage ?? null,
coordinates: located ? [c[0], c[1]] : null, properties: p};
});
}
export function selectRows(rows, query = '') {
const q = String(query).trim().toLocaleLowerCase('en-GB');
return rows.filter(row => !q || [row.name, row.operator, row.sourceId, row.category, row.voltage].some(value => String(value ?? '').toLocaleLowerCase('en-GB').includes(q)));
}
export function voltageLabel(value) {
if (value === null || value === undefined || value === '') return 'Not recorded';
const parts = String(value).split(';');
if (!parts.every(x => /^\d+(\.\d+)?$/.test(x.trim()) && Number(x) > 0)) return String(value);
return parts.map(x => (Number(x) / 1000).toLocaleString('en-GB', {maximumFractionDigits: 3})).join(' / ') + ' kV';
}
export function locationLink(row) {
if (!row.coordinates) return null;
// Location-only contract, never an invented REPD ID or asserted connection.
const url = new URL('https://ventusltd.github.io/gridatlas/atlas/');
url.search = new URLSearchParams({longitude: String(row.coordinates[0]), latitude: String(row.coordinates[1]), zoom: '12',
project: row.name || row.sourceId, technology: row.id.startsWith('substation:') ? 'substation' : 'offtaker'});
return url.href;
}
function publicationStamp(value) {
if(typeof value!=='string')return NaN;
const match=/^(\d{4})-(\d{2})-(\d{2})(?:T(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d{1,9})?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d))?$/.exec(value);
if(!match)return NaN;
const year=Number(match[1]),month=Number(match[2]),day=Number(match[3]);
const leap=year%4===0&&(year%100!==0||year%400===0),days=[31,leap?29:28,31,30,31,30,31,31,30,31,30,31];
if(year<1900||month<1||month>12||day<1||day>days[month-1])return NaN;
return Date.parse(value);
}
export function latestHeadlines(items, limit = 100, {asOf=Date.now()}={}) {
if (!Array.isArray(items) || items.length>10000 || !Number.isFinite(asOf) || !Number.isInteger(limit) || limit<1 || limit>100) return [];
const unique = new Map();
for (const item of items) {
if (typeof item?.title !== 'string' || !item.title.trim() || item.title.length > 1000) continue;
let u; try { u = publicHttpsUrl(item.link); } catch { continue; }
const stamp = publicationStamp(item.date || item.first_seen || '');
if (!Number.isFinite(stamp) || stamp>asOf) continue;
const row = {title: item.title, link: u.href, source: typeof item.source==='string'&&item.source.trim()?item.source:'Publisher not supplied', date: item.date || item.first_seen, dateKind:item.date?'Publisher date':'First collected', stamp};
if (!unique.has(row.link) || unique.get(row.link).stamp < stamp) unique.set(row.link, row);
}
return [...unique.values()].sort((a,b) => b.stamp - a.stamp || a.link.localeCompare(b.link)).slice(0, limit);
}Pipeline Layers
A style sheet in the scripts folder of GlobalGrid2050.
energy-dataglobalgrid2050 / uk_renewables_pipeline/202611171507/scripts/layers/pipeline-layers.css · lines 1–35 of 35 · version 2026-11-17 15:07 · Entry point
- What it does
- 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.
- Downstream impact
- Used directly by 1 file: GlobalGrid2050 — UK Renewables Pipeline Page (globalgrid2050, https://globalgrid2050.com/uk_renewables_pipeline/202611280922/). Reached from 4 other entry points, including GlobalGrid2050 Pipeline Legal Evidence Workflow (globalgrid2050); V923 Public Readback Workflow (neural-link-between-agents); A4 Legal Model (globalgrid2050).
- What it achieves
- Scoped extension: it never restyles the approved Pipeline shell or other apps.
- Why it matters
- Loaded by the UK Renewables Pipeline page at https://globalgrid2050.com/uk_renewables_pipeline/202611280922/.
- Application
- globalgrid2050 · uk_renewables_pipeline/202611171507/scripts/layers · style sheet
- Uses
- none found
- Used by
- loaded by GlobalGrid2050 — UK Renewables Pipeline Page (stylesheet)
- 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/202611171507/scripts/layers/pipeline-layers.css:1-35 · blob 7df860ad350e407bd4b5540079d30a0f0c479bf4 · 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
/* Scoped extension: it never restyles the approved Pipeline shell or other apps. */
.pn-layers,.pn-ticker{font:inherit;color:inherit;max-width:100%;min-width:0}
.pn-layers [hidden]{display:none!important}
.pn-layers .pn-groups,.pn-layers .pn-subtabs,.pn-layers .pn-tools{display:flex;gap:.4rem;align-items:center;flex-wrap:wrap;margin:.5rem 0}
.pn-layers button,.pn-layers input,.pn-layers a,.pn-ticker button{font:inherit}
.pn-layers button,.pn-layers input,.pn-ticker button{background:#070909;color:#00ffff;border:1px solid #345257;padding:.5rem .7rem;min-height:44px;box-sizing:border-box}
.pn-layers button[aria-selected="true"],.pn-layers button[aria-pressed="true"]{color:#ffd24a;border-color:#ffd24a}
.pn-layers button:disabled{opacity:.45}
.pn-layers :focus-visible,.pn-ticker :focus-visible{outline:2px solid #ffd24a;outline-offset:2px}
.pn-layers input{flex:1;min-width:120px;max-width:100%}
.pn-layers a{color:#00ffff}
.pn-layers .pn-source,.pn-layers .pn-note{color:#b0bec0;font-size:.85em;line-height:1.45}
.pn-layers .pn-count{color:#ffd24a;font-size:.9em}
.pn-layers .pn-tablewrap{overflow:auto;max-width:100%}
.pn-layers table{border-collapse:collapse;width:100%;font-size:.85em}
.pn-layers th,.pn-layers td{text-align:left;border-bottom:1px solid #263539;padding:.45rem;vertical-align:top;overflow-wrap:anywhere}
.pn-layers td small{display:block;color:#9ba5a5;font-size:.85em}
.pn-layers details{margin-top:.4rem;color:#b0bec0}.pn-layers pre{white-space:pre-wrap;overflow-wrap:anywhere;max-width:30rem;font-size:.85em}
.pn-layers td a{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px}
.pn-layers canvas{display:block;width:100%;height:auto;background:#050a0b;border:1px solid #263539;box-sizing:border-box}
.pn-layers .pn-plot p,.pn-layers .pn-analytics p{font-size:.85em}
.pn-layers .pn-bar-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(60px,1fr);gap:.6rem;font-size:.8em;padding:.2rem 0}
.pn-layers meter{width:100%}
.pn-layers iframe{display:block;width:100%;height:75vh;min-height:480px;border:1px solid #345257;margin-top:.7rem;box-sizing:border-box;background:#000}
.pn-ticker{display:flex;align-items:center;gap:.6rem;background:#100405;color:#ff5555;border-block:1px solid #642126;overflow:hidden;padding:.35rem;box-sizing:border-box}
.pn-ticker-label{flex:none;font-size:.75em;max-width:10rem}
.pn-ticker-tools{display:flex;flex-wrap:wrap;align-items:center;gap:.3rem;max-width:24rem}.pn-ticker input{min-width:0;width:10rem;background:#070909;color:#ff7777;border:1px solid #642126;padding:.4rem;min-height:44px}.pn-ticker-count{font-size:.75em;flex-basis:100%}
.pn-ticker-viewport{overflow-x:auto;min-width:0;flex:1;scrollbar-width:thin;touch-action:pan-x pan-y}
.pn-ticker-track{display:flex;width:max-content}
.pn-ticker ul{display:flex;flex:none;gap:2.5rem;list-style:none;margin:0;padding:0 2.5rem 0 0}
.pn-ticker li{white-space:nowrap;display:flex;align-items:center;min-height:44px}
.pn-ticker a{color:#ff5555;text-decoration:none;font-size:.85em}
.pn-ticker a:hover{text-decoration:underline}
.pn-ticker time{font-size:.75em}
@media(max-width:500px){.pn-ticker{flex-wrap:wrap}.pn-ticker-label,.pn-ticker-tools,.pn-ticker-viewport{flex-basis:100%;max-width:none}.pn-layers th,.pn-layers td{padding:.3rem}.pn-layers .pn-tools{gap:.25rem}}Check V9 36
A JavaScript module in the tests folder of GlobalGrid2050 that tests major project news, interconnectors and the Renewable Energy Planning Database (REPD) register, using SHA-256.
Set aside from the main view: 91% of its lines are the same as uk_renewables_pipeline/202611180520/tests/check_v9_45.mjs (globalgrid2050), which stays. (near-copy-of, proposed by families.py). 90% of lines shared with Check V9 45; read that one first. All set-aside files, with reasons. Nothing was deleted.
Evidence
- line-jaccard 0.9099 to globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 uk_renewables_pipeline/202611180520/tests/check_v9_45.mjs:1-123 41fe9e5b51a076d6ffbe2ce5a8afe5a5265f4d56
- sha256 3d4f4c7ae2f73cffda1955a16ec6b6ea4b6e56886d790ea803aab1d40c03e631
- target sha256 e8956eb33f4e20f2a38ba682b879bfbfb35a358854d686c40467140d601f9e5b
- group of 15 (identity.json near-copy edges >= 0.9)
- canonical rule: reachable, newest stamp, core repo, most lines
testglobalgrid2050 / uk_renewables_pipeline/202611171507/tests/check_v9_36.mjs · lines 1–123 of 123 · version 2026-11-17 15:07
- What it does
- It tests major project news, interconnectors and the REPD register. Defines text, json, sha256, fmt. Uses libraries node:assert/strict, node:crypto, node:fs/promises, node:url, node:path. Side effects: reads or writes files.
- 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: interconnectors, the REPD register.
- Inputs & outputs
- In: JSON file release.v9.1.json; JSON file release.v9.5.1.json; JSON file build_manifest.json; JSON file major_project_news_v9_5_1.json; JSON file interconnectors.v9.8.json; JSON file interconnectors.json; JSON file interconnectors_manifest.json.
- Downstream impact
- Used directly by 1 file: Run V9 36 (globalgrid2050).
- What it achieves
- It is built from the text step (`text`), the JSON step (`json`) and the sha256 step (`sha256`). Pipeline News V9.36, proven from the bytes and through the page's OWN loaders (the pattern of `check_v9_13.mjs`).
- Why it matters
- Checked by Run V9 36.
- Application
- globalgrid2050 · uk_renewables_pipeline/202611171507/tests · JavaScript module
- Uses
- Canonical Projects V9 5 1 (new URL import.meta.url), node:assert/strict, node:crypto, node:fs/promises, node:url, node:path
- Used by
- run by Run V9 36 (script call)
- Produces
- text, json, sha256, fmt
- Defines here
- text, json, sha256, fmt
- 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/202611171507/tests/check_v9_36.mjs:1-123 · blob ab762b6d66ccad4762ba987756d93652ef0c61f5 · GitHub at these lines
- State
- achieves: comment · context: readme_derived · stage: ingest · effects: filesystem · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: production_core
/* check_v9_36.mjs - Pipeline News V9.36, proven from the bytes and through the
* page's OWN loaders (the pattern of check_v9_13.mjs).
*
* 1. The contracts bind the fixtures held by 202611132345 by path and sha256.
* 2. The page's own loader chain is imported unmodified and executed against the
* files in this folder; every invariant the browser asserts is asserted here.
* 3. The spine partitions are what the manifest says (sha256 and counts).
* 4. The UK newspaper feed is unchanged and Beacon Fen still resolves.
* 5. The interconnector product and contract are the parent's, byte for byte.
* 6. The page states its own identity and version label.
*
* Run: node tests/check_v9_36.mjs
*/
import assert from "node:assert/strict";
import { createHash } from "node:crypto";
import { readFile } from "node:fs/promises";
import { fileURLToPath } from "node:url";
import { basename, dirname, join } from "node:path";
const HERE = dirname(fileURLToPath(import.meta.url));
const RELEASE = join(HERE, "..");
const ID = basename(RELEASE);
const ROOT = join(RELEASE, "..", "..");
const VERSION = "9.36";
const STATE = "RELEASE CANDIDATE";
const PARENT_ID = "202611171217";
const FIXTURE_OWNER = "202611132345";
const PARENT = join(RELEASE, "..", PARENT_ID);
const text = (p) => readFile(p, "utf8");
const json = async (p) => JSON.parse(await text(p));
const sha256 = (b) => createHash("sha256").update(b).digest("hex");
const NEWS_FEED_SHA256 = "cea104c3e9cfc07971680afdf5f64073e1d4825b63bfaf4e969266df8386ebbd";
// 1. contracts bind fixtures
const c91 = await json(join(RELEASE, "contracts", "release.v9.1.json"));
const c951 = await json(join(RELEASE, "contracts", "release.v9.5.1.json"));
assert.equal(c91.source.dataset, "DESNZ Renewable Energy Planning Database Q3 2026");
for (const [pathKey, shaKey] of [["identity_fixture", "identity_fixture_sha256"], ["coordinate_fixture", "coordinate_fixture_sha256"]]) {
const rel = c91.source[pathKey];
assert.ok(rel.startsWith(`uk_renewables_pipeline/${FIXTURE_OWNER}/fixtures/`), `${pathKey} must be the fixture owner's: ${rel}`);
assert.equal(sha256(await readFile(join(ROOT, rel))), c91.source[shaKey], `${pathKey} bytes`);
}
const coords = await json(join(ROOT, c91.source.coordinate_fixture));
assert.equal(coords.source_workbook_sha256, c91.source.workbook_sha256, "coordinate fixture names the contract workbook");
const identity = await json(join(ROOT, c91.source.identity_fixture));
assert.equal(identity.schema, "globalgrid2050.project-identity.v6");
assert.equal(identity.records.length, identity.raw_record_count);
assert.equal(coords.source_records, identity.raw_record_count, "workbook and identity hold the same refs");
// 2. the page's own loader, unmodified, against these bytes
const ORIGIN = "http://release.invalid";
const BASE = `${ORIGIN}/uk_renewables_pipeline/${ID}/`;
globalThis.window = { location: { origin: ORIGIN, href: BASE } };
globalThis.fetch = async (path) => {
const url = new URL(path, BASE);
assert.ok(url.pathname.startsWith(`/uk_renewables_pipeline/${ID}/`), `loader fetched outside the release: ${url}`);
const file = join(RELEASE, decodeURIComponent(url.pathname.slice(`/uk_renewables_pipeline/${ID}/`.length)));
const body = await text(file);
return { ok: true, status: 200, url: url.href, json: async () => JSON.parse(body) };
};
const loader = await import(new URL("../scripts/data/canonical-projects-v9-5-1.js", import.meta.url).href);
const model = await loader.loadCanonicalProjectsV9_5_1();
assert.equal(model.projects.length, c951.expected.project_count);
assert.equal(Math.round(model.metadata.capacity_mw), c951.expected.displayed_capacity_mw);
// 3. partitions are the manifest's bytes
const manifest = await json(join(RELEASE, "data", "v9.1", "build_manifest.json"));
for (const part of [...manifest.project_partitions, ...manifest.atlas_partitions]) {
assert.equal(sha256(await readFile(join(RELEASE, part.path))), part.sha256, `${part.path} hash`);
}
const atlasFeatures = manifest.atlas_partitions.reduce((n, p) => n + p.feature_count, 0);
assert.equal(atlasFeatures, manifest.geometry_count, "atlas features = valid geometries");
for (const key of Object.keys(c91.expected)) assert.equal(manifest[key], c91.expected[key], `manifest ${key}`);
assert.equal(manifest.source_dataset, c91.source.dataset);
assert.equal(manifest.source_record_count, identity.raw_record_count);
// 4. the newspaper: unchanged Q2 feed, every bound ref still resolves
const feedBytes = await readFile(join(ROOT, "dist", "major_project_news_v9_5_1.json"));
assert.equal(sha256(feedBytes), NEWS_FEED_SHA256, "dist/major_project_news_v9_5_1.json must not be rebuilt by this release");
const feed = JSON.parse(feedBytes);
const byRef = new Map(model.projects.map((p) => [p.repd_ref, p]));
const boundRefs = new Set(feed.canonical_items.map((item) => String(item.repd_ref)));
const unresolved = [...boundRefs].filter((ref) => !byRef.has(ref));
const beacon = byRef.get(feed.beacon_fen_contract.repd_ref);
assert.ok(beacon, "Beacon Fen must be in the spine");
assert.equal(beacon.capacity_mw, feed.beacon_fen_contract.official_capacity_mw, "Beacon Fen official capacity");
// 5. interconnectors are the parent's
for (const rel of ["contracts/interconnectors.v9.8.json", "data/v9.8/interconnectors.json", "data/v9.8/interconnectors_manifest.json"]) {
assert.equal(sha256(await readFile(join(RELEASE, rel))), sha256(await readFile(join(PARENT, rel))), `${rel} is the parent's`);
}
// 6. page identity
const fmt = (n) => n.toLocaleString("en-GB");
const html = await text(join(RELEASE, "index.html"));
const compact = html.includes(`data-edition="${ID}"`);
assert.ok(compact || html.includes(`UK RENEWABLES PIPELINE ${ID}`), "visible page identity names this release");
assert.ok(new RegExp(`Canonical DESNZ REPD Q3 2026[^<]*${fmt(manifest.project_count)} solar, BESS and wind records`).test(html), "index.html states the Q3 register count");
assert.ok(!html.includes("REPD Q2 2026: 7,680"), "index.html must not claim the Q2 register");
assert.ok(html.includes("scripts/app-v9-8.js"), "index.html loads the v9.8 app");
const label = html.slice(html.indexOf("<body>"), html.indexOf('<section class="newspaper">'));
assert.ok(!/CANDIDATE/.test(label.replaceAll("RELEASE CANDIDATE", "")), "brand, nav, h1 and meta carry no candidate label other than this version's own state");
if (compact) {
assert.ok(label.includes(`<small>PIPELINE NEWS · V${VERSION}</small>`), "compact brand names the version");
assert.ok(label.includes(`>V${VERSION} · PIPELINE NEWS</a>`), "compact nav names the version");
assert.ok(label.includes(`V${VERSION} · `) && label.includes(' · REPD OCTOBER 2026 · '), "compact stamp names the version and source vintage");
assert.ok(html.includes(`<title>GlobalGrid2050 | Pipeline News V${VERSION} · ${ID}</title>`), "compact title names this release");
assert.equal((html.match(/<section\b/g)||[]).length,2,"exactly two principal blocks");
for (const tab of ['solarTab','bessTab','gridTab','datacentreTab']) assert.ok(html.includes(`id="${tab}" role="tab"`),`category ${tab}`);
assert.ok(!html.includes('<th>NEWS SIGNAL</th>')&&!html.includes('id="solar1000Pilot"'),"withdrawn panels/column do not return");
} else {
assert.ok(label.includes(`<small>UK RENEWABLES PIPELINE · V${VERSION}</small>`), "brand names the version");
assert.ok(label.includes(`<a class="active" href="#">V${VERSION} ${STATE} · REPD Q3 2026</a>`), "nav names the version");
assert.ok(new RegExp(`<strong>V${VERSION.replace(".", "\\.")} · REPD OCTOBER 2026 \\(Q3\\) · [^<]+ · ${STATE} · \\d+ November 2026</strong>`).test(label), "meta line names the version and its date");
assert.ok(html.includes(`<title>GlobalGrid2050 | UK Renewables Pipeline ${ID}</title>`), "title names this release");
}
assert.ok(label.includes(`<a href="../${PARENT_ID}/">`), "nav links back to the parent");
assert.ok(label.includes('<a href="../versions.html">'), "nav links to the list of all versions");
console.log(`check_v9_36: ${ID} loader PASS - ${fmt(model.projects.length)} records, ${model.metadata.capacity_mw.toLocaleString("en-GB", { minimumFractionDigits: 2 })} MW, `
+ `${manifest.geometry_count} with geometry / ${manifest.missing_geometry_count} without; news feed unchanged, `
+ `${boundRefs.size - unresolved.length}/${boundRefs.size} bound refs resolve${unresolved.length ? ` (unresolved: ${unresolved.join(", ")})` : ""}`);