GLOBALGRID2050 / EXPLORE CODE

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

North Star Checks and 13 more files

A Python module in the tests folder of GlobalGrid2050 that tests battery storage (BESS), solar, wind and the Renewable Energy Planning Database (REPD) register, using SHA-256.

670 lines of Shell and Python from globalgrid2050, in 14 files. Topic: Electricity markets and data pipelines. Section 928 of 2044.

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

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

In this section

  1. North Star Checks test · globalgrid2050 / uk_renewables_pipeline/202609051156/tests/north_star_checks.py lines 1–221
  2. Run V7 1 test · globalgrid2050 / uk_renewables_pipeline/202609051156/tests/run_v7_1.sh lines 1–48
  3. Run V8 0 test · globalgrid2050 / uk_renewables_pipeline/202609051156/tests/run_v8_0.sh lines 1–14
  4. Run V8 1 test · globalgrid2050 / uk_renewables_pipeline/202609051156/tests/run_v8_1.sh lines 1–43
  5. Run V9 0 test · globalgrid2050 / uk_renewables_pipeline/202609051156/tests/run_v9_0.sh lines 1–15
  6. Run V9 1 test · globalgrid2050 / uk_renewables_pipeline/202609051156/tests/run_v9_1.sh lines 1–16
  7. Run V9 2 test · globalgrid2050 / uk_renewables_pipeline/202609051156/tests/run_v9_2.sh lines 1–19
  8. Run V9 3 test · globalgrid2050 / uk_renewables_pipeline/202609051156/tests/run_v9_3.sh lines 1–36
  9. Run V9 4 test · globalgrid2050 / uk_renewables_pipeline/202609051156/tests/run_v9_4.sh lines 1–37
  10. Run V9 5 test · globalgrid2050 / uk_renewables_pipeline/202609051156/tests/run_v9_5.sh lines 1–38
  11. Run V9 5 1 test · globalgrid2050 / uk_renewables_pipeline/202609051156/tests/run_v9_5_1.sh lines 1–43
  12. Run V9 6 1 test · globalgrid2050 / uk_renewables_pipeline/202609051156/tests/run_v9_6_1.sh lines 1–50
  13. Run V9 6 2 test · globalgrid2050 / uk_renewables_pipeline/202609051156/tests/run_v9_6_2.sh lines 1–40
  14. Test V7 2 Spine Safety test · globalgrid2050 / uk_renewables_pipeline/202609051156/tests/test_v7_2_spine_safety.py lines 1–50

North Star Checks

A Python module in the tests folder of GlobalGrid2050 that tests battery storage (BESS), solar, wind and the Renewable Energy Planning Database (REPD) register, using SHA-256.

testglobalgrid2050 / uk_renewables_pipeline/202609051156/tests/north_star_checks.py · lines 1–221 of 221 · version 2026-09-05 11:56 · pattern run_gate (shared by 2 files)

What it does
It tests battery storage (BESS), solar, wind and the REPD register. Defines 17 functions or classes, including sha256, load_json, capacity, Gate, __init__. Uses libraries __future__, hashlib, json, pathlib, typing. 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: battery storage (BESS), solar, wind, the REPD register.
Inputs & outputs
In: JSON file build_manifest.json.
Downstream impact
Used directly by 1 file: Validate North Star (globalgrid2050).
What it achieves
It checks files (`check_files`) and checks legacy workflows (`check_legacy_workflows`). Defines `sha256`, `load_json`, `capacity` and 13 more.
Why it matters
Checked by Validate North Star.
Application
globalgrid2050 · uk_renewables_pipeline/202609051156/tests · Python module
Uses
__future__, hashlib, json, pathlib, typing
Used by
imported by Validate North Star (import)
Produces
sha256, load_json, capacity, Gate, check_files, check_legacy_workflows, check_legacy_universe, check_v5_news, check_v6_identity, check_v6_projects, check_phase, run_gate
Defines here
sha256, load_json, capacity, Gate, __init__, require, require_true, passed, check_files, check_legacy_workflows, check_legacy_universe, count_tech, check_v5_news, check_v6_identity, check_v6_projects, check_phase, run_gate
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/202609051156/tests/north_star_checks.py:1-221 · blob ebdca695fe97a1ca6c93b1f8b0114b5ae9cbd8cc · GitHub at these lines
State
achieves: name · context: readme_derived · stage: ingest · effects: filesystem · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: production_core
from __future__ import annotations

import hashlib
import json
from pathlib import Path
from typing import Any


def sha256(path: Path) -> str:
    digest = hashlib.sha256()
    with path.open("rb") as handle:
        for chunk in iter(lambda: handle.read(1024 * 1024), b""):
            digest.update(chunk)
    return digest.hexdigest()


def load_json(path: Path) -> Any:
    with path.open("r", encoding="utf-8") as handle:
        return json.load(handle)


def capacity(feature: dict[str, Any]) -> float:
    value = (feature.get("properties") or {}).get("capacity")
    try:
        return float(value)
    except (TypeError, ValueError):
        return 0.0


class Gate:
    def __init__(self) -> None:
        self.checks: list[dict[str, Any]] = []
        self.metrics: dict[str, Any] = {}

    def require(self, name: str, actual: Any, expected: Any) -> None:
        passed = actual == expected
        self.checks.append({"name": name, "passed": passed, "actual": actual, "expected": expected})

    def require_true(self, name: str, condition: bool, detail: str = "") -> None:
        self.checks.append({"name": name, "passed": bool(condition), "detail": detail})

    @property
    def passed(self) -> bool:
        return all(check["passed"] for check in self.checks)


