GLOBALGRID2050 / EXPLORE CODE

Part of: Explore Code / Electricity markets and data pipelines / pipelinenews / archive/202608261547-pipelinenews/newsv7/styles

Intelligence News v7 and 6 more files

A style sheet in the styles folder of PipelineNews.

700 lines of JavaScript and CSS and Shell from pipelinenews, in 7 files. Topic: Electricity markets and data pipelines. Section 991 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. Intelligence News v7 render · pipelinenews / archive/202608261547-pipelinenews/newsv7/styles/intelligence-newsv7.css lines 1–189
  2. Performance News v7 render · pipelinenews / archive/202608261547-pipelinenews/newsv7/styles/performance-newsv7.css lines 1–42
  3. Check News v7 test · pipelinenews / archive/202608261547-pipelinenews/newsv7/tests/check_newsv7.mjs lines 1–170
  4. Run News v7 test · pipelinenews / archive/202608261547-pipelinenews/newsv7/tests/run_newsv7.sh lines 1–27
  5. Objects — Sha256 Style Sheet render · pipelinenews / archive/202608261547-pipelinenews/objects/css/sha256/5c196d2b307e0426447dc96f1762bc6e39de98f2a39ae8667265198f09d5166e.css lines 1–93
  6. Objects — Sha256 transform · pipelinenews / archive/202608261547-pipelinenews/objects/js/sha256/0f0adf842d22158b882f168d6c131480afd81bce6609b8453a073f15d201d18c.mjs lines 1–174
  7. Objects — Sha256 render · pipelinenews / archive/202608261547-pipelinenews/objects/js/sha256/5096d055234312c574b10d5ff239b91582497289cb58fd6a1faa6b89e16e657f.mjs lines 1–5

Intelligence News v7

A style sheet in the styles folder of PipelineNews.

renderpipelinenews / archive/202608261547-pipelinenews/newsv7/styles/intelligence-newsv7.css · lines 1–189 of 189 · version 2026-08-26 15:47 · Entry point

What it does
Side effects: changes the web page (DOM).
Why it exists in the grid workflow
Domain stage experimental (path word 'archive'): work its own path marks as experimental (sandbox, prototype, archive or similar words); by this evidence it is not part of a production workflow.
Downstream impact
Used directly by 1 file: PipelineNews — News v7 Page (pipelinenews, https://ventusltd.github.io/pipelinenews/archive/202608261547-pipelinenews/newsv7/). Reached from 1 other entry point, including PipelineNews — PipelineNews Page (pipelinenews, https://ventusltd.github.io/pipelinenews/archive/202608261547-pipelinenews/202608251651-PipelineNews/).
What it achieves
No statement of purpose was found in the file, a README line naming it, or its name. Described from its file name only (a candidate, not yet checked against the code).
Why it matters
Loaded by the News v7 page at https://ventusltd.github.io/pipelinenews/archive/202608261547-pipelinenews/newsv7/.
Application
pipelinenews · archive/202608261547-pipelinenews/newsv7/styles · style sheet
Uses
none found
Used by
loaded by PipelineNews — News v7 Page (stylesheet)
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 archive/202608261547-pipelinenews/newsv7/styles/intelligence-newsv7.css:1-189 · blob b7721f8b79986bc713fd0786f932dbc6a8f473ce · GitHub at these lines
State
achieves: name · context: readme_derived · stage: output · effects: dom · domain stage: experimental · users: none · canonical: production_core
.intelligence {
  background: #090c10;
  border: 1px solid #2a3038;
  box-sizing: border-box;
  margin: 18px 0;
  min-width: 0;
  padding: 16px;
}

.intelligence-head {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  min-width: 0;
}

.intelligence-head h2 {
  color: #fff;
  font-family: "Courier New", monospace;
  font-size: 20px;
  margin: 0 0 5px;
}

.intelligence-head p,
#intelligenceStatus {
  color: #8d95a3;
  font: 10px/1.5 "Courier New", monospace;
  margin: 0;
}

#intelligenceStatus {
  color: #60ff9c;
  max-width: 360px;
  text-align: right;
}

.intelligence-cards {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 14px;
  min-width: 0;
}

.intelligence-card {
  background: #05070a;
  border: 1px solid #1f7049;
  box-sizing: border-box;
  min-width: 0;
  padding: 12px;
}

.intelligence-card.warning {
  border-color: #7b5a20;
}

.intelligence-card strong,
.intelligence-card span,
.intelligence-card small {
  display: block;
}

.intelligence-card strong {
  color: #60ff9c;
  font: 700 20px "Courier New", monospace;
}

.intelligence-card.warning strong {
  color: #ffcc00;
}

.intelligence-card span {
  color: #fff;
  font: 700 10px/1.4 "Courier New", monospace;
  margin: 6px 0;
}

.intelligence-card small,
.intelligence-empty {
  color: #8d95a3;
  font: 9px/1.45 "Courier New", monospace;
  overflow-wrap: anywhere;
}

.intelligence-empty {
  grid-column: 1 / -1;
  padding: 12px;
}

.intelligence-details {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
  min-width: 0;
}

.intelligence-details details {
  border: 1px solid #252a31;
  min-width: 0;
  padding: 10px;
}

