GLOBALGRID2050 / EXPLORE CODE

Part of: Explore Code / Automation and CI / globalgrid2050 / .github/workflows

GlobalGrid2050 Night Tests Workflow and 9 more files

A GitHub Actions workflow. Runs on a schedule and by hand.

664 lines of YAML from globalgrid2050, in 10 files. Topic: Automation and CI. Section 1722 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. GlobalGrid2050 Inverter Flow Check Workflow automation · globalgrid2050 / .github/workflows/inverter-flow-check.yml lines 1–34
  2. GlobalGrid2050 Isolate UK Energy Tracking V2 Workflow automation · globalgrid2050 / .github/workflows/isolate_uk_energy_tracking_v2.yml lines 1–45
  3. GlobalGrid2050 Jekyll Gh Pages Workflow automation · globalgrid2050 / .github/workflows/jekyll-gh-pages.yml lines 1–58
  4. GlobalGrid2050 Key to Code Workflow automation · globalgrid2050 / .github/workflows/key-to-code.yml lines 1–50
  5. GlobalGrid2050 Major Project News V4 Workflow automation · globalgrid2050 / .github/workflows/major_project_news_v4.yml lines 1–38
  6. GlobalGrid2050 Major Project News V5 Workflow automation · globalgrid2050 / .github/workflows/major_project_news_v5.yml lines 1–61
  7. GlobalGrid2050 Major Project News V6 Workflow automation · globalgrid2050 / .github/workflows/major_project_news_v6.yml lines 1–138
  8. GlobalGrid2050 Modularise Solar Er Workflow automation · globalgrid2050 / .github/workflows/modularise_solar_er.yml lines 1–48
  9. GlobalGrid2050 Modularize V3 Once Workflow automation · globalgrid2050 / .github/workflows/modularize-v3-once.yml lines 1–32
  10. GlobalGrid2050 Night Tests Workflow test · globalgrid2050 / .github/workflows/night-tests.yml lines 1–160

GlobalGrid2050 Inverter Flow Check Workflow

A GitHub Actions workflow. Runs on push and by hand.

automationglobalgrid2050 / .github/workflows/inverter-flow-check.yml · lines 1–34 of 34 · Entry point

What it does
It runs automated jobs on GitHub Actions. Side effects: starts processes.
Why it exists in the grid workflow
Domain stage sub33kv_design (path word 'inverter'): inside-the-fence electrical and civil design below 33kV, which Ventus Ltd states is within its commercial execution boundary.
Downstream impact
It is itself an entry point (workflow); no other file was found loading it.
What it achieves
Runs `.github/tests/inverter-flow.cjs`.
Why it matters
No other file in the estate was found to import it; it is an entry point.
Application
globalgrid2050 · .github/workflows · workflow
Uses
Inverter 48 (workflow run), Inverter 48 Native (workflow run), Inverter Flow (workflow run)
Used by
none found
Produces
none declared
Defines here
Inverter flow check
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 .github/workflows/inverter-flow-check.yml:1-34 · blob 47393c63f5af77bc57dea30a3944f10101f087a1 · GitHub at these lines
State
achieves: comment · context: readme_derived · stage: unknown · effects: process · domain stage: sub33kv_design · users: EPC_contractor, ICP_grid_engineer · canonical: production_core
name: Inverter flow check
on:
  workflow_dispatch:
  push:
    branches: [codex/inverter-full-flow]
permissions:
  contents: read
jobs:
  browser:
    runs-on: ubuntu-latest
    timeout-minutes: 10
    steps:
      - uses: actions/checkout@v4
        with:
          sparse-checkout: |
            ventus/wiring
            .github/tests
      - uses: actions/setup-node@v4
        with:
          node-version: 22
      - name: Check scripts
        run: |
          node --check ventus/wiring/inverter-48.mjs
          node --check ventus/wiring/inverter-48-native.mjs
      - name: Check animation in hosted Chromium
        run: |
          npm install --prefix "$RUNNER_TEMP/browser" --no-save --ignore-scripts playwright@1.62.1
          "$RUNNER_TEMP/browser/node_modules/.bin/playwright" install --with-deps chromium
          PLAYWRIGHT_MODULE="$RUNNER_TEMP/browser/node_modules/playwright" node .github/tests/inverter-flow.cjs
      - uses: actions/upload-artifact@v4
        if: always()
        with:
          name: inverter-flow-evidence
          path: inverter-flow-evidence

GlobalGrid2050 Isolate UK Energy Tracking V2 Workflow

A GitHub Actions workflow. Runs by hand.

automationglobalgrid2050 / .github/workflows/isolate_uk_energy_tracking_v2.yml · lines 1–45 of 45 · Entry point