def check_files(root: Path, contract: dict[str, Any], gate: Gate) -> None:
    readme = root / contract["governing_readme"]["path"]
    gate.require("governing README SHA-256", sha256(readme), contract["governing_readme"]["sha256"])
    text = readme.read_text(encoding="utf-8")
    for phrase in contract["required_readme_phrases"]:
        gate.require_true(f"README phrase: {phrase}", phrase in text)

    for group in ("historical_files", "immutable_fixture_files"):
        for relative, expected in contract[group].items():
            path = root / relative
            gate.require_true(f"file exists: {relative}", path.is_file())
            if path.is_file():
                gate.require(f"file SHA-256: {relative}", sha256(path), expected)

    for relative in contract["runtime_data_paths"]:
        gate.require_true(f"runtime source exists: {relative}", (root / relative).is_file())


def check_legacy_workflows(root: Path, contract: dict[str, Any], gate: Gate) -> None:
    for relative in contract["manual_only_legacy_workflows"]:
        path = root / relative
        gate.require_true(f"manual-only workflow exists: {relative}", path.is_file())
        if not path.is_file():
            continue
        triggers: list[str] = []
        inside_on = False
        for line in path.read_text(encoding="utf-8").splitlines():
            if line == "on:":
                inside_on = True
                continue
            if inside_on and line and not line.startswith(" "):
                break
            if inside_on and line.startswith("  ") and not line.startswith("    ") and line.rstrip().endswith(":"):
                triggers.append(line.strip()[:-1])
        gate.require(f"manual-only workflow triggers: {relative}", triggers, ["workflow_dispatch"])


def check_legacy_universe(root: Path, contract: dict[str, Any], fixtures: dict[str, Any], gate: Gate) -> None:
    master = load_json(root / contract["fixture_roles"]["v5_geojson"])
    features = master.get("features") or []
    display = []
    for feature in features:
        props = feature.get("properties") or {}
        if capacity(feature) >= 1 and props.get("tech") in {"solar", "solar_roof", "bess", "wind"}:
            display.append(feature)

    def count_tech(names: set[str]) -> int:
        return sum(1 for feature in display if (feature.get("properties") or {}).get("tech") in names)

    raw_solar = sum(
        1 for feature in features
        if (feature.get("properties") or {}).get("tech") in {"solar", "solar_roof"} and capacity(feature) > 49
    )
    raw_bess_gt99 = sum(
        1 for feature in features
        if (feature.get("properties") or {}).get("tech") == "bess" and capacity(feature) > 99
    )
    raw_bess_gt100 = sum(
        1 for feature in features
        if (feature.get("properties") or {}).get("tech") == "bess" and capacity(feature) > 100
    )
    actual = {
        "legacy_features": len(features),
        "legacy_display_total": len(display),
        "legacy_display_solar": count_tech({"solar", "solar_roof"}),
        "legacy_display_bess": count_tech({"bess"}),
        "legacy_display_wind": count_tech({"wind"}),
        "v5_raw_solar_gt49": raw_solar,
        "v5_raw_bess_gt99": raw_bess_gt99,
        "v5_raw_bess_gt100": raw_bess_gt100,
        "v5_bess_gt99_minus_gt100": raw_bess_gt99 - raw_bess_gt100,
    }
    for key, value in actual.items():
        gate.require(key, value, fixtures[key])
    gate.metrics.update(actual)


def check_v5_news(root: Path, contract: dict[str, Any], fixtures: dict[str, Any], gate: Gate) -> None:
    news = load_json(root / contract["fixture_roles"]["v5_news"])
    actual = {
        "v5_eligible_projects": news.get("eligible_projects"),
        "v5_headlines": news.get("headline_count"),
        "v5_lookback_days": news.get("lookback_days"),
    }
    gate.require("V5 item array count", len(news.get("items") or []), fixtures["v5_headlines"])
    for key, value in actual.items():
        gate.require(key, value, fixtures[key])
    gate.metrics.update(actual)


def check_v6_identity(root: Path, contract: dict[str, Any], gate: Gate) -> None:
    identity = load_json(root / contract["fixture_roles"]["v6_identity"])
    records = identity.get("records") or []
    by_ref = {str(record.get("repd_ref")): record for record in records}
    gate.require("V6 identity record count", len(records), contract["universe_fixtures"]["v6_identity_records"])
    gate.require("V6 unique REPD Ref count", len(by_ref), contract["universe_fixtures"]["v6_identity_records"])
    gate.require("canonical sentinel record count", len(contract["canonical_sentinels"]), contract["canonical_sentinel_counts"]["repd_records"])
    sentinel_developments = {item["gg_development_id"] for item in contract["canonical_sentinels"]}
    gate.require("canonical sentinel development count", len(sentinel_developments), contract["canonical_sentinel_counts"]["developments"])

    bess = [record for record in records if record.get("technology") == "Battery"]
    bess_gt99 = sum(float(record.get("capacity_mw") or 0) > 99 for record in bess)
    bess_gt100 = sum(float(record.get("capacity_mw") or 0) > 100 for record in bess)
    q2_thresholds = {
        "v7_q2_bess_gt99": bess_gt99,
        "v7_q2_bess_gt100": bess_gt100,
        "v7_q2_bess_gt99_minus_gt100": bess_gt99 - bess_gt100,
    }
    for key, value in q2_thresholds.items():
        gate.require(key, value, contract["universe_fixtures"][key])
    gate.metrics.update(q2_thresholds)

    for expected in contract["canonical_sentinels"]:
        ref = expected["repd_ref"]
        actual = by_ref.get(ref)
        gate.require_true(f"canonical sentinel exists: {ref}", actual is not None)
        if actual is None:
            continue
        fields = {
            "site_name": expected["site_name"],
            "technology": expected["technology"],
            "capacity_mw": expected["capacity_mw"],
            "status": expected["status"],
            "gg_development_id": expected["gg_development_id"],
            "planning_application_reference": expected["planning_reference"],
        }
        for field, value in fields.items():
            gate.require(f"REPD {ref} {field}", actual.get(field), value)
        in_scope = expected["capacity_mw"] > (49 if expected["technology"] == "Solar Photovoltaics" else 99)
        gate.require_true(f"canonical sentinel in V7 utility scope: {ref}", in_scope)