.intelligence-details summary {
  color: #00ffff;
  cursor: pointer;
  font: 700 10px "Courier New", monospace;
}

.evidence-rows {
  display: grid;
  gap: 7px;
  margin-top: 10px;
  min-width: 0;
}

.evidence-rows a {
  border-top: 1px solid #1d2229;
  color: #d4d8de;
  display: grid;
  gap: 3px;
  min-width: 0;
  overflow-wrap: anywhere;
  padding-top: 7px;
  text-decoration: none;
}

.evidence-rows b,
.evidence-rows span,
.evidence-rows small {
  font: 9px/1.4 "Courier New", monospace;
}

.health-state {
  color: #ffcc00;
  font-weight: 700 !important;
}

.health-state.unavailable {
  color: #ff6666;
}

.story-intelligence {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.intelligence-badge {
  border: 1px solid #5d4920;
  color: #ffcc00;
  display: inline-block;
  font: 700 8px "Courier New", monospace;
  padding: 2px 4px;
}

.intelligence-badge.evidence {
  border-color: #1f7049;
  color: #60ff9c;
}

@media (max-width: 1100px) {
  .intelligence-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .intelligence {
    padding: 11px;
  }

  .intelligence-head {
    display: block;
  }

  #intelligenceStatus {
    margin-top: 8px;
    max-width: none;
    text-align: left;
  }

  .intelligence-cards,
  .intelligence-details {
    grid-template-columns: 1fr;
  }
}

Performance News v7

A style sheet in the styles folder of PipelineNews.

Set aside from the main view: 93% of its lines are the same as archive/202608261547-pipelinenews/newsv1/styles/performance-newsv1.css (pipelinenews), which stays. (near-copy-of, proposed by families.py). 93% of lines shared with Performance News v1; read that one first. All set-aside files, with reasons. Nothing was deleted.

Evidence
  • line-jaccard 0.931 to pipelinenews@45c944c8640a9d7ae65edb51d66032ba204f3f46 archive/202608261547-pipelinenews/newsv1/styles/performance-newsv1.css:1-42 36a59eb647bd6124aa20ea5c7899ea5894127338
  • sha256 56867797e579b62ffe19ecccdf4687c789b832d68e71444ad5698280af35dd60
  • target sha256 d1f4e681626e0ae022f9f93a4456c574b98bdbe65569fdf66176eb2651db69fe
  • group of 2 (identity.json near-copy edges >= 0.9)
  • canonical rule: reachable, newest stamp, core repo, most lines

renderpipelinenews / archive/202608261547-pipelinenews/newsv7/styles/performance-newsv7.css · lines 1–42 of 42 · version 2026-08-26 15:47 · Entry point

What it does
Side effects: changes the web page (DOM).
Why it exists in the grid workflow
Domain stage experimental (path word 'archive'): work its own path marks as experimental (sandbox, prototype, archive or similar words); by this evidence it is not part of a production workflow.
Downstream impact
Used directly by 1 file: PipelineNews — News v7 Page (pipelinenews, https://ventusltd.github.io/pipelinenews/archive/202608261547-pipelinenews/newsv7/). Reached from 1 other entry point, including PipelineNews — PipelineNews Page (pipelinenews, https://ventusltd.github.io/pipelinenews/archive/202608261547-pipelinenews/202608251651-PipelineNews/).
What it achieves
News V7 retains the proven `NewsV1/V9.7` performance controls and mobile table law.
Why it matters
Loaded by the News v7 page at https://ventusltd.github.io/pipelinenews/archive/202608261547-pipelinenews/newsv7/.
Application
pipelinenews · archive/202608261547-pipelinenews/newsv7/styles · style sheet
Uses
none found
Used by
loaded by PipelineNews — News v7 Page (stylesheet)
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 archive/202608261547-pipelinenews/newsv7/styles/performance-newsv7.css:1-42 · blob 1eb736e27f0a2a6045bd13c395c3b4a743e6c8aa · GitHub at these lines
State
achieves: comment · context: readme_derived · stage: output · effects: dom · domain stage: experimental · users: none · canonical: production_core
/* News V7 retains the proven NewsV1/V9.7 performance controls and mobile table law. */
.project-pager {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  max-width: 100%;
  padding: 10px 0 2px;
}

.project-pager .btn {
  flex: 0 0 auto;
  margin: 0;
}

.project-pager button:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

#projectPageStatus {
  color: #9aa4b2;
  font-family: "Courier New", monospace;
  font-size: 11px;
  min-width: 230px;
  text-align: center;
}

@media (max-width: 768px) {
  .project-pager {
    box-sizing: border-box;
    padding-inline: 4px;
    width: 100%;
  }

  #projectPageStatus {
    flex: 1 0 100%;
    min-width: 0;
    order: -1;
  }
}

Check News v7

A JavaScript module in the tests folder of PipelineNews that tests release newsv7, migration, cumulative intelligence and regional news, using SHA-256.

testpipelinenews / archive/202608261547-pipelinenews/newsv7/tests/check_newsv7.mjs · lines 1–170 of 170 · version 2026-08-26 15:47 · Not reached from any entry point (candidate for review) · pattern bytes (shared by 19 files)