What it does
It runs automated jobs on GitHub Actions. Side effects: starts processes.
Inputs & outputs
Out: commits pushed to the repository.
Downstream impact
It is itself an entry point (workflow); no other file was found loading it.
What it achieves
Runs GlobalGrid2050 Isolate UK Energy Tracking V2 (`scripts/isolate_uk_energy_tracking_v2.py`).
Why it matters
No other file in the estate was found to import it; it is an entry point.
Application
globalgrid2050 · .github/workflows · workflow
Uses
GlobalGrid2050 Isolate UK Energy Tracking V2 (workflow run)
Used by
none found
Produces
none declared
Defines here
isolate_uk_energy_tracking_v2
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 .github/workflows/isolate_uk_energy_tracking_v2.yml:1-45 · blob f1d3718fe59f82557891062da84fdb7bfd49cd80 · GitHub at these lines
State
achieves: comment · context: readme_derived · stage: unknown · effects: process · domain stage: unknown · users: none · canonical: production_core
name: isolate_uk_energy_tracking_v2

on:
  workflow_dispatch:
permissions:
  contents: write

jobs:
  isolate:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
        with:
          fetch-depth: 0
          token: ${{ secrets.GRIDBOT_PAT }}

      - name: Setup Python
        uses: actions/setup-python@v5
        with:
          python-version: '3.11'

      - name: Run V2 isolation
        run: python scripts/isolate_uk_energy_tracking_v2.py

      - name: Commit isolated V2 system
        env:
          PAT: ${{ secrets.GRIDBOT_PAT }}
        run: |
          git config --global user.name "gridbot"
          git config --global user.email "bot@globalgrid2050.com"
          git add uk_energy_tracking_v2
          git add scripts/update_uk_energy_v2.py
          git add scripts/update_uk_price_v2.py
          git add scripts/update_oil_prices_v2.py
          git add scripts/update_uk_fuel_prices_v2.py
          git add .github/workflows/fetch_uk_energy_and_prices_v2.yml
          git add gridbot_reports/isolate_uk_energy_tracking_v2.md
          if [ -n "$(git status --porcelain)" ]; then
            git commit -m "Isolate UK energy tracking V2"
            git push https://${PAT}@github.com/${{ github.repository }}.git HEAD:main
          else
            echo "No V2 isolation changes to commit"
          fi

GlobalGrid2050 Jekyll Gh Pages Workflow

A GitHub Actions workflow that builds and publishes the site. Runs by hand.

automationglobalgrid2050 / .github/workflows/jekyll-gh-pages.yml · lines 1–58 of 58 · Entry point

What it does
It builds and publishes its content. Side effects: starts processes.
Inputs & outputs
Out: GitHub Pages deployment.
Downstream impact
It is itself an entry point (workflow); no other file was found loading it.
What it achieves
Build and deploy the GlobalGrid2050 Pages site.
Why it matters
No other file in the estate was found to import it; it is an entry point.
Application
globalgrid2050 · .github/workflows · workflow
Uses
none found
Used by
none found
Produces
none declared
Defines here
Deploy Jekyll with GitHub Pages dependencies preinstalled
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 .github/workflows/jekyll-gh-pages.yml:1-58 · blob fa0c96de199d4df9c2dd8fb49267bcb7e6626a51 · GitHub at these lines
State
achieves: comment · context: readme_derived · stage: unknown · effects: process · domain stage: unknown · users: none · canonical: production_core
# Build and deploy the GlobalGrid2050 Pages site.
name: Deploy Jekyll with GitHub Pages dependencies preinstalled

# TWO PUBLISHERS, ONE SITE.
#
# This workflow and deploy-pages.yml both deployed GitHub Pages, both on a push
# to main touching index.html, and both in concurrency group "pages" with
# cancel-in-progress: false. So every homepage change queued TWO different
# builders against the same environment and whichever finished last won - one
# uploading the repository as-is, the other running it through Jekyll, which
# this site is not.
#
# Observed on 2026-09-06: index.html correct on origin/main with 53 Test Code
# links, and the live page still serving 44 several minutes and five polls
# later. A site that does not update is indistinguishable from a site that was
# never pushed to, which is how a whole morning of work can look lost.
#
# The push trigger is removed so there is exactly one publisher. This workflow
# stays available by hand, because deciding which publisher the estate wants is
# the architect's call and deleting the alternative would take that away.
on:
  workflow_dispatch:

permissions:
  contents: read
  pages: write
  id-token: write

concurrency:
  group: "pages"
  cancel-in-progress: false

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4
      - name: Setup Pages
        uses: actions/configure-pages@v5
      - name: Build with Jekyll
        uses: actions/jekyll-build-pages@v1
        with:
          source: ./
          destination: ./_site
      - name: Upload artifact
        uses: actions/upload-pages-artifact@v3

  deploy:
    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}
    runs-on: ubuntu-latest
    needs: build
    steps:
      - name: Deploy to GitHub Pages
        id: deployment
        uses: actions/deploy-pages@v4

GlobalGrid2050 Key to Code Workflow

A GitHub Actions workflow that builds and publishes the site. Runs by hand.

automationglobalgrid2050 / .github/workflows/key-to-code.yml · lines 1–50 of 50 · Entry point