def check_v6_projects(root: Path, contract: dict[str, Any], fixtures: dict[str, Any], gate: Gate) -> None:
    payload = load_json(root / contract["fixture_roles"]["v6_projects"])
    gate.require("V6 project count", payload.get("project_count"), fixtures["v6_project_records"])
    gate.require("V6 solar count", payload.get("solar_count"), fixtures["v6_solar_records"])
    gate.require("V6 BESS count", payload.get("bess_count"), fixtures["v6_bess_records"])
    array_json = json.dumps(payload.get("projects") or [], ensure_ascii=False, sort_keys=True, separators=(",", ":"))
    array_sha = hashlib.sha256(array_json.encode("utf-8")).hexdigest()
    gate.require("V6 declared project-array SHA-256", payload.get("projects_sha256"), contract["hash_semantics"]["major_projects_v6_projects_array_sha256"])
    gate.require("V6 recomputed project-array SHA-256", array_sha, contract["hash_semantics"]["major_projects_v6_projects_array_sha256"])
    gate.require("V6 fixture file SHA-256 semantics", sha256(root / contract["fixture_roles"]["v6_projects"]), contract["hash_semantics"]["major_projects_v6_file_sha256"])


def check_phase(root: Path, contract: dict[str, Any], phase: str, gate: Gate) -> None:
    index_path = root / contract["release_baseline"]["index_path"]
    if phase == "pre":
        gate.require("release baseline index SHA-256", sha256(index_path), contract["release_baseline"]["index_sha256"])
        return

    for relative in contract["v7_1_required_files"]:
        gate.require_true(f"V7.1 required file: {relative}", (root / relative).is_file())
    manifest_path = root / "uk_renewables_pipeline/v7/data/build_manifest.json"
    if manifest_path.is_file():
        manifest = load_json(manifest_path)
        gate.require("manifest version", manifest.get("version"), "7.1")
        gate.require("manifest feature", manifest.get("feature"), contract["feature"])
        gate.require("manifest North Star result", manifest.get("north_star"), "PASS")
    index_text = index_path.read_text(encoding="utf-8")
    gate.require_true("V7.1 external stylesheet", 'href="styles/v7.css"' in index_text)
    gate.require_true("V7.1 module entrypoint", 'type="module" src="scripts/app.js"' in index_text)
    gate.require_true("V7.1 has no inline style block", "<style>" not in index_text)


def run_gate(root: Path, contract: dict[str, Any], phase: str) -> Gate:
    gate = Gate()
    check_files(root, contract, gate)
    check_legacy_workflows(root, contract, gate)
    fixtures = contract["universe_fixtures"]
    check_legacy_universe(root, contract, fixtures, gate)
    check_v5_news(root, contract, fixtures, gate)
    check_v6_identity(root, contract, gate)
    check_v6_projects(root, contract, fixtures, gate)
    check_phase(root, contract, phase, gate)
    return gate

Run V7 1

A shell script in the tests folder of GlobalGrid2050 that tests project spine and projects plugin.

testglobalgrid2050 / uk_renewables_pipeline/202609051156/tests/run_v7_1.sh · lines 1–48 of 48 · version 2026-09-05 11:56 · Entry point

What it does
It tests project spine and projects plugin. Side effects: makes network requests; starts processes.
Why it exists in the grid workflow
Domain stage upstream_foresight (path word 'renewables'): upstream engineering foresight over GB transmission and distribution topology (TSO/DNO, 132kV and above, the REPD pipeline, data centres), which Ventus Ltd states it models for foresight.
Inputs & outputs
In: JSON file project-spine.v7.2.json; JSON file projects-plugin.v7.2.json.
Downstream impact
It is itself an entry point (shell script); no other file was found loading it.
What it achieves
No statement of purpose was found in the file, a README line naming it, or its name.
Why it matters
No other file in the estate was found to import it; it is an entry point.
Application
globalgrid2050 · uk_renewables_pipeline/202609051156/tests · shell script
Uses
none found
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 uk_renewables_pipeline/202609051156/tests/run_v7_1.sh:1-48 · blob 107acdedf9aa913eb29c3d810474f4a5b1c9e4b1 · GitHub at these lines
State
achieves: name · context: readme_derived · stage: ingest · effects: network, process · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: production_core
#!/usr/bin/env bash
set -euo pipefail

