GLOBALGRID2050 / EXPLORE CODE

Part of: Explore Code / Maps, GIS and field navigation / pipelinenews / tools/intelligence/cartridges/map-corpus-contract

Proof and 8 more files

A JavaScript module in the map corpus contract folder of PipelineNews that reads wider fleet, using SHA-256.

680 lines of JavaScript and HTML from pipelinenews, satnav, in 9 files. Topic: Maps, GIS and field navigation. Section 715 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. Proof ingest · pipelinenews / tools/intelligence/cartridges/map-corpus-contract/proof.mjs lines 1–244
  2. Workflow Proof automation · pipelinenews / tools/intelligence/cartridges/map-corpus-contract/workflow-proof.mjs lines 1–34
  3. UI Atlas V9 Deep Links render · pipelinenews / ui/atlas-v9-deep-links.js lines 1–21
  4. Atlas V8 Deep Link transform · pipelinenews / ui/cartridges/202608271329-atlas-v8-deep-link.mjs lines 1–79
  5. Atlas V9 Deep Link transform · pipelinenews / ui/cartridges/202608291310-atlas-v9-deep-link.mjs lines 1–66
  6. Atlas Pointer Deep Link transform · pipelinenews / ui/cartridges/202608291504-atlas-pointer-deep-link.mjs lines 1–92
  7. Preview — Nav interaction · satnav / preview/9698781539e549deaa6ecaa4a2b34610c1f9fd29/nav/app.mjs lines 1–63
  8. Compass transform · satnav / preview/9698781539e549deaa6ecaa4a2b34610c1f9fd29/nav/compass.mjs lines 1–18
  9. SatNav — Scope Page render · satnav / scope/index.html lines 1–63

Proof

A JavaScript module in the map corpus contract folder of PipelineNews that reads wider fleet, using SHA-256.

ingestpipelinenews / tools/intelligence/cartridges/map-corpus-contract/proof.mjs · lines 1–244 of 244 · Entry point · pattern identity (shared by 11 files)

What it does
It loads wider fleet. Defines 7 functions or classes, including check, text, json, sha256, decode. Uses libraries node:child_process, node:crypto, node:fs, node:fs/promises, node:path. Side effects: reads or writes files; starts processes.
Why it exists in the grid workflow
Domain stage upstream_foresight (repository name word 'pipelinenews'): upstream engineering foresight over GB transmission and distribution topology (TSO/DNO, 132kV and above, the REPD pipeline, data centres), which Ventus Ltd states it models for foresight.
Inputs & outputs
In: JSON file 202608291447-registry.json; JSON file 202608270055-8ab1807551bc-v8-fast-projects.json; JSON file 202609030009-wider-fleet.json; command-line arguments.
Downstream impact
Used directly by 1 file: PipelineNews Map Corpus Contract Workflow (pipelinenews).
What it achieves
It is built from the check step (`check`), the text step (`text`) and the JSON step (`json`). Prove every coordinate-bearing source row and the exact Grid receiver API. Its code works with 47.30 MW.
Why it matters
Run by PipelineNews Map Corpus Contract Workflow.
Application
pipelinenews · tools/intelligence/cartridges/map-corpus-contract · JavaScript module
Uses
node:child_process, node:crypto, node:fs, node:fs/promises, node:path, node:url
Used by
run by PipelineNews Map Corpus Contract Workflow (workflow run), mentioned in Standalone (comment link)
Produces
check, text, json, sha256, decode, canonicalName, identity
Defines here
check, text, json, sha256, decode, canonicalName, identity
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
pipelinenews@45c944c8640a9d7ae65edb51d66032ba204f3f46 tools/intelligence/cartridges/map-corpus-contract/proof.mjs:1-244 · blob 7ff6ed82eb38c82c7a6140a5952f3a65ad8a653c · 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
#!/usr/bin/env node
/** Prove every coordinate-bearing source row and the exact Grid receiver API. */
import { execFileSync } from "node:child_process";
import { createHash } from "node:crypto";
import { existsSync } from "node:fs";
import { readFile } from "node:fs/promises";
import { dirname, join, resolve } from "node:path";
import { fileURLToPath, pathToFileURL } from "node:url";

const here = dirname(fileURLToPath(import.meta.url));
const repo = resolve(here, "../../../..");
const releaseId = process.argv[2];
if (!/^\d{12}-pipelinenews$/u.test(releaseId || "")) {
  throw new Error("usage: node proof.mjs <release-id> [--gridatlas <candidate-worktree>]");
}
const gridFlag = process.argv.indexOf("--gridatlas");
const grid = gridFlag >= 0
  ? resolve(process.argv[gridFlag + 1])
  : resolve(repo, "../gridatlas-20260904-30x");
const release = join(repo, "releases", releaseId);

let passed = 0;
const failures = [];
const check = (name, condition, detail = "") => {
  if (condition) {
    passed += 1;
    console.log(`PASS  ${name}`);
  } else {
    failures.push(`${name}${detail ? `: ${detail}` : ""}`);
    console.error(`FAIL  ${name}${detail ? `: ${detail}` : ""}`);
  }
};
const text = (relative) => readFile(join(release, relative), "utf8");
const json = async (relative) => JSON.parse(await text(relative));
const sha256 = (bytes) => createHash("sha256").update(bytes).digest("hex");

const app = await text("assets/202608291447-app.mjs");
const registry = await json("data/202608291447-registry.json");
const entry = registry.supplemental_assets?.map_corpus_contract;
check("active registry carries the MAP corpus contract", Boolean(entry));
check("old wider receipt is explicitly superseded",
  registry.supplemental_assets?.wider_fleet?.ui_state === "superseded");