What it does
It builds and publishes its content. Side effects: starts processes.
Downstream impact
It is itself an entry point (workflow); no other file was found loading it.
What it achieves
Forty lanes re-check that every block on the wafer is still tied to its real line of code.
Why it matters
No other file in the estate was found to import it; it is an entry point.
Application
globalgrid2050 · .github/workflows · workflow
Uses
none found
Used by
none found
Produces
none declared
Defines here
Key to code
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 .github/workflows/key-to-code.yml:1-50 · blob 48d8822b84bd540477a3821077c39a81daedcea7 · GitHub at these lines
State
achieves: comment · context: readme_derived · stage: unknown · effects: process · domain stage: unknown · users: none · canonical: production_core
# Key to code: forty lanes re-check that every block on the wafer is still tied to its real line of code.
# Each lane takes the code places whose index is lane mod 40, fetches each line from the clone at its recorded
# commit and hashes it. The summary adds the lanes up; anything short of every key found fails the run.
name: Key to code

on:
  workflow_dispatch:

concurrency: key-to-code

jobs:
  lane:
    runs-on: [self-hosted, msi, gpu]
    timeout-minutes: 30
    strategy:
      fail-fast: false
      # JOB CAP. A 50-lane matrix on the same push that publishes a page can
      # starve the Pages deploy behind it, and then "pushed" is reported as
      # "live" while the site still serves the old bytes. Capped at 12.
      max-parallel: 12
      matrix:
        shard: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39]
    env:
      # No absolute path and no account name in a public file. The runner
      # resolves this against its own profile in the step below.
      CPU_WORLD_REL: Desktop\CPU WORLD
      SHARD: ${{ matrix.shard }}
      TOTAL: 40
    steps:
      - name: lane ${{ matrix.shard }} of 40
        shell: 'powershell -NoProfile -ExecutionPolicy Bypass -File {0}'
        run: |
          $ErrorActionPreference = 'Stop'
          $cpuWorld = Join-Path $env:USERPROFILE $env:CPU_WORLD_REL
          if (-not (Test-Path $cpuWorld)) { throw "working tree not found at the path this runner resolved" }
          Set-Location $cpuWorld
          $out = python pipeline\entangle.py | Select-Object -Last 1
          $out
          $r = $out | ConvertFrom-Json
          if ($r.resolved -ne $r.shard_keys) { throw "lane $env:SHARD: $($r.resolved) of $($r.shard_keys) keys found at their line; broken $($r.broken)" }
          "lane $env:SHARD: $($r.resolved) of $($r.shard_keys) keys found at their recorded line" | Out-File $env:GITHUB_STEP_SUMMARY -Append
  summary:
    needs: lane
    if: always()
    runs-on: [self-hosted, msi, gpu]
    steps:
      - shell: 'powershell -NoProfile -ExecutionPolicy Bypass -File {0}'
        run: |
          "Key to code: forty lanes finished with result '${{ needs.lane.result }}'" | Out-File $env:GITHUB_STEP_SUMMARY -Append
          if ('${{ needs.lane.result }}' -ne 'success') { exit 1 }

GlobalGrid2050 Major Project News V4 Workflow

A GitHub Actions workflow. Runs by hand.

automationglobalgrid2050 / .github/workflows/major_project_news_v4.yml · lines 1–38 of 38 · Entry point

What it does
It runs automated jobs on GitHub Actions. Side effects: starts processes.
Inputs & outputs
Out: commits pushed to the repository.
Downstream impact
It is itself an entry point (workflow); no other file was found loading it.
What it achieves
Named “UK Renewables V4 Major Project News”; runs GlobalGrid2050 Major Project News V4 (`scripts/major_project_news_v4.py`).
Why it matters
No other file in the estate was found to import it; it is an entry point.
Application
globalgrid2050 · .github/workflows · workflow
Uses
GlobalGrid2050 Major Project News V4 (workflow run)
Used by
none found
Produces
none declared
Defines here
UK Renewables V4 Major Project News
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 .github/workflows/major_project_news_v4.yml:1-38 · blob abff646cbcc1f942914d0753e4e3c41cc64c5888 · GitHub at these lines
State
achieves: comment · context: readme_derived · stage: unknown · effects: process · domain stage: unknown · users: none · canonical: production_core
name: UK Renewables V4 Major Project News

# Deliberate exception to the June 2026 root-workflow manual freeze.
# Authorised for V4 on 22 Aug 2026: one bounded daily data-refresh workflow.
# Retired from automatic execution on 2026-08-23. V4 remains available only
# for deliberate historical diagnostics; V7 owns all future production work.
on:
  workflow_dispatch:

permissions:
  contents: write

concurrency:
  group: uk-renewables-v4-major-project-news
  cancel-in-progress: true

jobs:
  refresh-news:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4
      - name: Setup Python
        uses: actions/setup-python@v5
        with:
          python-version: '3.10'
      - name: Install dependency
        run: pip install requests
      - name: Build eligible projects and matched headlines
        run: python scripts/major_project_news_v4.py
      - name: Commit only when data changed
        run: |
          git config user.name "Ventus-Bot"
          git config user.email "bot@ventus.ltd"
          git add dist/major_projects_v4.json dist/major_project_news_v4.json
          git diff --cached --quiet && exit 0
          git commit -m "V4 major project news refresh: $(date -u +'%Y-%m-%d')"
          git push