v7_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
repo_root="$(cd "$v7_dir/../.." && pwd)"

python3 "$v7_dir/tests/check_v5_parity.py"
node "$v7_dir/tests/check_modules.mjs"

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

if [[ "${V7_BROWSER_SMOKE:-0}" == "1" ]]; then
  browser_base_url="${V7_BASE_URL:-http://127.0.0.1:8765/uk_renewables_pipeline/v7/}"
  python3 -m http.server 8765 --directory "$repo_root" >/tmp/globalgrid2050-v7-http.log 2>&1 &
  server_pid=$!
  trap 'kill "$server_pid" 2>/dev/null || true' EXIT
  for _ in {1..20}; do
    if curl --fail --silent --output /dev/null "$browser_base_url"; then
      break
    fi
    sleep 0.25
  done
  curl --fail --silent --output /dev/null "$browser_base_url"
  V7_BASE_URL="$browser_base_url" node "$v7_dir/tests/browser_smoke.mjs"
  kill "$server_pid" 2>/dev/null || true
  trap - EXIT
fi

north_star_report="${V7_NORTH_STAR_REPORT:-${TMPDIR:-/tmp}/globalgrid2050-v7-postflight.json}"
python3 "$v7_dir/tests/validate_north_star.py" \
  --phase post \
  --report "$north_star_report"

if [[ -f "$v7_dir/contracts/project-spine.v7.2.json" ]]; then
  python3 "$v7_dir/tests/test_v7_2_spine_safety.py"
  python3 "$v7_dir/tests/validate_v7_2_spine.py"
fi

if [[ -f "$v7_dir/contracts/projects-plugin.v7.2.json" ]]; then
  python3 "$v7_dir/tests/validate_projects_plugin_v7_2.py" --phase spec
  node "$v7_dir/tests/check_v7_2_project_model.mjs"
  node "$v7_dir/tests/check_v7_2_project_controls.mjs"
  node "$v7_dir/tests/check_v7_2_project_table_export.mjs"
fi

echo "V7.1 validation suite: PASS ($repo_root)"

Run V8 0

A shell script in the tests folder of GlobalGrid2050.

testglobalgrid2050 / uk_renewables_pipeline/202609051156/tests/run_v8_0.sh · lines 1–14 of 14 · version 2026-09-05 11:56 · Entry point

What it does
It tests its inputs. 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.
Downstream impact
It is itself an entry point (shell script); no other file was found loading it.
What it achieves
No statement of purpose was found in the file, a README line naming it, or its name.
Why it matters
No other file in the estate was found to import it; it is an entry point.
Application
globalgrid2050 · uk_renewables_pipeline/202609051156/tests · shell script
Uses
none found
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 uk_renewables_pipeline/202609051156/tests/run_v8_0.sh:1-14 · blob d9f2629b89770f943f151ec958de7ccc052d7703 · 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
set -euo pipefail

v8_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
repo_root="$(cd "$v8_dir/../.." && pwd)"

bash "$repo_root/uk_renewables_pipeline/v7/tests/run_v7_1.sh"
python3 "$v8_dir/tests/check_v8_baseline.py"

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

echo "V8.0 validation suite: PASS ($repo_root)"

Run V8 1

A shell script in the tests folder of GlobalGrid2050.

testglobalgrid2050 / uk_renewables_pipeline/202609051156/tests/run_v8_1.sh · lines 1–43 of 43 · version 2026-09-05 11:56 · Entry point

What it does
It tests its inputs. Side effects: makes network requests; starts processes.
Why it exists in the grid workflow
Domain stage upstream_foresight (path word 'renewables'): upstream engineering foresight over GB transmission and distribution topology (TSO/DNO, 132kV and above, the REPD pipeline, data centres), which Ventus Ltd states it models for foresight.
Downstream impact
It is itself an entry point (shell script); no other file was found loading it.
What it achieves
No statement of purpose was found in the file, a README line naming it, or its name.
Why it matters
No other file in the estate was found to import it; it is an entry point.
Application
globalgrid2050 · uk_renewables_pipeline/202609051156/tests · shell script
Uses
none found
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 uk_renewables_pipeline/202609051156/tests/run_v8_1.sh:1-43 · blob 6f755e0945b4f45178e471ff394e3a574293480b · GitHub at these lines
State
achieves: name · context: readme_derived · stage: ingest · effects: network, process · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: production_core
#!/usr/bin/env bash
set -euo pipefail

v8_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
repo_root="$(cd "$v8_dir/../.." && pwd)"
expected_v7_tree="9ad8cfe9cdf26948ed3ad3898822977f9198006a"

bash "$repo_root/uk_renewables_pipeline/v7/tests/run_v7_1.sh"

actual_v7_tree="$(git -C "$repo_root" rev-parse HEAD:uk_renewables_pipeline/v7)"
if [[ "$actual_v7_tree" != "$expected_v7_tree" ]]; then
  echo "V8.1 gate: V7 fallback tree changed ($actual_v7_tree)" >&2
  exit 1
fi

python3 "$v8_dir/tests/test_v7_2_spine_safety.py"
python3 "$v8_dir/tests/validate_v7_2_spine.py"
python3 "$v8_dir/tests/validate_projects_plugin_v7_2.py" --phase spec
node "$v8_dir/tests/check_v7_2_project_model.mjs"
node "$v8_dir/tests/check_v8_1_mvp.mjs"

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

