GLOBALGRID2050 / EXPLORE CODE

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

GlobalGrid2050 Gridbot London Sunrise Sunset UI Chart Workflow and 6 more files

A GitHub Actions workflow. Runs by hand.

637 lines of YAML from globalgrid2050, in 7 files. Topic: Automation and CI. Section 1719 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 Gridbot London Sunrise Sunset UI Chart Workflow automation · globalgrid2050 / .github/workflows/gridbot_london_sunrise_sunset_ui_chart.yml lines 1–138
  2. GlobalGrid2050 Gridbot Mega Upgrade Workflow automation · globalgrid2050 / .github/workflows/gridbot_mega_upgrade.yml lines 1–92
  3. GlobalGrid2050 Gridbot MWh Mobile Bounds Repair Workflow automation · globalgrid2050 / .github/workflows/gridbot_mwh_mobile_bounds_repair.yml lines 1–91
  4. GlobalGrid2050 Gridbot Repo Split Inventory Workflow automation · globalgrid2050 / .github/workflows/gridbot_repo_split_inventory.yml lines 1–66
  5. GlobalGrid2050 Gridbot Root Homepage Directory Audit Workflow automation · globalgrid2050 / .github/workflows/gridbot_root_homepage_directory_audit.yml lines 1–91
  6. GlobalGrid2050 Gridbot Solar 10 Year Backfill Workflow automation · globalgrid2050 / .github/workflows/gridbot_solar_10_year_backfill.yml lines 1–88
  7. GlobalGrid2050 Gridbot Solar Daily MWh Chart Upgrade Workflow automation · globalgrid2050 / .github/workflows/gridbot_solar_daily_mwh_chart_upgrade.yml lines 1–71

GlobalGrid2050 Gridbot London Sunrise Sunset UI Chart Workflow

A GitHub Actions workflow. Runs by hand.

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

What it does
It runs automated jobs on GitHub Actions. Side effects: changes the web page (DOM); reads or writes files; starts processes.
Inputs & outputs
In: JSON file london_solar_daylight_geometry_2026.json; JSON file LONDON_SUNRISE_SUNSET_UI_CHART_LATEST.json. Out: SVG drawing; commits pushed to the repository.
Downstream impact
It is itself an entry point (workflow); 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 · .github/workflows · workflow
Uses
none found
Used by
none found
Produces
none declared
Defines here
GridBot London Sunrise Sunset UI Chart
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/gridbot_london_sunrise_sunset_ui_chart.yml:1-138 · blob c20213ab87b688c99221c9770a6689c2b73c45d0 · GitHub at these lines
State
achieves: name · context: readme_derived · stage: output · effects: dom, filesystem, process · domain stage: unknown · users: none · canonical: production_core
name: GridBot London Sunrise Sunset UI Chart

on:
  workflow_dispatch:
    inputs:
      mode:
        description: Run mode
        required: true
        default: audit
        type: choice
        options:
          - audit
          - apply
      commit_reports:
        description: Commit reports and apply output
        required: true
        default: 'true'
        type: choice
        options:
          - 'true'
          - 'false'
permissions:
  contents: write

concurrency:
  group: gridbot-london-sunrise-sunset-ui-chart
  cancel-in-progress: false