GlobalGrid2050 Major Project News V5 Workflow

A GitHub Actions workflow. Runs by hand.

automationglobalgrid2050 / .github/workflows/major_project_news_v5.yml · lines 1–61 of 61 · Entry point

What it does
It runs solar. Side effects: reads or writes files; starts processes.
Why it exists in the grid workflow
Domain terms in the code: solar.
Inputs & outputs
In: JSON file major_project_news_v5.json. Out: commits pushed to the repository.
Downstream impact
It is itself an entry point (workflow); no other file was found loading it.
What it achieves
Named “UK Renewables V5 Newspaper”; runs GlobalGrid2050 Validate Renewables V5 Integrity (`scripts/validate_renewables_v5_integrity.py`) and GlobalGrid2050 Major Project News V5 (`scripts/major_project_news_v5.py`).
Why it matters
No other file in the estate was found to import it; it is an entry point.
Application
globalgrid2050 · .github/workflows · workflow
Uses
GlobalGrid2050 Validate Renewables V5 Integrity (workflow run), GlobalGrid2050 Major Project News V5 (workflow run)
Used by
none found
Produces
none declared
Defines here
UK Renewables V5 Newspaper
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 .github/workflows/major_project_news_v5.yml:1-61 · blob a87bd9c0a0360b870968dd9e11b33c44a3d6023d · GitHub at these lines
State
achieves: comment · context: readme_derived · stage: ingest · effects: filesystem, process · domain stage: unknown · users: none · canonical: production_core
name: UK Renewables V5 Newspaper

# Retired from automatic execution on 2026-08-23. V5 remains available only
# for deliberate historical diagnostics; V7 owns all future production work.
on:
  workflow_dispatch:
permissions:
  contents: write
concurrency:
  group: uk-renewables-v5-newspaper
  cancel-in-progress: true
jobs:
  refresh-newspaper:
    runs-on: ubuntu-latest
    timeout-minutes: 3
    steps:
      - name: Checkout main
        uses: actions/checkout@v4
        with:
          ref: main
          fetch-depth: 1
          persist-credentials: true
      - name: Setup Python
        uses: actions/setup-python@v5
        with:
          python-version: '3.11'
      - name: Install dependency
        run: python -m pip install --disable-pip-version-check requests
      - name: Measure V1-V5 and block truncation
        run: python scripts/validate_renewables_v5_integrity.py
      - name: Build six-month REPD major-project newspaper
        run: python scripts/major_project_news_v5.py
      - name: Validate generated newspaper before publication
        run: |
          python - <<'PY'
          import json
          from pathlib import Path
          d=json.loads(Path('dist/major_project_news_v5.json').read_text(encoding='utf-8')); items=d.get('items') or []; eligible=d.get('eligible_projects'); count=d.get('headline_count'); sources=set(d.get('priority_sources') or []); required={'BBC','Solar Power Portal','Energy-Storage.News','PV Magazine'}
          assert isinstance(eligible,int) and eligible>0
          assert isinstance(count,int) and count==len(items)
          assert len(items)>=5, f'only {len(items)} headlines generated'
          assert required.issubset(sources)
          assert 180 <= int(d.get('lookback_days') or 0) <= 184
          for i,item in enumerate(items):
              assert item.get('project') and item.get('headline') and item.get('url')
              assert item.get('technology') in {'solar','bess'}
              mw=float(item.get('capacity_mw') or 0)
              assert mw>49 if item['technology']=='solar' else mw>100
          print(f'NEWSPAPER PASS: {eligible} eligible; {len(items)} headlines; {d.get("lookback_days")} days')
          PY
      - name: Re-check V5 integrity after newspaper build
        run: python scripts/validate_renewables_v5_integrity.py
      - name: Commit only validated newspaper changes
        run: |
          git config user.name "Ventus-Bot"
          git config user.email "bot@ventus.ltd"
          git add dist/major_projects_v5.json dist/major_project_news_v5.json
          if git diff --cached --quiet; then exit 0; fi
          git commit -m "V5 newspaper refresh: $(date -u +'%Y-%m-%d')"
          git pull --rebase origin main
          git push origin HEAD:main

GlobalGrid2050 Major Project News V6 Workflow

A GitHub Actions workflow that builds and publishes the site. Runs by hand.

automationglobalgrid2050 / .github/workflows/major_project_news_v6.yml · lines 1–138 of 138 · Entry point