if [[ "${V8_BROWSER_SMOKE:-0}" == "1" ]]; then
  browser_base_url="${V8_BASE_URL:-http://127.0.0.1:8765/uk_renewables_pipeline/v8/}"
  python3 -m http.server 8765 --directory "$repo_root" >/tmp/globalgrid2050-v8-http.log 2>&1 &
  server_pid=$!
  trap 'kill "$server_pid" 2>/dev/null || true' EXIT
  for _ in {1..20}; do
    if curl --fail --silent --output /dev/null "$browser_base_url"; then
      break
    fi
    sleep 0.25
  done
  curl --fail --silent --output /dev/null "$browser_base_url"
  V8_BASE_URL="$browser_base_url" node "$v8_dir/tests/browser_smoke_v8_1.mjs"
  kill "$server_pid" 2>/dev/null || true
  trap - EXIT
fi

echo "V8.1 validation suite: PASS ($repo_root)"

Run V9 0

A shell script in the tests folder of GlobalGrid2050.

testglobalgrid2050 / uk_renewables_pipeline/202609051156/tests/run_v9_0.sh · lines 1–15 of 15 · version 2026-09-05 11:56 · Entry point

What it does
It tests its inputs. 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.
Downstream impact
It is itself an entry point (shell script); no other file was found loading it.
What it achieves
No statement of purpose was found in the file, a README line naming it, or its name.
Why it matters
No other file in the estate was found to import it; it is an entry point.
Application
globalgrid2050 · uk_renewables_pipeline/202609051156/tests · shell script
Uses
none found
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 uk_renewables_pipeline/202609051156/tests/run_v9_0.sh:1-15 · blob 8329bb74c84c13b69738e285c04833de59e1f008 · 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
set -euo pipefail

v9_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
repo_root="$(cd "$v9_dir/../.." && pwd)"

bash "$repo_root/uk_renewables_pipeline/v8/tests/run_v8_1.sh"
python3 "$v9_dir/tests/check_legacy_integrity_v9.py"
node "$v9_dir/tests/check_v9_0.mjs"

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

echo "V9.0 validation suite: PASS ($repo_root)"

Run V9 1

A shell script in the tests folder of GlobalGrid2050.

testglobalgrid2050 / uk_renewables_pipeline/202609051156/tests/run_v9_1.sh · lines 1–16 of 16 · version 2026-09-05 11:56 · Entry point

What it does
It tests its inputs. 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.
Downstream impact
It is itself an entry point (shell script); no other file was found loading it.
What it achieves
No statement of purpose was found in the file, a README line naming it, or its name.
Why it matters
No other file in the estate was found to import it; it is an entry point.
Application
globalgrid2050 · uk_renewables_pipeline/202609051156/tests · shell script
Uses
Check Legacy Integrity V9 (script call), Check V9 1 (script call)
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 uk_renewables_pipeline/202609051156/tests/run_v9_1.sh:1-16 · blob 1dc27c2d394d8304ba4aa2e95cba84659a858b34 · 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
set -euo pipefail

HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
V9="$(cd "$HERE/.." && pwd)"
ROOT="$(cd "$V9/../.." && pwd)"

test "$(git -C "$ROOT" rev-parse '50a6df6c4bd54ff4c113aaf0df4f230b7c9544d2^{tree}')" = "60b72b3665e6b65a397541b221c4bca75aa402c9"
bash "$ROOT/uk_renewables_pipeline/v8/tests/run_v8_1.sh"
python3 "$HERE/check_legacy_integrity_v9.py"
python3 "$V9/scripts/data/build_v9_1_spine.py"
node --check "$V9/scripts/data/canonical-projects-v9-1.js"
node --check "$V9/scripts/plugins/gauges-v9-1.js"
node --check "$V9/scripts/plugins/projects-v9-1.js"
node "$HERE/check_v9_1.mjs"
echo "V9.1 validation suite: PASS ($ROOT)"

Run V9 2

A shell script in the tests folder of GlobalGrid2050.

testglobalgrid2050 / uk_renewables_pipeline/202609051156/tests/run_v9_2.sh · lines 1–19 of 19 · version 2026-09-05 11:56 · Entry point

What it does
It tests its inputs. 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.
Downstream impact
It is itself an entry point (shell script); no other file was found loading it.
What it achieves
No statement of purpose was found in the file, a README line naming it, or its name.
Why it matters
No other file in the estate was found to import it; it is an entry point.
Application
globalgrid2050 · uk_renewables_pipeline/202609051156/tests · shell script
Uses
Check V9 2 (script call)
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 uk_renewables_pipeline/202609051156/tests/run_v9_2.sh:1-19 · blob 3686589afbd8493b6a5a33ad896c70edd3e8d8dd · 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
set -euo pipefail

HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
V9="$(cd "$HERE/.." && pwd)"
ROOT="$(cd "$V9/../.." && pwd)"

