In this section
- GridAtlas Cartridge Proof Workflow automation · gridatlas / .github/workflows/202608312212-cartridge-proof.yml lines 1–250
- GridAtlas Offshore Coordinate Reconcile Workflow automation · gridatlas / .github/workflows/offshore-coordinate-reconcile.yml lines 1–139
GridAtlas Cartridge Proof Workflow
A GitHub Actions workflow that builds and publishes the site. Runs on push, on pull requests and by hand.
automationgridatlas / .github/workflows/202608312212-cartridge-proof.yml · lines 1–250 of 250 · version 2026-08-31 22:12 · Entry point
- What it does
- It builds and publishes its content. Side effects: starts processes; uses storage (browser storage, DuckDB or Parquet).
- Why it exists in the grid workflow
- Domain stage upstream_foresight (repository name word 'gridatlas'): 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: DuckDB queries.
- Downstream impact
- It is itself an entry point (workflow); no other file was found loading it.
- What it achieves
- Every cartridge push runs the proof of the cartridge that is composed.
- Why it matters
- No other file in the estate was found to import it; it is an entry point.
- Application
- gridatlas · .github/workflows · workflow
- Uses
- Vicinity Controls Rescue Proof (workflow run), Vicinity A4 Browser (workflow run), All Layer Clicks Browser (workflow run), All Controls Browser (workflow run), Verify Compose (workflow run), Run Current (workflow run), Arrival Identity Browser (workflow run), Menu Bar Mobile Hit Browser (workflow run), and 1 more
- Used by
- none found
- Produces
- none declared
- Defines here
- 202608312212 GridAtlas cartridge proof
- Cannot conclude
- Whether this code runs, is used by a live app today, or is correct. This is a static reading.
- Evidence
- gridatlas@98b5004c5eda9f2ed915fb6fca4b9bbcaa426ca5 .github/workflows/202608312212-cartridge-proof.yml:1-250 · blob b7ab5930d36f9cc048995dd94c244b164437b09c · GitHub at these lines
- State
- achieves: comment · context: readme_derived · stage: ingest · effects: process, storage · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: production_core
# Every cartridge push runs the proof of the cartridge that is composed.
#
# The bounded scope loop is retired and fires only on workflow_dispatch, and
# the verify-live workflow triggers on a path list that does not include
# atlas/. So until now a cartridge could be composed, hashed, pushed and served
# with nobody having run its proof except the person who wrote it.
#
# That proof is 253 checks, and every one of them encodes something that was
# actually wrong on a live page: central AC larger than any nameplate in the
# plant, a project marker invisible against the links converging on it, a boot
# that needed a painted basemap, a symbol layer throwing once per frame for
# want of a glyph atlas. Guarding that by hand is not guarding it.
#
# THREE REPOSITORIES AND ONE LOCKED BROWSER, DELIBERATELY.
#
# The proof's parity check measures every distance the cartridge produces
# against Ventusltd/grid-distance-maths, the canonical geodesy for the estate,
# and it needs that repository checked out BESIDE this one. The first run of
# this workflow failed for exactly that reason and was right to: one repo on
# the runner, so the check that guards the arithmetic could not run and said
# so. Checking out both is what makes the parity real rather than a thing that
# only ever happens on one laptop.
#
# The 393x852 layer-control regression only exists in browser hit testing: a
# docked project sheet can be visually beneath a control yet still win
# `elementFromPoint`. Playwright is locked in package-lock.json and installs
# Chromium only; there is no browser matrix or unbounded crawl.
#
# THE ACTIONS ARE PINNED BY COMMIT, and this workflow is the reason to care.
# It is the gate every cartridge cut passes through, so whatever it trusts,
# the whole composition trusts. `@v4` is a mutable tag: whoever can move it
# can run code inside the one job that decides whether a generation ships,
# with the repository checked out. Three of them stood here - checkout twice,
# setup-node once - and nowhere else in this repository; the other four
# workflows were already pinned by SHA, so the only unpinned actions in
# gridatlas were in its guard rail.
#
# 11bd71901bbe5b1630ceea73d27597364c9af683 is actions/checkout v4.2.2, the
# same commit tools/scope/loop.mjs already asserts for the scope loop, so the
# repository now names one checkout everywhere.
name: 202608312212 GridAtlas cartridge proof
on:
workflow_dispatch:
# STATE.md IS ON THIS LIST BECAUSE A STEP BELOW ASSERTS IT.
#
# The v9.89 cut moved the composition without regenerating STATE.md, and
# this gate caught it - correctly, at "STATE.md was regenerated before it was
# committed". The regeneration that fixed it then touched STATE.md and
# nothing else, so it matched no path here and the gate did not run at all.
# The composition's last runner conclusion stayed the failure, and the commit
# that actually fixed it was never checked by anything.
#
# A file a gate asserts must be a file that wakes the gate. Otherwise the
# only commits it can judge are the ones that happen to touch something else,
# which is the same shape as a check that skips when its input is missing.
push:
branches: [main, 'fix/v9196-vicinity-a4-20261122']
paths:
- 'atlas/**'
- 'tools/proofs/**'
- 'tools/scope/**'
- 'STATE.md'
- '.github/workflows/202608312212-cartridge-proof.yml'
pull_request:
paths:
- 'atlas/**'
- 'tools/proofs/**'
- 'tools/scope/**'
- 'STATE.md'
permissions:
contents: read
concurrency:
group: gridatlas-cartridge-proof-${{ github.ref }}
cancel-in-progress: true
jobs:
vicinity-v9196-mobile:
if: startsWith(github.ref_name, 'fix/v9196-') || github.ref_name == 'main'
runs-on: ubuntu-24.04
timeout-minutes: 25
strategy:
fail-fast: false
matrix:
browser: [chromium, webkit]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020
with:
node-version: '24'
- run: npm ci --ignore-scripts --no-audit --no-fund
- run: npx --no-install playwright install --with-deps ${{ matrix.browser }}
- run: node tools/proofs/202611222325-vicinity-controls-rescue.proof.mjs
- name: A4/PDF MAP and real Grid Engine / layers hit-tests
run: VICINITY_BROWSER=${{ matrix.browser }} node tools/proofs/202611222325-vicinity-a4.browser.mjs
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
if: always()
with:
name: vicinity-v9196-${{ matrix.browser }}-${{ github.run_id }}
path: work/vicinity-v9196-${{ matrix.browser }}
retention-days: 14
user-layer-clicks:
runs-on: ubuntu-24.04
timeout-minutes: 25
strategy:
fail-fast: false
matrix:
width: [1440, 393]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020
with:
node-version: '24'
- run: npm ci --ignore-scripts --no-audit --no-fund
- run: npx --no-install playwright install --with-deps chromium
- name: Every published layer paints, accepts a feature click, opens and closes a card, and switches off
run: node tools/proofs/all-layer-clicks.browser.mjs --width ${{ matrix.width }} --out work/layer-clicks-${{ matrix.width }}
- name: Menus, drawing tools, exports, search, fullscreen and Pipeline controls work
run: node tools/proofs/all-controls.browser.mjs ${{ matrix.width == 393 && '--mobile' || '--desktop' }}
- name: Preserve interaction receipts and screenshots
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
with:
name: layer-clicks-${{ matrix.width }}
path: |
work/layer-clicks-${{ matrix.width }}
work/controls-audit
retention-days: 14
# Android-sized touch Chromium is an emulation, not a physical-device claim.
# CuPy parity is run locally on the RTX GPU through verify-layers-local.ps1;
# a hosted CPU runner must never label its browser test a GPU run.
proof:
runs-on: ubuntu-24.04
# Browser installation and five cold mobile arrivals share this outer
# budget; it must be larger than the browser step's own bounded timeout.
timeout-minutes: 20
defaults:
run:
working-directory: gridatlas
steps:
- name: Checkout the pushed state
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
path: gridatlas
# Beside it, not inside it: the proof resolves ../grid-distance-maths.
- name: Checkout the canonical geodesy beside it
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: Ventusltd/grid-distance-maths
ref: 30d2f817a4b007b7c3be334f3aff308331a848b8
path: grid-distance-maths
persist-credentials: false
# The receiver gate executes every coordinate in the two immutable
# Pipeline products that generate MAP links. Pin the producer rather
# than silently testing whichever corpus happens to be on main.
- name: Checkout the Pipeline map-link corpus beside it
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: Ventusltd/pipelinenews
ref: 3493be1c4ebf3dabbc94135db17f433bb7892a8e
path: pipelinenews
persist-credentials: false
- name: Node
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v4
with:
node-version: '24'
- name: Install the locked browser harness
run: npm ci --ignore-scripts --no-audit --no-fund
- name: Install the one browser this gate exercises
run: npx --no-install playwright install --with-deps chromium
timeout-minutes: 4
- name: Install the pinned Parquet census reader
run: python3 -m pip install --disable-pip-version-check duckdb==1.3.2
# Every digest in this repository is of git blob content, which is LF. A
# runner checks out LF, so a mismatch here is a real mismatch and not a
# line-ending artefact -- unlike a Windows working copy, where it is
# usually the reverse. Four verifiers in this estate hashed the working
# copy rather than the bytes served before that was fixed, the proof
# itself among them.
- name: The composition matches what is declared and hashed
run: node tools/scope/verify-compose.mjs
- name: The composed cartridge passes its own proof
run: node tools/proofs/run-current.mjs
- name: The exact Pipeline 0144 corpus has honest arrival states
run: node tools/proofs/202609040229-arrival-identity-corpus.proof.mjs
- name: Mobile arrival identity, absence, failure and retry are executable
run: node tools/proofs/202609040229-arrival-identity.browser.mjs
timeout-minutes: 10
- name: A docked mobile card cannot intercept a layer control
run: node tools/proofs/menu-bar-mobile-hit.browser.mjs
timeout-minutes: 2
- name: The scope ledger and workflow budget still hold
run: |
node tools/scope/loop.mjs lint
node tools/scope/loop.mjs state
# STATE.md is generated deterministically. If running the generator
# changes it, the committed file was stale, and a stale durable-state
# file is how a session picks up a wrong picture of the estate.
- name: STATE.md was regenerated before it was committed
run: git diff --exit-code -- STATE.md
# Linux compliance, enforced rather than intended.
#
# .gitattributes pins every text file to LF in the working copy as well
# as the blob, which removes the class of defect that appeared four times
# in one evening: a file on disk that is not the file that ships, so
# anything reading the disk answers differently depending on the machine.
#
# A CR at the end of a shebang line is the sharpest version. The kernel
# then looks for an interpreter whose name ends in a carriage return and
# reports "bad interpreter" against a path that plainly exists.
- name: No CRLF survives in a tracked text file
run: |
set -euo pipefail
# git ls-files --eol reports the index and working-tree endings for
# every tracked file. On a runner both must be lf; i/crlf would mean
# a blob carrying CRLF, which is what ships.
if git ls-files --eol | grep -E 'i/crlf|i/mixed|w/crlf|w/mixed'; then
echo "the files listed above are not LF"
exit 1
fi
echo "every tracked text file is LF, on disk and in the blob"
- name: Renormalising changes nothing, so .gitattributes is being obeyed
run: |
set -euo pipefail
git add --renormalize .
if ! git diff --cached --quiet; then
echo "these files are not stored as .gitattributes requires:"
git diff --cached --name-only
exit 1
fi
echo "the index already agrees with .gitattributes"GridAtlas Offshore Coordinate Reconcile Workflow
A GitHub Actions workflow that builds and publishes the site. Runs on push, on a schedule and by hand.
automationgridatlas / .github/workflows/offshore-coordinate-reconcile.yml · lines 1–139 of 139 · Entry point
- What it does
- It builds and publishes the REPD register. Side effects: reads or writes files; starts processes.
- Why it exists in the grid workflow
- Domain stage upstream_foresight (repository name word 'gridatlas'): 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: the REPD register. README: "Offshore coordinates are reconciled by `tools/offshore/reconcile_offshore_coordinates.py`, run annually and on demand by `.github/workflows/offshore-coordinate-reconcile.yml`, writing `atlas/data/offshore-coordinates.json`."
- Inputs & outputs
- In: JSON file offshore-coordinates.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
- Runs `gridatlas/tools/offshore/reconcile_offshore_coordinates.py`.
- Why it matters
- No other file in the estate was found to import it; it is an entry point.
- Application
- gridatlas · .github/workflows · workflow
- Uses
- none found
- Used by
- none found
- Produces
- none declared
- Defines here
- Offshore coordinates reconcile
- Cannot conclude
- Whether this code runs, is used by a live app today, or is correct. This is a static reading.
- Evidence
- gridatlas@98b5004c5eda9f2ed915fb6fca4b9bbcaa426ca5 .github/workflows/offshore-coordinate-reconcile.yml:1-139 · blob b3c205a780d219341eb902d582b68cfb570e873d · GitHub at these lines
- State
- achieves: comment · context: readme_derived · stage: ingest · effects: filesystem, process · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: production_core
name: Offshore coordinates reconcile
# REPD locates almost everything it lists. Wind Offshore is the exception, and
# those leftover rows are the ones whose MAP button reaches the Atlas with no
# point to fly to. The Crown Estate leases the seabed under them and publishes
# the lease polygons, so the gap closes from data the estate already holds.
#
# The register is refreshed by DESNZ on its own cadence and the Crown Estate
# adds leasing rounds occasionally, so this runs once a year on a timer and on
# demand whenever either source changes. It discovers its inputs by glob rather
# than by fixed filename, so a lease file added under a new name is picked up
# without editing this workflow.
#
# It never edits repd.csv. The register is the register; the output is a
# separate, explicitly derived coordinate set.
on:
# Once a year. Deliberately not on the 1st at midnight, and not on the hour.
schedule:
- cron: '23 4 14 2 *' # 14 February, 04:23 UTC
workflow_dispatch:
inputs:
commit:
description: 'Commit the regenerated coordinate set back to main'
type: boolean
default: true
push:
branches: [main]
paths:
- 'tools/offshore/**'
- '.github/workflows/offshore-coordinate-reconcile.yml'
permissions:
contents: write
concurrency:
group: offshore-coordinate-reconcile
cancel-in-progress: false
jobs:
reconcile:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Check out gridatlas
uses: actions/checkout@v4
with:
path: gridatlas
# The register and the lease files live in sibling repositories. Checking
# them out beside this one is what lets the same script run unchanged on a
# developer machine and here.
- name: Check out globalgrid2050 (holds repd.csv)
uses: actions/checkout@v4
with:
repository: Ventusltd/globalgrid2050
path: globalgrid2050
- name: Check out testcode (holds the Crown Estate lease geojson)
uses: actions/checkout@v4
with:
repository: Ventusltd/testcode
path: testcode
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Report what the sources look like today
run: |
echo "repd.csv: $(wc -l < globalgrid2050/repd.csv) lines"
echo "lease geojson:"
find testcode -iname '*crown*.geojson' -print | sed 's/^/ /'
# Check BEFORE writing. --check recomputes from the live sources and
# compares against the COMMITTED file; running it afterwards would only
# ever compare the new file against itself and could never fail.
#
# Fewer recovered projects than the committed set is a regression,
# whether from a renamed lease file, a changed column, or a matcher that
# quietly got narrower. Fail loudly rather than commit it.
- name: Fail if coverage regressed
run: |
python gridatlas/tools/offshore/reconcile_offshore_coordinates.py \
--root "$GITHUB_WORKSPACE" \
--out gridatlas/atlas/data/offshore-coordinates.json \
--check
- name: Reconcile
run: |
python gridatlas/tools/offshore/reconcile_offshore_coordinates.py \
--root "$GITHUB_WORKSPACE" \
--out gridatlas/atlas/data/offshore-coordinates.json
- name: Summarise
run: |
python - <<'PY'
import json
d = json.load(open('gridatlas/atlas/data/offshore-coordinates.json'))
r = d['register']
print(f"register {r['mappable']}/{r['rows']} mappable")
print(f"offshore gaps {r['offshore_unmappable']} of {r['offshore_rows']}")
print(f"recovered {d['recovered']}")
print(f"still unmatched {d['still_unmatched']}")
for row in d['coordinates']:
if row['longitude'] is None:
print(f" {row['repd_ref']:<8}{row['site_name'][:36]:<38} NO LEASE MATCH")
else:
print(f" {row['repd_ref']:<8}{row['site_name'][:36]:<38} {row['longitude']}, {row['latitude']}")
PY
- name: Publish the coordinate set as an artifact
if: always()
uses: actions/upload-artifact@v4
with:
name: offshore-coordinates
path: gridatlas/atlas/data/offshore-coordinates.json
if-no-files-found: warn
- name: Commit the regenerated set
if: github.event_name == 'schedule' || inputs.commit
working-directory: gridatlas
run: |
if git diff --quiet -- atlas/data/offshore-coordinates.json; then
echo "no change"
exit 0
fi
git config user.name "gridatlas-ci"
git config user.email "gridatlas-ci@users.noreply.github.com"
git add atlas/data/offshore-coordinates.json
RECOVERED=$(python -c "import json;print(json.load(open('atlas/data/offshore-coordinates.json'))['recovered'])")
UNMATCHED=$(python -c "import json;print(json.load(open('atlas/data/offshore-coordinates.json'))['still_unmatched'])")
git commit -m "Offshore coordinates: ${RECOVERED} recovered, ${UNMATCHED} still unmatched
Regenerated from DESNZ REPD and the Crown Estate lease geometry by
tools/offshore/reconcile_offshore_coordinates.py. Points are derived
with point-on-surface over the lease polygon and are labelled derived;
repd.csv is not edited by this workflow."
git push