What it does
It builds and publishes the REPD register. Side effects: starts processes.
Why it exists in the grid workflow
Domain terms in the code: the REPD register.
Inputs & outputs
Out: commits pushed to the repository.
Downstream impact
It is itself an entry point (workflow); no other file was found loading it.
What it achieves
Named “UK Renewables V6 Renewable Energy Planning Database (REPD)-Bound Newspaper”; runs GlobalGrid2050 Validate Renewable Energy Planning Database (REPD) Sources V6 (`scripts/validate_repd_sources_v6.py`), GlobalGrid2050 Validate V6 Manifest Provenance (`scripts/validate_v6_manifest_provenance.py`) and GlobalGrid2050 Build Project Identity V6 (`scripts/build_project_identity_v6.py`).
Why it matters
No other file in the estate was found to import it; it is an entry point.
Application
globalgrid2050 · .github/workflows · workflow
Uses
GlobalGrid2050 Validate Renewable Energy Planning Database (REPD) Sources V6 (workflow run), GlobalGrid2050 Validate V6 Manifest Provenance (workflow run), GlobalGrid2050 Build Project Identity V6 (workflow run), GlobalGrid2050 Build Renewables V6 Dashboard (workflow run), GlobalGrid2050 Harden Renewables V6 Dashboard (workflow run), GlobalGrid2050 Major Project News V6 Hardened (workflow run), GlobalGrid2050 Enrich Renewables V6 Identity (workflow run), GlobalGrid2050 Validate Project Identity V6 (workflow run), and 2 more
Used by
none found
Produces
none declared
Defines here
UK Renewables V6 REPD-Bound Newspaper
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 .github/workflows/major_project_news_v6.yml:1-138 · blob c6ec71165f4d5df50866fe4ccefd915df309b14d · GitHub at these lines
State
achieves: comment · context: readme_derived · stage: unknown · effects: process · domain stage: unknown · users: none · canonical: production_core
name: UK Renewables V6 REPD-Bound Newspaper

# Retired from automatic execution on 2026-08-23. V6 remains available only
# for deliberate historical diagnostics; V7 owns all future production work.
# V6 is maintained as a standalone app and fails closed on structural, DESNZ source,
# REPD identity, GlobalGrid identity, quantity or headline-quality regression.
# Official sources are reconciled into V6-only staged assets; the shared REPD master,
# manifest_v4 and V1-V5 regression baselines are never refreshed by this workflow.
on:
  workflow_dispatch:

permissions:
  contents: write

concurrency:
  group: uk-renewables-v6-repd-bound
  cancel-in-progress: true

jobs:
  build-validate-publish:
    if: github.event_name != 'issues' || github.event.issue.title == '[OPS] RUN UK RENEWABLES V6'
    runs-on: ubuntu-latest
    # External news discovery remains hard-capped below three minutes. The additional
    # headroom covers setup, dual-source reconciliation, identity generation and gates.
    timeout-minutes: 20
    steps:
      - name: Checkout main
        uses: actions/checkout@v4
        with:
          ref: main
          fetch-depth: 1
          persist-credentials: true

      - name: Setup Python
        uses: actions/setup-python@v5
        with:
          python-version: '3.11'

      - name: Install REPD and news dependencies
        run: |
          echo install > /tmp/v6_stage
          python -m pip install --disable-pip-version-check pandas openpyxl

      - name: Reconcile official DESNZ CSV and XLSX into V6-only staged sources
        run: |
          echo repd_source_reconciliation > /tmp/v6_stage
          python scripts/validate_repd_sources_v6.py
          python scripts/validate_v6_manifest_provenance.py

      - name: Build canonical identity registry and same-origin public snapshot
        run: |
          echo project_identity > /tmp/v6_stage
          python scripts/build_project_identity_v6.py

      - name: Verify maintained standalone V6 frontend structure
        run: |
          echo dashboard_builder > /tmp/v6_stage
          python scripts/build_renewables_v6_dashboard.py
          python scripts/harden_renewables_v6_dashboard.py

      - name: Crawl six-month V6 newspaper within three-minute budget
        run: |
          echo news_crawler > /tmp/v6_stage
          timeout 170s python scripts/major_project_news_v6_hardened.py

      - name: Bind V6 project/news outputs to canonical GlobalGrid IDs
        run: |
          echo identity_enrichment > /tmp/v6_stage
          python scripts/enrich_renewables_v6_identity.py

      - name: Validate GlobalGrid project identity and actual Q2 quantities
        run: |
          echo identity_validator > /tmp/v6_stage
          python scripts/validate_project_identity_v6.py

      - name: Pass 3 scope audit against V1-V5, DESNZ, REPD and newspaper rules
        run: |
          echo scope_validator > /tmp/v6_stage
          python scripts/validate_renewables_v6_scope.py

      - name: Assert shared REPD and V1-V5 baselines remain untouched
        run: |
          echo immutable_baselines > /tmp/v6_stage
          git diff --exit-code -- \
            dist/repd_master.json \
            dist/manifest_v4.json \
            uk_renewables_pipeline/dashboard.html \
            uk_renewables_pipeline/dashboard_v2_2026-08-22.html \
            uk_renewables_pipeline/dashboard_v3_live_2026-08-22.html \
            uk_renewables_pipeline/dashboard_v4_live.html \
            uk_renewables_pipeline/dashboard_v5_live.html

      - name: Promote scope-validated V6 on root homepage
        run: |
          echo homepage_promotion > /tmp/v6_stage
          python scripts/promote_renewables_v6_homepage.py

      - name: Commit only fully validated V6 output
        run: |
          echo publish > /tmp/v6_stage
          git config user.name "Ventus-Bot"
          git config user.email "bot@ventus.ltd"
          rm -f data/latest_repd_v6_canonical.csv
          rm -f dist/renewables_v6_failure.txt
          git add -- \
            index.html \
            dist/manifest_v6.json \
            dist/repd_source_reconciliation_v6.json \
            dist/project_identity_v6.json \
            dist/project_identity_v6_integrity.json \
            dist/project_news_links_v6.json \
            dist/major_projects_v6.json \
            dist/major_project_news_v6.json \
            dist/renewables_v6_integrity.json \
            uk_renewables_pipeline/dashboard_v6_live.html
          if git ls-files --error-unmatch dist/renewables_v6_failure.txt >/dev/null 2>&1; then
            git add -u -- dist/renewables_v6_failure.txt
          fi
          if git diff --cached --quiet; then
            echo "No validated V6 changes to publish."
            exit 0
          fi
          git commit -m "V6 scope-validated REPD newspaper refresh: $(date -u +'%Y-%m-%d')"
          git pull --rebase origin main
          git push origin HEAD:main

      - name: Persist fail-closed build stage
        if: failure()
        run: |
          git config user.name "Ventus-Bot"
          git config user.email "bot@ventus.ltd"
          git reset --mixed HEAD
          stage="$(cat /tmp/v6_stage 2>/dev/null || echo unknown)"
          printf 'V6 build failed closed\nstage=%s\nutc=%s\n' "$stage" "$(date -u +'%Y-%m-%dT%H:%M:%SZ')" > dist/renewables_v6_failure.txt
          git add -- dist/renewables_v6_failure.txt
          git diff --cached --quiet && exit 0
          git commit -m "V6 fail-closed diagnostic: ${stage}"
          git push origin HEAD:main