test "$(git -C "$ROOT" rev-parse '59f74e319fbaad62abdb995107dba5759d7f3ca2^{tree}')" = "e9dc244b74d9c983e4557a23bd2b745c1daeb105"
bash "$ROOT/uk_renewables_pipeline/v9/tests/run_v9_1.sh"
git -C "$ROOT" diff --exit-code -- uk_renewables_pipeline/v9/data/v9.1
node --check "$V9/scripts/core/project-filter-v9-2.js"
node --check "$V9/scripts/core/news-relevance-v9-2.js"
node --check "$V9/scripts/data/canonical-projects-v9-2.js"
node --check "$V9/scripts/plugins/gauges-v9-2.js"
node --check "$V9/scripts/plugins/newspaper-v9-2.js"
node --check "$V9/scripts/plugins/projects-v9-2.js"
node --check "$V9/scripts/app.js"
node "$HERE/check_v9_2.mjs"
echo "V9.2 validation suite: PASS ($ROOT)"

Run V9 3

A shell script in the tests folder of GlobalGrid2050.

testglobalgrid2050 / uk_renewables_pipeline/202609051156/tests/run_v9_3.sh · lines 1–36 of 36 · version 2026-09-05 11:56 · Entry point

What it does
It tests its inputs. Side effects: makes network requests; starts processes.
Why it exists in the grid workflow
Domain stage upstream_foresight (path word 'renewables'): upstream engineering foresight over GB transmission and distribution topology (TSO/DNO, 132kV and above, the REPD pipeline, data centres), which Ventus Ltd states it models for foresight.
Downstream impact
It is itself an entry point (shell script); no other file was found loading it.
What it achieves
No statement of purpose was found in the file, a README line naming it, or its name.
Why it matters
No other file in the estate was found to import it; it is an entry point.
Application
globalgrid2050 · uk_renewables_pipeline/202609051156/tests · shell script
Uses
Check Legacy Integrity V9 (script call), Check V9 3 (script call), Browser Smoke V9 3 (script call)
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 uk_renewables_pipeline/202609051156/tests/run_v9_3.sh:1-36 · blob a9e5b678b47c547c61f14c15731c60527d1601db · GitHub at these lines
State
achieves: name · context: readme_derived · stage: ingest · effects: network, process · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: production_core
#!/usr/bin/env bash
set -euo pipefail

HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
V9="$(cd "$HERE/.." && pwd)"
ROOT="$(cd "$V9/../.." && pwd)"

test "$(git -C "$ROOT" rev-parse '77085a5dc8a8ce42cd4de7dad927eaf9aaf785ee^{tree}')" = "3807968dbf5c73e4499c6de9157464e3185dd241"
python3 "$HERE/check_legacy_integrity_v9.py"
python3 "$V9/scripts/data/build_v9_1_spine.py"
git -C "$ROOT" diff --exit-code -- uk_renewables_pipeline/v9/data/v9.1

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

node "$HERE/check_v9_3.mjs"

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

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

Run V9 4

A shell script in the tests folder of GlobalGrid2050.

testglobalgrid2050 / uk_renewables_pipeline/202609051156/tests/run_v9_4.sh · lines 1–37 of 37 · version 2026-09-05 11:56 · Entry point

What it does
It tests its inputs. Side effects: makes network requests; starts processes.
Why it exists in the grid workflow
Domain stage upstream_foresight (path word 'renewables'): upstream engineering foresight over GB transmission and distribution topology (TSO/DNO, 132kV and above, the REPD pipeline, data centres), which Ventus Ltd states it models for foresight.
Downstream impact
It is itself an entry point (shell script); no other file was found loading it.
What it achieves
No statement of purpose was found in the file, a README line naming it, or its name.
Why it matters
No other file in the estate was found to import it; it is an entry point.
Application
globalgrid2050 · uk_renewables_pipeline/202609051156/tests · shell script
Uses
Check Legacy Integrity V9 (script call), Check V9 4 (script call), Browser Smoke V9 4 (script call)
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 uk_renewables_pipeline/202609051156/tests/run_v9_4.sh:1-37 · blob 4c3122eff216caa04449013b34285562e3268382 · GitHub at these lines
State
achieves: name · context: readme_derived · stage: ingest · effects: network, process · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: production_core
#!/usr/bin/env bash
set -euo pipefail

HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
V94="$(cd "$HERE/.." && pwd)"
ROOT="$(cd "$V94/../.." && pwd)"

test "$(git -C "$ROOT" rev-parse 'HEAD:uk_renewables_pipeline/v9')" = "d9a508845b4e3b717bfb8cb33f244f7507d4d581"
python3 "$HERE/check_legacy_integrity_v9.py"
python3 "$V94/scripts/data/build_v9_1_spine.py"
git -C "$ROOT" diff --exit-code -- uk_renewables_pipeline/v9
git -C "$ROOT" diff --exit-code -- uk_renewables_pipeline/v9.4/data/v9.1

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

node "$HERE/check_v9_4.mjs"

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

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

Run V9 5

A shell script in the tests folder of GlobalGrid2050.

testglobalgrid2050 / uk_renewables_pipeline/202609051156/tests/run_v9_5.sh · lines 1–38 of 38 · version 2026-09-05 11:56 · Entry point

