In this section
- Matcher Bridge transform · pipelinenews / archive/202608261547-pipelinenews/discoveryv1/modules/matcher-bridge.mjs lines 1–80
- Mention Normalizer render · pipelinenews / archive/202608261547-pipelinenews/discoveryv1/modules/mention-normalizer.mjs lines 1–61
- Query Planner transform · pipelinenews / archive/202608261547-pipelinenews/discoveryv1/modules/query-planner.mjs lines 1–78
- Search Adapters transform · pipelinenews / archive/202608261547-pipelinenews/discoveryv1/modules/search-adapters.mjs lines 1–87
- Build Discovery Ledger storage · pipelinenews / archive/202608261547-pipelinenews/discoveryv1/scripts/build-discovery-ledger.mjs lines 1–17
- Check Batch1 Schema test · pipelinenews / archive/202608261547-pipelinenews/discoveryv1/tests/check_batch1_schema.mjs lines 1–29
- Check Batch2 Planner Adapters test · pipelinenews / archive/202608261547-pipelinenews/discoveryv1/tests/check_batch2_planner_adapters.mjs lines 1–57
- Check Batch3 Normalize Credibility test · pipelinenews / archive/202608261547-pipelinenews/discoveryv1/tests/check_batch3_normalize_credibility.mjs lines 1–39
- Check Batch4 Binding test · pipelinenews / archive/202608261547-pipelinenews/discoveryv1/tests/check_batch4_binding.mjs lines 1–34
- PipelineNews — News v1 Page render · pipelinenews / archive/202608261547-pipelinenews/newsv1/index.html lines 1–170
- App News v1 other · pipelinenews / archive/202608261547-pipelinenews/newsv1/scripts/app-newsv1.js lines 1–30
Matcher Bridge
A JavaScript module in PipelineNews that works with solar, wind and the Renewable Energy Planning Database (REPD) register.
transformpipelinenews / archive/202608261547-pipelinenews/discoveryv1/modules/matcher-bridge.mjs · lines 1–80 of 80 · version 2026-08-26 15:47 · Not reached from any entry point (candidate for review) · pattern evidenceFor (shared by 4 files)
- What it does
- It calculates solar, wind and the REPD register. Defines 7 functions or classes, including text, compact, technologyClass, projectTechnology, nameStem.
- 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, wind, the REPD register.
- Downstream impact
- Used directly by 2 files: Discovery Ledger (pipelinenews); Check Batch4 Binding (pipelinenews).
- What it achieves
- It matches discovery mention (`matchDiscoveryMention`) and is built from the technology class helper (`technologyClass`) and the project technology helper (`projectTechnology`). Defines `text`, `compact`, `technologyClass` and 4 more.
- Why it matters
- Imported by Discovery Ledger. Checked by Check Batch4 Binding.
- Application
- pipelinenews · archive/202608261547-pipelinenews/discoveryv1/modules · JavaScript module
- Uses
- none found
- Used by
- imported by Discovery Ledger (import), imported by Check Batch4 Binding (import)
- Produces
- matchDiscoveryMention
- Defines here
- text, compact, technologyClass, projectTechnology, nameStem, evidenceFor, matchDiscoveryMention
- 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/discoveryv1/modules/matcher-bridge.mjs:1-80 · blob 5826678ea984a033bfd682cd040cc6cdeaab7b1f · GitHub at these lines
- State
- achieves: name · context: readme_derived · stage: transform · effects: none found · domain stage: experimental · users: none · canonical: unreached_review
const text = (value) => String(value ?? "").normalize("NFKC").toLowerCase().replace(/[^\p{L}\p{N}]+/gu, " ").trim();
const compact = (value) => text(value).replace(/\s+/gu, "");
const descriptorTail = /\s+(solar\s+farm|solar\s+park|battery\s+storage|energy\s+storage|wind\s+farm|energy\s+park|power\s+station).*$/iu;
const foreignLocation = /\b(usa|united states|california|canada|australia|germany|spain|italy|france|india|china)\b/iu;
function technologyClass(value) {
const source = text(value);
if (/\b(battery|bess|energy storage)\b/u.test(source)) return "BATTERY";
if (/\b(solar|photovoltaic|pv)\b/u.test(source)) return "SOLAR";
if (/\b(offshore wind)\b/u.test(source)) return "WIND_OFFSHORE";
if (/\b(onshore wind|wind farm|wind turbine)\b/u.test(source)) return "WIND_ONSHORE";
return null;
}
function projectTechnology(value) {
const source = text(value);
if (source.includes("battery")) return "BATTERY";
if (source.includes("solar") || source.includes("photovoltaic")) return "SOLAR";
if (source.includes("offshore")) return "WIND_OFFSHORE";
if (source.includes("wind")) return "WIND_ONSHORE";
return null;
}
function nameStem(name) {
const first = String(name ?? "").split(/\s+-\s+|,/u)[0];
return text(first).replace(descriptorTail, "").trim();
}
function evidenceFor(project, haystack, observedTechnology) {
const exactName = haystack.includes(text(project.name));
const stem = nameStem(project.name);
const stemTokens = stem.split(/\s+/u).filter(Boolean);
const stemMatch = stemTokens.length >= 2 && haystack.includes(stem);
const planningReference = compact(project.planning_application_reference);
const planningMatch = planningReference.length >= 6 && compact(haystack).includes(planningReference);
const projectTech = projectTechnology(project.technology);
const technologyMatch = !observedTechnology || observedTechnology === projectTech;
const operatorMatch = text(project.operator).length >= 4 && haystack.includes(text(project.operator));
const locationMatch = text(project.county).length >= 3 && haystack.includes(text(project.county));
const capacityMatch = Number.isFinite(Number(project.capacity_mw)) && new RegExp(`\\b${Number(project.capacity_mw)}\\s*mw\\b`, "iu").test(haystack);
const identityGate = planningMatch || exactName || stemMatch;
const score = (planningMatch ? 10 : 0) + (exactName ? 6 : 0) + (stemMatch ? 4 : 0) + (operatorMatch ? 2 : 0) + (technologyMatch && observedTechnology ? 2 : 0) + (locationMatch ? 1 : 0) + (capacityMatch ? 1 : 0);
return { identity_gate: identityGate, exact_name: exactName, name_stem: stemMatch, planning_reference: planningMatch, operator: operatorMatch, technology: technologyMatch, location: locationMatch, capacity: capacityMatch, score };
}
export function matchDiscoveryMention(mention, projects) {
if (!Array.isArray(projects) || !projects.length) throw new Error("closed REPD gazetteer is required");
const haystack = text(`${mention.title ?? ""} ${mention.snippet ?? ""}`);
if (foreignLocation.test(haystack) && !/\b(uk|united kingdom|england|scotland|wales|northern ireland|norfolk)\b/iu.test(haystack)) {
return { binding_status: "REJECTED", reason: "FOREIGN_LOCATION_CONFLICT", repd_ref: null, gg_project_id: null, candidate_gg_project_ids: [], binding_evidence: { foreign_location_veto: true } };
}
const observedTechnology = technologyClass(haystack);
const candidates = projects.map((project) => ({ project, evidence: evidenceFor(project, haystack, observedTechnology) }))
.filter((row) => row.evidence.identity_gate && row.evidence.technology)
.sort((left, right) => right.evidence.score - left.evidence.score || String(left.project.repd_ref).localeCompare(String(right.project.repd_ref), "en", { numeric: true }));
if (!candidates.length) {
return { binding_status: "ABSTAIN", reason: "NO_IDENTITY_EVIDENCE", repd_ref: null, gg_project_id: null, candidate_gg_project_ids: [], binding_evidence: { observed_technology: observedTechnology, credibility_used: false } };
}
const top = candidates[0];
const tied = candidates.filter((row) => row.evidence.score === top.evidence.score);
if (tied.length !== 1 || top.evidence.score < 4) {
return {
binding_status: "ABSTAIN",
reason: "AMBIGUOUS_IDENTITY_EVIDENCE",
repd_ref: null,
gg_project_id: null,
candidate_gg_project_ids: tied.map((row) => row.project.gg_project_id ?? `GG2050-REPD-${row.project.repd_ref}`),
binding_evidence: { observed_technology: observedTechnology, top_score: top.evidence.score, credibility_used: false }
};
}
return {
binding_status: "PRIMARY_MATCH",
reason: "CLOSED_GAZETTEER_GATES_PASSED",
repd_ref: String(top.project.repd_ref),
gg_project_id: top.project.gg_project_id ?? `GG2050-REPD-${top.project.repd_ref}`,
candidate_gg_project_ids: [top.project.gg_project_id ?? `GG2050-REPD-${top.project.repd_ref}`],
binding_evidence: { ...top.evidence, observed_technology: observedTechnology, credibility_used: false, news_may_overwrite_repd: false }
};
}Mention Normalizer
A JavaScript module in PipelineNews that works with canonical URL (`canonicalUrl`) and min hash signature (`minHashSignature`), using SHA-256.
renderpipelinenews / archive/202608261547-pipelinenews/discoveryv1/modules/mention-normalizer.mjs · lines 1–61 of 61 · version 2026-08-26 15:47 · Not reached from any entry point (candidate for review)
- What it does
- It lists and searches its content. Defines 8 functions or classes, including sha256, canonicalUrl, mentionId, shingles, hash32. 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.
- Downstream impact
- Used directly by 2 files: Discovery Ledger (pipelinenews); Check Batch3 Normalize Credibility (pipelinenews).
- What it achieves
- It is built from the canonical URL helper (`canonicalUrl`), the mention id helper (`mentionId`) and the shingles step (`shingles`). Defines `sha256`, `canonicalUrl`, `mentionId` and 5 more.
- Why it matters
- Imported by Discovery Ledger. Checked by Check Batch3 Normalize Credibility.
- Application
- pipelinenews · archive/202608261547-pipelinenews/discoveryv1/modules · JavaScript module
- Uses
- node:crypto
- Used by
- imported by Discovery Ledger (import), imported by Check Batch3 Normalize Credibility (import)
- Produces
- canonicalUrl, mentionId, minHashSignature, minHashSimilarity, clusterMentions
- Defines here
- sha256, canonicalUrl, mentionId, shingles, hash32, minHashSignature, minHashSimilarity, clusterMentions
- 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/discoveryv1/modules/mention-normalizer.mjs:1-61 · blob 9ad9021b07bfb5c373d0ca5735d340430dd230c5 · GitHub at these lines
- State
- achieves: name · context: readme_derived · stage: output · effects: none found · domain stage: experimental · users: none · canonical: unreached_review
import { createHash } from "node:crypto";
const tracking = /^(utm_.+|fbclid|gclid|mc_.+)$/iu;
const sha256 = (value) => createHash("sha256").update(value).digest("hex");
export function canonicalUrl(rawUrl) {
const url = new URL(rawUrl);
if (!["http:", "https:"].includes(url.protocol)) throw new Error("mention URL must use HTTP(S)");
if (url.username || url.password) throw new Error("URL credentials are forbidden");
url.protocol = "https:";
url.hash = "";
for (const key of [...url.searchParams.keys()]) if (tracking.test(key)) url.searchParams.delete(key);
url.searchParams.sort();
url.pathname = url.pathname.replace(/\/amp\/?$/iu, "/").replace(/\/{2,}/gu, "/");
if (url.pathname.length > 1) url.pathname = url.pathname.replace(/\/+$/u, "");
return url.toString();
}
export function mentionId({ canonical_url, gg_project_id = null, title = "", snippet = "" }) {
const identity = gg_project_id ?? `ABSTAIN:${sha256(`${title}\n${snippet}`).slice(0, 16)}`;
return `PN-MENTION-${sha256(`${canonical_url}\n${identity}`).slice(0, 20).toUpperCase()}`;
}
function shingles(value, width = 3) {
const words = String(value ?? "").normalize("NFKC").toLowerCase().match(/[\p{L}\p{N}]+/gu) ?? [];
if (words.length <= width) return new Set([words.join(" ")].filter(Boolean));
return new Set(Array.from({ length: words.length - width + 1 }, (_, index) => words.slice(index, index + width).join(" ")));
}
function hash32(value, seed) {
let hash = (2166136261 ^ seed) >>> 0;
for (let index = 0; index < value.length; index += 1) {
hash ^= value.charCodeAt(index);
hash = Math.imul(hash, 16777619) >>> 0;
}
return hash;
}
export function minHashSignature(value, components = 64) {
const parts = [...shingles(value)];
if (!parts.length) return Array(components).fill(0);
return Array.from({ length: components }, (_, seed) => Math.min(...parts.map((part) => hash32(part, seed + 1))));
}
export function minHashSimilarity(left, right) {
if (!Array.isArray(left) || left.length !== right.length || !left.length) throw new Error("signatures must have equal non-zero length");
return left.filter((value, index) => value === right[index]).length / left.length;
}
export function clusterMentions(mentions, threshold = 0.85) {
if (!Array.isArray(mentions)) throw new Error("mentions must be an array");
const clusters = [];
return mentions.map((mention) => {
const signature = minHashSignature(`${mention.title} ${mention.snippet}`);
const existing = clusters.find((cluster) => minHashSimilarity(signature, cluster.signature) >= threshold);
if (existing) return { ...mention, cluster_id: existing.cluster_id };
const clusterId = `PN-CLUSTER-${sha256(`${mention.title}\n${mention.snippet}`).slice(0, 20).toUpperCase()}`;
clusters.push({ cluster_id: clusterId, signature });
return { ...mention, cluster_id: clusterId };
});
}Query Planner
A JavaScript module in PipelineNews that works with solar. It queries forms (`queryForms`) and selects daily candidates (`selectDailyCandidates`).
transformpipelinenews / archive/202608261547-pipelinenews/discoveryv1/modules/query-planner.mjs · lines 1–78 of 78 · version 2026-08-26 15:47 · Not reached from any entry point (candidate for review) · pattern finite (shared by 43 files)
- What it does
- It calculates solar. Defines finite, priority, queryForms, siteRestrictedQueries, selectDailyCandidates.
- 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.
- Downstream impact
- Used directly by 1 file: Check Batch2 Planner Adapters (pipelinenews).
- What it achieves
- Defines `finite`, `priority`, `queryForms` and 2 more.
- Why it matters
- Checked by Check Batch2 Planner Adapters.
- Application
- pipelinenews · archive/202608261547-pipelinenews/discoveryv1/modules · JavaScript module
- Uses
- none found
- Used by
- imported by Check Batch2 Planner Adapters (import)
- Produces
- priority, queryForms, siteRestrictedQueries, selectDailyCandidates
- Defines here
- finite, priority, queryForms, siteRestrictedQueries, selectDailyCandidates
- 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/discoveryv1/modules/query-planner.mjs:1-78 · blob 4000e2c3a09405a09f8fb1fa69fc28b148d6089d · GitHub at these lines
- State
- achieves: name · context: readme_derived · stage: transform · effects: none found · domain stage: experimental · users: landowner_planner · canonical: unreached_review
const lifecycleWeight = Object.freeze({
UNDER_CONSTRUCTION: 1,
LIVE_PRE_CONSTRUCTION: 0.85,
UNKNOWN: 0.4,
OPERATIONAL: 0.25,
INACTIVE: 0.05,
});
const descriptorTail = /\s*[-,]?\s*(solar|battery|energy)\s+(farm|park|storage|project|facility|system)s?\b.*$/iu;
const administrativeSegment = /\s+-\s+|,/u;
const finite = (value, fallback = 0) => Number.isFinite(Number(value)) ? Number(value) : fallback;
export function priority(candidate) {
const weight = lifecycleWeight[candidate.lifecycle] ?? 0.3;
const size = Math.min(1, Math.log10(Math.max(finite(candidate.capacity_mw, 1), 1)) / 3);
const stale = Math.min(Math.max(finite(candidate.days_since_last_query), 0) / 90, 1);
const yieldPrior = Math.min(Math.max(finite(candidate.hits_all_time), 0) / 5, 1);
const daysSinceHit = candidate.days_since_last_hit === null || candidate.days_since_last_hit === undefined
? null
: finite(candidate.days_since_last_hit);
const heat = daysSinceHit === null ? 0 : Math.max(0, 1 - daysSinceHit / 60);
return (0.35 * weight) + (0.15 * size) + (0.3 * stale) + (0.1 * yieldPrior) + (0.1 * heat);
}
export function queryForms(name, operator = null) {
const sourceName = String(name ?? "").normalize("NFKC").trim();
if (!sourceName) return [];
const segment = sourceName.split(administrativeSegment)[0].trim();
const stem = segment.replace(descriptorTail, "").trim();
const forms = [];
if (stem.split(/\s+/u).filter(Boolean).length >= 2) {
forms.push(`"${stem} solar"`);
forms.push(operator ? `"${stem}" "${String(operator).trim()}"` : `"${stem}" UK`);
}
forms.push(`"${sourceName}"`);
return [...new Set(forms)].slice(0, 2);
}
export function siteRestrictedQueries(candidate, siteDomain) {
const domain = String(siteDomain ?? "").trim().toLowerCase();
if (!/^[a-z0-9.-]+$/u.test(domain) || domain.includes("..")) throw new Error("site domain must be a hostname");
return queryForms(candidate.name, candidate.operator).map((query) => `${query} site:${domain}`);
}
export function selectDailyCandidates(candidates, budget, { maximumDaysWithoutQuery = 30 } = {}) {
if (!Array.isArray(candidates)) throw new Error("candidates must be an array");
if (!Number.isInteger(budget) || budget < 1) throw new Error("budget must be a positive integer");
if (!Number.isInteger(maximumDaysWithoutQuery) || maximumDaysWithoutQuery < 1) throw new Error("maximumDaysWithoutQuery must be positive");
const rows = candidates.map((candidate) => {
if (!String(candidate.repd_ref ?? "").match(/^\d+$/u)) throw new Error("candidate requires numeric repd_ref");
const neverQueried = candidate.days_since_last_query === null || candidate.days_since_last_query === undefined;
const days = neverQueried ? Number.POSITIVE_INFINITY : finite(candidate.days_since_last_query);
return {
...candidate,
score: priority({ ...candidate, days_since_last_query: neverQueried ? maximumDaysWithoutQuery : days }),
starvation_guard: neverQueried || days >= maximumDaysWithoutQuery,
days_for_ordering: days,
};
});
rows.sort((left, right) =>
Number(right.starvation_guard) - Number(left.starvation_guard)
|| right.days_for_ordering - left.days_for_ordering
|| right.score - left.score
|| String(left.repd_ref).localeCompare(String(right.repd_ref), "en", { numeric: true }));
return rows.slice(0, Math.min(budget, rows.length)).map((row) => ({
repd_ref: String(row.repd_ref),
gg_project_id: `GG2050-REPD-${row.repd_ref}`,
priority: Number(row.score.toFixed(6)),
starvation_guard: row.starvation_guard,
query_forms: queryForms(row.name, row.operator),
}));
}
export { lifecycleWeight };Search Adapters
A JavaScript module in PipelineNews that builds search request (`buildSearchRequest`), using SHA-256. It builds search request (`buildSearchRequest`) and normalises results (`normaliseResults`).
transformpipelinenews / archive/202608261547-pipelinenews/discoveryv1/modules/search-adapters.mjs · lines 1–87 of 87 · version 2026-08-26 15:47 · Not reached from any entry point (candidate for review) · pattern executeSearch (shared by 10 files)
- What it does
- It calculates its inputs. Defines 7 functions or classes, including digest, apex, isRestrictedHost, assertAllowedFetchTarget, buildSearchRequest. 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.
- Downstream impact
- Used directly by 1 file: Check Batch2 Planner Adapters (pipelinenews).
- What it achieves
- Defines `digest`, `apex`, `isRestrictedHost` and 4 more.
- Why it matters
- Checked by Check Batch2 Planner Adapters.
- Application
- pipelinenews · archive/202608261547-pipelinenews/discoveryv1/modules · JavaScript module
- Uses
- node:crypto
- Used by
- imported by Check Batch2 Planner Adapters (import)
- Produces
- userAgent, isRestrictedHost, assertAllowedFetchTarget, buildSearchRequest, executeSearch
- Defines here
- digest, apex, isRestrictedHost, assertAllowedFetchTarget, buildSearchRequest, normaliseResults, executeSearch
- 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/discoveryv1/modules/search-adapters.mjs:1-87 · blob 83bfe0e966c04e2ce945281c9a579c9d892f7451 · 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 userAgent = "GlobalGrid2050Bot/1.0 (+https://globalgrid2050.com/crawler; open-source; contact@ventusltd.com)";
const endpoints = Object.freeze({
brave: "https://api.search.brave.com/res/v1/web/search",
google_cse: "https://customsearch.googleapis.com/customsearch/v1",
serper: "https://google.serper.dev/search",
});
const restrictedApexDigests = new Set([
"68c1e55b7e7549913f34030a5f0d49a94613b05469ac21f5eea1e6cb32cd5eb7"
]);
const digest = (value) => createHash("sha256").update(value).digest("hex");
const apex = (hostname) => hostname.toLowerCase().replace(/^www\./u, "").split(".").slice(-2).join(".");
export function isRestrictedHost(hostname) {
return restrictedApexDigests.has(digest(apex(String(hostname ?? ""))));
}
export function assertAllowedFetchTarget(rawUrl) {
const url = new URL(rawUrl);
if (url.protocol !== "https:") throw new Error("search API requests require HTTPS");
if (isRestrictedHost(url.hostname)) throw new Error("direct retrieval from restricted source is forbidden");
const allowed = Object.values(endpoints).map((value) => new URL(value));
if (!allowed.some((item) => item.hostname === url.hostname && url.pathname.startsWith(item.pathname))) {
throw new Error("target is not a configured search API endpoint");
}
return url;
}
export function buildSearchRequest({ provider, query, credentials = {}, count = 10 }) {
if (!Object.hasOwn(endpoints, provider)) throw new Error(`unsupported search provider: ${provider}`);
if (!String(query ?? "").trim()) throw new Error("query is required");
const limit = Math.max(1, Math.min(Number(count) || 10, 20));
const url = new URL(endpoints[provider]);
const headers = { Accept: "application/json", "User-Agent": userAgent };
let method = "GET";
let body;
if (provider === "brave") {
if (!credentials.apiKey) throw new Error("brave credentials unavailable");
url.searchParams.set("q", query);
url.searchParams.set("count", String(limit));
headers["X-Subscription-Token"] = credentials.apiKey;
} else if (provider === "google_cse") {
if (!credentials.apiKey || !credentials.engineId) throw new Error("google_cse credentials unavailable");
url.searchParams.set("key", credentials.apiKey);
url.searchParams.set("cx", credentials.engineId);
url.searchParams.set("q", query);
url.searchParams.set("num", String(Math.min(limit, 10)));
} else {
if (!credentials.apiKey) throw new Error("serper credentials unavailable");
method = "POST";
headers["X-API-KEY"] = credentials.apiKey;
headers["Content-Type"] = "application/json";
body = JSON.stringify({ q: query, num: limit });
}
assertAllowedFetchTarget(url);
return { provider, url: url.toString(), method, headers, body, redirect: "error" };
}
function normaliseResults(provider, payload) {
const rows = provider === "brave" ? payload?.web?.results : provider === "google_cse" ? payload?.items : payload?.organic;
return (Array.isArray(rows) ? rows : []).map((row) => ({
title: String(row.title ?? "").trim(),
url: String(row.url ?? row.link ?? "").trim(),
snippet: String(row.description ?? row.snippet ?? "").trim().slice(0, 300),
published_at: row.page_age ?? row.date ?? null,
})).filter((row) => row.title && /^https?:\/\//u.test(row.url));
}
export async function executeSearch({ fetchImpl = fetch, provider, query, credentials, count = 10 }) {
const request = buildSearchRequest({ provider, query, credentials, count });
const response = await fetchImpl(request.url, {
method: request.method,
headers: request.headers,
body: request.body,
redirect: request.redirect,
});
if (!response.ok) throw new Error(`${provider} search unavailable: HTTP ${response.status}`);
return normaliseResults(provider, await response.json());
}
export { endpoints };Build Discovery Ledger
A JavaScript module in the scripts folder of PipelineNews that reads east pye discovery and discovery mentions.
storagepipelinenews / archive/202608261547-pipelinenews/discoveryv1/scripts/build-discovery-ledger.mjs · lines 1–17 of 17 · version 2026-08-26 15:47 · Not reached from any entry point (candidate for review)
- What it does
- It loads east pye discovery and discovery mentions. Uses libraries 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 east-pye-discovery.v1.json; JSON file discovery_mentions.json.
- What it achieves
- Its name says it builds discovery ledger. It reads `discoveryv1/fixtures/east-pye-discovery.v1.json`.
- Why it matters
- No other file in the estate was found to import it.
- Application
- pipelinenews · archive/202608261547-pipelinenews/discoveryv1/scripts · JavaScript module
- Uses
- Discovery Ledger (import), node:fs/promises
- 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/discoveryv1/scripts/build-discovery-ledger.mjs:1-17 · blob 8278cb9f81b800e3fc28fdae89c9271a0ca7d02f · GitHub at these lines
- State
- achieves: name · context: readme_derived · stage: output · effects: filesystem · domain stage: experimental · users: none · canonical: unreached_review
import { open, readFile, rename } from "node:fs/promises";
import { buildDiscoveryLedger } from "../modules/discovery-ledger.mjs";
const root = new URL("../../", import.meta.url);
const input = JSON.parse(await readFile(new URL("discoveryv1/fixtures/east-pye-discovery.v1.json", root)));
const output = `${JSON.stringify(buildDiscoveryLedger(input), null, 2)}\n`;
const target = new URL("discoveryv1/data/discovery_mentions.json", root);
const temporary = new URL("discoveryv1/data/.discovery_mentions.json.tmp", root);
const handle = await open(temporary, "w");
try {
await handle.writeFile(output);
await handle.sync();
} finally {
await handle.close();
}
JSON.parse(await readFile(temporary, "utf8"));
await rename(temporary, target);Check Batch1 Schema
A JavaScript module in the tests folder of PipelineNews that tests release discoveryv1, discovery mention schema and lineage scan.
testpipelinenews / archive/202608261547-pipelinenews/discoveryv1/tests/check_batch1_schema.mjs · lines 1–29 of 29 · version 2026-08-26 15:47 · Not reached from any entry point (candidate for review)
- What it does
- It tests release discoveryv1, discovery mention schema and lineage scan. Defines json. Uses libraries node:assert/strict, 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.discoveryv1.json; JSON file discovery-mention.v1.schema.json; JSON file 202608251701-lineage-scan.json.
- What it achieves
- Its name says it checks Batch1 schema. Defines `json`.
- Why it matters
- No other file in the estate was found to import it.
- Application
- pipelinenews · archive/202608261547-pipelinenews/discoveryv1/tests · JavaScript module
- Uses
- node:assert/strict, node:fs/promises
- Used by
- none found
- Produces
- json
- Defines here
- json
- 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/discoveryv1/tests/check_batch1_schema.mjs:1-29 · blob 9c1c68589b49ad032dc2e2f7dd21fce6c49251a4 · 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 { readFile } from "node:fs/promises";
const root = new URL("../../", import.meta.url);
const json = async (path) => JSON.parse(await readFile(new URL(path, root)));
const contract = await json("discoveryv1/contracts/release.discoveryv1.json");
const schema = await json("discoveryv1/contracts/discovery-mention.v1.schema.json");
const lineage = await json("reports/202608251701-lineage-scan.json");
assert.equal(contract.release, "discoveryv1");
assert.equal(contract.status, "CANDIDATE");
assert.equal(contract.acceptance.repd_mutation_allowed, false);
assert.equal(contract.acceptance.credibility_may_gate_identity, false);
assert.equal(contract.acceptance.outbound_result_fetch_allowed, false);
assert.equal(contract.acceptance.abstentions_retained, true);
assert.deepEqual(contract.data_law.primary_key, ["mention_id"]);
assert.equal(schema.properties.snippet.maxLength, 300);
assert.equal(schema.properties.credibility.minimum > 0, true);
assert.match(schema.properties.gg_project_id.pattern, /GG2050-REPD/);
assert.equal(schema.allOf.length, 2);
assert.equal(lineage.scan_method, "Git tree and blob identity plus byte length");
assert.equal(lineage.legacy_integrity.versions.V1.git_blob, "e2d99e37d6388d3f498a79696773238ad689574b");
assert.equal(lineage.legacy_integrity.versions.V9.git_tree, "2c30c2df03c68b19e6dd0ca0d51508619eb7c804");
assert.equal(lineage.news_layers.newsv1.files, 48);
assert.equal(lineage.news_layers.newsv7.files, 53);
assert.equal(lineage.timestamp_releases["202608251700-pipelinenews"].files, 3);
console.log("PASS DiscoveryV1 batch 1: schema frozen; abstention representable; V1-V9 and NewsV1-NewsV7 lineage pinned");Check Batch2 Planner Adapters
A JavaScript module in the tests folder of PipelineNews that tests search adapters and solar. It is built from the fake fetch helper (`fakeFetch`).
testpipelinenews / archive/202608261547-pipelinenews/discoveryv1/tests/check_batch2_planner_adapters.mjs · lines 1–57 of 57 · version 2026-08-26 15:47 · Not reached from any entry point (candidate for review) · pattern fakeFetch (shared by 2 files)
- What it does
- It tests search adapters and solar. Defines fakeFetch. Uses libraries node:assert/strict, 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. Domain terms in the code: solar.
- Inputs & outputs
- In: JSON file search-adapters.v1.json.
- What it achieves
- Its name says it checks Batch2 planner adapters. Defines `fakeFetch`. It reads `../contracts/search-adapters.v1.json`.
- Why it matters
- No other file in the estate was found to import it.
- Application
- pipelinenews · archive/202608261547-pipelinenews/discoveryv1/tests · JavaScript module
- Uses
- Query Planner (import), Search Adapters (import), node:assert/strict, node:fs/promises
- Used by
- none found
- Produces
- fakeFetch
- Defines here
- fakeFetch
- 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/discoveryv1/tests/check_batch2_planner_adapters.mjs:1-57 · blob 8299b350aac9c268700ed540c675aadb90ded181 · GitHub at these lines
- State
- achieves: name · context: readme_derived · stage: ingest · effects: filesystem · domain stage: experimental · users: landowner_planner · canonical: unreached_review
import assert from "node:assert/strict";
import { readFile } from "node:fs/promises";
import { priority, queryForms, selectDailyCandidates, siteRestrictedQueries } from "../modules/query-planner.mjs";
import { assertAllowedFetchTarget, buildSearchRequest, endpoints, executeSearch, isRestrictedHost } from "../modules/search-adapters.mjs";
const contract = JSON.parse(await readFile(new URL("../contracts/search-adapters.v1.json", import.meta.url)));
assert.deepEqual(contract.providers, ["brave", "google_cse", "serper"]);
assert.equal(contract.fetch_policy.outbound_result_page_fetch, false);
assert.equal(contract.maximum_days_without_query, 30);
const eastPye = { repd_ref: "17494", name: "East Pye Solar Farm", operator: "Island Green Power", lifecycle: "LIVE_PRE_CONSTRUCTION", capacity_mw: 500, days_since_last_query: 31, days_since_last_hit: 1, hits_all_time: 2 };
assert.deepEqual(queryForms(eastPye.name, eastPye.operator), ['"East Pye solar"', '"East Pye" "Island Green Power"']);
assert.equal(siteRestrictedQueries(eastPye, "professional-network.example")[0], '"East Pye solar" site:professional-network.example');
assert.equal(priority(eastPye) > 0.5, true);
const corpus = Array.from({ length: 7680 }, (_, index) => ({
repd_ref: String(index + 1),
name: `Project ${index + 1} Solar Farm`,
operator: null,
lifecycle: index % 5 === 0 ? "UNDER_CONSTRUCTION" : index % 5 === 1 ? "LIVE_PRE_CONSTRUCTION" : index % 5 === 2 ? "OPERATIONAL" : index % 5 === 3 ? "INACTIVE" : "UNKNOWN",
capacity_mw: (index % 1000) + 1,
days_since_last_query: null,
days_since_last_hit: null,
hits_all_time: 0,
}));
const seen = new Set();
for (let day = 0; day < 30; day += 1) {
const selected = selectDailyCandidates(corpus, 400, { maximumDaysWithoutQuery: 30 });
for (const row of corpus) {
if (selected.some((item) => item.repd_ref === row.repd_ref)) {
row.days_since_last_query = 0;
seen.add(row.repd_ref);
} else if (row.days_since_last_query !== null) row.days_since_last_query += 1;
}
}
assert.equal(seen.size, 7680, "full corpus must not starve");
for (const endpoint of Object.values(endpoints)) assert.doesNotThrow(() => assertAllowedFetchTarget(endpoint));
const restrictedFixture = ["link", "edin.com"].join("");
assert.equal(isRestrictedHost(restrictedFixture), true);
assert.equal(isRestrictedHost(`news.${restrictedFixture}`), true);
assert.throws(() => assertAllowedFetchTarget(`https://${restrictedFixture}/posts/example`), /forbidden/);
assert.throws(() => assertAllowedFetchTarget("https://example.com/article"), /not a configured/);
assert.throws(() => buildSearchRequest({ provider: "brave", query: "test" }), /credentials unavailable/);
let requested;
const fakeFetch = async (url, options) => {
requested = { url, options };
return { ok: true, status: 200, json: async () => ({ web: { results: [{ title: "Result", url: "https://publisher.example/item", description: "x".repeat(500) }] } }) };
};
const results = await executeSearch({ fetchImpl: fakeFetch, provider: "brave", query: '"East Pye"', credentials: { apiKey: "fixture" } });
assert.equal(requested.options.redirect, "error");
assert.match(requested.url, /^https:\/\/api\.search\.brave\.com\//u);
assert.equal(results[0].snippet.length, 300);
assert.equal(results[0].url, "https://publisher.example/item");
console.log("PASS DiscoveryV1 batch 2: deterministic priority queue; 30-day starvation guard; search-API-only adapters");Check Batch3 Normalize Credibility
A JavaScript module in the tests folder of PipelineNews that tests solar.
testpipelinenews / archive/202608261547-pipelinenews/discoveryv1/tests/check_batch3_normalize_credibility.mjs · lines 1–39 of 39 · version 2026-08-26 15:47 · Not reached from any entry point (candidate for review)
- What it does
- It tests solar. Uses libraries node:assert/strict, 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. Domain terms in the code: solar.
- Inputs & outputs
- In: JSON file credibility.v1.json.
- What it achieves
- Its name says it checks Batch3 normalize credibility. It reads `../contracts/credibility.v1.json`.
- Why it matters
- No other file in the estate was found to import it.
- Application
- pipelinenews · archive/202608261547-pipelinenews/discoveryv1/tests · JavaScript module
- Uses
- Credibility (import), Mention Normalizer (import), node:assert/strict, node:fs/promises
- 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/discoveryv1/tests/check_batch3_normalize_credibility.mjs:1-39 · blob 6d655dde480462a0ddc9d75ed8e504bbe2364bf7 · 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 { readFile } from "node:fs/promises";
import { credibilityForDomain, eventConfidence } from "../modules/credibility.mjs";
import { canonicalUrl, clusterMentions, mentionId, minHashSignature, minHashSimilarity } from "../modules/mention-normalizer.mjs";
const contract = JSON.parse(await readFile(new URL("../contracts/credibility.v1.json", import.meta.url)));
assert.equal(contract.identity_gate, false);
assert.equal(contract.default_credibility, 0.3);
assert.equal(contract.zero_credibility_allowed, false);
assert.equal(contract.canonicalisation.network_requests, false);
assert.equal(credibilityForDomain("planning.data.gov.uk"), 1);
assert.equal(credibilityForDomain("www.bbc.co.uk"), 0.6);
assert.equal(credibilityForDomain("energy-storage.news"), 0.7);
assert.equal(credibilityForDomain("unknown.example"), 0.3);
const restrictedFixture = ["link", "edin.com"].join("");
assert.equal(credibilityForDomain(`www.${restrictedFixture}`), 0.3);
assert.equal(eventConfidence([{ source_domain: restrictedFixture, credibility: 0.3 }, { source_domain: "gov.uk", credibility: 1 }]), 1);
assert.equal(eventConfidence([{ source_domain: "one.example", credibility: 0.3 }, { source_domain: "two.example", credibility: 0.3 }]), 0.35);
const canonical = canonicalUrl("http://publisher.example/story/amp/?utm_source=test&b=2&a=1#section");
assert.equal(canonical, "https://publisher.example/story?a=1&b=2");
const id = mentionId({ canonical_url: canonical, gg_project_id: "GG2050-REPD-17494" });
assert.match(id, /^PN-MENTION-[A-F0-9]{20}$/u);
const first = "East Pye solar scheme near Long Stratton in Norfolk gains a new milestone";
const copied = "East Pye solar scheme near Long Stratton in Norfolk gains a new milestone";
const unrelated = "Offshore wind turbine maintenance contract awarded in Scotland";
assert.equal(minHashSimilarity(minHashSignature(first), minHashSignature(copied)), 1);
assert.equal(minHashSimilarity(minHashSignature(first), minHashSignature(unrelated)) < 0.5, true);
const clustered = clusterMentions([
{ mention_id: "a", title: first, snippet: "" },
{ mention_id: "b", title: copied, snippet: "" },
{ mention_id: "c", title: unrelated, snippet: "" }
]);
assert.equal(clustered[0].cluster_id, clustered[1].cluster_id);
assert.notEqual(clustered[0].cluster_id, clustered[2].cluster_id);
console.log("PASS DiscoveryV1 batch 3: URL normalization is offline; MinHash dedupe deterministic; event credibility is monotonic and identity-neutral");Check Batch4 Binding
A JavaScript module in the tests folder of PipelineNews that tests east pye discovery and the Renewable Energy Planning Database (REPD) register.
testpipelinenews / archive/202608261547-pipelinenews/discoveryv1/tests/check_batch4_binding.mjs · lines 1–34 of 34 · version 2026-08-26 15:47 · Not reached from any entry point (candidate for review)
- What it does
- It tests east pye discovery and the REPD register. Uses libraries node:assert/strict, 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. Domain terms in the code: the REPD register.
- Inputs & outputs
- In: JSON file east-pye-discovery.v1.json; JSON file binding.v1.json.
- What it achieves
- Its name says it checks Batch4 binding. It reads `../fixtures/east-pye-discovery.v1.json`.
- Why it matters
- No other file in the estate was found to import it.
- Application
- pipelinenews · archive/202608261547-pipelinenews/discoveryv1/tests · JavaScript module
- Uses
- Discovery Ledger (import), Matcher Bridge (import), node:assert/strict, node:fs/promises
- 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/discoveryv1/tests/check_batch4_binding.mjs:1-34 · blob 8ce0ddd3bfce2ed264e0036fa74b7c69da0296e9 · 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 { readFile } from "node:fs/promises";
import { buildDiscoveryLedger } from "../modules/discovery-ledger.mjs";
import { matchDiscoveryMention } from "../modules/matcher-bridge.mjs";
const fixture = JSON.parse(await readFile(new URL("../fixtures/east-pye-discovery.v1.json", import.meta.url)));
const contract = JSON.parse(await readFile(new URL("../contracts/binding.v1.json", import.meta.url)));
const ledger = buildDiscoveryLedger(fixture);
assert.equal(ledger.fixture_only, true);
assert.equal(ledger.publication_status, "REGRESSION_FIXTURE_ONLY");
assert.equal(ledger.counts.observations, 2);
assert.equal(ledger.counts.primary_match, 1);
assert.equal(ledger.counts.abstain, 1);
assert.equal(ledger.mentions.length, 2, "abstention must be retained");
const headline = ledger.mentions.find((row) => row.binding_status === "ABSTAIN");
const snippet = ledger.mentions.find((row) => row.binding_status === "PRIMARY_MATCH");
assert.equal(headline.title, contract.regression.headline);
assert.equal(headline.gg_project_id, null);
assert.equal(snippet.repd_ref, "17494");
assert.equal(snippet.gg_project_id, "GG2050-REPD-17494");
assert.notEqual(snippet.repd_ref, "20670");
assert.equal(snippet.binding_evidence.technology, true);
assert.equal(snippet.binding_evidence.credibility_used, false);
assert.equal(snippet.snippet.length <= 300, true);
assert.equal(Object.hasOwn(snippet, "body"), false);
const low = matchDiscoveryMention({ ...fixture.observations[1], credibility: 0.3 }, fixture.projects);
const high = matchDiscoveryMention({ ...fixture.observations[1], credibility: 1 }, fixture.projects);
assert.deepEqual(low, high, "credibility must never gate identity");
const foreign = matchDiscoveryMention({ title: "East Pye solar project in California, USA", snippet: "" }, fixture.projects);
assert.equal(foreign.binding_status, "REJECTED");
console.log("PASS DiscoveryV1 batch 4: headline abstains; identifying snippet binds only GG2050-REPD-17494; credibility cannot change identity");PipelineNews — News v1 Page
A web page that reads inputs for news, county and sort projects (units: MW), covering the Renewable Energy Planning Database (REPD) register, solar and battery storage (BESS). Published at https://ventusltd.github.io/pipelinenews/archive/202608261547-pipelinenews/newsv1/.
renderpipelinenews / archive/202608261547-pipelinenews/newsv1/index.html · lines 1–170 of 170 · version 2026-08-26 15:47 · Entry point
- What it does
- It draws the REPD register, solar and battery storage (BESS). Uses libraries styles/v7.css?v=newsv1. 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. Domain terms in the code: the REPD register, solar, battery storage (BESS).
- Inputs & outputs
- In: form fields (user input). Out: web page.
- Downstream impact
- Used directly by 3 files: PipelineNews — PipelineNews Page (pipelinenews, https://ventusltd.github.io/pipelinenews/archive/202608261547-pipelinenews/202608251651-PipelineNews/); Check News v1 (pipelinenews); PipelineNews — News v7 Page (pipelinenews, https://ventusltd.github.io/pipelinenews/archive/202608261547-pipelinenews/newsv7/). It is itself an entry point, published at https://ventusltd.github.io/pipelinenews/archive/202608261547-pipelinenews/newsv1/.
- What it achieves
- UK Renewables News V1. Its code works with 1 MW.
- Why it matters
- Loaded by the PipelineNews page at https://ventusltd.github.io/pipelinenews/archive/202608261547-pipelinenews/202608251651-PipelineNews/ and 1 other page. Checked by Check News v1.
- Application
- pipelinenews · archive/202608261547-pipelinenews/newsv1 · page
- Uses
- Mobile (stylesheet), V9 3 (stylesheet), V9 4 (stylesheet), V9 5 1 (stylesheet), V9 6 1 (stylesheet), Performance News v1 (stylesheet), UK Renewables Pipeline — V9 7 Page (link), UK Renewables Pipeline — V9 6 2 Page (link), and 16 more, styles/v7.css?v=newsv1
- Used by
- linked from PipelineNews — PipelineNews Page (link), referenced by Check News v1 (new URL import.meta.url), linked from PipelineNews — News v7 Page (link)
- 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/newsv1/index.html:1-170 · blob 883361dbf3a148c9bfbac99099858bd152dd9bea · GitHub at these lines
- State
- achieves: comment · context: readme_derived · stage: output · effects: dom · domain stage: experimental · users: none · canonical: production_core
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Pipeline News | UK Renewables News V1</title>
<link rel="stylesheet" href="styles/v7.css?v=newsv1">
<link rel="stylesheet" href="styles/mobile.css?v=newsv1">
<link rel="stylesheet" href="styles/v9-3.css?v=newsv1">
<link rel="stylesheet" href="styles/v9-4.css?v=newsv1">
<link rel="stylesheet" href="styles/v9-5-1.css?v=newsv1">
<link rel="stylesheet" href="styles/v9-6-1.css?v=newsv1">
<link rel="stylesheet" href="styles/performance-newsv1.css?v=newsv1">
</head>
<body>
<aside class="sidebar">
<div class="brand">
<b>GLOBALGRID2050</b>
<small>UK RENEWABLES PIPELINE · NEWS V1</small>
</div>
<nav class="nav">
<a class="active" href="#">NEWS V1 CANDIDATE</a>
<a href="https://globalgrid2050.com/uk_renewables_pipeline/v9.7/">V9.7 FROZEN SOURCE</a>
<a href="https://globalgrid2050.com/uk_renewables_pipeline/v9.6.2/">V9.6.2 LIVE VALIDATED</a>
<a href="https://globalgrid2050.com/uk_renewables_pipeline/v9.6.1/">V9.6.1 FROZEN APP</a>
<a href="https://globalgrid2050.com/uk_renewables_pipeline/v9.6/">V9.6 DISCONTINUED</a>
<a href="https://globalgrid2050.com/uk_renewables_pipeline/v9.5.1/">V9.5.1 FROZEN APP</a>
<a href="https://globalgrid2050.com/uk_renewables_pipeline/v9.5/">V9.5 FROZEN APP</a>
<a href="https://globalgrid2050.com/uk_renewables_pipeline/v9.4/">V9.4 FROZEN APP</a>
<a href="https://globalgrid2050.com/uk_renewables_pipeline/v9/">V9.3.1 FROZEN APP</a>
<a href="https://github.com/Ventusltd/globalgrid2050/tree/eee4cf7d854bf44235c249d337c2aad3916bcdc0/uk_renewables_pipeline/v9" target="_blank" rel="noopener">V9.3 CHECKPOINT</a>
<a href="https://github.com/Ventusltd/globalgrid2050/tree/77085a5dc8a8ce42cd4de7dad927eaf9aaf785ee/uk_renewables_pipeline/v9" target="_blank" rel="noopener">V9.2 CHECKPOINT</a>
<a href="https://github.com/Ventusltd/globalgrid2050/tree/59f74e319fbaad62abdb995107dba5759d7f3ca2/uk_renewables_pipeline/v9" target="_blank" rel="noopener">V9.1 CHECKPOINT</a>
<a href="https://globalgrid2050.com/uk_renewables_pipeline/v8/">V8.1 FALLBACK</a>
<a href="https://globalgrid2050.com/uk_renewables_pipeline/v7/">V7 FALLBACK</a>
<a href="https://globalgrid2050.com/uk_renewables_pipeline/dashboard_v6_live.html">V6</a>
<a href="https://globalgrid2050.com/uk_renewables_pipeline/dashboard_v5_live.html">V5</a>
<a href="https://globalgrid2050.com/uk_renewables_pipeline/dashboard_v4_live.html">V4</a>
<a href="https://globalgrid2050.com/uk_renewables_pipeline/dashboard_v3_live_2026-08-22.html">V3</a>
<a href="https://globalgrid2050.com/uk_renewables_pipeline/dashboard_v2_2026-08-22.html">V2</a>
<a href="https://globalgrid2050.com/uk_renewables_pipeline/dashboard.html">V1 LEGACY</a>
<a href="https://globalgrid2050.com/">DIRECTORY</a>
<a href="https://globalgrid2050.com/repd_grid_atlasv8/">MAP ATLAS</a>
<a href="#" id="export">EXPORT CSV</a>
</nav>
</aside>
<main class="main">
<div class="header">
<h1>UK RENEWABLES PIPELINE NEWS V1</h1>
<div class="status">● 133 HEADLINES · 45 UK · 19 INTERNATIONAL · FULL ≥1 MW</div>
</div>
<div class="meta">
<strong>NEWS V1 · V9.8 PERFORMANCE LINEAGE · CANDIDATE · 24 August 2026</strong>
<span>Canonical DESNZ REPD Q2 2026: 7,680 solar, BESS and wind records at ≥1 MW.</span>
<span id="releaseMeta" class="release-meta">Loading canonical release contract…</span>
<a href="https://www.gov.uk/government/publications/renewable-energy-planning-database-quarterly-extract" target="_blank" rel="noopener">Official REPD source</a>
</div>
<section class="newspaper">
<div class="masthead">
<h2>GLOBALGRID2050 <span>ENERGY DAILY</span></h2>
<div class="strap">
<span>UK requires canonical REPD binding · INTERNATIONAL is read from a committed build-time decision ledger · regional items never drive REPD project signals</span>
<span id="newsMeta">loading daily edition…</span>
</div>
</div>
<div class="news-tools" id="newsTools">
<button class="active" data-news="ALL">ALL</button>
<button data-news="UK">UK</button>
<button data-news="INTERNATIONAL">INTERNATIONAL</button>
<button data-news="US">US</button>
<button data-news="EUROPE">EUROPE</button>
<button data-news="SOLAR">SOLAR</button>
<button data-news="BESS">BESS</button>
<button data-news="CONSENT">CONSENT</button>
<button data-news="CONSTRUCTION">CONSTRUCTION</button>
<button data-news="OPERATIONAL">OPERATIONAL</button>
<button data-news="FINANCE">FINANCE / M&A</button>
<input id="newsSearch" placeholder="SEARCH HEADLINES / PROJECT / OPERATOR">
</div>
<div class="paper">
<div class="stories" id="stories">
<div class="news-empty">Loading today’s major-project newspaper…</div>
</div>
</div>
</section>
<h2 class="section-title">REPD PIPELINE ANALYTICS</h2>
<div class="gauges">
<div class="card">
<h3>FILTERED CAPACITY (MW)</h3>
<div class="chart"><canvas id="g1"></canvas><div class="value" id="v1">0</div></div>
</div>
<div class="card">
<h3>FILTERED PROJECTS (≥1MW)</h3>
<div class="chart"><canvas id="g2"></canvas><div class="value" id="v2">0</div></div>
</div>
<div class="card">
<h3>LARGEST SINGLE SITE (MW)</h3>
<div class="chart"><canvas id="g3"></canvas><div class="value" id="v3">0</div></div>
</div>
</div>
<div class="filters" id="tech">
<button class="btn active" data-technology="all" aria-pressed="true">ALL TECH</button>
<button class="btn" data-technology="solar" aria-pressed="false">SOLAR</button>
<button class="btn" data-technology="bess" aria-pressed="false">BATTERY</button>
<button class="btn" data-technology="wind_onshore" aria-pressed="false">ONSHORE</button>
<button class="btn" data-technology="wind_offshore" aria-pressed="false">OFFSHORE</button>
</div>
<div class="filters" id="status">
<button class="btn active" data-official-status="All" aria-pressed="true">ALL STATUS</button>
<button class="btn" data-official-status="Operational" aria-pressed="false">OPERATIONAL</button>
<button class="btn" data-official-status="Under Construction" aria-pressed="false">CONSTRUCTING</button>
<button class="btn" data-official-status="Awaiting Construction" aria-pressed="false">AWAITING</button>
<button class="btn" data-official-status="Application Submitted" aria-pressed="false">SUBMITTED</button>
</div>
<div class="filters">
<select id="county"><option value="All">🌍 ALL COUNTIES</option></select>
<select id="sortProjects" aria-label="Sort projects">
<option value="capacity_desc">SORT: CAPACITY (DEFAULT)</option>
<option value="updated_desc">SORT: REPD UPDATED — NEWEST</option>
<option value="updated_asc">SORT: REPD UPDATED — OLDEST</option>
</select>
<input id="search" class="asset-search" placeholder="🔍 SEARCH PROJECT / REPD / GLOBALGRID / PLANNING..." autocomplete="off">
<button class="btn clear-filters" id="clearFilters">CLEAR FILTERS</button>
<button class="btn export-inline" id="exportInline">EXPORT FILTERED CSV</button>
<span id="resultsMeta" class="results-meta">Loading all qualifying records…</span>
<span id="exportMeta" class="export-meta">CSV contains the current filtered rows only</span>
</div>
<div class="meta">
<strong>STATUS DISCIPLINE</strong>
<span><b>DEFAULT:</b> every qualifying ≥1 MW record is loaded. Filters are user controls; they never redefine or truncate the pipeline.</span>
<span><b>NEWS:</b> relevance scores are algorithmic screening only and never change an official REPD fact.</span>
<span><b>ATLAS:</b> valid geometry resolves the exact REPD Ref. Missing geometry remains in search and CSV and is labelled NO MAP.</span>
</div>
<div class="tablewrap">
<table>
<thead>
<tr>
<th>SITE NAME</th>
<th class="hide-mobile">COUNTY</th>
<th class="hide-mobile">OPERATOR</th>
<th>TECHNOLOGY</th>
<th>OFFICIAL REPD STATUS</th>
<th>OFFICIAL CAPACITY</th>
<th class="hide-mobile">REPD REF</th>
<th class="hide-mobile">GLOBALGRID REF</th>
<th class="hide-mobile repd-updated-heading" id="repdUpdatedHeader" aria-sort="none">
<button id="sortUpdated" type="button" aria-label="Sort by REPD updated date, newest first">
REPD UPDATED <span id="updatedSortIndicator" aria-hidden="true">↕</span>
</button>
</th>
<th>NEWS SIGNAL</th>
<th>ACTIONS</th>
</tr>
</thead>
<tbody id="tbody"></tbody>
</table>
</div>
<nav class="project-pager" id="projectPager" aria-label="Project result pages">
<button class="btn" id="projectPrev" type="button">← PREVIOUS</button>
<span id="projectPageStatus" aria-live="polite">Loading project page…</span>
<button class="btn" id="projectNext" type="button">NEXT →</button>
</nav>
</main>
<script type="module" src="scripts/app-newsv1.js?v=newsv1"></script>
<script type="module" src="scripts/plugins/capacity-presentation-v9-3.js?v=newsv1"></script>
</body>
</html>App News v1
A JavaScript module in the scripts folder of PipelineNews.
otherpipelinenews / archive/202608261547-pipelinenews/newsv1/scripts/app-newsv1.js · lines 1–30 of 30 · version 2026-08-26 15:47 · Entry point
- 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 v1 Page (pipelinenews, https://ventusltd.github.io/pipelinenews/archive/202608261547-pipelinenews/newsv1/). Reached from 2 other entry points, including PipelineNews — News v7 Page (pipelinenews, https://ventusltd.github.io/pipelinenews/archive/202608261547-pipelinenews/newsv7/); 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 v1 page at https://ventusltd.github.io/pipelinenews/archive/202608261547-pipelinenews/newsv1/.
- Application
- pipelinenews · archive/202608261547-pipelinenews/newsv1/scripts · JavaScript module
- Uses
- Gauges V9 2 (import), Newspaper News v1 (import), Projects News v1 (import), Plugin Host (import)
- Used by
- loaded by PipelineNews — News v1 Page (script src)
- 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/newsv1/scripts/app-newsv1.js:1-30 · blob b7c1f6578a5716e3e7506ee5aaf4dd1dcdad867a · GitHub at these lines
- State
- achieves: name · context: readme_derived · stage: unknown · effects: none found · domain stage: experimental · users: none · canonical: production_core
import { initialiseGaugesV9_2, loadGaugeChartsNewsV1 } from "./plugins/gauges-v9-2.js";
import { bindNewspaperNewsV1, loadNewsNewsV1 } from "./plugins/newspaper-newsv1.js";
import {
bindProjectControlsNewsV1,
loadProjectsNewsV1,
refreshProjectsNewsV1,
} from "./plugins/projects-newsv1.js";
import { startPlugins } from "./core/plugin-host.js";
startPlugins([
{ id: "gauges", start: initialiseGaugesV9_2 },
{
id: "newspaper",
dependsOn: ["gauges"],
start() {
bindNewspaperNewsV1(refreshProjectsNewsV1);
loadNewsNewsV1();
},
},
{
id: "projects",
dependsOn: ["gauges", "newspaper"],
start() {
bindProjectControlsNewsV1();
loadProjectsNewsV1();
},
},
]);
loadGaugeChartsNewsV1();