GlobalGrid2050 Modularise Solar Er Workflow

A GitHub Actions workflow. Runs by hand.

automationglobalgrid2050 / .github/workflows/modularise_solar_er.yml · lines 1–48 of 48 · Entry point

What it does
It runs solar. Side effects: starts processes.
Why it exists in the grid workflow
Domain stage sub33kv_design (path word 'solar'): inside-the-fence electrical and civil design below 33kV, which Ventus Ltd states is within its commercial execution boundary. Domain terms in the code: solar.
Inputs & outputs
Out: commits pushed to the repository.
Downstream impact
It is itself an entry point (workflow); no other file was found loading it.
What it achieves
Runs GlobalGrid2050 Gridbot Modularise Employers' Requirements (`scripts/gridbot_modularise_employers_requirements.py`).
Why it matters
No other file in the estate was found to import it; it is an entry point.
Application
globalgrid2050 · .github/workflows · workflow
Uses
GlobalGrid2050 Gridbot Modularise Employers' Requirements (workflow run)
Used by
none found
Produces
none declared
Defines here
Modularise Solar ER Page
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 .github/workflows/modularise_solar_er.yml:1-48 · blob a48f7058c18767049b019fe96c5db0eceb7088de · GitHub at these lines
State
achieves: comment · context: readme_derived · stage: unknown · effects: process · domain stage: sub33kv_design · users: EPC_contractor, ICP_grid_engineer · canonical: production_core
name: Modularise Solar ER Page

on:
  workflow_dispatch:
    inputs:
      target:
        description: Target markdown file
        required: true
        default: employers_requirments_large_scale_solar/index.md
      page_title:
        description: Public page title
        required: true
        default: Employers Requirements Large Scale Solar
permissions:
  contents: write

jobs:
  modularise-solar-er:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
        with:
          token: ${{ secrets.GRIDBOT_PAT }}

      - name: Run modular builder
        shell: bash
        run: |
          python scripts/gridbot_modularise_employers_requirements.py \
            --target "${{ github.event.inputs.target }}" \
            --page-title "${{ github.event.inputs.page_title }}" \
            --backup-dir "backups/employers_requirments_large_scale_solar" \
            --report-dir "gridbot_reports"

      - name: Commit and push changes
        env:
          PAT: ${{ secrets.GRIDBOT_PAT }}
        run: |
          git config --global user.name "gridbot"
          git config --global user.email "bot@globalgrid2050.com"
          git add .
          if [ -n "$(git status --porcelain)" ]; then
            git commit -m "Modularise solar employer requirements page"
            git push https://${PAT}@github.com/${{ github.repository }}.git HEAD:main
          else
            echo "No changes to commit"
          fi

GlobalGrid2050 Modularize V3 Once Workflow

A GitHub Actions workflow. Runs by hand.

automationglobalgrid2050 / .github/workflows/modularize-v3-once.yml · lines 1–32 of 32 · Entry point