What it does
It tests its inputs. Side effects: makes network requests; starts processes.
Why it exists in the grid workflow
Domain stage upstream_foresight (path word 'renewables'): upstream engineering foresight over GB transmission and distribution topology (TSO/DNO, 132kV and above, the REPD pipeline, data centres), which Ventus Ltd states it models for foresight.
Downstream impact
It is itself an entry point (shell script); no other file was found loading it.
What it achieves
No statement of purpose was found in the file, a README line naming it, or its name.
Why it matters
No other file in the estate was found to import it; it is an entry point.
Application
globalgrid2050 · uk_renewables_pipeline/202609051156/tests · shell script
Uses
Check Legacy Integrity V9 (script call), Check V9 5 (script call), Browser Smoke V9 5 (script call)
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 uk_renewables_pipeline/202609051156/tests/run_v9_5.sh:1-38 · blob 673c227c75d9b97c4ded0f5f6da6e2d944066e07 · GitHub at these lines
State
achieves: name · context: readme_derived · stage: ingest · effects: network, process · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: production_core
#!/usr/bin/env bash
set -euo pipefail

HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
V95="$(cd "$HERE/.." && pwd)"
ROOT="$(cd "$V95/../.." && pwd)"

test "$(git -C "$ROOT" rev-parse 'HEAD:uk_renewables_pipeline/v9.4')" = "c274af911f786fb0385e7fb96f4e20ae7dec1de3"
python3 "$HERE/check_legacy_integrity_v9.py"
python3 "$V95/scripts/data/build_v9_1_spine.py"
git -C "$ROOT" diff --exit-code -- uk_renewables_pipeline/v9.4
git -C "$ROOT" diff --exit-code -- uk_renewables_pipeline/v9.5/data/v9.1
python3 "$ROOT/scripts/test_news_binder_v9_5.py"

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

node "$HERE/check_v9_5.mjs"

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

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

Run V9 5 1

A shell script in the tests folder of GlobalGrid2050.

testglobalgrid2050 / uk_renewables_pipeline/202609051156/tests/run_v9_5_1.sh · lines 1–43 of 43 · version 2026-09-05 11:56 · Entry point

What it does
It tests its inputs. Side effects: makes network requests; starts processes.
Why it exists in the grid workflow
Domain stage upstream_foresight (path word 'renewables'): upstream engineering foresight over GB transmission and distribution topology (TSO/DNO, 132kV and above, the REPD pipeline, data centres), which Ventus Ltd states it models for foresight.
Downstream impact
It is itself an entry point (shell script); no other file was found loading it.
What it achieves
No statement of purpose was found in the file, a README line naming it, or its name.
Why it matters
No other file in the estate was found to import it; it is an entry point.
Application
globalgrid2050 · uk_renewables_pipeline/202609051156/tests · shell script
Uses
Check Legacy Integrity V9 (script call), Check V9 5 1 (script call), Browser Smoke V9 5 1 (script call)
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 uk_renewables_pipeline/202609051156/tests/run_v9_5_1.sh:1-43 · blob 18485f8464b5d9206134a0c557f62e9dff64c523 · GitHub at these lines
State
achieves: name · context: readme_derived · stage: ingest · effects: network, process · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: production_core
#!/usr/bin/env bash
set -euo pipefail

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

test "$(git -C "$ROOT" rev-parse 'HEAD:uk_renewables_pipeline/v9.4')" = "c274af911f786fb0385e7fb96f4e20ae7dec1de3"
test "$(git -C "$ROOT" rev-parse 'HEAD:uk_renewables_pipeline/v9.5')" = "763c5b4055fc82939c1192a26123bfb2c75f3869"
python3 "$HERE/check_legacy_integrity_v9.py"
python3 "$V951/scripts/data/build_v9_1_spine.py"
git -C "$ROOT" diff --exit-code -- uk_renewables_pipeline/v9.4
git -C "$ROOT" diff --exit-code -- uk_renewables_pipeline/v9.5
git -C "$ROOT" diff --exit-code -- uk_renewables_pipeline/v9.5.1/data/v9.1
python3 "$ROOT/scripts/test_news_binder_v9_5.py"
python3 "$ROOT/scripts/build_news_feed_v9_5_1.py"
git -C "$ROOT" diff --exit-code -- dist/major_project_news_v9_5_1.json
python3 "$ROOT/scripts/test_news_feed_v9_5_1.py"

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

node "$HERE/check_v9_5_1.mjs"

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

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

Run V9 6 1

A shell script in the tests folder of GlobalGrid2050.

testglobalgrid2050 / uk_renewables_pipeline/202609051156/tests/run_v9_6_1.sh · lines 1–50 of 50 · version 2026-09-05 11:56 · Entry point

What it does
It tests its inputs. Side effects: makes network requests; starts processes.
Why it exists in the grid workflow
Domain stage upstream_foresight (path word 'renewables'): upstream engineering foresight over GB transmission and distribution topology (TSO/DNO, 132kV and above, the REPD pipeline, data centres), which Ventus Ltd states it models for foresight.
Downstream impact
It is itself an entry point (shell script); no other file was found loading it.
What it achieves
No statement of purpose was found in the file, a README line naming it, or its name.
Why it matters
No other file in the estate was found to import it; it is an entry point.
Application
globalgrid2050 · uk_renewables_pipeline/202609051156/tests · shell script
Uses
Check V9 6 1 (script call), Browser Smoke V9 6 1 (script call)
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 uk_renewables_pipeline/202609051156/tests/run_v9_6_1.sh:1-50 · blob 145f9f3d6ada74f6102e6d11fd3db3049372be2c · GitHub at these lines
State
achieves: name · context: readme_derived · stage: ingest · effects: network, process · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: production_core
#!/usr/bin/env bash
set -euo pipefail

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

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

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

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

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

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

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

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

