In this section
- App V9 7 other · globalgrid2050 / testcode/202609051152/pipeline/scripts/app-v9-7.js lines 1–28
- Testcode — Pipeline other · globalgrid2050 / testcode/202609051152/pipeline/scripts/app.js lines 1–31
- News Regions V9 6 2 transform · globalgrid2050 / testcode/202609051152/pipeline/scripts/core/news-regions-v9-6-2.js lines 1–87
- News Relevance V9 2 transform · globalgrid2050 / testcode/202609051152/pipeline/scripts/core/news-relevance-v9-2.js lines 1–80
- Plugin Host transform · globalgrid2050 / testcode/202609051152/pipeline/scripts/core/plugin-host.js lines 1–14
- Project Filter V9 2 transform · globalgrid2050 / testcode/202609051152/pipeline/scripts/core/project-filter-v9-2.js lines 1–72
- Project State transform · globalgrid2050 / testcode/202609051152/pipeline/scripts/core/project-state.js lines 1–121
- State other · globalgrid2050 / testcode/202609051152/pipeline/scripts/core/state.js lines 1–23
- Testcode — Pipeline transform · globalgrid2050 / testcode/202609051152/pipeline/scripts/core/utils.js lines 1–28
- Canonical Projects V9 1 render · globalgrid2050 / testcode/202609051152/pipeline/scripts/data/canonical-projects-v9-1.js lines 1–75
- Canonical Projects V9 2 render · globalgrid2050 / testcode/202609051152/pipeline/scripts/data/canonical-projects-v9-2.js lines 1–30
- Canonical Projects V9 3 render · globalgrid2050 / testcode/202609051152/pipeline/scripts/data/canonical-projects-v9-3.js lines 1–33
- Canonical Projects V9 4 render · globalgrid2050 / testcode/202609051152/pipeline/scripts/data/canonical-projects-v9-4.js lines 1–33
- Canonical Projects V9 5 1 render · globalgrid2050 / testcode/202609051152/pipeline/scripts/data/canonical-projects-v9-5-1.js lines 1–33
App V9 7
A JavaScript module in the scripts folder of GlobalGrid2050.
otherglobalgrid2050 / testcode/202609051152/pipeline/scripts/app-v9-7.js · lines 1–28 of 28 · version 2026-09-05 11:52 · Entry point
- Why it exists in the grid workflow
- Domain stage experimental (path word 'testcode'): work its own path marks as experimental (sandbox, prototype, archive or similar words); by this evidence it is not part of a production workflow.
- Downstream impact
- Used directly by 2 files: UK Renewables Pipeline — V9 7 Page (globalgrid2050, https://globalgrid2050.com/uk_renewables_pipeline/v9.7/); Sandbox — Pipeline Page (testcode). Reached from 86 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/).
- What it achieves
- No statement of purpose was found in the file, a README line naming it, or its name. Described from its file name only (a candidate, not yet checked against the code).
- Why it matters
- Loaded by the V9 7 page at https://globalgrid2050.com/uk_renewables_pipeline/v9.7/ and 1 other page.
- Application
- globalgrid2050 · testcode/202609051152/pipeline/scripts · JavaScript module
- Uses
- Gauges V9 2 (import), Newspaper V9 7 (import), Projects V9 5 1 (import), Plugin Host (import)
- Used by
- loaded by UK Renewables Pipeline — V9 7 Page (script src), loaded by Sandbox — Pipeline Page (script src)
- 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 testcode/202609051152/pipeline/scripts/app-v9-7.js:1-28 · blob 73dce8009c552b60ae80429929cde7aa6bfadd1c · GitHub at these lines
- State
- achieves: name · context: readme_derived · stage: unknown · effects: none found · domain stage: experimental · users: none · canonical: production_core
import { initialiseGaugesV9_2 } from "./plugins/gauges-v9-2.js";
import { bindNewspaperV9_7, loadNewsV9_7 } from "./plugins/newspaper-v9-7.js";
import {
bindProjectControlsV9_5_1,
loadProjectsV9_5_1,
refreshProjectsV9_5_1,
} from "./plugins/projects-v9-5-1.js";
import { startPlugins } from "./core/plugin-host.js";
startPlugins([
{ id: "gauges", start: initialiseGaugesV9_2 },
{
id: "newspaper",
dependsOn: ["gauges"],
start() {
bindNewspaperV9_7(refreshProjectsV9_5_1);
loadNewsV9_7();
},
},
{
id: "projects",
dependsOn: ["gauges", "newspaper"],
start() {
bindProjectControlsV9_5_1();
loadProjectsV9_5_1();
},
},
]);Testcode — Pipeline
A JavaScript module in the scripts folder of GlobalGrid2050.
otherglobalgrid2050 / testcode/202609051152/pipeline/scripts/app.js · lines 1–31 of 31 · version 2026-09-05 11:52 · Not reached from any entry point (candidate for review)
- Why it exists in the grid workflow
- Domain stage experimental (path word 'testcode'): work its own path marks as experimental (sandbox, prototype, archive or similar words); by this evidence it is not part of a production workflow.
- What it achieves
- No statement of purpose was found in the file, a README line naming it, or its name. Described from its file name only (a candidate, not yet checked against the code).
- Why it matters
- No other file in the estate was found to import it.
- Application
- globalgrid2050 · testcode/202609051152/pipeline/scripts · JavaScript module
- Uses
- Gauges V9 2 (import), Newspaper V9 2 (import), Projects V9 2 (import), Plugin Host (import)
- Used by
- none found
- 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 testcode/202609051152/pipeline/scripts/app.js:1-31 · blob 9c7360de94dda315fc0ddfd7d2d9699c91da0e70 · GitHub at these lines
- State
- achieves: name · context: readme_derived · stage: unknown · effects: none found · domain stage: experimental · users: none · canonical: unreached_review
import { initialiseGaugesV9_2 } from "./plugins/gauges-v9-2.js";
import { bindNewspaperV9_2, loadNewsV9_2 } from "./plugins/newspaper-v9-2.js";
import {
bindProjectControlsV9_2,
loadProjectsV9_2,
refreshProjectsV9_2,
} from "./plugins/projects-v9-2.js";
import { startPlugins } from "./core/plugin-host.js";
startPlugins([
{
id: "gauges",
start: initialiseGaugesV9_2,
},
{
id: "newspaper",
dependsOn: ["gauges"],
start() {
bindNewspaperV9_2(refreshProjectsV9_2);
loadNewsV9_2();
},
},
{
id: "projects",
dependsOn: ["gauges", "newspaper"],
start() {
bindProjectControlsV9_2();
loadProjectsV9_2();
},
},
]);News Regions V9 6 2
A JavaScript module in the core folder of GlobalGrid2050 that works with solar and battery storage (BESS).
transformglobalgrid2050 / testcode/202609051152/pipeline/scripts/core/news-regions-v9-6-2.js · lines 1–87 of 87 · version 2026-09-05 11:52 · pattern distinctiveProjectTokens (shared by 4 files)
- What it does
- It calculates solar and battery storage (BESS). Defines distinctiveProjectTokens, ukEvidenceV9_6_2, technology, classifyInternationalV9_6_2, regionalCountsV9_6_2.
- Why it exists in the grid workflow
- Domain stage experimental (path word 'testcode'): work its own path marks as experimental (sandbox, prototype, archive or similar words); by this evidence it is not part of a production workflow. Domain terms in the code: solar, battery storage (BESS).
- Downstream impact
- Used directly by 3 files: Newspaper V9 6 2 (globalgrid2050); Check V9 6 2 (globalgrid2050); Check V9 6 2 (globalgrid2050). Reached from 93 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/).
- What it achieves
- It classifies international v9 (`classifyInternationalV9_6_2`) and is built from the distinctive project tokens helper (`distinctiveProjectTokens`). Defines `distinctiveProjectTokens`, `ukEvidenceV9_6_2`, `technology` and 2 more.
- Why it matters
- Imported by Newspaper V9 6 2. Checked by 2 tests, including Check V9 6 2.
- Application
- globalgrid2050 · testcode/202609051152/pipeline/scripts/core · JavaScript module
- Uses
- Testcode — Pipeline (import)
- Used by
- imported by Newspaper V9 6 2 (import), imported by Check V9 6 2 (import), imported by Check V9 6 2 (import)
- Produces
- ukEvidenceV9_6_2, classifyInternationalV9_6_2, regionalCountsV9_6_2
- Defines here
- distinctiveProjectTokens, ukEvidenceV9_6_2, technology, classifyInternationalV9_6_2, regionalCountsV9_6_2
- Cannot conclude
- Whether this code runs, is used by a live app today, or is correct. This is a static reading.
- Evidence
- globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 testcode/202609051152/pipeline/scripts/core/news-regions-v9-6-2.js:1-87 · blob 0127ebdd379d54b7f87b781f496a28e3c3e65325 · GitHub at these lines
- State
- achieves: name · context: readme_derived · stage: transform · effects: none found · domain stage: experimental · users: none · canonical: production_core
import { normaliseProject } from "./utils.js";
const SOLAR = /\b(?:solar|photovoltaic(?:s)?|pv|agrivoltaic(?:s)?)\b/i;
const BESS = /\b(?:bess|battery|batteries|energy storage|grid storage)\b/i;
const UK = /\b(?:uk|u\.k\.|united kingdom|britain|british|england|english|scotland|scottish|wales|welsh|northern ireland|north yorkshire|lincolnshire|nottinghamshire|devon|cornish|cumbria|suffolk|kent|surrey|gloucestershire|oxfordshire|warwickshire|yorkshire|essex|norfolk|somerset|dorset|lancashire|derbyshire|leicestershire|cambridgeshire|bedfordshire|hertfordshire|buckinghamshire|worcestershire|s … [line shortened here: 535 characters; full line on GitHub]
const US = /\b(?:us(?!\$)|u\.s\.(?!\$)|usa|u\.s\.a\.|united states|american|new jersey|virginia|california|arizona|texas|new york|florida|illinois|ohio|pennsylvania|colorado|nevada|oregon|washington state|massachusetts|connecticut|maryland|michigan|minnesota|wisconsin|georgia|north carolina|south carolina|tennessee|kentucky|indiana|iowa|kansas|missouri|oklahoma|new mexico|utah|idaho|montana|wyomin … [line shortened here: 566 characters; full line on GitHub]
const EUROPE = /\b(?:europe|european union|eu|ireland|irish|germany|german|france|french|spain|spanish|italy|italian|netherlands|dutch|belgium|belgian|poland|polish|portugal|portuguese|greece|greek|denmark|danish|sweden|swedish|norway|norwegian|finland|finnish|austria|austrian|switzerland|swiss|czechia|czech|romania|romanian|bulgaria|bulgarian|hungary|hungarian|croatia|croatian|serbia|serbian|slov … [line shortened here: 541 characters; full line on GitHub]
const OTHER = /\b(?:australia|australian|canada|india|china|chinese|south africa|new zealand|japan|japanese|brazil|brazilian|mexico|mexican|uae|united arab emirates|saudi arabia|taiwan|philippines|chile|argentina|africa|asia|latin america|middle east)\b/i;
const GENERIC_PROJECT = new Set([
"and", "the", "farm", "solar", "battery", "bess", "storage", "energy", "park", "site",
"road", "lane", "wind", "offshore", "onshore", "project", "phase", "extension", "facility",
"system", "scheme", "development", "power", "limited", "ltd", "centre", "center",
"grid", "services", "complex", "south", "north", "east", "west", "southern", "northern",
"eastern", "western", "california", "virginia", "jersey", "australia", "germany", "france",
"spain", "italy", "ireland", "romania", "greece", "chile", "japan",
]);
function distinctiveProjectTokens(item) {
return normaliseProject(item.project || "")
.split(" ")
.filter((token) => token.length >= 5 && !GENERIC_PROJECT.has(token));
}
export function ukEvidenceV9_6_2(item) {
if (item?.canonical_relevant === true) return "canonical REPD PRIMARY_MATCH";
const headline = String(item?.headline || "");
if (UK.test(headline)) return "explicit UK geography";
const normalisedHeadline = normaliseProject(headline);
const projectToken = distinctiveProjectTokens(item).find((token) => normalisedHeadline.includes(token));
if (projectToken && String(item?.county || "").trim()) return `UK project token ${projectToken}`;
return "";
}
function technology(headline) {
const solar = SOLAR.test(headline);
const bess = BESS.test(headline);
if (solar && bess) return "SOLAR + BESS";
if (solar) return "SOLAR";
if (bess) return "BESS";
return "";
}
export function classifyInternationalV9_6_2(item) {
const headline = String(item?.headline || "");
const classifiedTechnology = technology(headline);
if (!classifiedTechnology || ukEvidenceV9_6_2(item)) return null;
let region = "";
let evidence = "";
if (US.test(headline)) {
region = "US";
evidence = "explicit US geography";
} else if (EUROPE.test(headline)) {
region = "EUROPE";
evidence = "explicit European geography";
} else if (OTHER.test(headline)) {
region = "INTERNATIONAL_OTHER";
evidence = "explicit non-UK geography";
}
if (!region) return null;
return Object.freeze({
region,
technology: classifiedTechnology,
evidence,
project_signal_eligible: false,
canonical_identity: false,
});
}
export function regionalCountsV9_6_2(items) {
const counts = { international: 0, us: 0, europe: 0, other: 0 };
for (const item of items || []) {
const result = classifyInternationalV9_6_2(item);
if (!result) continue;
counts.international += 1;
if (result.region === "US") counts.us += 1;
else if (result.region === "EUROPE") counts.europe += 1;
else counts.other += 1;
}
return Object.freeze(counts);
}News Relevance V9 2
A JavaScript module in the core folder of GlobalGrid2050 that works with battery storage (BESS) and solar.
transformglobalgrid2050 / testcode/202609051152/pipeline/scripts/core/news-relevance-v9-2.js · lines 1–80 of 80 · version 2026-09-05 11:52
- What it does
- It calculates battery storage (BESS) and solar. Defines significantTokens, countMatches, capacityAppears, assessNewsItemV9_2, newsMatchesProjectV9_2.
- Why it exists in the grid workflow
- Domain stage experimental (path word 'testcode'): work its own path marks as experimental (sandbox, prototype, archive or similar words); by this evidence it is not part of a production workflow. Domain terms in the code: battery storage (BESS), solar.
- Downstream impact
- Used directly by 7 files: Newspaper V9 2 (globalgrid2050); Check V9 2 (globalgrid2050); Check V9 3 (globalgrid2050); Check V9 4 (globalgrid2050); and 3 more. Reached from 190 other entry points, including GlobalGrid2050 Historical Builds (globalgrid2050, https://globalgrid2050.com/historical_builds.html); GlobalGrid2050 Homepage Before Four Nests (globalgrid2050, https://globalgrid2050.com/homepage-before-four-nests-20260925.html); GlobalGrid2050 — PipelineNews Intelligence Page (globalgrid2050, https://globalgrid2050.com/pipelinenews_intelligence/202609050309/).
- What it achieves
- It counts matches (`countMatches`) and is built from the significant tokens helper (`significantTokens`) and the capacity appears helper (`capacityAppears`). Defines `significantTokens`, `countMatches`, `capacityAppears` and 2 more.
- Why it matters
- Imported by Newspaper V9 2. Checked by 6 tests, including Check V9 2.
- Application
- globalgrid2050 · testcode/202609051152/pipeline/scripts/core · JavaScript module
- Uses
- Testcode — Pipeline (import)
- Used by
- imported by Newspaper V9 2 (import), imported by Check V9 2 (import), imported by Check V9 3 (import), imported by Check V9 4 (import), imported by Check V9 4 (import), imported by Check V9 4 (import), imported by Check V9 3 (import), mentioned in Standalone (comment link)
- Produces
- assessNewsItemV9_2, newsMatchesProjectV9_2
- Defines here
- significantTokens, countMatches, capacityAppears, assessNewsItemV9_2, newsMatchesProjectV9_2
- Cannot conclude
- Whether this code runs, is used by a live app today, or is correct. This is a static reading.
- Evidence
- globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 testcode/202609051152/pipeline/scripts/core/news-relevance-v9-2.js:1-80 · blob f8374bfd6f0c47e98ca1e7f2f3312c9281a34e8a · GitHub at these lines
- State
- achieves: name · context: readme_derived · stage: transform · effects: none found · domain stage: experimental · users: none · canonical: production_core
import { normaliseProject } from "./utils.js";
const GENERIC = new Set([
"and", "the", "farm", "solar", "battery", "bess", "storage", "energy", "park", "site",
"road", "lane", "wind", "offshore", "onshore", "project", "phase", "extension", "facility",
"system", "scheme", "development", "power", "limited", "ltd", "uk", "centre", "center",
]);
function significantTokens(value) {
return normaliseProject(value)
.split(" ")
.filter((token) => token.length >= 3 && !GENERIC.has(token));
}
function countMatches(tokens, text) {
return tokens.filter((token) => text.includes(token)).length;
}
function capacityAppears(item, headline) {
const capacity = Number(item.capacity_mw || 0);
if (!capacity) return false;
const candidates = new Set([
String(capacity),
String(Math.round(capacity)),
capacity.toLocaleString("en-GB", { maximumFractionDigits: 2 }),
]);
return [...candidates].some((candidate) => candidate && headline.includes(candidate.toLowerCase()));
}
export function assessNewsItemV9_2(item) {
const headline = normaliseProject(item.headline || "");
const projectTokens = significantTokens(item.project);
const operatorTokens = significantTokens(item.operator);
const matchedProjectTokens = countMatches(projectTokens, headline);
const matchedOperatorTokens = countMatches(operatorTokens, headline);
const county = normaliseProject(item.county || "");
const countyMatch = Boolean(county && headline.includes(county));
const capacityMatch = capacityAppears(item, headline);
const technology = String(item.technology || "").toLowerCase();
const technologyMatch = technology === "solar"
? /\bsolar\b/.test(headline)
: technology === "bess"
? /\b(bess|battery|storage)\b/.test(headline)
: false;
const sourceConfidence = Math.max(0, Math.min(100, Number(item.confidence || 0)));
let score = Math.min(matchedProjectTokens, 3) * 30;
score += Math.min(matchedOperatorTokens, 2) * 12;
if (countyMatch) score += 15;
if (capacityMatch) score += 15;
if (technologyMatch) score += 8;
score += Math.round(sourceConfidence / 20);
score = Math.min(score, 100);
const hasIdentitySupport = matchedProjectTokens >= 2
|| (matchedProjectTokens >= 1 && (matchedOperatorTokens >= 1 || countyMatch || capacityMatch));
const strong = hasIdentitySupport && score >= 45;
const reason = strong
? `project/headline relevance ${score}%`
: `relevance gate rejected ${score}%`;
return Object.freeze({
score,
strong,
reason,
matched_project_tokens: matchedProjectTokens,
matched_operator_tokens: matchedOperatorTokens,
county_match: countyMatch,
capacity_match: capacityMatch,
technology_match: technologyMatch,
});
}
export function newsMatchesProjectV9_2(project, item) {
if (!project || !item) return false;
if (normaliseProject(project.name) !== normaliseProject(item.project)) return false;
const expectedTechnology = project.technology === "solar" ? "solar" : project.technology === "bess" ? "bess" : "";
if (!expectedTechnology || String(item.technology || "").toLowerCase() !== expectedTechnology) return false;
return assessNewsItemV9_2(item).strong;
}Plugin Host
A JavaScript module in the core folder of GlobalGrid2050 that starts plugins (`startPlugins`). It starts plugins (`startPlugins`).
transformglobalgrid2050 / testcode/202609051152/pipeline/scripts/core/plugin-host.js · lines 1–14 of 14 · version 2026-09-05 11:52
- What it does
- It calculates its inputs. Defines startPlugins.
- Why it exists in the grid workflow
- Domain stage experimental (path word 'testcode'): work its own path marks as experimental (sandbox, prototype, archive or similar words); by this evidence it is not part of a production workflow.
- Downstream impact
- Used directly by 19 files: App V9 3 (globalgrid2050); App V9 4 (globalgrid2050); App V9 5 1 (globalgrid2050); App V9 5 (globalgrid2050); and 15 more. Reached from 193 other entry points, including GlobalGrid2050 Historical Builds (globalgrid2050, https://globalgrid2050.com/historical_builds.html); GlobalGrid2050 Homepage Before Four Nests (globalgrid2050, https://globalgrid2050.com/homepage-before-four-nests-20260925.html); GlobalGrid2050 — PipelineNews Intelligence Page (globalgrid2050, https://globalgrid2050.com/pipelinenews_intelligence/202609050309/).
- What it achieves
- Defines `startPlugins`.
- Why it matters
- Imported by 18 files, including App V9 3, App V9 4 and App V9 5 1, from PipelineNews. Checked by Check Modules.
- Application
- globalgrid2050 · testcode/202609051152/pipeline/scripts/core · JavaScript module
- Uses
- none found
- Used by
- imported by App V9 3 (import), imported by App V9 4 (import), imported by App V9 5 1 (import), imported by App V9 5 (import), imported by App V9 6 2 (import), imported by App V9 7 (import), imported by Testcode — Pipeline (import), imported by Check Modules (import), and 11 more, mentioned in Standalone (comment link)
- Produces
- startPlugins
- Defines here
- startPlugins
- Cannot conclude
- Whether this code runs, is used by a live app today, or is correct. This is a static reading.
- Evidence
- globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 testcode/202609051152/pipeline/scripts/core/plugin-host.js:1-14 · blob 159b7ae4029cc0686cd3770abf596919a928e5dd · GitHub at these lines
- State
- achieves: name · context: readme_derived · stage: transform · effects: none found · domain stage: experimental · users: none · canonical: production_core
export function startPlugins(plugins) {
const started = new Set();
for (const plugin of plugins) {
if (!plugin || typeof plugin.id !== "string" || typeof plugin.start !== "function") {
throw new TypeError("Every V7 plugin requires an id and start function.");
}
if (started.has(plugin.id)) throw new Error(`Duplicate V7 plugin id: ${plugin.id}`);
const missing = (plugin.dependsOn || []).filter((dependency) => !started.has(dependency));
if (missing.length) throw new Error(`V7 plugin ${plugin.id} has unmet dependencies: ${missing.join(", ")}`);
plugin.start();
started.add(plugin.id);
}
return Object.freeze([...started]);
}Project Filter V9 2
A JavaScript module in the core folder of GlobalGrid2050 that normalises search v9 (`normaliseSearchV9_2`), builds project search v9 (`buildProjectSearchTextV9_2`) and projects matches v9 (`projectMatchesV9_2`) (units: MW).
transformglobalgrid2050 / testcode/202609051152/pipeline/scripts/core/project-filter-v9-2.js · lines 1–72 of 72 · version 2026-09-05 11:52
- What it does
- It calculates its inputs. Defines normaliseSearchV9_2, tokeniseSearchV9_2, buildProjectSearchTextV9_2, projectMatchesV9_2, summariseProjectsV9_2.
- Why it exists in the grid workflow
- Domain stage experimental (path word 'testcode'): work its own path marks as experimental (sandbox, prototype, archive or similar words); by this evidence it is not part of a production workflow.
- Downstream impact
- Used directly by 35 files: Projects V9 2 (globalgrid2050); Projects V9 3 (globalgrid2050); Projects V9 4 (globalgrid2050); Projects V9 5 (globalgrid2050); and 31 more. Reached from 214 other entry points, including GlobalGrid2050 Historical Builds (globalgrid2050, https://globalgrid2050.com/historical_builds.html); GlobalGrid2050 Homepage Before Four Nests (globalgrid2050, https://globalgrid2050.com/homepage-before-four-nests-20260925.html); GlobalGrid2050 — PipelineNews Intelligence Page (globalgrid2050, https://globalgrid2050.com/pipelinenews_intelligence/202609050309/).
- What it achieves
- It normalises search v9 (`normaliseSearchV9_2`), builds project search text v9 (`buildProjectSearchTextV9_2`) and summarises projects v9 (`summariseProjectsV9_2`). Defines `normaliseSearchV9_2`, `tokeniseSearchV9_2`, `buildProjectSearchTextV9_2` and 2 more.
- Why it matters
- Imported by 22 files, including Projects V9 2, Projects V9 3 and Projects V9 4, from PipelineNews. Checked by 13 tests, including Check V9 2.
- Application
- globalgrid2050 · testcode/202609051152/pipeline/scripts/core · JavaScript module
- Uses
- none found
- Used by
- imported by Projects V9 2 (import), imported by Projects V9 3 (import), imported by Projects V9 4 (import), imported by Projects V9 5 (import), imported by Projects V9 5 1 (import), imported by Check V9 2 (import), imported by Check V9 3 (import), imported by Check V9 4 (import), and 27 more, mentioned in Standalone (comment link)
- Produces
- normaliseSearchV9_2, tokeniseSearchV9_2, buildProjectSearchTextV9_2, projectMatchesV9_2, summariseProjectsV9_2
- Defines here
- normaliseSearchV9_2, tokeniseSearchV9_2, buildProjectSearchTextV9_2, projectMatchesV9_2, summariseProjectsV9_2
- Cannot conclude
- Whether this code runs, is used by a live app today, or is correct. This is a static reading.
- Evidence
- globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 testcode/202609051152/pipeline/scripts/core/project-filter-v9-2.js:1-72 · blob dceee01d0f51e85b071aef275250c1fb223eeba7 · GitHub at these lines
- State
- achieves: name · context: readme_derived · stage: transform · effects: none found · domain stage: experimental · users: none · canonical: production_core
const TECHNOLOGIES = new Set(["all", "solar", "bess", "wind_onshore", "wind_offshore"]);
export function normaliseSearchV9_2(value) {
return String(value ?? "")
.normalize("NFKD")
.replace(/[\u0300-\u036f]/g, "")
.toLocaleLowerCase("en-GB")
.replace(/&/g, " and ")
.replace(/[^a-z0-9.-]+/g, " ")
.replace(/\s+/g, " ")
.trim();
}
export function tokeniseSearchV9_2(value) {
const normalised = normaliseSearchV9_2(value);
return normalised ? normalised.split(" ").filter(Boolean) : [];
}
export function buildProjectSearchTextV9_2(project) {
const relationshipRefs = [
...(Array.isArray(project.direct_related_repd_refs) ? project.direct_related_repd_refs : []),
...(Array.isArray(project.planning_sibling_repd_refs) ? project.planning_sibling_repd_refs : []),
...(Array.isArray(project.development_repd_refs) ? project.development_repd_refs : []),
];
return normaliseSearchV9_2([
project.name,
project.operator,
project.repd_ref,
project.gg_project_id,
project.gg_development_id,
project.repd_old_ref,
project.repd_technology,
project.technology,
project.status,
project.lifecycle,
project.capacity_mw,
project.county,
project.region,
project.country,
project.planning_authority,
project.planning_application_reference,
project.repd_record_updated,
project.geometry_status,
relationshipRefs.join(" "),
].join(" "));
}
export function projectMatchesV9_2(project, filters, searchText = buildProjectSearchTextV9_2(project)) {
const technology = TECHNOLOGIES.has(filters.technology) ? filters.technology : "all";
const status = String(filters.status || "All");
const county = String(filters.county || "All");
const tokens = Array.isArray(filters.tokens) ? filters.tokens : tokeniseSearchV9_2(filters.query);
if (technology !== "all" && project.technology !== technology) return false;
if (status !== "All" && !String(project.status || "").includes(status)) return false;
if (county !== "All" && project.county !== county) return false;
return tokens.every((token) => searchText.includes(token));
}
export function summariseProjectsV9_2(projects) {
let capacity = 0;
let largest = 0;
for (const project of projects) {
capacity += Number(project.capacity_mw) || 0;
largest = Math.max(largest, Number(project.capacity_mw) || 0);
}
return {
count: projects.length,
capacity_mw: Math.round((capacity + Number.EPSILON) * 100) / 100,
largest_mw: largest,
};
}Project State
A JavaScript module in the core folder of GlobalGrid2050 that filters projects (`filterProjects`), sets canonical project filter (`setCanonicalProjectFilter`) and resets canonical project filters (`resetCanonicalProjectFilters`).
transformglobalgrid2050 / testcode/202609051152/pipeline/scripts/core/project-state.js · lines 1–121 of 121 · version 2026-09-05 11:52 · pattern unique (shared by 10 files)
- What it does
- It calculates its inputs. Defines 10 functions or classes, including defaultFilters, filterProjects, optionsFor, unique, createCanonicalProjectState.
- Why it exists in the grid workflow
- Domain stage experimental (path word 'testcode'): work its own path marks as experimental (sandbox, prototype, archive or similar words); by this evidence it is not part of a production workflow.
- Downstream impact
- Used directly by 10 files: Canonical Project Controls (globalgrid2050); Projects (globalgrid2050); Check V7 2 Project Controls (globalgrid2050); Check V7 2 Project Model (globalgrid2050); and 6 more. Reached from 187 other entry points, including GlobalGrid2050 Historical Builds (globalgrid2050, https://globalgrid2050.com/historical_builds.html); GlobalGrid2050 Homepage Before Four Nests (globalgrid2050, https://globalgrid2050.com/homepage-before-four-nests-20260925.html); GlobalGrid2050 — PipelineNews Intelligence Page (globalgrid2050, https://globalgrid2050.com/pipelinenews_intelligence/202609050309/).
- What it achieves
- It filters projects (`filterProjects`), creates canonical project state (`createCanonicalProjectState`) and sets canonical project filter (`setCanonicalProjectFilter`). Defines `defaultFilters`, `filterProjects`, `optionsFor` and 7 more.
- Why it matters
- Imported by Canonical Project Controls and Projects. Checked by 7 tests, including Check V7 2 Project Controls.
- Application
- globalgrid2050 · testcode/202609051152/pipeline/scripts/core · JavaScript module
- Uses
- Canonical Projects (import)
- Used by
- imported by Canonical Project Controls (import), imported by Projects (import), imported by Check V7 2 Project Controls (import), imported by Check V7 2 Project Model (import), imported by Check V7 2 Project Table Export (import), imported by Check V8 1 Mvp (import), imported by Check V9 0 (import), imported by Projects (import), and 2 more, mentioned in Standalone (comment link)
- Produces
- createCanonicalProjectState, beginCanonicalProjectLoad, commitCanonicalProjectModel, failCanonicalProjectLoad, setCanonicalProjectFilter, resetCanonicalProjectFilters, canonicalProjectState
- Defines here
- defaultFilters, filterProjects, optionsFor, unique, createCanonicalProjectState, beginCanonicalProjectLoad, commitCanonicalProjectModel, failCanonicalProjectLoad, setCanonicalProjectFilter, resetCanonicalProjectFilters
- Cannot conclude
- Whether this code runs, is used by a live app today, or is correct. This is a static reading.
- Evidence
- globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 testcode/202609051152/pipeline/scripts/core/project-state.js:1-121 · blob 8fe3faf1801b1e581dd7fb40adfad9ebe78d0c30 · GitHub at these lines
- State
- achieves: name · context: readme_derived · stage: transform · effects: none found · domain stage: experimental · users: none · canonical: production_core
import {
canonicalProjectMetrics,
searchCanonicalProjects,
} from "../data/canonical-projects.js";
const EMPTY_PROJECTS = Object.freeze([]);
const FILTER_KEYS = new Set([
"technology",
"lifecycleView",
"officialStatus",
"county",
"region",
"query",
]);
function defaultFilters() {
return {
technology: "all",
lifecycleView: "ALL",
officialStatus: "All",
county: "All",
region: "All",
query: "",
};
}
function filterProjects(projects, filters, searchFields) {
const searched = searchCanonicalProjects(projects, filters.query, searchFields);
return searched.filter((project) => (
(filters.technology === "all" || project.technology === filters.technology)
&& (filters.lifecycleView === "ALL" || project.lifecycle_view === filters.lifecycleView)
&& (filters.officialStatus === "All" || project.status === filters.officialStatus)
&& (filters.county === "All" || project.county === filters.county)
&& (filters.region === "All" || project.region === filters.region)
));
}
function optionsFor(projects) {
const unique = (field) => [...new Set(projects.map((project) => project[field]).filter(Boolean))]
.sort((left, right) => left.localeCompare(right, "en-GB"));
return Object.freeze({
officialStatuses: Object.freeze(unique("status")),
counties: Object.freeze(unique("county")),
regions: Object.freeze(unique("region")),
});
}
export function createCanonicalProjectState() {
return {
release: "7.2",
phase: "isolated-not-live",
status: "idle",
source: null,
contract: null,
metadata: null,
all: EMPTY_PROJECTS,
filtered: EMPTY_PROJECTS,
filters: defaultFilters(),
filterOptions: optionsFor(EMPTY_PROJECTS),
metrics: canonicalProjectMetrics(EMPTY_PROJECTS),
searchFields: EMPTY_PROJECTS,
error: null,
};
}
export function beginCanonicalProjectLoad(state) {
state.status = state.all.length ? "refreshing" : "loading";
state.error = null;
return state;
}
export function commitCanonicalProjectModel(state, model) {
const searchFields = Object.freeze([...model.contract.interface.search_fields]);
const filters = defaultFilters();
const filtered = Object.freeze(filterProjects(model.projects, filters, searchFields));
Object.assign(state, {
status: "ready",
source: model.source,
contract: model.contract,
metadata: model.metadata,
all: model.projects,
filtered,
filters,
filterOptions: optionsFor(model.projects),
metrics: canonicalProjectMetrics(filtered),
searchFields,
error: null,
});
return state;
}
export function failCanonicalProjectLoad(state, error) {
state.status = state.all.length ? "stale" : "error";
state.error = error instanceof Error ? error.message : String(error || "Unknown project-data error");
return state;
}
export function setCanonicalProjectFilter(state, key, value) {
if (!FILTER_KEYS.has(key)) throw new Error(`V7.2 project state: unknown filter ${key}`);
if (key === "technology" && !["all", "solar", "bess"].includes(value)) {
throw new Error(`V7.2 project state: invalid technology ${value}`);
}
if (key === "lifecycleView" && !["ALL", "CURRENT", "DISPUTED", "HISTORICAL", "REVIEW"].includes(value)) {
throw new Error(`V7.2 project state: invalid lifecycle view ${value}`);
}
state.filters = { ...state.filters, [key]: key === "query" ? String(value || "").trim() : value };
const filtered = filterProjects(state.all, state.filters, state.searchFields);
state.filtered = Object.freeze(filtered);
state.metrics = canonicalProjectMetrics(filtered);
return state;
}
export function resetCanonicalProjectFilters(state) {
state.filters = defaultFilters();
const filtered = filterProjects(state.all, state.filters, state.searchFields);
state.filtered = Object.freeze(filtered);
state.metrics = canonicalProjectMetrics(filtered);
return state;
}
export const canonicalProjectState = createCanonicalProjectState();State
A JavaScript module in the core folder of GlobalGrid2050 covering major project news, solar and battery storage (BESS).
otherglobalgrid2050 / testcode/202609051152/pipeline/scripts/core/state.js · lines 1–23 of 23 · version 2026-09-05 11:52
- Why it exists in the grid workflow
- Domain stage experimental (path word 'testcode'): work its own path marks as experimental (sandbox, prototype, archive or similar words); by this evidence it is not part of a production workflow. Domain terms in the code: solar, battery storage (BESS).
- Inputs & outputs
- In: JSON file major_project_news_v5.json.
- Downstream impact
- Used directly by 16 files: Gauges (globalgrid2050); Newspaper V9 2 (globalgrid2050); Newspaper V9 5 1 (globalgrid2050); Newspaper V9 5 (globalgrid2050); and 12 more. Reached from 200 other entry points, including GlobalGrid2050 Historical Builds (globalgrid2050, https://globalgrid2050.com/historical_builds.html); GlobalGrid2050 Homepage Before Four Nests (globalgrid2050, https://globalgrid2050.com/homepage-before-four-nests-20260925.html); GlobalGrid2050 — PipelineNews Intelligence Page (globalgrid2050, https://globalgrid2050.com/pipelinenews_intelligence/202609050309/).
- What it achieves
- No statement of purpose was found in the file, a README line naming it, or its name.
- Why it matters
- Imported by 16 files, including Gauges, Newspaper V9 2 and Newspaper V9 5 1.
- Application
- globalgrid2050 · testcode/202609051152/pipeline/scripts/core · JavaScript module
- Uses
- none found
- Used by
- imported by Gauges (import), imported by Newspaper V9 2 (import), imported by Newspaper V9 5 1 (import), imported by Newspaper V9 5 (import), imported by Newspaper V9 6 2 (import), imported by Newspaper V9 7 (import), imported by Newspaper (import), imported by Project Export (import), and 8 more
- Produces
- state, COLORS, DATA_SOURCES
- 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 testcode/202609051152/pipeline/scripts/core/state.js:1-23 · blob b880efadfe135843fb79c63c7e94acf1904d08fd · GitHub at these lines
- State
- achieves: name · context: readme_derived · stage: unknown · effects: none found · domain stage: experimental · users: none · canonical: production_core
export const state = {
all: [],
filtered: [],
canonicalModel: null,
tech: "All",
status: "All",
county: "All",
search: "",
charts: { solar: null, bess: null, projects: null, largest: null },
newsItems: [],
newsMode: "ALL",
newsQuery: "",
};
export const COLORS = Object.freeze({
Solar: "#ffff00",
"Battery Storage": "#ffae00",
});
export const DATA_SOURCES = Object.freeze({
newsPages: "/dist/major_project_news_v5.json",
newsGitHub: "https://raw.githubusercontent.com/Ventusltd/globalgrid2050/main/dist/major_project_news_v5.json",
});Testcode — Pipeline
A JavaScript module in the core folder of GlobalGrid2050 that normalises project (`normaliseProject`).
transformglobalgrid2050 / testcode/202609051152/pipeline/scripts/core/utils.js · lines 1–28 of 28 · version 2026-09-05 11:52 · pattern normaliseProject (shared by 2 files)
- What it does
- It calculates its inputs. Defines escapeHtml, normaliseProject, titleCase, isFinanceEvent.
- Why it exists in the grid workflow
- Domain stage experimental (path word 'testcode'): work its own path marks as experimental (sandbox, prototype, archive or similar words); by this evidence it is not part of a production workflow.
- Downstream impact
- Used directly by 53 files: News Regions V9 6 2 (globalgrid2050); News Relevance V9 2 (globalgrid2050); Newspaper V9 2 (globalgrid2050); Newspaper V9 5 1 (globalgrid2050); and 49 more. Reached from 219 other entry points, including GlobalGrid2050 Historical Builds (globalgrid2050, https://globalgrid2050.com/historical_builds.html); GlobalGrid2050 Homepage Before Four Nests (globalgrid2050, https://globalgrid2050.com/homepage-before-four-nests-20260925.html); GlobalGrid2050 — PipelineNews Intelligence Page (globalgrid2050, https://globalgrid2050.com/pipelinenews_intelligence/202609050309/).
- What it achieves
- It normalises project (`normaliseProject`) and is built from the escape HTML helper (`escapeHtml`) and the title case helper (`titleCase`). Defines `escapeHtml`, `normaliseProject`, `titleCase` and 1 more.
- Why it matters
- Imported by 52 files, including News Regions V9 6 2, News Relevance V9 2 and Newspaper V9 2, from PipelineNews. Checked by Check Modules.
- Application
- globalgrid2050 · testcode/202609051152/pipeline/scripts/core · JavaScript module
- Uses
- none found
- Used by
- imported by News Regions V9 6 2 (import), imported by News Relevance V9 2 (import), imported by Newspaper V9 2 (import), imported by Newspaper V9 5 1 (import), imported by Newspaper V9 5 (import), imported by Newspaper V9 6 2 (import), imported by Newspaper V9 7 (import), imported by Newspaper (import), and 45 more, mentioned in Standalone (comment link)
- Produces
- escapeHtml, normaliseProject, titleCase, isFinanceEvent
- Defines here
- escapeHtml, normaliseProject, titleCase, isFinanceEvent
- Cannot conclude
- Whether this code runs, is used by a live app today, or is correct. This is a static reading.
- Evidence
- globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 testcode/202609051152/pipeline/scripts/core/utils.js:1-28 · blob c2ec95aa95a5d57911728963e187b7d0e840c6ce · GitHub at these lines
- State
- achieves: name · context: readme_derived · stage: transform · effects: none found · domain stage: experimental · users: none · canonical: production_core
export function escapeHtml(value) {
return String(value ?? "").replace(/[&<>"']/g, (character) => ({
"&": "&",
"<": "<",
">": ">",
'"': """,
"'": "'",
})[character]);
}
export function normaliseProject(value) {
return String(value || "")
.toLowerCase()
.replace(/&/g, " and ")
.replace(/[^a-z0-9]+/g, " ")
.replace(/\s+/g, " ")
.trim();
}
export function titleCase(value) {
return value
? value.toLowerCase().split(" ").map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ")
: "";
}
export function isFinanceEvent(event) {
return ["FINANCIAL CLOSE", "ACQUISITION"].includes(String(event || "").toUpperCase());
}Canonical Projects V9 1
A JavaScript module in the data folder of GlobalGrid2050 that fetches solar, battery storage (BESS) and the Renewable Energy Planning Database (REPD) register.
renderglobalgrid2050 / testcode/202609051152/pipeline/scripts/data/canonical-projects-v9-1.js · lines 1–75 of 75 · version 2026-09-05 11:52 · pattern loadCanonicalProjects (shared by 12 files)
- What it does
- It fetches solar, battery storage (BESS) and the REPD register. Defines invariant, round2, fetchJson, loadCanonicalProjectsV9_1. Side effects: changes the web page (DOM); makes network requests.
- Why it exists in the grid workflow
- Domain stage experimental (path word 'testcode'): work its own path marks as experimental (sandbox, prototype, archive or similar words); by this evidence it is not part of a production workflow. Domain terms in the code: solar, battery storage (BESS), the REPD register.
- Inputs & outputs
- In: JSON file release.v9.1.json; JSON file build_manifest.json.
- Downstream impact
- Used directly by 6 files: Canonical Projects V9 2 (globalgrid2050); Canonical Projects V9 3 (globalgrid2050); Canonical Projects V9 4 (globalgrid2050); Canonical Projects V9 5 1 (globalgrid2050); and 2 more. Reached from 256 other entry points, including GlobalGrid2050 Historical Builds (globalgrid2050, https://globalgrid2050.com/historical_builds.html); GlobalGrid2050 Homepage Before Four Nests (globalgrid2050, https://globalgrid2050.com/homepage-before-four-nests-20260925.html); GlobalGrid2050 — PipelineNews Intelligence Page (globalgrid2050, https://globalgrid2050.com/pipelinenews_intelligence/202609050309/).
- What it achieves
- It fetches JSON (`fetchJson`) and loads canonical projects v9 (`loadCanonicalProjectsV9_1`). Defines `invariant`, `round2`, `fetchJson` and 1 more. Its code works with 1 MW.
- Why it matters
- Imported by 6 files, including Canonical Projects V9 2, Canonical Projects V9 3 and Canonical Projects V9 4.
- Application
- globalgrid2050 · testcode/202609051152/pipeline/scripts/data · JavaScript module
- Uses
- none found
- Used by
- imported by Canonical Projects V9 2 (import), imported by Canonical Projects V9 3 (import), imported by Canonical Projects V9 4 (import), imported by Canonical Projects V9 5 1 (import), imported by Canonical Projects V9 5 (import), imported by Projects V9 1 (import), mentioned in Standalone (comment link)
- Produces
- loadCanonicalProjectsV9_1
- Defines here
- invariant, round2, fetchJson, loadCanonicalProjectsV9_1
- Cannot conclude
- Whether this code runs, is used by a live app today, or is correct. This is a static reading.
- Evidence
- globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 testcode/202609051152/pipeline/scripts/data/canonical-projects-v9-1.js:1-75 · blob b92a4a31a74e8d1b45ee5d32e5678324bd364d66 · GitHub at these lines
- State
- achieves: name · context: readme_derived · stage: output · effects: dom, network · domain stage: experimental · users: none · canonical: production_core
const CONTRACT_URL = "contracts/release.v9.1.json";
const MANIFEST_URL = "data/v9.1/build_manifest.json";
const ALLOWED_TECHNOLOGIES = new Set(["solar", "bess", "wind_onshore", "wind_offshore"]);
function invariant(condition, message) {
if (!condition) throw new Error(`V9.1 canonical projects: ${message}`);
}
function round2(value) {
return Math.round((value + Number.EPSILON) * 100) / 100;
}
async function fetchJson(path) {
const response = await fetch(path, { cache: "force-cache" });
invariant(response.ok, `${path} returned HTTP ${response.status}`);
invariant(new URL(response.url).origin === window.location.origin, `${path} redirected cross-origin`);
return response.json();
}
export async function loadCanonicalProjectsV9_1() {
const [contract, payload] = await Promise.all([fetchJson(CONTRACT_URL), fetchJson(MANIFEST_URL)]);
invariant(contract.release === "9.1", "release contract mismatch");
invariant(payload.schema === "globalgrid2050.v9.project-spine-build.v9.1", "project manifest schema mismatch");
invariant(payload.release === "9.1", "project release mismatch");
invariant(Array.isArray(payload.project_partitions) && payload.project_partitions.length > 0, "project partitions missing");
invariant(payload.source_identity_sha256 === contract.source.identity_fixture_sha256, "identity hash mismatch");
invariant(payload.source_coordinate_fixture_sha256 === contract.source.coordinate_fixture_sha256, "coordinate hash mismatch");
invariant(payload.source_workbook_sha256 === contract.source.workbook_sha256, "workbook hash mismatch");
const partitions = await Promise.all(payload.project_partitions.map(async (partition) => {
const part = await fetchJson(partition.path);
invariant(part.schema === "globalgrid2050.v9.project-partition.v9.1", `${partition.path} schema mismatch`);
invariant(part.record_count === partition.record_count && part.projects.length === partition.record_count, `${partition.path} count mismatch`);
return part.projects;
}));
const sourceProjects = partitions.flat();
invariant(sourceProjects.length === payload.project_count, "partition total mismatch");
const refs = new Set();
const projectIds = new Set();
let capacity = 0;
let largest = 0;
const counts = { solar: 0, bess: 0, wind_onshore: 0, wind_offshore: 0 };
const projects = sourceProjects.map((project) => {
invariant(typeof project.repd_ref === "string" && project.repd_ref, "missing REPD Ref");
invariant(project.gg_project_id === `GG2050-REPD-${project.repd_ref}`, `invalid ID for ${project.repd_ref}`);
invariant(project.identity_status === "REPD_BOUND" && project.identity_confidence === "authoritative", `unbound identity for ${project.repd_ref}`);
invariant(ALLOWED_TECHNOLOGIES.has(project.technology), `out-of-scope technology for ${project.repd_ref}`);
invariant(Number.isFinite(project.capacity_mw) && project.capacity_mw >= 1, `capacity below 1 MW for ${project.repd_ref}`);
invariant(!refs.has(project.repd_ref), `duplicate REPD Ref ${project.repd_ref}`);
invariant(!projectIds.has(project.gg_project_id), `duplicate project ID ${project.gg_project_id}`);
refs.add(project.repd_ref);
projectIds.add(project.gg_project_id);
counts[project.technology] += 1;
capacity += project.capacity_mw;
largest = Math.max(largest, project.capacity_mw);
return Object.freeze({ ...project });
});
const actual = {
project_count: projects.length,
capacity_mw: round2(capacity),
largest_mw: largest,
solar_count: counts.solar,
bess_count: counts.bess,
wind_onshore_count: counts.wind_onshore,
wind_offshore_count: counts.wind_offshore,
};
Object.entries(contract.expected).forEach(([key, value]) => invariant(actual[key] === value, `${key} is ${actual[key]}, expected ${value}`));
return Object.freeze({
contract: Object.freeze(contract),
metadata: Object.freeze({ ...payload, projects: undefined }),
projects: Object.freeze(projects),
});
}Canonical Projects V9 2
A JavaScript module in the data folder of GlobalGrid2050 that fetches release (`fetchRelease`) (units: MW). It fetches release (`fetchRelease`) and loads canonical projects v9 (`loadCanonicalProjectsV9_2`).
renderglobalgrid2050 / testcode/202609051152/pipeline/scripts/data/canonical-projects-v9-2.js · lines 1–30 of 30 · version 2026-09-05 11:52 · pattern fetchRelease (shared by 9 files)
- What it does
- It fetches data. Defines invariant, fetchRelease, loadCanonicalProjectsV9_2. Side effects: changes the web page (DOM); makes network requests.
- Why it exists in the grid workflow
- Domain stage experimental (path word 'testcode'): work its own path marks as experimental (sandbox, prototype, archive or similar words); by this evidence it is not part of a production workflow.
- Inputs & outputs
- In: JSON file release.v9.2.json.
- Downstream impact
- Used directly by 2 files: Projects V9 2 (globalgrid2050); Projects V9 2 (globalgrid2050). Reached from 1 other entry point, including Run V9 2 (globalgrid2050).
- What it achieves
- Defines `invariant`, `fetchRelease` and `loadCanonicalProjectsV9_2`.
- Why it matters
- Imported by Projects V9 2.
- Application
- globalgrid2050 · testcode/202609051152/pipeline/scripts/data · JavaScript module
- Uses
- Canonical Projects V9 1 (import)
- Used by
- imported by Projects V9 2 (import), imported by Projects V9 2 (import), mentioned in Standalone (comment link)
- Produces
- loadCanonicalProjectsV9_2
- Defines here
- invariant, fetchRelease, loadCanonicalProjectsV9_2
- Cannot conclude
- Whether this code runs, is used by a live app today, or is correct. This is a static reading.
- Evidence
- globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 testcode/202609051152/pipeline/scripts/data/canonical-projects-v9-2.js:1-30 · blob e3d9b7bb0f39b813cf3b1f125467efbd6a021dda · GitHub at these lines
- State
- achieves: name · context: readme_derived · stage: output · effects: dom, network · domain stage: experimental · users: none · canonical: production_core
import { loadCanonicalProjectsV9_1 } from "./canonical-projects-v9-1.js";
const RELEASE_URL = "contracts/release.v9.2.json";
function invariant(condition, message) {
if (!condition) throw new Error(`V9.2 canonical projects: ${message}`);
}
async function fetchRelease() {
const response = await fetch(RELEASE_URL, { cache: "no-store" });
invariant(response.ok, `${RELEASE_URL} returned HTTP ${response.status}`);
invariant(new URL(response.url).origin === window.location.origin, `${RELEASE_URL} redirected cross-origin`);
return response.json();
}
export async function loadCanonicalProjectsV9_2() {
const [release, model] = await Promise.all([fetchRelease(), loadCanonicalProjectsV9_1()]);
invariant(release.release === "9.2", "release contract mismatch");
invariant(release.data_parent?.release === "9.1", "data-parent release mismatch");
invariant(model.contract.release === "9.1", "canonical data contract mismatch");
invariant(model.projects.length === release.expected.project_count, "project count mismatch");
invariant(model.metadata.capacity_mw === release.expected.capacity_mw, "capacity mismatch");
invariant(model.metadata.largest_mw === release.expected.largest_mw, "largest project mismatch");
return Object.freeze({
release: Object.freeze(release),
dataContract: model.contract,
metadata: Object.freeze({ ...model.metadata, ui_release: "9.2" }),
projects: model.projects,
});
}Canonical Projects V9 3
A JavaScript module in the data folder of GlobalGrid2050 that fetches release (`fetchRelease`) (units: MW). It fetches release (`fetchRelease`) and loads canonical projects v9 (`loadCanonicalProjectsV9_3`).
renderglobalgrid2050 / testcode/202609051152/pipeline/scripts/data/canonical-projects-v9-3.js · lines 1–33 of 33 · version 2026-09-05 11:52 · pattern fetchRelease (shared by 9 files)
- What it does
- It fetches data. Defines invariant, fetchRelease, loadCanonicalProjectsV9_3. Side effects: changes the web page (DOM); makes network requests.
- Why it exists in the grid workflow
- Domain stage experimental (path word 'testcode'): work its own path marks as experimental (sandbox, prototype, archive or similar words); by this evidence it is not part of a production workflow.
- Inputs & outputs
- In: JSON file release.v9.3.json.
- Downstream impact
- Used directly by 2 files: Projects V9 3 (globalgrid2050); Projects V9 3 (globalgrid2050). Reached from 187 other entry points, including GlobalGrid2050 Historical Builds (globalgrid2050, https://globalgrid2050.com/historical_builds.html); GlobalGrid2050 Homepage Before Four Nests (globalgrid2050, https://globalgrid2050.com/homepage-before-four-nests-20260925.html); GlobalGrid2050 — PipelineNews Intelligence Page (globalgrid2050, https://globalgrid2050.com/pipelinenews_intelligence/202609050309/).
- What it achieves
- Defines `invariant`, `fetchRelease` and `loadCanonicalProjectsV9_3`.
- Why it matters
- Imported by Projects V9 3.
- Application
- globalgrid2050 · testcode/202609051152/pipeline/scripts/data · JavaScript module
- Uses
- Canonical Projects V9 1 (import)
- Used by
- imported by Projects V9 3 (import), imported by Projects V9 3 (import), mentioned in Standalone (comment link)
- Produces
- loadCanonicalProjectsV9_3
- Defines here
- invariant, fetchRelease, loadCanonicalProjectsV9_3
- Cannot conclude
- Whether this code runs, is used by a live app today, or is correct. This is a static reading.
- Evidence
- globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 testcode/202609051152/pipeline/scripts/data/canonical-projects-v9-3.js:1-33 · blob 189004ab3828f440dfd1f4fb18a794158af30d4d · GitHub at these lines
- State
- achieves: name · context: readme_derived · stage: output · effects: dom, network · domain stage: experimental · users: none · canonical: production_core
import { loadCanonicalProjectsV9_1 } from "./canonical-projects-v9-1.js";
const RELEASE_URL = "contracts/release.v9.3.json";
function invariant(condition, message) {
if (!condition) throw new Error(`V9.3 canonical projects: ${message}`);
}
async function fetchRelease() {
const response = await fetch(RELEASE_URL, { cache: "no-store" });
invariant(response.ok, `${RELEASE_URL} returned HTTP ${response.status}`);
invariant(new URL(response.url).origin === window.location.origin, `${RELEASE_URL} redirected cross-origin`);
return response.json();
}
export async function loadCanonicalProjectsV9_3() {
const [release, model] = await Promise.all([fetchRelease(), loadCanonicalProjectsV9_1()]);
invariant(release.release === "9.3", "release contract mismatch");
invariant(release.behaviour_parent?.release === "9.2", "behaviour-parent release mismatch");
invariant(release.data_parent?.release === "9.1", "data-parent release mismatch");
invariant(model.contract.release === "9.1", "canonical data contract mismatch");
invariant(model.projects.length === release.expected.project_count, "project count mismatch");
invariant(model.metadata.capacity_mw === release.expected.capacity_mw, "capacity mismatch");
invariant(model.metadata.largest_mw === release.expected.largest_mw, "largest project mismatch");
invariant(model.metadata.geometry_count === release.expected.valid_geometry_count, "valid geometry count mismatch");
invariant(model.metadata.missing_geometry_count === release.expected.missing_geometry_count, "missing geometry count mismatch");
return Object.freeze({
release: Object.freeze(release),
dataContract: model.contract,
metadata: Object.freeze({ ...model.metadata, ui_release: "9.3" }),
projects: model.projects,
});
}Canonical Projects V9 4
A JavaScript module in the data folder of GlobalGrid2050 that fetches release (`fetchRelease`) (units: MW). It fetches release (`fetchRelease`) and loads canonical projects v9 (`loadCanonicalProjectsV9_4`).
renderglobalgrid2050 / testcode/202609051152/pipeline/scripts/data/canonical-projects-v9-4.js · lines 1–33 of 33 · version 2026-09-05 11:52 · pattern fetchRelease (shared by 9 files)
- What it does
- It fetches data. Defines invariant, fetchRelease, loadCanonicalProjectsV9_4. Side effects: changes the web page (DOM); makes network requests.
- Why it exists in the grid workflow
- Domain stage experimental (path word 'testcode'): work its own path marks as experimental (sandbox, prototype, archive or similar words); by this evidence it is not part of a production workflow.
- Inputs & outputs
- In: JSON file release.v9.4.json.
- Downstream impact
- Used directly by 2 files: Projects V9 4 (globalgrid2050); Projects V9 4 (globalgrid2050). Reached from 186 other entry points, including GlobalGrid2050 Historical Builds (globalgrid2050, https://globalgrid2050.com/historical_builds.html); GlobalGrid2050 Homepage Before Four Nests (globalgrid2050, https://globalgrid2050.com/homepage-before-four-nests-20260925.html); GlobalGrid2050 — PipelineNews Intelligence Page (globalgrid2050, https://globalgrid2050.com/pipelinenews_intelligence/202609050309/).
- What it achieves
- Defines `invariant`, `fetchRelease` and `loadCanonicalProjectsV9_4`.
- Why it matters
- Imported by Projects V9 4.
- Application
- globalgrid2050 · testcode/202609051152/pipeline/scripts/data · JavaScript module
- Uses
- Canonical Projects V9 1 (import)
- Used by
- imported by Projects V9 4 (import), imported by Projects V9 4 (import), mentioned in Standalone (comment link)
- Produces
- loadCanonicalProjectsV9_4
- Defines here
- invariant, fetchRelease, loadCanonicalProjectsV9_4
- Cannot conclude
- Whether this code runs, is used by a live app today, or is correct. This is a static reading.
- Evidence
- globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 testcode/202609051152/pipeline/scripts/data/canonical-projects-v9-4.js:1-33 · blob ba0e881e246a2649f61f3364bfcb865d3d9b2ff7 · GitHub at these lines
- State
- achieves: name · context: readme_derived · stage: output · effects: dom, network · domain stage: experimental · users: none · canonical: production_core
import { loadCanonicalProjectsV9_1 } from "./canonical-projects-v9-1.js";
const RELEASE_URL = "contracts/release.v9.4.json";
function invariant(condition, message) {
if (!condition) throw new Error(`V9.4 canonical projects: ${message}`);
}
async function fetchRelease() {
const response = await fetch(RELEASE_URL, { cache: "no-store" });
invariant(response.ok, `${RELEASE_URL} returned HTTP ${response.status}`);
invariant(new URL(response.url).origin === window.location.origin, `${RELEASE_URL} redirected cross-origin`);
return response.json();
}
export async function loadCanonicalProjectsV9_4() {
const [release, model] = await Promise.all([fetchRelease(), loadCanonicalProjectsV9_1()]);
invariant(release.release === "9.4", "release contract mismatch");
invariant(release.frozen_parent?.release === "9.3.1", "frozen-parent release mismatch");
invariant(release.data_parent?.release === "9.1", "data-parent release mismatch");
invariant(model.contract.release === "9.1", "canonical data contract mismatch");
invariant(model.projects.length === release.expected.project_count, "project count mismatch");
invariant(model.metadata.capacity_mw === release.expected.capacity_mw, "capacity mismatch");
invariant(model.metadata.largest_mw === release.expected.largest_mw, "largest project mismatch");
invariant(model.metadata.geometry_count === release.expected.valid_geometry_count, "valid geometry count mismatch");
invariant(model.metadata.missing_geometry_count === release.expected.missing_geometry_count, "missing geometry count mismatch");
return Object.freeze({
release: Object.freeze(release),
dataContract: model.contract,
metadata: Object.freeze({ ...model.metadata, ui_release: "9.4" }),
projects: model.projects,
});
}Canonical Projects V9 5 1
A JavaScript module in the data folder of GlobalGrid2050 that fetches release (`fetchRelease`) (units: MW). It fetches release (`fetchRelease`) and loads canonical projects v9 (`loadCanonicalProjectsV9_5_1`).
renderglobalgrid2050 / testcode/202609051152/pipeline/scripts/data/canonical-projects-v9-5-1.js · lines 1–33 of 33 · version 2026-09-05 11:52 · pattern fetchRelease (shared by 9 files)
- What it does
- It fetches data. Defines invariant, fetchRelease, loadCanonicalProjectsV9_5_1. Side effects: changes the web page (DOM); makes network requests.
- Why it exists in the grid workflow
- Domain stage experimental (path word 'testcode'): work its own path marks as experimental (sandbox, prototype, archive or similar words); by this evidence it is not part of a production workflow.
- Inputs & outputs
- In: JSON file release.v9.5.1.json.
- Downstream impact
- Used directly by 44 files: Solar1000 V924 (globalgrid2050); Projects V9 5 1 (globalgrid2050); Projects V9 5 1 (globalgrid2050); Projects V9 9 (globalgrid2050); and 40 more. Reached from 242 other entry points, including GlobalGrid2050 Historical Builds (globalgrid2050, https://globalgrid2050.com/historical_builds.html); GlobalGrid2050 Homepage Before Four Nests (globalgrid2050, https://globalgrid2050.com/homepage-before-four-nests-20260925.html); GlobalGrid2050 — PipelineNews Intelligence Page (globalgrid2050, https://globalgrid2050.com/pipelinenews_intelligence/202609050309/).
- What it achieves
- Defines `invariant`, `fetchRelease` and `loadCanonicalProjectsV9_5_1`.
- Why it matters
- Imported by 9 files, including Solar1000 V924, Projects V9 5 1 and Projects V9 9, from PipelineNews. Checked by 35 tests, including Check V9 12.
- Application
- globalgrid2050 · testcode/202609051152/pipeline/scripts/data · JavaScript module
- Uses
- Canonical Projects V9 1 (import)
- Used by
- imported by Solar1000 V924 (import), imported by Projects V9 5 1 (import), imported by Projects V9 5 1 (import), imported by Projects V9 9 (import), referenced by Check V9 12 (new URL import.meta.url), referenced by Check V9 13 (new URL import.meta.url), referenced by Check V9 14 (new URL import.meta.url), referenced by Check V9 15 (new URL import.meta.url), and 36 more, mentioned in Standalone (comment link)
- Produces
- loadCanonicalProjectsV9_5_1
- Defines here
- invariant, fetchRelease, loadCanonicalProjectsV9_5_1
- Cannot conclude
- Whether this code runs, is used by a live app today, or is correct. This is a static reading.
- Evidence
- globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 testcode/202609051152/pipeline/scripts/data/canonical-projects-v9-5-1.js:1-33 · blob b632ccdf34f2ae41a2ddf39c3ed415726bee265a · GitHub at these lines
- State
- achieves: name · context: readme_derived · stage: output · effects: dom, network · domain stage: experimental · users: none · canonical: production_core
import { loadCanonicalProjectsV9_1 } from "./canonical-projects-v9-1.js";
const RELEASE_URL = "contracts/release.v9.5.1.json";
function invariant(condition, message) {
if (!condition) throw new Error(`V9.5.1 canonical projects: ${message}`);
}
async function fetchRelease() {
const response = await fetch(RELEASE_URL, { cache: "no-store" });
invariant(response.ok, `${RELEASE_URL} returned HTTP ${response.status}`);
invariant(new URL(response.url).origin === window.location.origin, `${RELEASE_URL} redirected cross-origin`);
return response.json();
}
export async function loadCanonicalProjectsV9_5_1() {
const [release, model] = await Promise.all([fetchRelease(), loadCanonicalProjectsV9_1()]);
invariant(release.release === "9.5.1", "release contract mismatch");
invariant(release.frozen_parent?.release === "9.5", "frozen-parent release mismatch");
invariant(release.data_parent?.release === "9.1", "data-parent release mismatch");
invariant(model.contract.release === "9.1", "canonical data contract mismatch");
invariant(model.projects.length === release.expected.project_count, "project count mismatch");
invariant(model.metadata.capacity_mw === release.expected.capacity_mw, "capacity mismatch");
invariant(model.metadata.largest_mw === release.expected.largest_mw, "largest project mismatch");
invariant(model.metadata.geometry_count === release.expected.valid_geometry_count, "valid geometry count mismatch");
invariant(model.metadata.missing_geometry_count === release.expected.missing_geometry_count, "missing geometry count mismatch");
return Object.freeze({
release: Object.freeze(release),
dataContract: model.contract,
metadata: Object.freeze({ ...model.metadata, ui_release: "9.5.1" }),
projects: model.projects,
});
}