What it does
It runs automated jobs on GitHub Actions. Side effects: starts processes.
Inputs & outputs
Out: commits pushed to the repository.
Downstream impact
It is itself an entry point (workflow); no other file was found loading it.
What it achieves
Runs GlobalGrid2050 Modularize V3 (`scripts/modularize_v3.py`).
Why it matters
No other file in the estate was found to import it; it is an entry point.
Application
globalgrid2050 · .github/workflows · workflow
Uses
GlobalGrid2050 Modularize V3 (workflow run)
Used by
none found
Produces
none declared
Defines here
Modularize V3 Once
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 .github/workflows/modularize-v3-once.yml:1-32 · blob aeadb521209de4fbdb8472d532556037f31819cd · GitHub at these lines
State
achieves: comment · context: readme_derived · stage: unknown · effects: process · domain stage: unknown · users: none · canonical: production_core
name: Modularize V3 Once

on:
  workflow_dispatch:
permissions:
  contents: write

jobs:
  modularize-v3:
    runs-on: ubuntu-latest
    if: github.actor != 'github-actions[bot]'

    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
        with:
          token: ${{ secrets.GITHUB_TOKEN }}

      - name: Run V3 modulariser
        run: python scripts/modularize_v3.py

      - name: Commit modularised V3
        run: |
          git config --global user.name "gridbot"
          git config --global user.email "bot@globalgrid2050.com"
          git add solar-bess-topology-v3 scripts/modularize_v3.py
          if [ -n "$(git status --porcelain)" ]; then
            git commit -m "Modularize GIS SLD V3"
            git push
          else
            echo "No modularisation changes to commit"
          fi

GlobalGrid2050 Night Tests Workflow

A GitHub Actions workflow. Runs on a schedule and by hand.

testglobalgrid2050 / .github/workflows/night-tests.yml · lines 1–160 of 160 · Entry point

What it does
It tests its inputs. Side effects: reads or writes files; starts processes.
Inputs & outputs
In: JSON file report.json.
Downstream impact
It is itself an entry point (workflow); no other file was found loading it.
What it achieves
Every 30 minutes this job opens the live pages in headless Chrome and checks them: HTTP status, uncaught page errors, console errors, horizontal overflow on a phone viewport, the words each page must and must not show, and.
Why it matters
No other file in the estate was found to import it; it is an entry point.
Application
globalgrid2050 · .github/workflows · workflow
Uses
CI Night Tests (workflow run)
Used by
none found
Produces
none declared
Defines here
Night tests
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 .github/workflows/night-tests.yml:1-160 · blob 8a4ddeda1812c3c0f6764b6fe81b658030a9bdd4 · GitHub at these lines
State
achieves: comment · context: readme_derived · stage: ingest · effects: filesystem, process · domain stage: unknown · users: none · canonical: production_core
# Night tests
#
# Every 30 minutes this job opens the live pages in headless Chrome and checks
# them: HTTP status, uncaught page errors, console errors, horizontal overflow
# on a phone viewport, the words each page must and must not show, and — the
# strongest check — that every file publication.json lists is served with the
# sha256 it was published with.
#
# THE NIGHT WINDOW, AND WHY IT NO LONGER REPORTS SUCCESS
# The job reads testcode/ci/NIGHT-UNTIL.txt (one ISO time). It used to compare
# that time in a shell step, print "night window closed; nothing run", set
# run=no and let every later step be skipped - which GitHub renders as a wholly
# green job. Since 2026-09-15T07:00:00Z that is what every scheduled run has
# been: green, every half hour, having asked nothing.
#
# The window is now judged by night-tests.mjs, which states a VERDICT - PASS,
# FAIL, EXPIRED, NOT_APPLICABLE or INCOMPLETE - in report.json and on its last
# line. A closed window is EXPIRED, and EXPIRED is not a pass: the job is
# annotated with it and the run summary says so. Actions offers a job exactly
# two conclusions, so only FAIL is red; the verdict is the thing to read.
#
# An expired window that nobody renews or deletes becomes a FAIL after
# NIGHT_EXPIRY_GRACE_DAYS (7). A schedule that has asked nothing for a week is
# not idle, it is abandoned, and that is a defect worth a red run.
#
# To extend the night, put a later time in NIGHT-UNTIL.txt. To stop it for
# good, delete this file (or drop `schedule:` and keep workflow_dispatch).
#
# GRAPHICS ON THE RUNNER
# GitHub's runners have no GPU: Chrome draws WebGL with SwiftShader on the CPU,
# so the heavy page can take minutes to paint. The script navigates on
# domcontentloaded and then waits for the page's own count line, and treats a
# page that never paints as a WARNING with its elapsed time, not a failure. The
# served-bytes checks need no browser and run either way.
#
# The report is uploaded as an artifact. Nothing is committed back to the repo.

name: Night tests

on:
  schedule:
    - cron: "*/30 * * * *"
  workflow_dispatch:

permissions:
  contents: read
  issues: write

concurrency:
  group: night-tests
  cancel-in-progress: false