Run V9 6 2

A shell script in the tests folder of GlobalGrid2050.

testglobalgrid2050 / uk_renewables_pipeline/202609051156/tests/run_v9_6_2.sh · lines 1–40 of 40 · version 2026-09-05 11:56 · Entry point

What it does
It tests its inputs. Side effects: makes network requests; starts processes.
Why it exists in the grid workflow
Domain stage upstream_foresight (path word 'renewables'): upstream engineering foresight over GB transmission and distribution topology (TSO/DNO, 132kV and above, the REPD pipeline, data centres), which Ventus Ltd states it models for foresight.
Downstream impact
It is itself an entry point (shell script); no other file was found loading it.
What it achieves
No statement of purpose was found in the file, a README line naming it, or its name.
Why it matters
No other file in the estate was found to import it; it is an entry point.
Application
globalgrid2050 · uk_renewables_pipeline/202609051156/tests · shell script
Uses
Check V9 6 2 (script call), Browser Smoke V9 6 2 (script call)
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 uk_renewables_pipeline/202609051156/tests/run_v9_6_2.sh:1-40 · blob e2c930b3bd377fceaf09289bc643d3f81fdc10a8 · GitHub at these lines
State
achieves: name · context: readme_derived · stage: ingest · effects: network, process · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: production_core
#!/usr/bin/env bash
set -euo pipefail

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

test "$(git -C "$ROOT" rev-parse 'HEAD:uk_renewables_pipeline/v9.6.1')" = "243d1217c9748a4246a6d427a5e80ac45c5bd22e"

diff -qr -x __pycache__ -x '*.pyc' "$V961/data" "$V962/data"
diff -qr -x __pycache__ -x '*.pyc' "$V961/fixtures" "$V962/fixtures"

V9_BROWSER_SMOKE=0 bash "$V961/tests/run_v9_6_1.sh"
node "$HERE/check_v9_6_2.mjs"

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

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

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

Test V7 2 Spine Safety

A test in the tests folder of GlobalGrid2050 that checks Build V7 2 Spine.

testglobalgrid2050 / uk_renewables_pipeline/202609051156/tests/test_v7_2_spine_safety.py · lines 1–50 of 50 · version 2026-09-05 11:56 · Entry point

What it does
It tests its inputs. Defines main. Uses libraries __future__, json, sys, tempfile, pathlib. 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.
Inputs & outputs
In: JSON file asset.json. Coordinate systems named: OSGB36 / EPSG:27700 (British National Grid).
Downstream impact
Used directly by 1 file: GlobalGrid2050 Project Signals Acid Workflow (globalgrid2050).
What it achieves
No statement of purpose was found in the file, a README line naming it, or its name.
Why it matters
Run by GlobalGrid2050 Project Signals Acid Workflow.
Application
globalgrid2050 · uk_renewables_pipeline/202609051156/tests · test
Uses
Build V7 2 Spine (sys.path import), __future__, json, sys, tempfile, pathlib, unittest.mock
Used by
run by GlobalGrid2050 Project Signals Acid Workflow (workflow run)
Produces
main
Defines here
main
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/202609051156/tests/test_v7_2_spine_safety.py:1-50 · blob ea6c6f0e66639e0943837d4bb0cae0bf6969914d · GitHub at these lines
State
achieves: name · context: readme_derived · stage: ingest · effects: filesystem · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: production_core
#!/usr/bin/env python3
from __future__ import annotations

import json
import sys
import tempfile
from pathlib import Path
from unittest.mock import patch


V7 = Path(__file__).resolve().parents[1]
sys.path.insert(0, str(V7 / "scripts/data"))

from build_v7_2_spine import atomic_write_json, optional_float, project_feature, resolve_geometry  # noqa: E402


def main() -> None:
    with tempfile.TemporaryDirectory() as directory:
        root = Path(directory)
        target = root / "asset.json"
        atomic_write_json(target, {"complete": True})
        assert json.loads(target.read_text(encoding="utf-8")) == {"complete": True}
        assert not list(root.glob(".*.tmp"))

        original = target.read_bytes()
        with patch("build_v7_2_spine.os.replace", side_effect=OSError("simulated replace failure")):
            try:
                atomic_write_json(target, {"complete": False})
            except OSError:
                pass
            else:
                raise AssertionError("simulated atomic replacement failure was not raised")
        assert target.read_bytes() == original
        assert not list(root.glob(".*.tmp"))

    assert optional_float(float("inf")) is None
    for easting, northing, expected in ((None, None, "missing"), (float("inf"), 100.0, "invalid"), (-1.0, 100.0, "invalid")):
        status, longitude, latitude = resolve_geometry(easting, northing)
        assert status == expected and longitude is None and latitude is None
        assert project_feature({"gg_project_id": "GG2050-TEST", "geometry_status": status, "longitude": longitude, "latitude": latitude}) is None

    status, longitude, latitude = resolve_geometry(530000.0, 180000.0)
    assert status == "valid" and longitude is not None and latitude is not None
    feature = project_feature({"gg_project_id": "GG2050-TEST", "geometry_status": status, "longitude": longitude, "latitude": latitude})
    assert feature is not None and feature["geometry"]["coordinates"] == [longitude, latitude]
    print("V7.2 spine safety: PASS (atomic replacement, missing/invalid/valid geometry)")


if __name__ == "__main__":
    main()