What it does
It tests release newsv7, migration, cumulative intelligence and regional news. Defines text, bytes, json, repoBytes, sha256. Uses libraries node:assert/strict, node:crypto, node:fs/promises. Side effects: reads or writes files.
Why it exists in the grid workflow
Domain stage experimental (path word 'archive'): work its own path marks as experimental (sandbox, prototype, archive or similar words); by this evidence it is not part of a production workflow.
Inputs & outputs
In: JSON file release.newsv7.json; JSON file MIGRATION_MANIFEST.json; JSON file cumulative_intelligence.json; JSON file build_manifest.json; JSON file release.v9.1.json; JSON file regional_news.json; JSON file regional_decisions.json; JSON file regional_manifest.json.
What it achieves
It is built from the repo bytes helper (`repoBytes`) and the sha256 step (`sha256`). Its name says it checks news. Defines `text`, `bytes`, `json` and 2 more.
Why it matters
No other file in the estate was found to import it.
Application
pipelinenews · archive/202608261547-pipelinenews/newsv7/tests · JavaScript module
Uses
PipelineNews — News v7 Page (new URL import.meta.url), node:assert/strict, node:crypto, node:fs/promises
Used by
none found
Produces
text, bytes, json, repoBytes, sha256
Defines here
text, bytes, json, repoBytes, sha256
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
pipelinenews@45c944c8640a9d7ae65edb51d66032ba204f3f46 archive/202608261547-pipelinenews/newsv7/tests/check_newsv7.mjs:1-170 · blob 809756d5bd1c49a40cdbdd937bb49102eb1241df · GitHub at these lines
State
achieves: name · context: readme_derived · stage: ingest · effects: filesystem · domain stage: experimental · users: none · canonical: unreached_review
import assert from "node:assert/strict";
import { createHash } from "node:crypto";
import { readFile } from "node:fs/promises";

const releaseRoot = new URL("../", import.meta.url);
const repositoryRoot = new URL("../../", import.meta.url);
const text = (path) => readFile(new URL(path, releaseRoot), "utf8");
const bytes = (path) => readFile(new URL(path, releaseRoot));
const json = async (path) => JSON.parse(await text(path));
const repoBytes = (path) => readFile(new URL(path, repositoryRoot));
const sha256 = (value) => createHash("sha256").update(value).digest("hex");

const [release, migration, cumulative, manifest, html, projectsSource, newsSource, intelligenceSource, mobileCss] = await Promise.all([
  json("contracts/release.newsv7.json"),
  json("MIGRATION_MANIFEST.json"),
  json("data/newsv7/cumulative_intelligence.json"),
  json("data/newsv7/build_manifest.json"),
  text("index.html"),
  text("scripts/plugins/projects-newsv7.js"),
  text("scripts/plugins/newspaper-newsv7-base.js"),
  text("scripts/plugins/intelligence-newsv7.js"),
  text("styles/v9-6-1.css"),
]);

assert.equal(release.schema, "pipelinenews.ui-release.v1");
assert.equal(release.release, "newsv7");
assert.equal(release.semantic_version, "7.0.0-rc.1");
assert.equal(release.status, "CANDIDATE");
assert.equal(release.frozen_source.release, "9.7");
assert.equal(release.frozen_source.commit, "824a23cd0cf9f90a9df942f1b37a09c2dc6472b7");
assert.equal(release.frozen_source.subtree, "4fca94ede95789ade9490258a2323c00c13ec2ea");
assert.equal(release.ui_baseline.release, "newsv1");
assert.equal(release.ui_baseline.tree, "2d6247c067aa5fad49995dcb9029d6cdb9898994");
assert.equal(migration.release, "newsv7");
assert.equal(migration.canonical_data_changed, false);
assert.equal(migration.news_content_or_order_changed, false);

const baselinePaths = [
  "contracts/release.v9.1.json",
  "data/v9.1/build_manifest.json",
  ...Array.from({ length: 16 }, (_, index) => `data/v9.1/projects/part-${String(index + 1).padStart(3, "0")}.json`),
  "data/v9.7/regional_news.json",
  "data/v9.7/regional_decisions.json",
  "data/v9.7/regional_manifest.json",
  "dist/major_project_news_v9_5_1.json",
  "styles/mobile.css",
  "styles/v9-6-1.css",
];
for (const path of baselinePaths) {
  const [newsv1Bytes, newsv7Bytes] = await Promise.all([repoBytes(`newsv1/${path}`), bytes(path)]);
  assert.equal(sha256(newsv7Bytes), sha256(newsv1Bytes), `${path} differs from frozen NewsV1/V9.7 baseline`);
}

assert.equal(cumulative.schema, "pipelinenews.cumulative-intelligence.newsv7.v1");
assert.equal(cumulative.release, "newsv7");
assert.equal(cumulative.baseline.project_count, 7680);
assert.equal(cumulative.baseline.capacity_mw, 356474.09);
assert.equal(cumulative.baseline.all_headlines, 133);
assert.equal(cumulative.baseline.uk_headlines, 45);
assert.equal(cumulative.baseline.international_headlines, 19);
assert.equal(cumulative.baseline.beacon_fen_repd_ref, "13599");
assert.deepEqual(cumulative.counts, {
  material_event_assertions: 45,
  organisation_labels: 28,
  project_operator_role_assertions: 29,
  transaction_role_abstentions: 45,
  source_health_decisions: 6,
  current_context_sources: 0,
  publishable_reasons: 0,
  held_reasons: 45,
  data_centre_sources: 6,
  data_centre_observations: 2,
  data_centre_link_decisions: 2,
  renewable_data_centre_identity_links: 0,
  parquet_tables: 9,
  parquet_rows: 208,
});