jobs:
  night-tests:
    runs-on: ubuntu-latest
    timeout-minutes: 45
    steps:
      - name: Check out
        uses: actions/checkout@v4

      - name: Set up node
        uses: actions/setup-node@v4
        with:
          node-version: "20"

      - name: Read the night window
        id: gate
        run: |
          UNTIL="$(tr -d '[:space:]' < testcode/ci/NIGHT-UNTIL.txt)"
          echo "now   $(date -u +%Y-%m-%dT%H:%M:%SZ)"
          echo "until $UNTIL"
          echo "until=$UNTIL" >> "$GITHUB_OUTPUT"
          # The window is not judged here. night-tests.mjs decides, and says
          # EXPIRED out loud, because a step that quietly skips the rest of the
          # job is how this workflow spent a week reporting success.
          if [ "$(date -u +%s)" -lt "$(date -u -d "$UNTIL" +%s)" ]; then
            echo "open=yes" >> "$GITHUB_OUTPUT"
          else
            echo "open=no" >> "$GITHUB_OUTPUT"
          fi

      - name: Install puppeteer and Chrome
        if: steps.gate.outputs.open == 'yes'
        run: |
          mkdir -p "$RUNNER_TEMP/pptr"
          cd "$RUNNER_TEMP/pptr"
          npm init -y > /dev/null
          npm i puppeteer@23 --no-audit --no-fund
          ENTRY="$(node -p "require.resolve('puppeteer')")"
          echo "installed puppeteer $(node -p "require('puppeteer/package.json').version") at $ENTRY"
          echo "PUPPETEER_MODULE=$ENTRY" >> "$GITHUB_ENV"

      # Always run. With the window shut this costs one node start and produces
      # an EXPIRED verdict and a report, which is the point: the run says what
      # it did, and what it did was nothing.
      - name: Run night tests
        id: tests
        continue-on-error: true
        env:
          NIGHT_TESTS_BASE: https://globalgrid2050.com
          NIGHT_TESTS_LOAD_MS: "240000"
          NIGHT_TESTS_UNTIL: ${{ steps.gate.outputs.until }}
          REPORT_PATH: ${{ github.workspace }}/report.json
        run: node testcode/ci/night-tests.mjs

      # A verdict is stated in words on every run, whatever colour the job ends
      # up. Actions gives a job two conclusions; this gives the reader five.
      - name: State the verdict
        id: verdict
        run: |
          node -e '
            const fs = require("fs");
            let r;
            try { r = JSON.parse(fs.readFileSync("report.json", "utf8")); }
            catch (e) { r = { verdict: "FAIL", counts: {}, failed: ["report unreadable: " + e.message] }; }
            const c = r.counts || {};
            const n = (k) => c[k] || 0;
            const tally = n("pass") + " passed, " + n("fail") + " failed, " + n("skip") + " skipped, "
              + n("expired") + " expired, " + n("na") + " not-applicable";
            fs.appendFileSync(process.env.GITHUB_OUTPUT, "verdict=" + r.verdict + "\n");
            fs.appendFileSync(process.env.GITHUB_STEP_SUMMARY,
              "## Night tests: " + r.verdict + "\n\n" + tally + "\n"
              + ((r.failed || []).length ? "\nFailing: " + r.failed.join("; ") + "\n" : "")
              + ((r.skipped || []).length ? "\nSkipped: " + r.skipped.join("; ") + "\n" : ""));
            const say = {
              PASS:           ["notice",  "PASS - " + tally],
              NOT_APPLICABLE: ["notice",  "NOT_APPLICABLE - there was nothing here for this run to check"],
              INCOMPLETE:     ["warning", "INCOMPLETE - " + tally + ". A skip is not a pass."],
              EXPIRED:        ["warning", "EXPIRED - the night window in testcode/ci/NIGHT-UNTIL.txt has closed. Nothing was checked. This run is not evidence of anything."],
            }[r.verdict] || ["error", "FAIL - " + tally];
            console.log("::" + say[0] + " title=Night tests::" + say[1]);
            if (say[0] === "error") process.exitCode = 1;
          '
      - name: Upload report
        if: always()
        uses: actions/upload-artifact@v4
        with:
          name: night-report-${{ github.run_id }}
          path: report.json
          if-no-files-found: ignore
          retention-days: 7

      # Only a FAIL is worth an issue comment. EXPIRED and NOT_APPLICABLE are
      # visible on the run and in the report; paging a human about them would
      # retrain exactly the reflex this change exists to undo.
      - name: Report failures
        if: always() && steps.verdict.outputs.verdict == 'FAIL'
        env:
          GH_TOKEN: ${{ github.token }}
        run: |
          RUN_URL="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
          if [ -f report.json ]; then
            N="$(node -p "try{JSON.parse(require('fs').readFileSync('report.json','utf8')).failed.length}catch(e){0}")"
            NAMES="$(node -p "try{JSON.parse(require('fs').readFileSync('report.json','utf8')).failed.map(f=>'- '+f).join('\n')}catch(e){'- (report unreadable)'}")"
          else
            N="0"
            NAMES="- (no report written; the job failed before the tests ran)"
          fi
          printf 'Night tests: %s checks failed.\n\n%s\n\nRun: %s\n' "$N" "$NAMES" "$RUN_URL" > comment.md
          gh issue comment 37 --repo "${{ github.repository }}" --body-file comment.md