const senderMatch = app.match(
  /^import \{ buildAtlasV9DeepLink \} from "\.\/(\d{12}-atlas-pointer-deep-link\.mjs)";/mu
);
check("runtime imports exactly one timestamped MAP sender",
  Boolean(senderMatch) && (app.match(/-atlas-pointer-deep-link\.mjs"/gu) || []).length === 1);
check("wider runtime selects the successor registry entry",
  (app.match(/supplemental_assets\?\.map_corpus_contract/gu) || []).length === 1
    && !app.includes("supplemental_assets?.wider_fleet"));
if (!entry || !senderMatch) throw new Error("release wiring is incomplete");

const senderPath = join(release, "assets", senderMatch[1]);
const widerPath = join(release, entry.cartridge.path);
const sender = await import(pathToFileURL(senderPath).href);
const widerRuntime = await import(pathToFileURL(widerPath).href);
const senderBytes = await readFile(senderPath);
const widerBytes = await readFile(widerPath);
check("sender digest and byte count are registry-bound",
  entry.sender.sha256 === sha256(senderBytes) && entry.sender.bytes === senderBytes.length);
check("wider runtime digest and byte count are registry-bound",
  entry.cartridge.sha256 === sha256(widerBytes) && entry.cartridge.bytes === widerBytes.length);
check("sender self-test passes", sender.selfTest().ok,
  sender.selfTest().checks.filter(({ ok }) => !ok).map(({ name }) => name).join(", "));
check("runtime and registry generations agree",
  sender.ATLAS_DEEP_LINK_CONTRACT.generation === entry.generation
    && widerRuntime.WIDER_FLEET_CONTRACT.generation === entry.generation);

const compact = await json("data/202608270055-8ab1807551bc-v8-fast-projects.json");
const decode = (row) => Object.fromEntries(compact.fields.map((field, index) => {
  const value = row[index];
  const dictionary = compact.dictionaries[field];
  return [field, dictionary ? (dictionary[value] ?? "") : value];
}));
const spine = compact.rows.map(decode);
const eligibleSpine = spine.filter(({ geometry_status: state }) => state === "valid");
const sourceWider = await json("data/202609030009-wider-fleet.json");
const outputWider = await json(entry.payload.path);
const corpus = [
  ...eligibleSpine.map((project) => ({ lane: "spine", project })),
  ...sourceWider.map((row) => ({ lane: "wider", project: {
    repd_ref: row.ref || "", name: row.n, technology: row.t, capacity_mw: row.c,
    longitude: row.ll?.[0], latitude: row.ll?.[1], geometry_status: "valid",
  } })),
];
const derivedCorpusCount = eligibleSpine.length + sourceWider.length;
check("source boundary derives 7,652 valid spine rows",
  eligibleSpine.length === 7652, `derived ${eligibleSpine.length}`);
check("source boundary reads all 1,104 wider rows",
  sourceWider.length === 1104, `derived ${sourceWider.length}`);
check("the complete MAP corpus is derived, not sampled",
  corpus.length === derivedCorpusCount && derivedCorpusCount === 8756,
  `derived ${eligibleSpine.length} + ${sourceWider.length} = ${derivedCorpusCount}`);

const expectedOrder = [
  "repd_ref", "project", "technology", "capacity_mw", "latitude", "longitude", "zoom",
];
const canonicalTechnologies = new Set(sender.CANONICAL_PROJECT_TECHNOLOGIES);
const canonicalName = (value) => String(value ?? "").replace(/\s+/gu, " ").trim();
let clickable = 0;
let unresolved = 0;
let malformed = 0;
let processed = 0;
const receiverRows = [];
const malformedExamples = [];
for (const { lane, project } of corpus) {
  processed += 1;
  const href = sender.buildAtlasV9DeepLink(project);
  const ref = String(project.repd_ref ?? "").trim();
  if (!ref) {
    unresolved += 1;
    if (href) malformed += 1;
    continue;
  }
  clickable += 1;
  let ok = Boolean(href);
  let url;
  try { url = new URL(href); } catch { ok = false; }
  if (url) {
    const names = [...url.searchParams.keys()];
    ok = ok
      && url.protocol === "https:"
      && url.hostname === "ventusltd.github.io"
      && url.pathname === "/gridatlas/atlas/"
      && names.join(",") === expectedOrder.join(",")
      && names.every((name) => url.searchParams.getAll(name).length === 1)
      && url.searchParams.get("repd_ref") === ref
      && url.searchParams.get("project") === canonicalName(project.name)
      && url.searchParams.get("technology") === project.technology
      && canonicalTechnologies.has(project.technology)
      && Number(url.searchParams.get("capacity_mw")) === Number(project.capacity_mw)
      && Number(url.searchParams.get("latitude")) === Number(project.latitude)
      && Number(url.searchParams.get("longitude")) === Number(project.longitude)
      && url.searchParams.get("zoom") === "12";
  }
  if (!ok) {
    malformed += 1;
    if (malformedExamples.length < 10) malformedExamples.push(`${lane}:${ref}:${href}`);
  } else {
    receiverRows.push({
      repd_ref: ref,
      longitude: Number(project.longitude), latitude: Number(project.latitude),
      technology: project.technology,
      ...(canonicalName(project.name) ? { name: canonicalName(project.name) } : {}),
      capacity_mw: Number(project.capacity_mw), status: "Pipeline News transport fixture",
      href,
    });
  }
}
check("all 8,756 corpus rows reached a terminal gate decision", processed === derivedCorpusCount);
check("all 8,743 rows with exact identity emit canonical seven-parameter URLs",
  clickable === 8743 && malformed === 0,
  `${clickable} clickable, ${malformed} malformed; ${malformedExamples.join(" | ")}`);
check("the 13 unresolved wider rows fail closed instead of dropping identity",
  unresolved === 13, `found ${unresolved}`);

const identity = (row) => JSON.stringify([row.n, row.rt, row.c, row.ll]);
const outputIdentities = new Set(outputWider.map(identity));
const occurrenceCount = outputWider.reduce(
  (sum, row) => sum + (Number.isInteger(row.source_occurrences) ? row.source_occurrences : 1), 0
);
const sourceRefs = sourceWider.flatMap((row) => row.ref ? [String(row.ref)] : []).sort();
const outputRefs = outputWider.flatMap((row) => Array.isArray(row.repd_records)
  ? row.repd_records.map(({ ref }) => String(ref))
  : (row.ref ? [String(row.ref)] : [])).sort();
const duplicateRows = outputWider.filter((row) => row.source_occurrences > 1);
const sourceCapacity = sourceWider.reduce((sum, row) => sum + row.c, 0);
const outputCapacity = outputWider.reduce((sum, row) => sum + row.c, 0);
check("three duplicate display identities collapse to 1,101 rows",
  outputWider.length === 1101 && outputIdentities.size === outputWider.length
    && duplicateRows.length === 3);
check("deduplication accounts for every one of the 1,104 source rows",
  occurrenceCount === sourceWider.length, `accounted for ${occurrenceCount}`);
check("all 1,091 distinct source references survive deduplication",
  sourceRefs.length === 1091 && JSON.stringify(outputRefs) === JSON.stringify(sourceRefs));
check("only the measured 47.30 MW duplicate capacity is removed",
  Math.abs((sourceCapacity - outputCapacity) - 47.3) < 1e-9,
  `removed ${(sourceCapacity - outputCapacity).toFixed(2)} MW`);
check("the two multi-reference identities expose both exact MAP actions",
  duplicateRows.filter((row) => row.repd_records?.length === 2).length === 2);
const runtimeActions = outputWider.flatMap((row) => widerRuntime.mapLinksForRow(row));
check("active wider runtime retains all 1,091 valid MAP actions",
  runtimeActions.length === 1091
    && new Set(runtimeActions.map(({ ref }) => ref)).size === 1091);

const receiverModuleRelative = entry.receiver_contract.module;
const receiverModulePath = join(grid, receiverModuleRelative);
check("pinned Grid receiver module is available", existsSync(receiverModulePath), receiverModulePath);
if (!existsSync(receiverModulePath)) throw new Error("Grid candidate is required for contract proof");
const receiverModuleBytes = await readFile(receiverModulePath);
check("Grid receiver module matches pinned candidate bytes",
  receiverModuleBytes.length === entry.receiver_contract.module_bytes
    && sha256(receiverModuleBytes) === entry.receiver_contract.module_sha256);
const candidateHead = execFileSync("git", ["-C", grid, "rev-parse", "HEAD"], { encoding: "utf8" }).trim();
check("Grid checkout is the reviewed receiver candidate",
  candidateHead === entry.receiver_contract.candidate_commit, candidateHead);
const receiver = await import(pathToFileURL(receiverModulePath).href);
check("sender and receiver canonical vocabularies are byte-for-byte equal",
  JSON.stringify(sender.CANONICAL_PROJECT_TECHNOLOGIES)
    === JSON.stringify(receiver.PROJECT_TECHNOLOGIES));
const uniqueReceiverRefs = new Set(receiverRows.map(({ repd_ref }) => repd_ref));
check("the complete clickable corpus has unique exact identities",
  uniqueReceiverRefs.size === receiverRows.length,
  `${receiverRows.length - uniqueReceiverRefs.size} repeated refs`);

const receiverInput = receiverRows.map(({ href: ignored, ...row }) => row);
const receiverInputBytes = Buffer.from(JSON.stringify(receiverInput));
const provenance = {
  source_id: "project_register",
  release: `${releaseId}:all-map-senders`,
  sha256: sha256(receiverInputBytes),
  bytes: receiverInputBytes.length,
};
let receiverAccepted = 0;
try {
  const receiverRegister = receiver.createProjectRegister(receiverInput, provenance);
  const receiverIndex = receiver.createProjectIndex(receiverRegister);
  for (const row of receiverRows) {
    const arrival = receiver.parseProjectDeepLink(row.href, receiverIndex);
    if (arrival.selection.repd_ref === row.repd_ref
        && arrival.project.technology === row.technology
        && arrival.diagnostics.length === 0) receiverAccepted += 1;
  }
} catch (error) {
  failures.push(`receiver rejected corpus: ${error.stack || error}`);
}
check("Grid candidate parses every emitted URL without fallback or diagnostics",
  receiverAccepted === receiverRows.length,
  `${receiverAccepted} of ${receiverRows.length}`);

console.log(`\n${passed}/${passed + failures.length} checks passed`);
console.log(JSON.stringify({
  source_rows: derivedCorpusCount,
  clickable_rows: clickable,
  unresolved_rows: unresolved,
  display_identities: outputWider.length,
  receiver_accepted: receiverAccepted,
}));
if (failures.length) {
  console.error("\nFAILURES");
  failures.forEach((failure) => console.error(`  ${failure}`));
  process.exit(1);
}

Workflow Proof

A JavaScript module in the map corpus contract folder of PipelineNews.

automationpipelinenews / tools/intelligence/cartridges/map-corpus-contract/workflow-proof.mjs · lines 1–34 of 34 · Entry point

What it does
It loads data. Uses libraries node:fs/promises, node:path, node:url. Side effects: reads or writes files; starts processes.
Why it exists in the grid workflow
Domain stage upstream_foresight (repository name word 'pipelinenews'): upstream engineering foresight over GB transmission and distribution topology (TSO/DNO, 132kV and above, the REPD pipeline, data centres), which Ventus Ltd states it models for foresight.
Downstream impact
It is itself an entry point (JavaScript module); 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
pipelinenews · tools/intelligence/cartridges/map-corpus-contract · JavaScript module
Uses
node:fs/promises, node:path, node:url
Used by
none found
Produces
none declared
Defines here
none
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
pipelinenews@45c944c8640a9d7ae65edb51d66032ba204f3f46 tools/intelligence/cartridges/map-corpus-contract/workflow-proof.mjs:1-34 · blob d31d57f16ddeb090e476474cd317fec1589fc824 · GitHub at these lines
State
achieves: name · context: readme_derived · stage: ingest · effects: filesystem, process · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: production_core
#!/usr/bin/env node
import { readFile } from "node:fs/promises";
import { dirname, resolve } from "node:path";
import { fileURLToPath } from "node:url";

const here = dirname(fileURLToPath(import.meta.url));
const repo = resolve(here, "../../../..");
const workflow = await readFile(resolve(
  repo, ".github/workflows/202609040044-map-corpus-contract.yml"
), "utf8");
const required = [
  "permissions:\n  contents: read",
  "ref: b73247803377233069acfeff415ecad4e8391cb2",
  "persist-credentials: false",
  "python3 tools/intelligence/release_builder.py --check 202609040044-pipelinenews",
  "node tools/intelligence/cartridges/map-corpus-contract/proof.mjs",
  "--gridatlas .receiver/gridatlas",
];
const forbidden = [
  "schedule:", "pages: write", "contents: write", "id-token: write",
  "git push", "pull_request_target:", "actions/create-github-app-token",
];
const failures = [
  ...required.filter((token) => !workflow.includes(token)).map((token) => `missing ${token}`),
  ...forbidden.filter((token) => workflow.includes(token)).map((token) => `forbidden ${token}`),
];
if ((workflow.match(/persist-credentials: false/gu) || []).length !== 2) {
  failures.push("both checkouts must suppress persisted credentials");
}
if (failures.length) {
  failures.forEach((failure) => console.error(`FAIL  ${failure}`));
  process.exit(1);
}
console.log("PASS  bounded read-only MAP corpus workflow");

UI Atlas V9 Deep Links

A JavaScript file in PipelineNews using data from the GridAtlas repository. It builds atlas v9 URL (`buildAtlasV9Url`).

renderpipelinenews / ui/atlas-v9-deep-links.js · lines 1–21 of 21 · Entry point

What it does
Defines buildAtlasV9Url. Side effects: changes the web page (DOM).
Why it exists in the grid workflow
Domain stage upstream_foresight (path word 'atlas'): upstream engineering foresight over GB transmission and distribution topology (TSO/DNO, 132kV and above, the REPD pipeline, data centres), which Ventus Ltd states it models for foresight.
Downstream impact
Used directly by 1 file: PipelineNews Sync Atlas V9 Deep Links Workflow (pipelinenews).
What it achieves
Defines `buildAtlasV9Url`.
Why it matters
Run by PipelineNews Sync Atlas V9 Deep Links Workflow.
Application
pipelinenews · ui · script
Uses
none found
Used by
run by PipelineNews Sync Atlas V9 Deep Links Workflow (workflow run)
Produces
buildAtlasV9Url
Defines here
buildAtlasV9Url
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
pipelinenews@45c944c8640a9d7ae65edb51d66032ba204f3f46 ui/atlas-v9-deep-links.js:1-21 · blob 99737004213b41e74ccedf0a28db7124256bf3ce · GitHub at these lines
State
achieves: name · context: readme_derived · stage: output · effects: dom · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: production_core
(() => {
  'use strict';
  const RELEASE_ID = "202608300453-atlas-v9";
  const BASE_URL = "https://ventusltd.github.io/gridatlas/202608300453-atlas-v9/";
  const TECHNOLOGIES = new Set(['solar', 'bess', 'wind_onshore', 'wind_offshore']);
  const REPD_REF = /^[A-Za-z0-9-]{1,40}$/;

  function buildAtlasV9Url(project) {
    const repdRef = String(project?.repd_ref ?? project?.repdRef ?? '').trim();
    const technology = String(project?.technology ?? '').trim();
    if (!REPD_REF.test(repdRef) || !TECHNOLOGIES.has(technology)) return null;
    const query = new URLSearchParams({ repd_ref: repdRef, technology });
    for (const key of ['name', 'longitude', 'latitude']) {
      const value = project?.[key];
      if (value !== undefined && value !== null && String(value).trim()) query.set(key, String(value).trim());
    }
    return `${BASE_URL}?${query.toString()}`;
  }

  window.GridAtlasV9DeepLinks = Object.freeze({ releaseId: RELEASE_ID, baseUrl: BASE_URL, build: buildAtlasV9Url });
})();

Atlas V8 Deep Link

A JavaScript module in the cartridges folder of PipelineNews that works with solar and uses data from the GridAtlas repository.

Set aside from the main view: 91% of its lines are the same as releases/javascript/202608271329-atlas-v8-deep-link-cartridge.js (pipelinenews), which stays. (near-copy-of, proposed by families.py). 90% of lines shared with JavaScript Atlas V8 Deep Link Cartridge; read that one first. All set-aside files, with reasons. Nothing was deleted.

Evidence
  • line-jaccard 0.9077 to pipelinenews@45c944c8640a9d7ae65edb51d66032ba204f3f46 releases/javascript/202608271329-atlas-v8-deep-link-cartridge.js:1-79 d016cc46d993b48c9f8e3423da122a2ae2e295b2
  • sha256 3510181013d4bc21f2b642af2b50a65df0f52f481f144152c8c37759f9949393
  • target sha256 d8e997acea1ed6c628e4d69f27653a5fe9a21bb459ff95d4ee0a7d040b431ff7
  • group of 2 (identity.json near-copy edges >= 0.9)
  • canonical rule: reachable, newest stamp, core repo, most lines

transformpipelinenews / ui/cartridges/202608271329-atlas-v8-deep-link.mjs · lines 1–79 of 79 · version 2026-08-27 13:29 · Not reached from any entry point (candidate for review) · pattern buildAtlasV8DeepLink (shared by 2 files)

What it does
It calculates solar. Defines buildAtlasV8DeepLink.
Why it exists in the grid workflow
Domain stage upstream_foresight (path word 'atlas'): 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: solar.
Downstream impact
Used directly by 1 file: Compare Atlas V8 Deep Links (pipelinenews).
What it achieves
Defines `buildAtlasV8DeepLink`.
Why it matters
Imported by Compare Atlas V8 Deep Links.
Application
pipelinenews · ui/cartridges · JavaScript module
Uses
none found
Used by
imported by Compare Atlas V8 Deep Links (import)
Produces
ATLAS_V8_DEEP_LINK_CONTRACT, buildAtlasV8DeepLink
Defines here
buildAtlasV8DeepLink
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
pipelinenews@45c944c8640a9d7ae65edb51d66032ba204f3f46 ui/cartridges/202608271329-atlas-v8-deep-link.mjs:1-79 · blob 5eba768e1c46d11a01d2e4073f1c3ace81ca1823 · GitHub at these lines
State
achieves: name · context: readme_derived · stage: transform · effects: none found · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: unreached_review
export const ATLAS_V8_DEEP_LINK_CONTRACT = Object.freeze({
  schema: "pipelinenews.atlas-v8-deep-link-cartridge.v1",
  generation: "202608271329",
  parent_generation: "202608270844",
  trusted_reference: Object.freeze({
    application: "GlobalGrid2050 UK Renewables Pipeline V9.6.2",
    function: "atlasUrlV9_5_1",
    source_sha256: "f0c63602d85a5726aa38106157e8d3d6924d0ab1a684194ffe2de93df1c6d823",
  }),
  target: Object.freeze({
    protocol: "https:",
    hostname: "globalgrid2050.com",
    pathname: "/repd_grid_atlasv8/",
    base_url: "https://ventusltd.github.io/gridatlas/202608300453-atlas-v9/",
  }),
  eligibility: Object.freeze({
    field: "geometry_status",
    equals: "valid",
    ineligible_result: "",
    presentation: "NO MAP",
  }),
  identity_anchor: "repd_ref",
  query_parameter_order: Object.freeze([
    "repd_ref",
    "project",
    "technology",
    "capacity_mw",
    "latitude",
    "longitude",
    "zoom",
  ]),
  project_field_by_parameter: Object.freeze({
    repd_ref: "repd_ref",
    project: "name",
    technology: "technology",
    capacity_mw: "capacity_mw",
    latitude: "latitude",
    longitude: "longitude",
  }),
  fixed_parameters: Object.freeze({ zoom: "12" }),
  receiver_contract: Object.freeze({
    canonical_identity: Object.freeze(["repd_ref", "technology"]),
    display_context: Object.freeze(["project", "capacity_mw"]),
    coordinate_fallback: Object.freeze(["longitude", "latitude", "zoom"]),
    query_context_never_establishes_identity: true,
  }),
  sentinels: Object.freeze({
    east_pye: Object.freeze({
      repd_ref: "17494",
      expected_url: "https://ventusltd.github.io/gridatlas/202608300453-atlas-v9/?repd_ref=17494&project=East+Pye+Solar+Farm&technology=solar&capacity_mw=500&latitude=52.4733298&longitude=1.2432764&zoom=12",
    }),
    beacon_fen: Object.freeze({
      repd_ref: "13599",
      expected_url: "https://ventusltd.github.io/gridatlas/202608300453-atlas-v9/?repd_ref=13599&project=Beacon+Fen+Energy+Park&technology=solar&capacity_mw=400&latitude=52.9989987&longitude=-0.4092339&zoom=12",
    }),
    invalid_geometry: Object.freeze({
      repd_ref: "12780",
      expected_url: "",
      presentation: "NO MAP",
    }),
  }),
  lifecycle: "write-once; behavioural changes require a later timestamped cartridge",
  deployment: "not-authorised",
});

export function buildAtlasV8DeepLink(project) {
  if (project?.[ATLAS_V8_DEEP_LINK_CONTRACT.eligibility.field]
      !== ATLAS_V8_DEEP_LINK_CONTRACT.eligibility.equals) {
    return ATLAS_V8_DEEP_LINK_CONTRACT.eligibility.ineligible_result;
  }

  const url = new URL(ATLAS_V8_DEEP_LINK_CONTRACT.target.base_url);
  for (const parameter of ATLAS_V8_DEEP_LINK_CONTRACT.query_parameter_order) {
    const fixed = ATLAS_V8_DEEP_LINK_CONTRACT.fixed_parameters[parameter];
    const field = ATLAS_V8_DEEP_LINK_CONTRACT.project_field_by_parameter[parameter];
    url.searchParams.set(parameter, fixed ?? project[field]);
  }
  return url.href;
}

Atlas V9 Deep Link

A JavaScript module in the cartridges folder of PipelineNews that works with the Renewable Energy Planning Database (REPD) register and uses data from the GridAtlas repository.

transformpipelinenews / ui/cartridges/202608291310-atlas-v9-deep-link.mjs · lines 1–66 of 66 · version 2026-08-29 13:10 · Not reached from any entry point (candidate for review) · pattern buildAtlasV9DeepLink (shared by 9 files)

What it does
It calculates the REPD register. Defines buildAtlasV9DeepLink.
Why it exists in the grid workflow
Domain stage upstream_foresight (path word 'atlas'): 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.
What it achieves
Defines `buildAtlasV9DeepLink`.
Why it matters
No other file in the estate was found to import it.
Application
pipelinenews · ui/cartridges · JavaScript module
Uses
none found
Used by
none found
Produces
ATLAS_V9_DEEP_LINK_CONTRACT, buildAtlasV9DeepLink
Defines here
buildAtlasV9DeepLink
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
pipelinenews@45c944c8640a9d7ae65edb51d66032ba204f3f46 ui/cartridges/202608291310-atlas-v9-deep-link.mjs:1-66 · blob 4f5a2770dba354c1434d78cea66f8a3879b13bda · GitHub at these lines
State
achieves: name · context: readme_derived · stage: transform · effects: none found · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: unreached_review
export const ATLAS_V9_DEEP_LINK_CONTRACT = Object.freeze({
  schema: "pipelinenews.atlas-v9-deep-link-cartridge.v1",
  generation: "202608291310",
  parent_generation: "202608282200",
  receiver_release: Object.freeze({
    repository: "Ventusltd/gridatlas",
    generation: "202608291239",
    release_id: "202608291239-atlas-v9",
    source_commit: "ac00b9f326187a1e3bfabb5b45397210850c6052",
    publication_commit: "1898184ccbf52ca836cf1482362fc5933baf3e8d",
    pointer_commit: "936a31f703d31bd975af22d7349708d68a143d56",
    public_browser_claim_sha256: "a398b9e39174d5b8efd1fea9eb906b53aaf84642917fea6126d8d797f1e7eea8",
  }),
  target: Object.freeze({
    protocol: "https:",
    hostname: "ventusltd.github.io",
    pathname: "/gridatlas/202608291239-atlas-v9/",
    base_url: "https://ventusltd.github.io/gridatlas/202608300453-atlas-v9/",
  }),
  eligibility: Object.freeze({
    field: "geometry_status",
    equals: "valid",
    ineligible_result: "",
    presentation: "NO MAP",
  }),
  identity_anchor: "repd_ref",
  query_parameter_order: Object.freeze(["repd_ref"]),
  receiver_contract: Object.freeze({
    canonical_identity: Object.freeze(["repd_ref"]),
    selected_text_pattern: "REPD <repd_ref> selected",
    map_failure_must_preserve_selection: true,
    query_context_never_establishes_identity: true,
  }),
  sentinels: Object.freeze({
    east_pye: Object.freeze({
      repd_ref: "17494",
      expected_url: "https://ventusltd.github.io/gridatlas/202608300453-atlas-v9/?repd_ref=17494",
      expected_selection: "REPD 17494 selected",
    }),
    beacon_fen: Object.freeze({
      repd_ref: "13599",
      expected_url: "https://ventusltd.github.io/gridatlas/202608300453-atlas-v9/?repd_ref=13599",
      expected_selection: "REPD 13599 selected",
    }),
    invalid_geometry: Object.freeze({
      repd_ref: "12780",
      expected_url: "",
      presentation: "NO MAP",
    }),
  }),
  lifecycle: "write-once; behavioural changes require a later timestamped cartridge",
  classification: "IMMUTABLE_TIMESTAMPED_RELEASE",
  publication_control: "POINTER_AND_ATTESTATION_EXTERNAL",
});

export function buildAtlasV9DeepLink(project) {
  if (project?.[ATLAS_V9_DEEP_LINK_CONTRACT.eligibility.field]
      !== ATLAS_V9_DEEP_LINK_CONTRACT.eligibility.equals) {
    return ATLAS_V9_DEEP_LINK_CONTRACT.eligibility.ineligible_result;
  }
  const repdRef = String(project?.repd_ref ?? "").trim();
  if (!/^\d+$/u.test(repdRef)) return "";
  const url = new URL(ATLAS_V9_DEEP_LINK_CONTRACT.target.base_url);
  url.searchParams.set(ATLAS_V9_DEEP_LINK_CONTRACT.identity_anchor, repdRef);
  return url.href;
}

Atlas Pointer Deep Link

A JavaScript module in the cartridges folder of PipelineNews that uses SHA-256. It builds atlas v9 deep link (`buildAtlasV9DeepLink`).

transformpipelinenews / ui/cartridges/202608291504-atlas-pointer-deep-link.mjs · lines 1–92 of 92 · version 2026-08-29 15:04 · Not reached from any entry point (candidate for review) · pattern buildAtlasV9DeepLink (shared by 9 files)

What it does
It calculates its inputs. Defines invariant, buildAtlasV9DeepLink.
Why it exists in the grid workflow
Domain stage upstream_foresight (path word 'atlas'): 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.
What it achieves
Defines `invariant` and `buildAtlasV9DeepLink`.
Why it matters
No other file in the estate was found to import it.
Application
pipelinenews · ui/cartridges · JavaScript module
Uses
none found
Used by
none found
Produces
ATLAS_V9_DEEP_LINK_CONTRACT, buildAtlasV9DeepLink
Defines here
invariant, buildAtlasV9DeepLink
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
pipelinenews@45c944c8640a9d7ae65edb51d66032ba204f3f46 ui/cartridges/202608291504-atlas-pointer-deep-link.mjs:1-92 · blob 2b1ac94d84cdc824145cd32bcd323ef9f4da9d2a · GitHub at these lines
State
achieves: name · context: readme_derived · stage: transform · effects: none found · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: unreached_review
const GRIDATLAS_RECEIVER = Object.freeze(__GRIDATLAS_RECEIVER_JSON__);

function invariant(condition, message) {
  if (!condition) throw new Error(`Atlas receiver contract: ${message}`);
}

invariant(GRIDATLAS_RECEIVER.schema === "pipelinenews.gridatlas-pointer-receipt.v1", "wrong pointer receipt schema");
invariant(GRIDATLAS_RECEIVER.classification === "VERIFIED_GRIDATLAS_LIVE_POINTER", "pointer is not verified live");
invariant(GRIDATLAS_RECEIVER.receiver?.query_parameter === "repd_ref", "identity parameter changed");
const receiverUrl = new URL(GRIDATLAS_RECEIVER.receiver.base_url);
invariant(receiverUrl.protocol === "https:", "receiver is not HTTPS");
invariant(receiverUrl.hostname === "ventusltd.github.io", "receiver hostname changed");
invariant(receiverUrl.pathname === GRIDATLAS_RECEIVER.receiver.route, "receiver route mismatch");
invariant(receiverUrl.search === "" && receiverUrl.hash === "", "receiver base must not contain query or fragment");

export const ATLAS_V9_DEEP_LINK_CONTRACT = Object.freeze({
  schema: "pipelinenews.atlas-pointer-deep-link-cartridge.v1",
  generation: "202608291504",
  parent_generation: "202608291310",
  receiver_pointer: Object.freeze({
    repository: GRIDATLAS_RECEIVER.repository,
    resolved_commit: GRIDATLAS_RECEIVER.resolved_commit,
    path: GRIDATLAS_RECEIVER.pointer.path,
    bytes: GRIDATLAS_RECEIVER.pointer.bytes,
    sha256: GRIDATLAS_RECEIVER.pointer.sha256,
  }),
  receiver_release: Object.freeze({
    generation: GRIDATLAS_RECEIVER.receiver.generation,
    release_id: GRIDATLAS_RECEIVER.receiver.release_id,
    source_commit: GRIDATLAS_RECEIVER.receiver.source_commit,
    publication_commit: GRIDATLAS_RECEIVER.receiver.publication_commit,
  }),
  target: Object.freeze({
    protocol: receiverUrl.protocol,
    hostname: receiverUrl.hostname,
    pathname: receiverUrl.pathname,
    base_url: receiverUrl.href,
  }),
  eligibility: Object.freeze({
    field: "geometry_status",
    equals: "valid",
    ineligible_result: "",
    presentation: "NO MAP",
  }),
  identity_anchor: "repd_ref",
  query_parameter_order: Object.freeze(["repd_ref"]),
  receiver_contract: Object.freeze({
    canonical_identity: Object.freeze(["repd_ref"]),
    contractual_golden_repd_ref: GRIDATLAS_RECEIVER.receiver.golden_repd_ref,
    selection_evidence: Object.freeze(["receiver URL", "selected source", "receiver card"]),
    query_context_never_establishes_identity: true,
  }),
  sentinels: Object.freeze({
    contractual_golden: Object.freeze({
      repd_ref: GRIDATLAS_RECEIVER.receiver.golden_repd_ref,
      expected_url: `${receiverUrl.href}?repd_ref=${GRIDATLAS_RECEIVER.receiver.golden_repd_ref}`,
    }),
    east_pye_when_present: Object.freeze({
      repd_ref: "17494",
      expected_url: `${receiverUrl.href}?repd_ref=17494`,
    }),
    beacon_fen_when_present: Object.freeze({
      repd_ref: "13599",
      expected_url: `${receiverUrl.href}?repd_ref=13599`,
    }),
    invalid_geometry: Object.freeze({
      repd_ref: "12780",
      expected_url: "",
      presentation: "NO MAP",
    }),
  }),
  fallback: Object.freeze({
    ...GRIDATLAS_RECEIVER.fallback,
    activation: "EXTERNAL_POINTER_ROLLBACK_ONLY",
    rule: "Any failed V9 gate preserves the last-known-green V8 public candidate; it never rewrites this immutable release.",
  }),
  lifecycle: "write-once; behavioural changes require a later timestamped cartridge",
  classification: "IMMUTABLE_TIMESTAMPED_RELEASE",
  publication_control: "POINTER_AND_ATTESTATION_EXTERNAL",
});

export function buildAtlasV9DeepLink(project) {
  if (project?.[ATLAS_V9_DEEP_LINK_CONTRACT.eligibility.field]
      !== ATLAS_V9_DEEP_LINK_CONTRACT.eligibility.equals) {
    return ATLAS_V9_DEEP_LINK_CONTRACT.eligibility.ineligible_result;
  }
  const repdRef = String(project?.repd_ref ?? "").trim();
  if (!/^\d+$/u.test(repdRef)) return "";
  const url = new URL(ATLAS_V9_DEEP_LINK_CONTRACT.target.base_url);
  url.searchParams.set(ATLAS_V9_DEEP_LINK_CONTRACT.identity_anchor, repdRef);
  return url.href;
}

Preview — Nav

A JavaScript module in SatNav that sets target (`setTarget`). It sets target (`setTarget`) and is built from the stop step (`stop`).

interactionsatnav / preview/9698781539e549deaa6ecaa4a2b34610c1f9fd29/nav/app.mjs · lines 1–63 of 63 · Not reached from any entry point (candidate for review) · pattern setTarget (shared by 3 files)

What it does
Defines el, setTarget, render, acquire, stop. Side effects: changes the web page (DOM).
Why it exists in the grid workflow
Domain stage field_execution (path word 'nav'): on-road and off-road field navigation to the farm gate (access gates, terrain slope, ground-bearing limits, electrical hazards), as Ventus Ltd describes its SatNav work.
What it achieves
Defines `setTarget`, `render`, `acquire` and 1 more. It responds to submit, release and visibilitychange events.
Why it matters
No other file in the estate was found to import it.
Application
satnav · preview/9698781539e549deaa6ecaa4a2b34610c1f9fd29/nav · JavaScript module
Uses
SatNav Place (import), Compass (import)
Used by
none found
Produces
el, setTarget, render, acquire, stop
Defines here
el, setTarget, render, acquire, stop
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
satnav@ea69138ca5d5a9632233220e5cbe1cd3f1c83432 preview/9698781539e549deaa6ecaa4a2b34610c1f9fd29/nav/app.mjs:1-63 · blob 9ae118926d62b1bc8741ae73235e79a9e29378d1 · GitHub at these lines
State
achieves: name · context: readme_derived · stage: output · effects: dom · domain stage: field_execution · users: EPC_contractor, landowner_planner · canonical: unreached_review
import {parseDestination} from './place.mjs';
import {guide,fixQuality} from './compass.mjs';
const el=id=>document.getElementById(id);
let target=null,fix=null,watch=null,wake=null,generation=0,wakePending=false;
function setTarget(t){
  target=t;el('destination').textContent=t?(t.name||'Selected coordinates'):'No destination selected';
  if(t){el('latitude').value=t.coordinates[1];el('longitude').value=t.coordinates[0];el('name').value=t.name;}
  render();
}
function render(){
  const now=Date.now(),quality=fixQuality(fix,now);
  const usable=quality==='usable',fresh=usable||quality==='poor';
  const g=usable?guide(fix,target,now):null;
  el('distance').textContent=g?(g.distanceM>=1000?(g.distanceM/1000).toFixed(2)+' km':Math.round(g.distanceM)+' m'):'—';
  el('bearing').textContent=g?.bearingDeg!=null?Math.round(g.bearingDeg)%360+'°':'—';
  el('arrow').style.visibility=g?.bearingDeg!=null?'visible':'hidden';
  if(g?.bearingDeg!=null)el('arrow').style.transform='rotate('+g.bearingDeg+'deg)';
  el('position').textContent=fresh?'Position '+fix.latitude.toFixed(5)+', '+fix.longitude.toFixed(5):'Position unavailable';
  el('accuracy').textContent=fresh?'Accuracy ±'+Math.round(fix.accuracyM)+' m'+(!usable?' — too uncertain for guidance':g?.withinAccuracy?' — target within uncertainty; access unverified':''):'Accuracy unavailable';
  el('course').textContent=usable&&fix.heading!==null?'Course over ground '+Math.round(fix.heading)%360+'° (north-up display)':'North-up; course unavailable';
  if(watch!==null&&fix)el('status').textContent=!fresh?'Location stale':!usable?'Poor location accuracy':'Location fix received';
}
try{const t=parseDestination(location.search);if(t){if(t.mode!=='compass')throw new Error('Only compass mode is available');setTarget(t);}}catch(e){el('targetError').textContent=e.message;}
el('target').addEventListener('submit',e=>{
  e.preventDefault();
  try{
    const p=new URLSearchParams({latitude:el('latitude').value,longitude:el('longitude').value,name:el('name').value});
    setTarget(parseDestination(p.toString()));el('targetError').textContent='';
  }catch(err){setTarget(null);el('targetError').textContent=err.message;}
});
async function acquire(){
  const token=generation;if(watch===null||wake||wakePending||document.hidden)return;
  wakePending=true;
  try{const w=await navigator.wakeLock?.request('screen');if(token!==generation||watch===null){await w?.release();return;}wake=w;w?.addEventListener('release',()=>{if(wake===w)wake=null;});}
  catch{}finally{wakePending=false;}
}
function stop(message='Location stopped'){
  generation++;if(watch!==null)navigator.geolocation?.clearWatch(watch);
  watch=null;fix=null;wake?.release().catch(()=>{});wake=null;
  el('status').textContent=message;el('start').disabled=false;el('stop').disabled=true;render();
}
el('start').onclick=()=>{
  if(watch!==null)return;
  if(!isSecureContext||!navigator.geolocation){stop('Location unsupported or insecure context');return;}
  const token=++generation;el('status').textContent='Requesting location';
  try{
    watch=navigator.geolocation.watchPosition(p=>{
      if(token!==generation)return;
      const c=p.coords;
      if(![c.longitude,c.latitude,c.accuracy,p.timestamp].every(Number.isFinite)||Math.abs(c.longitude)>180||Math.abs(c.latitude)>90||c.accuracy<0){fix=null;el('status').textContent='Invalid location fix';render();return;}
      fix={longitude:c.longitude,latitude:c.latitude,accuracyM:c.accuracy,timestampMs:p.timestamp,heading:Number.isFinite(c.heading)&&c.heading>=0&&c.heading<360&&Number.isFinite(c.speed)&&c.speed>0?c.heading:null};
      render();
    },e=>{
      if(token!==generation)return;
      if(e.code===1){stop('Location permission denied');return;}
      fix=null;el('status').textContent=e.code===3?'Location request timed out':'Location unavailable';render();
    },{enableHighAccuracy:true,maximumAge:1000,timeout:10000});
    el('start').disabled=true;el('stop').disabled=false;acquire();
  }catch{stop('Location request unavailable');}
};
el('stop').onclick=()=>stop();
document.addEventListener('visibilitychange',()=>{if(!document.hidden){acquire();render();}});
window.addEventListener('pagehide',()=>stop());setInterval(render,1000);

Compass

A JavaScript module in the nav folder of SatNav that works with fix quality (`fixQuality`). It is built from the fix quality helper (`fixQuality`) and the guide step (`guide`).

transformsatnav / preview/9698781539e549deaa6ecaa4a2b34610c1f9fd29/nav/compass.mjs · lines 1–18 of 18 · Not reached from any entry point (candidate for review) · pattern fixQuality (shared by 2 files)

What it does
It calculates its inputs. Defines fixQuality, guide.
Why it exists in the grid workflow
Domain stage field_execution (path word 'compass'): on-road and off-road field navigation to the farm gate (access gates, terrain slope, ground-bearing limits, electrical hazards), as Ventus Ltd describes its SatNav work.
Downstream impact
Used directly by 1 file: Preview — Nav (satnav).
What it achieves
Its `fixQuality` function gives location fix quality from longitude latitude accuracy timestamp fix and optional reference time ms (VEDIC: check location fix).
Why it matters
Imported by Preview — Nav.
Application
satnav · preview/9698781539e549deaa6ecaa4a2b34610c1f9fd29/nav · JavaScript module
VEDIC
CHECK LOCATION FIX (GG2050-VEDIC-000062): SatNav · Location and navigation data. longitude_latitude_accuracy_timestamp_fix, reference_time_ms_optional → location_fix_quality
Uses
../vendor/grid-distance-maths/src/geodesy.mjs
Used by
imported by Preview — Nav (import)
Produces
MAX_AGE_MS, fixQuality, guide
Defines here
fixQuality, guide
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
satnav@ea69138ca5d5a9632233220e5cbe1cd3f1c83432 preview/9698781539e549deaa6ecaa4a2b34610c1f9fd29/nav/compass.mjs:1-18 · blob 9813532f1df0ee0a6e99ab6952087d64814586ce · GitHub at these lines
State
achieves: code · context: readme_derived · stage: transform · effects: none found · domain stage: field_execution · users: EPC_contractor, landowner_planner · canonical: unreached_review
import {distanceKm,initialBearingDeg} from '../vendor/grid-distance-maths/src/geodesy.mjs';
export const MAX_AGE_MS=10000, MAX_ACCURACY_M=30;
export function fixQuality(fix,now=Date.now()){
  if(!fix)return 'missing';
  const {longitude,latitude,accuracyM,timestampMs}=fix;
  if(![longitude,latitude,accuracyM,timestampMs,now].every(Number.isFinite)||accuracyM<0||Math.abs(longitude)>180||Math.abs(latitude)>90)return 'invalid';
  const age=now-timestampMs;
  if(age<0||age>MAX_AGE_MS)return 'stale';
  return accuracyM>MAX_ACCURACY_M?'poor':'usable';
}
export function guide(fix,target,now=Date.now()){
  if(fixQuality(fix,now)!=='usable'||!Array.isArray(target?.coordinates)||target.coordinates.length!==2)return null;
  const {longitude,latitude,accuracyM,timestampMs}=fix;
  const [lon,lat]=target.coordinates;
  if(![lon,lat].every(Number.isFinite)||Math.abs(lon)>180||Math.abs(lat)>90)return null;
  const distanceM=distanceKm(longitude,latitude,lon,lat)*1000;
  return {distanceM,bearingDeg:distanceM<=accuracyM?null:initialBearingDeg(longitude,latitude,lon,lat),accuracyM,fixAgeMs:now-timestampMs,withinAccuracy:distanceM<=accuracyM,kind:'straight_line',accessStatus:'unverified'};
}

SatNav — Scope Page

A web page that draws pipeline headlines snapshot, solar, battery storage (BESS) and LiDAR terrain, and uses data from the GridAtlas, kuiper-belt and ventus-grid-engine repositories. Published at https://ventusltd.github.io/satnav/scope/.

rendersatnav / scope/index.html · lines 1–63 of 63 · Entry point · pattern safeLink (shared by 3 files)

What it does
It draws pipeline headlines snapshot, solar, battery storage (BESS) and LiDAR terrain. Defines safeLink, valid, render, setReading, load. Side effects: changes the web page (DOM); makes network requests.
Why it exists in the grid workflow
Domain stage field_execution (repository name word 'satnav'): on-road and off-road field navigation to the farm gate (access gates, terrain slope, ground-bearing limits, electrical hazards), as Ventus Ltd describes its SatNav work. Domain terms in the code: solar, battery storage (BESS), LiDAR terrain.
Inputs & outputs
In: data source: gridatlas data; data source: kuiper-belt data; data source: ventus-grid-engine data; data source: globalgrid2050 data; JSON file pipeline_headlines.json; JSON file pipeline_headlines.snapshot.json. Out: web page.
Downstream impact
Used directly by 3 files: Build (cosmic); SatNav Public Scope Served Workflow (satnav); SatNav Public Scope Workflow (satnav). Reached from 4 other entry points, including Cadastre 27 (cosmic); Ship (cosmic); Test Build (cosmic). It is itself an entry point, published at https://ventusltd.github.io/satnav/scope/.
What it achieves
It sets reading (`setReading`) and is built from the safe link helper (`safeLink`) and the valid step (`valid`). UK electricity infrastructure navigation in development, with a GPS field compass test preview. It responds to click, focusin and pointerdown events.
Why it matters
Imported by Build, SatNav Public Scope Served Workflow and SatNav Public Scope Workflow, from Cosmic.
Application
satnav · scope · page
Uses
GridAtlas — Atlas Page (link), Kuiper Belt — See Through Page (link), Overlay (link)
Used by
named by URL in Build (estate URL), named by URL in SatNav Public Scope Served Workflow (estate URL), named by URL in SatNav Public Scope Workflow (estate URL)
Produces
safeLink, valid, render, setReading, load
Defines here
safeLink, valid, render, setReading, load
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
satnav@ea69138ca5d5a9632233220e5cbe1cd3f1c83432 scope/index.html:1-63 · blob 2aa21cbeff6219caf2f94cd7b23b59eb32a3f0ff · GitHub at these lines
State
achieves: comment · context: readme_derived · stage: output · effects: dom, network · domain stage: field_execution · users: EPC_contractor, landowner_planner · canonical: production_core
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="description" content="SatNav: UK electricity infrastructure navigation in development, with a GPS field compass test preview.">
<title>SatNav | GlobalGrid2050</title>
<style>
:root{--bg:#000;--panel:#0b0e14;--line:#2f343d;--soft:#222;--text:#fff;--muted:#a6adbb;--accent:#00ffff;--ok:#00ff88;--solar:#ffff00;--bess:#ffae00;--off:#0066ff}
*{box-sizing:border-box}html,body{margin:0;background:var(--bg);color:var(--text);font-family:'Courier New',monospace}body{font-size:14px;line-height:1.6}a{color:var(--accent)}a:focus-visible,button:focus-visible{outline:2px solid #fff;outline-offset:3px}.hud-header{background:#0a0a0a;border:1px solid #333;border-radius:6px;padding:12px;display:flex;justify-content:space-between;align-items:center  … [line shortened here: 1,964 characters; full line on GitHub]
#headlineTicker{background:#000;border-block:1px solid #333;overflow:hidden;margin-bottom:4px}.ticker-top{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:3px 12px;color:var(--muted);font-size:11px;flex-wrap:wrap}.ticker-top a{color:var(--muted)}.ticker-top button{background:#000;color:#fff;border:1px solid #333;min-height:32px;font:11px 'Courier New',monospace;cursor:  … [line shortened here: 1,725 characters; full line on GitHub]
.launch-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:16px 0}.launch-card{display:flex;flex-direction:column;gap:8px;padding:12px;background:#0a0a0a;border:1px solid var(--line);border-radius:5px;min-width:0}.launch-card:first-child{border-color:var(--accent)}.launch-card p{margin:0;overflow-wrap:anywhere}.launch-status{font-size:11px;letter-spacing:1px;color:var(-  … [line shortened here: 873 characters; full line on GitHub]
</style>
</head>
<body>
<section id="headlineTicker" aria-label="Pipeline News headlines">
<div class="ticker-top"><a href="https://globalgrid2050.com/uk_renewables_pipeline/202611232245/">PIPELINE NEWS</a><span id="newsStatus" role="status">Loading shared headline feed…</span><button id="pauseTicker" type="button" aria-pressed="false">Pause ticker</button></div>
<div class="pn-ticker-viewport" tabindex="0" aria-label="Headlines; scroll when paused"><div class="pn-ticker-track" id="tickerTrack"><p class="ticker-fallback">Headlines are available on <a href="https://globalgrid2050.com/uk_renewables_pipeline/202611232245/">Pipeline News</a>.</p></div></div>
<noscript><p class="ticker-fallback">JavaScript is disabled. Open Pipeline News for headlines.</p></noscript>
</section>
<div class="shell">
<header class="hud-header"><a class="brand" href="https://www.globalgrid2050.com/">GLOBALGRID2050<small>VENTUS | ELECTRICITY INFRASTRUCTURE</small></a><span class="hud-val">SATNAV / UNITED KINGDOM</span></header>
<main>
<section class="hero"><h1>SatNav</h1><small class="concept">Development preview — GPS prototype available</small><p>Mobile location awareness for UK electricity infrastructure.</p><p class="muted">The GPS field compass is available for testing. GridAtlas destination selection and transmission-line positioning are being developed using existing GlobalGrid2050 tools.</p>
<div class="launch-grid" aria-label="SatNav applications">
<article class="launch-card"><span class="launch-status ready">AVAILABLE · TEST PREVIEW</span><h3>GPS field compass</h3><p class="muted">Live position and accuracy, straight-line distance and true bearing to a selected destination. Location stays on the device.</p><a id="launch-gps" class="button" href="https://ventusltd.github.io/satnav/preview/9698781539e549deaa6ecaa4a2b34610c1f9fd29/nav/">Launc  … [line shortened here: 438 characters; full line on GitHub]
<article class="launch-card"><span class="launch-status">INTEGRATION IN PROGRESS</span><h3>GridAtlas destination selection</h3><p id="gridatlas-status" class="muted">Choose a destination on existing satellite imagery or through Vicinity, confirm it, then launch the compass. Not yet available.</p><button id="launch-gridatlas" class="button" type="button" disabled aria-describedby="gridatlas-status"  … [line shortened here: 440 characters; full line on GitHub]
<article class="launch-card"><span class="launch-status">IN DEVELOPMENT</span><h3>Selected transmission line</h3><p id="line-status" class="muted">Show measured GPS position and accuracy alongside selected line geometry, with a separate nearest point. Not yet available.</p><button id="launch-line" class="button" type="button" disabled aria-describedby="line-status">Transmission-line Navigation</bu  … [line shortened here: 415 characters; full line on GitHub]
</div>
<p class="notice">The GPS preview is a north-up compass, not turn-by-turn navigation or a device-heading sensor. A mapped point or line does not establish permission to enter land.</p><div class="links"><a class="button" href="https://ventusltd.github.io/gridatlas/atlas/">Explore GridAtlas</a><a class="button" href="https://globalgrid2050.com/uk_renewables_pipeline/202611232245/">Open Pipeline New  … [line shortened here: 421 characters; full line on GitHub]
<section class="panel"><h2>Capabilities and development scope</h2><div class="grid">
<div class="key-group"><h3>01 / Locate</h3><p class="muted">Device-based location, reported GPS accuracy, true bearing and straight-line distance to a selected point are available in the test preview. Location stays on the device.</p></div>
<div class="key-group"><h3>02 / Navigate</h3><p class="muted">GridAtlas destination selection and selected-line positioning are in development. Validated route-following and authorised last-mile navigation are later capabilities, not available in this preview.</p></div>
<div class="key-group"><h3>03 / Observe</h3><p class="muted">Explore surrounding grid infrastructure through the existing connected tools. Local field observations and terrain-assisted workflows are future capabilities.</p></div>
<div class="key-group"><h3>04 / Integrate</h3><p class="muted">Use existing project identities, network geometry, terrain information and engineering calculations without creating a competing design platform.</p></div>
</div></section>
<section class="panel"><h2>Connected tools</h2><div class="grid">
<div class="key-group"><a class="key-title" href="https://ventusltd.github.io/gridatlas/atlas/">GridAtlas / Vicinity</a><p class="muted">Mapped infrastructure and proximity analysis.</p></div>
<div class="key-group"><a class="key-title" href="https://ventusltd.github.io/kuiper-belt/see-through/">See Through / Kuiper</a><p class="muted">Substation exploration and infrastructure visualisation.</p></div>
<div class="key-group"><a class="key-title" href="https://ventusltd.github.io/ventus-grid-engine/">Ventus Grid Engine</a><p class="muted">Existing engineering context and distance calculations.</p></div>
<div class="key-group"><a class="key-title" href="https://globalgrid2050.com/energy-transition-simulator/202609282123/overlay.html">Solar Design Studio</a><p class="muted">Terrain-based design and proposed route geometry.</p></div>
<div class="key-group"><a class="key-title" href="https://github.com/Ventusltd/lidar">LiDAR</a><p class="muted">Terrain and elevation data, subject to regional coverage and licensing.</p></div>
<div class="key-group"><a class="key-title" href="https://globalgrid2050.com/uk_renewables_pipeline/202611232245/">Pipeline News</a><p class="muted">Project intelligence and the shared headline feed above.</p></div>
</div></section>
<section class="panel"><h2>Geographical scope</h2><p>England, Scotland, Wales and Northern Ireland. Data coverage, accuracy, access rights and coordinate systems must be verified for each region. Nationwide routing and offline availability are not currently claimed.</p></section>
<section class="panel"><h2>Development priorities</h2><ol><li>Available for testing: mobile location and compass prototype, with accuracy and permission controls.</li><li>Milestone 1: select and confirm a GridAtlas or Vicinity destination, then launch the compass.</li><li>Milestone 2: live measured position and accuracy alongside a selected transmission line.</li><li>Later: validated route followi  … [line shortened here: 714 characters; full line on GitHub]
</main><footer>SatNav is a development preview, not an operational navigation service, survey instrument or approved engineering design. <a href="https://github.com/Ventusltd/satnav">Open-source project</a> · <a href="https://www.globalgrid2050.com/">GlobalGrid2050</a></footer>
</div>
<script type="module">
const ticker=document.getElementById('headlineTicker'),track=document.getElementById('tickerTrack'),status=document.getElementById('newsStatus'),pause=document.getElementById('pauseTicker');
const live='https://raw.githubusercontent.com/Ventusltd/globalgrid2050/pipeline-news-data/dist/pipeline_headlines.json';
const snapshot='https://raw.githubusercontent.com/Ventusltd/globalgrid2050/032e28629125515650ea14d99091362ba46ee457/uk_renewables_pipeline/202611232245/news/pipeline_headlines.snapshot.json';
const safeLink=value=>{try{const u=new URL(value);return ['https:','http:'].includes(u.protocol)&&!u.username&&!u.password?u.href:null}catch{return null}};
function valid(doc){return doc?.schema==='globalgrid2050.news.pipeline-headlines.v1'&&Array.isArray(doc.items)&&Number.isFinite(Date.parse(doc.generated_at))}
function render(doc,saved){if(!valid(doc))throw Error('Invalid headline feed');const seen=new Set();const items=doc.items.filter(x=>{const url=safeLink(x?.link);if(!url||typeof x.title!=='string'||!x.title.trim()||typeof x.source!=='string'||!x.source.trim()||seen.has(url))return false;seen.add(url);return true}).slice(0,20);if(!items.length)throw Error('No available headlines');
const cycle=document.createElement('ul');cycle.className='pn-ticker-cycle';for(const item of items){const li=document.createElement('li');li.className='pn-ticker-item';const a=document.createElement('a');a.className='pn-ticker-title';a.href=safeLink(item.link);a.textContent=item.title+' — '+item.source;li.append(a);const date=document.createElement('span');date.className='pn-ticker-date';date.text  … [line shortened here: 1,190 characters; full line on GitHub]
function setReading(on){ticker.dataset.reading=String(on);pause.setAttribute('aria-pressed',String(on));pause.textContent=on?'Resume ticker':'Pause ticker'}
pause.addEventListener('click',()=>setReading(ticker.dataset.reading!=='true'));ticker.querySelector('.pn-ticker-viewport').addEventListener('focusin',()=>setReading(true));ticker.querySelector('.pn-ticker-viewport').addEventListener('pointerdown',()=>setReading(true));
async function load(url){const ctl=new AbortController();const timer=setTimeout(()=>ctl.abort(),6000);try{const r=await fetch(url,{cache:'no-store',signal:ctl.signal});if(!r.ok)throw Error('Feed unavailable');return await r.json()}finally{clearTimeout(timer)}}
try{render(await load(live),false)}catch{try{render(await load(snapshot),true)}catch{status.textContent='Headline feed unavailable — open Pipeline News';}}
</script>
</body>
</html>