assert.equal(cumulative.event_intelligence.length, 45);
assert.equal(new Set(cumulative.event_intelligence.map((row) => row.article_id)).size, 45);
assert.equal(new Set(cumulative.event_intelligence.map((row) => row.event_assertion_id)).size, 45);
cumulative.event_intelligence.forEach((row, index) => {
  assert.equal(row.display_order, index + 1);
  assert.ok(row.article_id && row.event_assertion_id && row.repd_ref && row.project_id);
  assert.equal(row.project_id, `GG2050-REPD-${row.repd_ref}`);
  assert.equal(row.event_claim_status, "HEADLINE_DERIVED_UNVERIFIED");
  assert.equal(row.transaction_role_decision, "ABSTAIN_NO_DIRECT_ROLE_EVIDENCE");
  assert.equal(row.research_decision, "HOLD_FOR_VERIFICATION");
  assert.equal(row.publishable_reason, false);
  assert.ok(row.operator_labels.length >= 1);
});
assert.ok(cumulative.event_intelligence.some((row) => row.repd_ref === "13599"));
assert.ok(!cumulative.event_intelligence.some((row) => row.repd_ref === "13600"));

const healthCounts = cumulative.source_health.reduce((counts, row) => {
  counts[row.status] = (counts[row.status] || 0) + 1;
  return counts;
}, {});
assert.equal(cumulative.source_health.length, 6);
assert.equal(healthCounts.CURRENT, undefined);
assert.equal(healthCounts.STALE, 1);
assert.equal(healthCounts.DEGRADED, 4);
assert.equal(healthCounts.UNAVAILABLE, 1);
assert.ok(cumulative.source_health.every((row) => row.protections.project_binding_allowed === false
  && row.protections.event_verification_allowed === false
  && row.protections.grid_constraint_assertion_allowed === false));

assert.equal(cumulative.data_centres.sources.length, 6);
assert.equal(cumulative.data_centres.observations.length, 2);
assert.equal(cumulative.data_centres.link_decisions.length, 2);
assert.ok(cumulative.data_centres.observations.every((row) => [
  row.it_load_mw,
  row.requested_grid_capacity_mw,
  row.contracted_grid_capacity_mw,
  row.operational_capacity_mw,
].every((value) => value === null)));
assert.ok(cumulative.data_centres.link_decisions.every((row) => row.decision === "ABSTAIN_INSUFFICIENT_IDENTITY_EVIDENCE"));

const cumulativeBytes = await bytes("data/newsv7/cumulative_intelligence.json");
assert.equal(manifest.schema, "pipelinenews.newsv7-build-manifest.v1");
assert.equal(manifest.status, "PASS");
assert.equal(manifest.output.sha256, sha256(cumulativeBytes));
assert.equal(manifest.output.event_rows, 45);
assert.ok(Object.values(manifest.checks).every((status) => status === "PASS"));
for (const [name, expected] of Object.entries(release.cumulative_inputs)) {
  const manifestName = {
    newsv2_material_events: "events",
    newsv3_organisation_evidence: "organisations",
    newsv4_source_health: "sourceHealth",
    newsv5_reason_decisions: "reasons",
    newsv6_data_centre_evidence: "dataCentres",
    analytics_v1_manifest: "parquetManifest",
    analytics_v1_audit: "parquetAudit",
    consumer_v1_overlay: "consumerOverlay",
    consumer_v1_interface_guard: "interfaceGuard",
  }[name];
  assert.equal(manifest.source_hashes[manifestName].sha256, expected, `${name} hash mismatch`);
}