jobs:
  chart:
    runs-on: ubuntu-latest
    timeout-minutes: 20
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
        with:
          fetch-depth: 0
          token: ${{ secrets.GRIDBOT_PAT }}

      - name: Sync latest main
        run: git pull --ff-only origin main

      - name: Build proposed chart and report
        env:
          GRIDBOT_MODE: ${{ github.event.inputs.mode }}
        run: |
          python - <<'PY'
          import json, datetime as dt, os
          from pathlib import Path
          root = Path('.')
          index = root / 'uk_energy_tracking_v6/generation_history/index.md'
          data_path = root / 'uk_energy_tracking_v6/generation_history/london_solar_daylight_geometry_2026.json'
          report_md = root / 'data_science_protocol/audit_reports/LONDON_SUNRISE_SUNSET_UI_CHART_LATEST.md'
          report_json = root / 'data_science_protocol/audit_reports/json/LONDON_SUNRISE_SUNSET_UI_CHART_LATEST.json'
          mode = os.environ.get('GRIDBOT_MODE','audit')
          data = json.loads(data_path.read_text(encoding='utf-8'))
          rows = [r for r in data.get('rows',[]) if r.get('sunriseExists') and r.get('sunsetExists')]
          def minutes(hhmm):
              h,m = hhmm.split(':')
              return int(h)*60+int(m)
          def point(row, key, i, n):
              x = 50 + (i/(n-1))*910
              y = 28 + ((minutes(row[key])-180)/1140)*250
              return f'{x:.1f},{y:.1f}'
          sunrise_points = ' '.join(point(r,'sunriseUKClock',i,len(rows)) for i,r in enumerate(rows))
          sunset_points = ' '.join(point(r,'sunsetUKClock',i,len(rows)) for i,r in enumerate(rows))
          ticks = ''
          for t in [240,480,720,960,1200]:
              y = 28 + ((t-180)/1140)*250
              ticks += f'<line x1="50" y1="{y:.1f}" x2="960" y2="{y:.1f}" stroke="rgba(255,255,255,.08)"/><text x="6" y="{y+8:.1f}" fill="#9aa3b6" font-size="24">{t//60:02d}:00</text>'
          summary = data.get('summary',{})
          card = f"""<div class="mwh-card wide" id="london-sunrise-sunset-card" data-gridbot="london-sunrise-sunset-ui-chart">
            <div class="mwh-aggregate-head"><strong>Sunrise and sunset times</strong><span>2026 London reference</span></div>
            <svg viewBox="0 0 1000 320" style="width:100%;height:260px;background:#05070c;border:1px solid rgba(255,255,255,.08);border-radius:10px" role="img" aria-label="London sunrise and sunset by day of year">
              {ticks}
              <polyline points="{sunrise_points}" fill="none" stroke="#f5c518" stroke-width="4"/>
              <polyline points="{sunset_points}" fill="none" stroke="#00d0ff" stroke-width="4"/>
              <text x="50" y="310" fill="#9aa3b6" font-size="24">Jan</text><text x="270" y="310" fill="#9aa3b6" font-size="24">Apr</text><text x="500" y="310" fill="#9aa3b6" font-size="24">Jul</text><text x="730" y="310" fill="#9aa3b6" font-size="24">Oct</text><text x="900" y="310" fill="#9aa3b6" font-size="24">Dec</text>
            </svg>
            <div class="mwh-note-line">Sunrise line shown in yellow. Sunset line shown in blue. Daylight window is the space between them.</div>
            <div class="mwh-check-grid">
              <div class="mwh-check-metric"><span>Shortest day</span><strong>{summary['shortestDay']['date']} · {summary['shortestDay']['daylightHours']} h</strong></div>
              <div class="mwh-check-metric"><span>Longest day</span><strong>{summary['longestDay']['date']} · {summary['longestDay']['daylightHours']} h</strong></div>
              <div class="mwh-check-metric"><span>Earliest sunrise</span><strong>{summary['earliestSunriseUKClock']['date']} · {summary['earliestSunriseUKClock']['time']}</strong></div>
              <div class="mwh-check-metric"><span>Latest sunset</span><strong>{summary['latestSunsetUKClock']['date']} · {summary['latestSunsetUKClock']['time']}</strong></div>
            </div>
            <div class="sunrise-sunset-attribution"><strong>Method:</strong> calculated London solar daylight geometry · GMT/UTC primary output · Europe/London display includes BST · formula attribution: USNO apparent sunrise/sunset horizon convention, NREL solar position reference, NOAA style equation of time and solar declination · AI assisted implementation credit: ChatGPT GPT 5.5 Thinking unde  … [line shortened here: 513 characters; full line on GitHub]
          </div>"""
          text = index.read_text(encoding='utf-8')
          text = text.replace('<div class="mwh-card" id="generation-mwh-daynight"></div>', '<div class="mwh-card" id="generation-mwh-daynight" style="display:none!important"></div>')
          old = '<div class="sunrise-sunset-attribution" data-gridbot="sunrise-sunset-visible-attribution"><strong>Sunrise and sunset reference:</strong> <a href="https://sunrise-sunset.org/api" rel="noopener noreferrer">Sunrise-Sunset.org API</a> · Europe/London · UK reference locations.</div>'
          if 'id="london-sunrise-sunset-card"' not in text:
              text = text.replace('        </div>\n        ' + old, '        </div>\n        ' + card)
          checks = {
              'daylight_geometry_json_exists': data_path.exists(),
              'daylight_geometry_has_365_rows': len(rows) == 365,
              'ui_card_prepared': 'id="london-sunrise-sunset-card"' in text,
              'old_day_night_hidden': 'generation-mwh-daynight" style="display:none!important"' in text,
              'formula_attribution_visible': 'formula attribution: USNO apparent sunrise/sunset horizon convention' in text,
              'ai_assisted_credit_visible': 'ChatGPT GPT 5.5 Thinking' in text,
              'generation_data_not_touched': True
          }
          passed = all(checks.values())
          if mode == 'apply' and passed:
              index.write_text(text, encoding='utf-8')
          report = {'reportTitle':'London Sunrise Sunset UI Chart','schemaVersion':'1.0.0','generatedUTC':dt.datetime.now(dt.timezone.utc).isoformat().replace('+00:00','Z'),'repository':'Ventusltd/globalgrid2050','workflowName':'GridBot London Sunrise Sunset UI Chart','route':'/uk_energy_tracking_v6/generation_history/','mode':mode,'changedFiles':['uk_energy_tracking_v6/generation_history/index.md  … [line shortened here: 886 characters; full line on GitHub]
          report_md.parent.mkdir(parents=True, exist_ok=True)
          report_json.parent.mkdir(parents=True, exist_ok=True)
          report_md.write_text('# London Sunrise Sunset UI Chart\n\nGenerated UTC: `'+report['generatedUTC']+'`\nMode: `'+mode+'`\nPass: `'+str(passed)+'`\n\n'+report['executiveSummary']+'\n\n## Checks\n\n| Check | Result |\n|---|---|\n'+'\n'.join('| '+k+' | '+('✅' if v else '❌')+' |' for k,v in checks.items())+'\n\n## Rollback\n\n'+report['rollbackMethod']+'\n', encoding='utf-8')
          report_json.write_text(json.dumps(report, indent=2), encoding='utf-8')
          if not passed:
              raise SystemExit(1)
          PY

      - name: Upload report
        if: always()
        uses: actions/upload-artifact@v4
        with:
          name: london-sunrise-sunset-ui-chart-${{ github.event.inputs.mode }}
          path: |
            data_science_protocol/audit_reports/LONDON_SUNRISE_SUNSET_UI_CHART_LATEST.md
            data_science_protocol/audit_reports/json/LONDON_SUNRISE_SUNSET_UI_CHART_LATEST.json

      - name: Commit audit or apply
        if: ${{ github.event.inputs.commit_reports == 'true' }}
        run: |
          git config user.name "Gridbot"
          git config user.email "gridbot@users.noreply.github.com"
          git add .github/workflows/gridbot_london_sunrise_sunset_ui_chart.yml
          git add data_science_protocol/audit_reports/LONDON_SUNRISE_SUNSET_UI_CHART_LATEST.md
          git add data_science_protocol/audit_reports/json/LONDON_SUNRISE_SUNSET_UI_CHART_LATEST.json
          if [ "${{ github.event.inputs.mode }}" = "apply" ]; then git add uk_energy_tracking_v6/generation_history/index.md; fi
          if git diff --cached --quiet; then
            echo "No changes to commit."
          else
            git commit -m "gridbot: london sunrise sunset ui chart ${{ github.event.inputs.mode }}"
            git push origin HEAD:main
          fi

GlobalGrid2050 Gridbot Mega Upgrade Workflow

A GitHub Actions workflow. Runs by hand.

automationglobalgrid2050 / .github/workflows/gridbot_mega_upgrade.yml · lines 1–92 of 92 · 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 Gridbot Mega Upgrade (`scripts/gridbot_mega_upgrade.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 Mega Upgrade (workflow run)
Used by
none found
Produces
none declared
Defines here
GridBot Mega Upgrade
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/gridbot_mega_upgrade.yml:1-92 · blob 1cee50f07a0d276e66bc34f1f5026760e6541d68 · GitHub at these lines
State
achieves: comment · context: readme_derived · stage: unknown · effects: process · domain stage: unknown · users: none · canonical: production_core
name: GridBot Mega Upgrade

on:
  workflow_dispatch:
    inputs:
      mode:
        description: Run mode
        required: true
        default: audit
        type: choice
        options:
          - audit
          - apply
      manifest:
        description: Manifest path
        required: true
        default: gridbot_manifests/001_generation_data_discipline.yml
        type: string
      phase:
        description: Phase to run, or all
        required: true
        default: all
        type: string
      commit_reports:
        description: Commit audit reports and applied outputs
        required: true
        default: 'true'
        type: choice
        options:
          - 'true'
          - 'false'
permissions:
  contents: write

concurrency:
  group: gridbot-mega-upgrade
  cancel-in-progress: false

jobs:
  gridbot-mega-upgrade:
    runs-on: ubuntu-latest
    timeout-minutes: 360

    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
        with:
          fetch-depth: 0

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

      - name: Install manifest dependencies
        run: python -m pip install pyyaml

      - name: Run GridBot mega upgrade in audit mode
        if: github.event.inputs.mode == 'audit'
        run: python scripts/gridbot_mega_upgrade.py --manifest "$GITHUB_WORKSPACE/${{ github.event.inputs.manifest }}" --phase "${{ github.event.inputs.phase }}"

      - name: Run GridBot mega upgrade in apply mode
        if: github.event.inputs.mode == 'apply'
        run: python scripts/gridbot_mega_upgrade.py --manifest "$GITHUB_WORKSPACE/${{ github.event.inputs.manifest }}" --phase "${{ github.event.inputs.phase }}" --apply

      - name: Upload GridBot reports
        if: always()
        uses: actions/upload-artifact@v4
        with:
          name: gridbot-mega-upgrade-report
          path: |
            data_science_protocol/audit_reports/GRIDBOT_MEGA_UPGRADE_LATEST.md
            data_science_protocol/audit_reports/json/GRIDBOT_MEGA_UPGRADE_LATEST.json

      - name: Commit GridBot outputs
        if: github.event.inputs.commit_reports == 'true'
        shell: bash
        run: |
          set -euo pipefail
          git config --global user.name "Gridbot"
          git config --global user.email "gridbot@globalgrid2050.com"
          git add .gitignore || true
          git add uk_energy_tracking_v6/generation_history/generation_recent_30d_30min.json || true
          git add uk_energy_tracking_v6/generation_history/live-config.js || true
          git add data_science_protocol/audit_reports/ || true
          if git diff --cached --quiet; then
            echo "No GridBot outputs to commit"
            exit 0
          fi
          git commit -m "gridbot: run mega upgrade ${{ github.event.inputs.mode }} ${{ github.event.inputs.phase }}"
          git pull --rebase origin "${GITHUB_REF_NAME}"
          git push origin HEAD:"${GITHUB_REF_NAME}"

GlobalGrid2050 Gridbot MWh Mobile Bounds Repair Workflow

A GitHub Actions workflow. Runs by hand.

automationglobalgrid2050 / .github/workflows/gridbot_mwh_mobile_bounds_repair.yml · lines 1–91 of 91 · 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 Gridbot MWh Mobile Bounds Repair (`scripts/gridbot_mwh_mobile_bounds_repair.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 MWh Mobile Bounds Repair (workflow run)
Used by
none found
Produces
none declared
Defines here
GridBot MWh Mobile Bounds Repair
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/gridbot_mwh_mobile_bounds_repair.yml:1-91 · blob ae28bd22d05ade8c2cf005c3de21ca0f1a1021ce · GitHub at these lines
State
achieves: comment · context: readme_derived · stage: unknown · effects: process · domain stage: unknown · users: none · canonical: production_core
name: GridBot MWh Mobile Bounds Repair

on:
  workflow_dispatch:
    inputs:
      mode:
        description: Run mode
        required: true
        default: audit
        type: choice
        options:
          - audit
          - apply
      commit_reports:
        description: Commit reports and apply outputs
        required: true
        default: 'true'
        type: choice
        options:
          - 'true'
          - 'false'
permissions:
  contents: write

concurrency:
  group: gridbot-mwh-mobile-bounds-repair
  cancel-in-progress: false

jobs:
  repair:
    runs-on: ubuntu-latest
    timeout-minutes: 20
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
        with:
          fetch-depth: 0
          token: ${{ secrets.GRIDBOT_PAT }}

      - name: Sync latest main before processing
        run: git pull --ff-only origin main

      - name: Run audit
        if: ${{ github.event.inputs.mode == 'audit' }}
        run: python scripts/gridbot_mwh_mobile_bounds_repair.py

      - name: Run apply
        if: ${{ github.event.inputs.mode == 'apply' }}
        run: python scripts/gridbot_mwh_mobile_bounds_repair.py --apply

      - name: Upload mobile bounds report
        if: always()
        uses: actions/upload-artifact@v4
        with:
          name: mwh-mobile-bounds-repair-${{ github.event.inputs.mode }}
          path: |
            data_science_protocol/audit_reports/MWH_MOBILE_BOUNDS_REPAIR_LATEST.md
            data_science_protocol/audit_reports/json/MWH_MOBILE_BOUNDS_REPAIR_LATEST.json

      - name: Commit audit report only
        if: ${{ github.event.inputs.commit_reports == 'true' && github.event.inputs.mode == 'audit' }}
        run: |
          git config user.name "Gridbot"
          git config user.email "gridbot@users.noreply.github.com"
          git add scripts/gridbot_mwh_mobile_bounds_repair.py
          git add .github/workflows/gridbot_mwh_mobile_bounds_repair.yml
          git add data_science_protocol/audit_reports/MWH_MOBILE_BOUNDS_REPAIR_LATEST.md
          git add data_science_protocol/audit_reports/json/MWH_MOBILE_BOUNDS_REPAIR_LATEST.json
          if git diff --cached --quiet; then
            echo "No changes to commit."
          else
            git commit -m "gridbot: mwh mobile bounds repair audit"
            git push origin HEAD:main
          fi

      - name: Commit mobile bounds changes and report
        if: ${{ github.event.inputs.commit_reports == 'true' && github.event.inputs.mode == 'apply' }}
        run: |
          git config user.name "Gridbot"
          git config user.email "gridbot@users.noreply.github.com"
          git add scripts/gridbot_mwh_mobile_bounds_repair.py
          git add .github/workflows/gridbot_mwh_mobile_bounds_repair.yml
          git add uk_energy_tracking_v6/generation_history/index.md
          git add data_science_protocol/audit_reports/MWH_MOBILE_BOUNDS_REPAIR_LATEST.md
          git add data_science_protocol/audit_reports/json/MWH_MOBILE_BOUNDS_REPAIR_LATEST.json
          if git diff --cached --quiet; then
            echo "No changes to commit."
          else
            git commit -m "gridbot: mwh mobile bounds repair apply"
            git push origin HEAD:main
          fi

GlobalGrid2050 Gridbot Repo Split Inventory Workflow

A GitHub Actions workflow. Runs by hand.

automationglobalgrid2050 / .github/workflows/gridbot_repo_split_inventory.yml · lines 1–66 of 66 · 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 Gridbot Repo Split Inventory (`scripts/gridbot_repo_split_inventory.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 Repo Split Inventory (workflow run)
Used by
none found
Produces
none declared
Defines here
GridBot Repo Split Inventory
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/gridbot_repo_split_inventory.yml:1-66 · blob be506b3bde32280cb242668fd9d3355614b5f735 · GitHub at these lines
State
achieves: comment · context: readme_derived · stage: unknown · effects: process · domain stage: unknown · users: none · canonical: production_core
name: GridBot Repo Split Inventory

on:
  workflow_dispatch:
    inputs:
      warn_mb:
        description: Warning threshold per file in MB
        required: true
        default: '5'
      fail_mb:
        description: Failure threshold per file in MB for classification
        required: true
        default: '25'
      commit_reports:
        description: Commit reports
        required: true
        default: 'true'
        type: choice
        options:
          - 'true'
          - 'false'
permissions:
  contents: write

concurrency:
  group: gridbot-repo-split-inventory
  cancel-in-progress: false

jobs:
  repo-split-inventory:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
        with:
          fetch-depth: 0
          token: ${{ secrets.GRIDBOT_PAT }}

      - name: Run inventory audit
        run: python scripts/gridbot_repo_split_inventory.py --warn-mb "${{ github.event.inputs.warn_mb }}" --fail-mb "${{ github.event.inputs.fail_mb }}"

      - name: Upload inventory reports
        uses: actions/upload-artifact@v4
        with:
          name: repo-split-inventory
          path: |
            data_science_protocol/audit_reports/REPO_SPLIT_INVENTORY_LATEST.md
            data_science_protocol/audit_reports/json/REPO_SPLIT_INVENTORY_LATEST.json

      - name: Commit reports
        if: ${{ github.event.inputs.commit_reports == 'true' }}
        run: |
          git config user.name "Gridbot"
          git config user.email "gridbot@users.noreply.github.com"
          git add scripts/gridbot_repo_split_inventory.py
          git add .github/workflows/gridbot_repo_split_inventory.yml
          git add data_science_protocol/APP_REPO_SPLIT_AND_DATA_PIPELINE_ARCHITECTURE.md
          git add data_science_protocol/audit_reports/REPO_SPLIT_INVENTORY_LATEST.md
          git add data_science_protocol/audit_reports/json/REPO_SPLIT_INVENTORY_LATEST.json
          if git diff --cached --quiet; then
            echo "No changes to commit."
          else
            git commit -m "gridbot: repo split inventory audit"
            git pull --rebase origin main
            git push origin HEAD:main
          fi

GlobalGrid2050 Gridbot Root Homepage Directory Audit Workflow

A GitHub Actions workflow. Runs by hand.

automationglobalgrid2050 / .github/workflows/gridbot_root_homepage_directory_audit.yml · lines 1–91 of 91 · 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 Gridbot Root Homepage Directory Audit (`scripts/gridbot_root_homepage_directory_audit.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 Root Homepage Directory Audit (workflow run)
Used by
none found
Produces
none declared
Defines here
GridBot Root Homepage Directory Audit
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/gridbot_root_homepage_directory_audit.yml:1-91 · blob 479649f2cd0a8a24b1d5e1d803f53110270c744f · GitHub at these lines
State
achieves: comment · context: readme_derived · stage: unknown · effects: process · domain stage: unknown · users: none · canonical: production_core
name: GridBot Root Homepage Directory Audit

on:
  workflow_dispatch:
    inputs:
      mode:
        description: Run mode
        required: true
        default: audit
        type: choice
        options:
          - audit
          - apply
      commit_reports:
        description: Commit reports and homepage changes
        required: true
        default: 'true'
        type: choice
        options:
          - 'true'
          - 'false'
permissions:
  contents: write

concurrency:
  group: gridbot-root-homepage-directory-audit
  cancel-in-progress: false

jobs:
  root-homepage-directory-audit:
    runs-on: ubuntu-latest
    timeout-minutes: 15
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
        with:
          fetch-depth: 0
          token: ${{ secrets.GRIDBOT_PAT }}

      - name: Sync latest main before processing
        run: git pull --ff-only origin main

      - name: Run audit
        if: ${{ github.event.inputs.mode == 'audit' }}
        run: python scripts/gridbot_root_homepage_directory_audit.py

      - name: Run apply
        if: ${{ github.event.inputs.mode == 'apply' }}
        run: python scripts/gridbot_root_homepage_directory_audit.py --apply

      - name: Upload homepage directory audit report
        if: always()
        uses: actions/upload-artifact@v4
        with:
          name: root-homepage-directory-audit-${{ github.event.inputs.mode }}
          path: |
            data_science_protocol/audit_reports/ROOT_HOMEPAGE_DIRECTORY_AUDIT_LATEST.md
            data_science_protocol/audit_reports/json/ROOT_HOMEPAGE_DIRECTORY_AUDIT_LATEST.json

      - name: Commit audit report only
        if: ${{ github.event.inputs.commit_reports == 'true' && github.event.inputs.mode == 'audit' }}
        run: |
          git config user.name "Gridbot"
          git config user.email "gridbot@users.noreply.github.com"
          git add scripts/gridbot_root_homepage_directory_audit.py
          git add .github/workflows/gridbot_root_homepage_directory_audit.yml
          git add data_science_protocol/audit_reports/ROOT_HOMEPAGE_DIRECTORY_AUDIT_LATEST.md
          git add data_science_protocol/audit_reports/json/ROOT_HOMEPAGE_DIRECTORY_AUDIT_LATEST.json
          if git diff --cached --quiet; then
            echo "No changes to commit."
          else
            git commit -m "gridbot: root homepage directory audit audit"
            git push origin HEAD:main
          fi

      - name: Commit homepage directory changes and report
        if: ${{ github.event.inputs.commit_reports == 'true' && github.event.inputs.mode == 'apply' }}
        run: |
          git config user.name "Gridbot"
          git config user.email "gridbot@users.noreply.github.com"
          git add scripts/gridbot_root_homepage_directory_audit.py
          git add .github/workflows/gridbot_root_homepage_directory_audit.yml
          git add index.html
          git add data_science_protocol/audit_reports/ROOT_HOMEPAGE_DIRECTORY_AUDIT_LATEST.md
          git add data_science_protocol/audit_reports/json/ROOT_HOMEPAGE_DIRECTORY_AUDIT_LATEST.json
          if git diff --cached --quiet; then
            echo "No changes to commit."
          else
            git commit -m "gridbot: root homepage directory audit apply"
            git push origin HEAD:main
          fi

GlobalGrid2050 Gridbot Solar 10 Year Backfill Workflow

A GitHub Actions workflow. Runs by hand.

automationglobalgrid2050 / .github/workflows/gridbot_solar_10_year_backfill.yml · lines 1–88 of 88 · 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 Solar Historic Backfill (`scripts/gridbot_solar_historic_backfill.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 Solar Historic Backfill (workflow run)
Used by
none found
Produces
none declared
Defines here
GridBot Solar 10 Year Backfill
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/gridbot_solar_10_year_backfill.yml:1-88 · blob ec624660c936a464fb7107e2cec453e9dcf22968 · 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: GridBot Solar 10 Year Backfill

on:
  workflow_dispatch:
    inputs:
      mode:
        description: Run mode
        required: true
        default: audit
        type: choice
        options:
          - audit
          - apply
      start_date:
        description: Start date YYYY-MM-DD
        required: true
        default: '2016-01-01'
        type: string
      end_date:
        description: End date YYYY-MM-DD, blank means yesterday
        required: false
        default: ''
        type: string
      max_days:
        description: Maximum days this run
        required: true
        default: '4000'
        type: string
      commit_reports:
        description: Commit reports and outputs
        required: true
        default: 'true'
        type: choice
        options:
          - 'true'
          - 'false'
permissions:
  contents: write

concurrency:
  group: gridbot-solar-10-year-backfill
  cancel-in-progress: false

jobs:
  solar-10-year-backfill:
    runs-on: ubuntu-latest
    timeout-minutes: 360
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - name: Audit Solar 10 year backfill
        if: github.event.inputs.mode == 'audit'
        run: python scripts/gridbot_solar_historic_backfill.py --start-date "${{ github.event.inputs.start_date }}" --end-date "${{ github.event.inputs.end_date }}" --max-days "${{ github.event.inputs.max_days }}"

      - name: Apply Solar 10 year backfill
        if: github.event.inputs.mode == 'apply'
        run: python scripts/gridbot_solar_historic_backfill.py --start-date "${{ github.event.inputs.start_date }}" --end-date "${{ github.event.inputs.end_date }}" --max-days "${{ github.event.inputs.max_days }}" --apply

      - name: Upload Solar 10 year report
        if: always()
        uses: actions/upload-artifact@v4
        with:
          name: solar-10-year-backfill-report
          path: |
            data_science_protocol/audit_reports/SOLAR_HISTORIC_BACKFILL_LATEST.md
            data_science_protocol/audit_reports/json/SOLAR_HISTORIC_BACKFILL_LATEST.json

      - name: Commit Solar 10 year outputs
        if: github.event.inputs.commit_reports == 'true'
        shell: bash
        run: |
          set -euo pipefail
          git config --global user.name "Gridbot"
          git config --global user.email "gridbot@globalgrid2050.com"
          git add data/confirmed/pvlive_solar_daily_candidate.json || true
          git add uk_energy_tracking_v6/generation_history/pvlive_solar_daily_browser.json || true
          git add data_science_protocol/audit_reports/SOLAR_HISTORIC_BACKFILL_LATEST.md || true
          git add data_science_protocol/audit_reports/json/SOLAR_HISTORIC_BACKFILL_LATEST.json || true
          if git diff --cached --quiet; then
            echo "No Solar 10 year outputs to commit"
            exit 0
          fi
          git commit -m "gridbot: run solar 10 year backfill ${{ github.event.inputs.mode }}"
          git pull --rebase origin main
          git push origin HEAD:main

GlobalGrid2050 Gridbot Solar Daily MWh Chart Upgrade Workflow

A GitHub Actions workflow. Runs by hand.

automationglobalgrid2050 / .github/workflows/gridbot_solar_daily_mwh_chart_upgrade.yml · lines 1–71 of 71 · 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 Solar Daily MWh Index Upgrade (`scripts/gridbot_solar_daily_mwh_index_upgrade.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 Solar Daily MWh Index Upgrade (workflow run)
Used by
none found
Produces
none declared
Defines here
GridBot Solar Daily MWh Chart Upgrade
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/gridbot_solar_daily_mwh_chart_upgrade.yml:1-71 · blob 1985b8457e422c403a7537f180167f658f906206 · 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: GridBot Solar Daily MWh Chart Upgrade

on:
  workflow_dispatch:
    inputs:
      mode:
        description: Audit first, apply after review
        required: true
        default: audit
        type: choice
        options:
          - audit
          - apply
      commit_reports:
        description: Commit audit report and applied index update
        required: true
        default: 'true'
        type: choice
        options:
          - 'true'
          - 'false'
permissions:
  contents: write

concurrency:
  group: gridbot-solar-daily-mwh-chart-upgrade
  cancel-in-progress: false

jobs:
  solar-daily-mwh-chart-upgrade:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - name: Audit Solar daily MWh chart upgrade
        if: github.event.inputs.mode == 'audit'
        run: python scripts/gridbot_solar_daily_mwh_index_upgrade.py

      - name: Apply Solar daily MWh chart upgrade
        if: github.event.inputs.mode == 'apply'
        run: python scripts/gridbot_solar_daily_mwh_index_upgrade.py --apply

      - name: Upload Solar daily MWh chart upgrade report
        if: always()
        uses: actions/upload-artifact@v4
        with:
          name: solar-daily-mwh-chart-upgrade-report
          path: |
            data_science_protocol/audit_reports/SOLAR_DAILY_MWH_CHART_UPGRADE_LATEST.md
            data_science_protocol/audit_reports/json/SOLAR_DAILY_MWH_CHART_UPGRADE_LATEST.json

      - name: Commit Solar daily MWh chart upgrade outputs
        if: github.event.inputs.commit_reports == 'true'
        shell: bash
        run: |
          set -euo pipefail
          git config --global user.name "Gridbot"
          git config --global user.email "gridbot@globalgrid2050.com"
          git add uk_energy_tracking_v6/generation_history/index.md || true
          git add data_science_protocol/audit_reports/SOLAR_DAILY_MWH_CHART_UPGRADE_LATEST.md || true
          git add data_science_protocol/audit_reports/json/SOLAR_DAILY_MWH_CHART_UPGRADE_LATEST.json || true
          if git diff --cached --quiet; then
            echo "No Solar daily MWh chart upgrade outputs to commit"
            exit 0
          fi
          git commit -m "gridbot: solar daily mwh chart upgrade ${{ github.event.inputs.mode }}"
          git pull --rebase origin "${GITHUB_REF_NAME}"
          git push origin HEAD:"${GITHUB_REF_NAME}"