assert.equal((html.match(/<th(?:\s|>)/g) || []).length, 11);
assert.match(html, /UK RENEWABLES PIPELINE NEWS V7/);
assert.match(html, /id="cumulativeIntelligence"/);
assert.match(html, /scripts\/app-newsv7\.js\?v=newsv7/);
assert.match(html, /styles\/intelligence-newsv7\.css\?v=newsv7/);
assert.doesNotMatch(html, /NEWS V1 CANDIDATE/);
assert.equal(release.interface.project_table_columns, 11);
assert.equal(release.interface.rows_per_page, 100);
assert.equal(release.interface.mobile_horizontal_scroll_preserved, true);
assert.equal(release.interface.mobile_card_conversion, false);
assert.match(mobileCss, /\.tablewrap\s*\{[^}]*overflow-x:\s*auto/s);
assert.match(mobileCss, /\.tablewrap \.hide-mobile\s*\{[^}]*display:\s*table-cell/s);
assert.match(projectsSource, /const ROWS_PER_PAGE = 100;/);
assert.match(projectsSource, /const pageRows = filtered\.slice\(start, start \+ ROWS_PER_PAGE\);/);
assert.match(projectsSource, /loadCanonicalProjectsNewsV7Release/);
assert.match(newsSource, /intelligenceForArticleNewsV7/);
assert.match(newsSource, /ROLES ABSTAINED/);
assert.match(intelligenceSource, /const FETCH_TIMEOUT_MS = 15000;/);
assert.match(intelligenceSource, /cache: "default"/);
assert.doesNotMatch(`${projectsSource}\n${newsSource}\n${intelligenceSource}`, /cache:\s*["']no-store["']|Date\.now\(\)/);
assert.deepEqual(cumulative.publication_law, {
  official_repd_facts_changed: false,
  headline_order_changed: false,
  event_claims_remain_unverified: true,
  commercial_roles_published: false,
  opportunity_claims_published: false,
  stale_context_used_as_event_proof: false,
  data_centres_linked_to_renewable_projects: false,
});

console.log("NewsV7 cumulative verification: PASS");

Run News v7

A shell script in the tests folder of PipelineNews.

testpipelinenews / archive/202608261547-pipelinenews/newsv7/tests/run_newsv7.sh · lines 1–27 of 27 · version 2026-08-26 15:47 · Entry point

What it does
It tests its inputs. Side effects: starts processes.
Why it exists in the grid workflow
Domain stage experimental (path word 'archive'): work its own path marks as experimental (sandbox, prototype, archive or similar words); by this evidence it is not part of a production workflow.
Downstream impact
It is itself an entry point (shell script); no other file was found loading it.
What it achieves
No statement of purpose was found in the file, a README line naming it, or its name.
Why it matters
No other file in the estate was found to import it; it is an entry point.
Application
pipelinenews · archive/202608261547-pipelinenews/newsv7/tests · shell script
Uses
none found
Used by
none found
Produces
none declared
Defines here
none
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
pipelinenews@45c944c8640a9d7ae65edb51d66032ba204f3f46 archive/202608261547-pipelinenews/newsv7/tests/run_newsv7.sh:1-27 · blob e7066a8e6de898c4db9d3af6b0672b5dac40c40a · GitHub at these lines
State
achieves: name · context: readme_derived · stage: unknown · effects: process · domain stage: experimental · users: none · canonical: production_core
#!/usr/bin/env bash
set -euo pipefail

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

for predecessor in newsv1 newsv2 newsv3 newsv4 newsv5 newsv6; do
  bash "$predecessor/tests/run_${predecessor}.sh"
done

node --check newsv7/scripts/build-cumulative-intelligence.mjs
node --check newsv7/scripts/data/canonical-projects-newsv7.js
node --check newsv7/scripts/data/canonical-projects-newsv7-release.js
node --check newsv7/scripts/plugins/intelligence-newsv7.js
node --check newsv7/scripts/plugins/newspaper-newsv7-base.js
node --check newsv7/scripts/plugins/newspaper-newsv7.js
node --check newsv7/scripts/plugins/projects-newsv7.js
node --check newsv7/scripts/app-newsv7.js

node newsv7/scripts/build-cumulative-intelligence.mjs
FIRST_OUTPUT_SHA="$(sha256sum newsv7/data/newsv7/cumulative_intelligence.json newsv7/data/newsv7/build_manifest.json)"
node newsv7/tests/check_newsv7.mjs
node newsv7/scripts/build-cumulative-intelligence.mjs
SECOND_OUTPUT_SHA="$(sha256sum newsv7/data/newsv7/cumulative_intelligence.json newsv7/data/newsv7/build_manifest.json)"
test "$FIRST_OUTPUT_SHA" = "$SECOND_OUTPUT_SHA"
node newsv7/tests/check_newsv7.mjs

Objects — Sha256 Style Sheet

A style sheet in PipelineNews.

renderpipelinenews / archive/202608261547-pipelinenews/objects/css/sha256/5c196d2b307e0426447dc96f1762bc6e39de98f2a39ae8667265198f09d5166e.css · lines 1–93 of 93 · version 2026-08-26 15:47 · Entry point

What it does
Side effects: changes the web page (DOM).
Why it exists in the grid workflow
Domain stage experimental (path word 'archive'): work its own path marks as experimental (sandbox, prototype, archive or similar words); by this evidence it is not part of a production workflow.
Downstream impact
Used directly by 1 file: PipelineNews — PipelineNews Page (pipelinenews, https://ventusltd.github.io/pipelinenews/archive/202608261547-pipelinenews/202608251651-PipelineNews/).
What it achieves
No statement of purpose was found in the file, a README line naming it, or its name. Described from its file name only (a candidate, not yet checked against the code).
Why it matters
Loaded by the PipelineNews page at https://ventusltd.github.io/pipelinenews/archive/202608261547-pipelinenews/202608251651-PipelineNews/.
Application
pipelinenews · archive/202608261547-pipelinenews/objects/css/sha256 · style sheet
Uses
none found
Used by
loaded by PipelineNews — PipelineNews Page (stylesheet)
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 archive/202608261547-pipelinenews/objects/css/sha256/5c196d2b307e0426447dc96f1762bc6e39de98f2a39ae8667265198f09d5166e.css:1-93 · blob ee4d535e3899225d945f43f5765222d4285b7a20 · GitHub at these lines
State
achieves: name · context: readme_derived · stage: output · effects: dom · domain stage: experimental · users: none · canonical: production_core
:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f3f5f1;
  color: #15211a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(145deg, #edf2eb 0%, #f9faf7 52%, #e6eee8 100%);
}

main {
  width: min(920px, calc(100% - 28px));
  margin: 0 auto;
  padding: 36px 0 64px;
}

header,
section {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #cad6cc;
  border-radius: 16px;
  box-shadow: 0 12px 34px rgba(29, 53, 35, 0.08);
}

header { padding: 28px; }
section { margin-top: 16px; padding: 22px; }

.eyebrow {
  margin: 0 0 8px;
  color: #39704b;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2 { margin: 0; }
h1 { font-size: clamp(2rem, 7vw, 4rem); line-height: 0.95; }
h2 { font-size: 1.1rem; }

.release-id {
  margin: 14px 0 0;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  overflow-wrap: anywhere;
}

.status {
  display: inline-flex;
  margin-top: 18px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff3c4;
  color: #654d00;
  font-size: 0.78rem;
  font-weight: 800;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.metric {
  padding: 14px;
  border-radius: 12px;
  background: #edf4ee;
}

.metric strong { display: block; font-size: 1.6rem; }
.metric span { color: #4e6153; font-size: 0.78rem; }

p,
li { line-height: 1.55; }

a { color: #145f34; text-underline-offset: 3px; }
.links { display: flex; flex-wrap: wrap; gap: 12px; }
.muted { color: #607066; }
.error { color: #9e1b1b; }

@media (max-width: 620px) {
  main { padding-top: 16px; }
  header,
  section { border-radius: 12px; padding: 18px; }
  .grid { grid-template-columns: 1fr; }
}

Objects — Sha256

A JavaScript module in PipelineNews that works with the Renewable Energy Planning Database (REPD) register, using SHA-256. It normalises planning reference (`normalisePlanningReference`), builds reference groups (`buildReferenceGroups`) and selects frontier (`selectFrontier`).

transformpipelinenews / archive/202608261547-pipelinenews/objects/js/sha256/0f0adf842d22158b882f168d6c131480afd81bce6609b8453a073f15d201d18c.mjs · lines 1–174 of 174 · version 2026-08-26 15:47 · Not reached from any entry point (candidate for review) · pattern resolvePlanningBinding (shared by 2 files)

What it does
It calculates the REPD register. Defines 14 functions or classes, including invariant, text, compact, sha256, normalisePlanningReference. Uses libraries node:crypto.
Why it exists in the grid workflow
Domain stage experimental (path word 'archive'): work its own path marks as experimental (sandbox, prototype, archive or similar words); by this evidence it is not part of a production workflow. Domain terms in the code: the REPD register.
Downstream impact
Used directly by 1 file: Objects — Sha256 (pipelinenews).
What it achieves
Defines `invariant`, `text`, `compact` and 11 more.
Why it matters
Imported by a file of the same name.
Application
pipelinenews · archive/202608261547-pipelinenews/objects/js/sha256 · JavaScript module
Uses
node:crypto
Used by
imported by Objects — Sha256 (import)
Produces
POLICY_ID, SOURCE_SCORES, normalisePlanningReference, buildReferenceGroups, selectFrontier, resolvePlanningBinding, sourceHealth, buildFrontierContract
Defines here
invariant, text, compact, sha256, normalisePlanningReference, projectName, projectRef, projectPriority, buildReferenceGroups, selectFrontier, recordReferences, resolvePlanningBinding, sourceHealth, buildFrontierContract
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
pipelinenews@45c944c8640a9d7ae65edb51d66032ba204f3f46 archive/202608261547-pipelinenews/objects/js/sha256/0f0adf842d22158b882f168d6c131480afd81bce6609b8453a073f15d201d18c.mjs:1-174 · blob 110c6bed4df4a7cfd872b9c4a92d928c8337203f · GitHub at these lines
State
achieves: name · context: readme_derived · stage: transform · effects: none found · domain stage: experimental · users: none · canonical: unreached_review
import { createHash } from "node:crypto";

export const POLICY_ID = "PN-OFFICIAL-FRONTIER-V1";
export const SOURCE_SCORES = Object.freeze({
  OFFICIAL_REPD_REGISTER: 100,
  OFFICIAL_GOV_UK: 95,
  OFFICIAL_PLANNING_AUTHORITY: 95,
  OFFICIAL_AGGREGATOR_PLANIT: 90,
  ORIGINAL_PUBLISHER: 65,
  NEWS_AGGREGATOR_GOOGLE: 30,
});

const invariant = (condition, message) => { if (!condition) throw new Error(message); };
const text = (value) => String(value ?? "").normalize("NFKC").trim();
const compact = (value) => text(value).toUpperCase().replace(/[^A-Z0-9]/g, "");
const sha256 = (value) => createHash("sha256").update(value).digest("hex");

export function normalisePlanningReference(value) {
  return compact(value);
}

function projectName(project) {
  return text(project.name || project.project_name || project.site_name);
}

function projectRef(project) {
  return text(project.repd_ref || project.Ref_ID || project.ref_id);
}

function projectPriority(project) {
  const state = `${text(project.lifecycle)} ${text(project.status || project.official_status)}`.toLowerCase();
  if (state.includes("live_pre_construction") || state.includes("application") || state.includes("construction")) return 0;
  if (state.includes("operational")) return 2;
  if (state.includes("refused") || state.includes("withdrawn") || state.includes("abandoned")) return 3;
  return 1;
}

export function buildReferenceGroups(projects) {
  invariant(Array.isArray(projects), "projects must be an array");
  const groups = new Map();
  for (const project of projects) {
    const rawReference = text(project.planning_application_reference);
    const normalisedReference = normalisePlanningReference(rawReference);
    if (!normalisedReference) continue;
    invariant(projectRef(project), "every scheduled project requires a REPD reference");
    const group = groups.get(normalisedReference) || { normalised_reference: normalisedReference, query_references: new Set(), projects: [] };
    group.query_references.add(rawReference);
    group.projects.push(project);
    groups.set(normalisedReference, group);
  }
  return [...groups.values()].map((group) => ({
    normalised_reference: group.normalised_reference,
    query_reference: [...group.query_references].sort((a, b) => a.length - b.length || a.localeCompare(b))[0],
    priority: Math.min(...group.projects.map(projectPriority)),
    projects: group.projects.sort((a, b) => projectRef(a).localeCompare(projectRef(b), "en", { numeric: true })),
  })).sort((a, b) => a.priority - b.priority || a.normalised_reference.localeCompare(b.normalised_reference));
}

export function selectFrontier(groups, state = {}, budget = 48) {
  invariant(Number.isInteger(budget) && budget > 0, "budget must be a positive integer");
  if (!groups.length) return { selected: [], next_index: 0, total_groups: 0, wrapped: false };
  const start = Number.isInteger(state.next_index) ? ((state.next_index % groups.length) + groups.length) % groups.length : 0;
  const count = Math.min(budget, groups.length);
  const selected = Array.from({ length: count }, (_, offset) => groups[(start + offset) % groups.length]);
  invariant(new Set(selected.map((group) => group.normalised_reference)).size === selected.length, "frontier emitted duplicate references");
  return {
    selected,
    next_index: (start + count) % groups.length,
    total_groups: groups.length,
    wrapped: start + count >= groups.length,
  };
}

function recordReferences(record) {
  return [record.uid, record.reference, record.altid, record.name].map(normalisePlanningReference).filter(Boolean);
}

export function resolvePlanningBinding(record, referenceGroup) {
  const recordRefs = new Set(recordReferences(record));
  if (!recordRefs.has(referenceGroup.normalised_reference)) {
    return { role: "ABSTAIN", reason: "PLANNING_REFERENCE_NOT_EXACT" };
  }
  if (referenceGroup.projects.length === 1) {
    const project = referenceGroup.projects[0];
    return {
      role: "PRIMARY_MATCH",
      method: "REPD_AND_PLANIT_EXACT_REFERENCE",
      repd_ref: projectRef(project),
      gg_project_id: text(project.gg_project_id) || `GG2050-REPD-${projectRef(project)}`,
      project_name: projectName(project),
      planning_application_reference: text(project.planning_application_reference),
      news_may_overwrite_official_facts: false,
    };
  }

  const body = compact([record.description, record.name, record.applicant, record.area_name].filter(Boolean).join(" "));
  const named = referenceGroup.projects.filter((project) => {
    const name = compact(projectName(project));
    return name.length >= 8 && body.includes(name);
  });
  if (named.length === 1) {
    const project = named[0];
    return {
      role: "PRIMARY_MATCH",
      method: "EXACT_REFERENCE_PLUS_EXACT_PROJECT_NAME",
      repd_ref: projectRef(project),
      gg_project_id: text(project.gg_project_id) || `GG2050-REPD-${projectRef(project)}`,
      project_name: projectName(project),
      planning_application_reference: text(project.planning_application_reference),
      news_may_overwrite_official_facts: false,
    };
  }
  return {
    role: "ABSTAIN",
    reason: "AMBIGUOUS_REPD_PLANNING_REFERENCE",
    candidate_repd_refs: referenceGroup.projects.map(projectRef),
  };
}

export function sourceHealth({ attempted, succeeded, statusCode, priorGoodAt = null, message = null }) {
  const status = succeeded === attempted && attempted > 0 ? "LIVE" : succeeded > 0 ? "DEGRADED" : "UNAVAILABLE";
  return { status, attempted, succeeded, status_code: statusCode ?? null, prior_good_at: priorGoodAt, message };
}

export function buildFrontierContract(input) {
  invariant(input.schema === "pipelinenews.official-frontier-input.v1", "unexpected input schema");
  invariant(/^\d{12}-PipelineNews$/.test(input.release_id), "invalid release ID");
  invariant(input.app_title === "PipelineNews", "fixed app title changed");
  invariant(input.spine.total_projects === input.spine.with_planning_reference + input.spine.without_planning_reference, "spine coverage does not reconcile");
  invariant(input.sources.google_news.enabled, "Google discovery must remain enabled");
  invariant(SOURCE_SCORES.OFFICIAL_GOV_UK > SOURCE_SCORES.ORIGINAL_PUBLISHER, "official sources must outrank publishers");
  invariant(SOURCE_SCORES.ORIGINAL_PUBLISHER > SOURCE_SCORES.NEWS_AGGREGATOR_GOOGLE, "publishers must outrank aggregators");

  const groups = buildReferenceGroups(input.fixture.projects);
  const frontier = selectFrontier(groups, input.fixture.state, input.scheduler.reference_budget_per_run);
  const uniqueGroup = groups.find((group) => group.normalised_reference === normalisePlanningReference("EN0110014"));
  const duplicateGroup = groups.find((group) => group.projects.length > 1);
  invariant(uniqueGroup && duplicateGroup, "binding fixtures incomplete");
  const uniqueBinding = resolvePlanningBinding(input.fixture.planit_unique, uniqueGroup);
  const duplicateBinding = resolvePlanningBinding(input.fixture.planit_duplicate, duplicateGroup);
  invariant(uniqueBinding.repd_ref === "17494", "East Pye regression failed");
  invariant(duplicateBinding.role === "ABSTAIN", "duplicate planning reference must abstain");

  const sourceOrder = Object.entries(SOURCE_SCORES).map(([source_class, score]) => ({ source_class, score })).sort((a, b) => b.score - a.score || a.source_class.localeCompare(b.source_class));
  return {
    schema: "pipelinenews.official-frontier-contract.v1",
    release_id: input.release_id,
    app_title: input.app_title,
    incepted_at: input.incepted_at,
    policy_id: POLICY_ID,
    contract_id: `PN-CONTRACT-${sha256(JSON.stringify(input.spine)).slice(0, 20).toUpperCase()}`,
    spine: input.spine,
    scheduler: { ...input.scheduler, strategy: "PERSISTENT_PRIORITY_FRONTIER", unfinished_work_resumes: true, duplicate_queries_per_run: false },
    source_order: sourceOrder,
    adapters: input.sources,
    fixture_proof: {
      selected_references: frontier.selected.map((group) => group.query_reference),
      next_index: frontier.next_index,
      east_pye_binding: uniqueBinding,
      duplicate_reference_decision: duplicateBinding,
    },
    publication_law: {
      full_repd_spine_retained: true,
      official_sources_rank_above_news: true,
      google_discovery_retained: true,
      original_outlet_gets_outbound_link: true,
      article_body_stored: false,
      empty_fetch_means_no_news: false,
      ambiguous_binding: "ABSTAIN",
      news_may_overwrite_repd: false,
    },
    mission_invariants: input.v1_v5_mission_invariants,
  };
}

Objects — Sha256

A JavaScript module in PipelineNews that fetches solar and battery storage (BESS). It gets JSON (`getJson`) and is built from the by id helper (`byId`).

renderpipelinenews / archive/202608261547-pipelinenews/objects/js/sha256/5096d055234312c574b10d5ff239b91582497289cb58fd6a1faa6b89e16e657f.mjs · lines 1–5 of 5 · version 2026-08-26 15:47 · Not reached from any entry point (candidate for review) · pattern getJson (shared by 15 files)

What it does
It fetches solar and battery storage (BESS). Defines byId, getJson, bytes. Side effects: changes the web page (DOM); makes network requests.
Why it exists in the grid workflow
Domain stage experimental (path word 'archive'): work its own path marks as experimental (sandbox, prototype, archive or similar words); by this evidence it is not part of a production workflow. Domain terms in the code: solar, battery storage (BESS).
Inputs & outputs
In: JSON file release.json.
What it achieves
Defines `byId`, `getJson` and `bytes`.
Why it matters
No other file in the estate was found to import it.
Application
pipelinenews · archive/202608261547-pipelinenews/objects/js/sha256 · JavaScript module
Uses
none found
Used by
none found
Produces
byId, getJson, bytes
Defines here
byId, getJson, bytes
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
pipelinenews@45c944c8640a9d7ae65edb51d66032ba204f3f46 archive/202608261547-pipelinenews/objects/js/sha256/5096d055234312c574b10d5ff239b91582497289cb58fd6a1faa6b89e16e657f.mjs:1-5 · blob 718ecd2d9acece5ac3219b859c4b015fdf6f4ce4 · GitHub at these lines
State
achieves: name · context: readme_derived · stage: output · effects: dom, network · domain stage: experimental · users: none · canonical: unreached_review
const byId=(id)=>document.getElementById(id);
const getJson=async(url)=>{const response=await fetch(url);if(!response.ok)throw new Error(`${response.status}: ${url}`);return response.json();};
const bytes=(value)=>Number(value).toLocaleString("en-GB");
async function start(){const folderUrl=new URL("release.json",document.baseURI);const folder=await getJson(folderUrl);const manifestUrl=new URL(folder.manifest,folderUrl);const manifest=await getJson(manifestUrl);const root=new URL(folder.repository_root,folderUrl);const item=manifest.objects.artifacts.find((entry)=>entry.role==="authority_safe_audited_snapshot");const artifactUrl=new URL(item.pat  … [line shortened here: 1,413 characters; full line on GitHub]
start().catch((error)=>{byId("state").textContent=`Release failed closed: ${error.message}`;byId("state").classList.add("error");});