GLOBALGRID2050 / EXPLORE CODE

Part of: Explore Code / Maps, GIS and field navigation / gridatlas / tools/proofs

Layers Visible Browser and 19 more files

A JavaScript module in the proofs folder of GridAtlas that works with panel visible (`panelVisible`). It is built from the panel visible helper (`panelVisible`).

660 lines of JavaScript from gridatlas, in 20 files. Topic: Maps, GIS and field navigation. Section 650 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. Vicinity Focus Browser render · gridatlas / tools/proofs/202611222130-vicinity-focus.browser.mjs lines 1–99
  2. Vicinity A4 Browser render · gridatlas / tools/proofs/202611222325-vicinity-a4.browser.mjs lines 1–74
  3. Layers Visible Browser render · gridatlas / tools/proofs/202611222343-layers-visible.browser.mjs lines 1–109
  4. Vicinity Controls Rescue Proof interaction · gridatlas / tools/proofs/202611222343-vicinity-controls-rescue.proof.mjs lines 1–76
  5. Vicinity Legal Evidence Proof render · gridatlas / tools/proofs/202611280016-vicinity-legal-evidence.proof.mjs lines 1–39
  6. SatNav Start Walk Proof other · gridatlas / tools/proofs/202612012118-satnav-start-walk.proof.mjs lines 1–2
  7. SatNav Waypoint Map Proof other · gridatlas / tools/proofs/202612012118-satnav-waypoint-map.proof.mjs lines 1–2
  8. UK Offtakers Overlay Proof other · gridatlas / tools/proofs/202612012118-uk-offtakers-overlay.proof.mjs lines 1–2
  9. Vicinity Focus Proof other · gridatlas / tools/proofs/202612012118-vicinity-focus.proof.mjs lines 1–2
  10. Unified Owner Test Proof test · gridatlas / tools/proofs/202612020056-unified-owner-test.proof.mjs lines 1–44
  11. Owner Test Proof test · gridatlas / tools/proofs/202612020205-owner-test.proof.mjs lines 1–27
  12. Convergence Proof ingest · gridatlas / tools/proofs/202612020930-convergence.proof.mjs lines 1–46
  13. Distance Dock Proof geodesy · gridatlas / tools/proofs/202612021205-distance-dock.proof.mjs lines 1–36
  14. Orient14 Proof interaction · gridatlas / tools/proofs/202612030153-orient14.proof.mjs lines 1–36
  15. Orient16 Proof ingest · gridatlas / tools/proofs/202612031130-orient16.proof.mjs lines 1–6
  16. Orient16 Recovery Proof ingest · gridatlas / tools/proofs/202612031235-orient16-recovery.proof.mjs lines 1–6
  17. Orient16 Responsive Proof ingest · gridatlas / tools/proofs/202612031346-orient16-responsive.proof.mjs lines 1–6
  18. Orient17 Regional Proof ingest · gridatlas / tools/proofs/202612031704-orient17-regional.proof.mjs lines 1–12
  19. Orient17b Proof ingest · gridatlas / tools/proofs/202612040110-orient17b.proof.mjs lines 1–13
  20. Orient17a Proof ingest · gridatlas / tools/proofs/202612040127-orient17a.proof.mjs lines 1–23

Vicinity Focus Browser

A JavaScript module in the proofs folder of GridAtlas covering substations and the Renewable Energy Planning Database (REPD) register.

rendergridatlas / tools/proofs/202611222130-vicinity-focus.browser.mjs · lines 1–99 of 99 · version 2026-11-22 21:30 · Entry point

What it does
Uses libraries node:assert/strict, node:fs, node:path, playwright. Side effects: changes the web page (DOM); reads or writes files.
Why it exists in the grid workflow
Domain stage upstream_foresight (repository name word 'gridatlas'): upstream engineering foresight over GB transmission and distribution topology (TSO/DNO, 132kV and above, the REPD pipeline, data centres), which Ventus Ltd states it models for foresight. Domain terms in the code: substations, the REPD register, 132kV.
Inputs & outputs
Out: JSON file receipt.json. Voltage levels named: 132kV.
Downstream impact
Used directly by 1 file: GridAtlas PR File Size Guard Workflow (gridatlas).
What it achieves
Its code works with 132 kV.
Why it matters
Run by GridAtlas PR File Size Guard Workflow.
Application
gridatlas · tools/proofs · JavaScript module
Uses
Serve (import), node:assert/strict, node:fs, node:path, playwright
Used by
run by GridAtlas PR File Size Guard Workflow (workflow run)
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
gridatlas@98b5004c5eda9f2ed915fb6fca4b9bbcaa426ca5 tools/proofs/202611222130-vicinity-focus.browser.mjs:1-99 · blob 56513361a8ad201d23cc575fad8303eca8c2607d · GitHub at these lines
State
achieves: name · context: readme_derived · stage: output · effects: dom, filesystem · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: production_core
import assert from 'node:assert/strict';
import fs from 'node:fs';
import path from 'node:path';
import {chromium,webkit} from 'playwright';
import {createPreviewServer} from '../journey/serve.mjs';
const engine=process.env.VICINITY_BROWSER||'chromium';
assert.ok(['chromium','webkit'].includes(engine));
const browser=await (engine==='webkit'?webkit:chromium).launch({headless:true,...(engine==='chromium'?{args:['--use-gl=angle','--use-angle=swiftshader','--enable-webgl','--ignore-gpu-blocklist']}: {})});
const server=await createPreviewServer();
const output=path.resolve('work/vicinity-v9195-'+engine);fs.mkdirSync(output,{recursive:true});
const context=await browser.newContext({viewport:{width:393,height:852},isMobile:true,hasTouch:true});
const page=await context.newPage(),errors=[];
page.on('pageerror',e=>errors.push(String(e)));
const params='repd_ref=12588&latitude=51.8132088&longitude=-1.3489728&project=Botley%20West&technology=solar&journey=vicinity';
let receipt={engine,softwareEmulation:true,physicalSafari:false};
try{
 const url='http://127.0.0.1:'+server.address().port+'/atlas/v/202611222130/?'+params;
 await page.goto(url,{waitUntil:'domcontentloaded',timeout:90000});
 await page.waitForFunction(()=>window.__GRIDATLAS_ATLAS__?.generation==='202611222130'&&!!window.__GRIDATLAS_V9_MAP__&&!!window.__GRIDATLAS_MODULES__?.ukOfftakers?.openProjectVicinity,null,{timeout:120000});

 // No Layout Sandbox may be launched from a substation OR a project, even
 // when a client still calls the legacy public method. Grid Engine stays on.
 const control=await page.evaluate(()=>{
   const g=window.__GRIDATLAS_MODULES__?.gridScope;
   const links=window.__GRIDATLAS_NEON_LINKS__;
   const sld=window.__GRIDATLAS_SLD__;
   const map=window.__GRIDATLAS_V9_MAP__;
   return {
     scope:typeof g?.scope==='function',
     near:typeof links?.measure?.nearestSubstations==='function',
     sldPresent:!!sld,
     openAt:sld?.openAt?.(map,[-1.3489728,51.8132088],'Node','132 kV'),
     openProject:sld?.openFromProject?.(map,{origin:[-1.3489728,51.8132088],name:'Botley West',links:[]}),
     active:sld?.active===true
   };
 });
 assert.equal(control.scope,true,'Grid Scope must remain usable');
 assert.equal(control.near,true,'nearest substation engine must remain usable');
 assert.equal(control.sldPresent,true,'carrier object remains for compatibility');
 assert.equal(control.openAt,false,'direct substation Layout entry disabled');
 assert.equal(control.openProject,false,'project Layout entry disabled');
 assert.equal(control.active,false,'layout never becomes active');
 assert.equal(await page.locator('#gridatlas-sld-panel').count(),0,'layout panel must not exist');
 assert.equal(await page.locator('button.neon-layout').count(),0,'layout button removed');

 const button=page.locator('#gridatlas-pipeline-vicinity-button');
 await button.waitFor({timeout:10000});await (engine==='webkit'?button.tap():button.click());
 const card=page.locator('[data-offtakers-card]');await card.waitFor({timeout:30000});
 await page.waitForFunction(()=>window.__GRIDATLAS_MODULES__?.ukOfftakers?.state?.pp?.swipe?.entries?.length>=2,null,{timeout:120000});
 const focus=card.locator('[data-vicinity-focus-card]');
 await focus.waitFor({timeout:10000});
 assert.equal(await page.locator('html[data-vicinity-focus="on"]').count(),1);
 assert.match(await focus.innerText(),/Substation|REPD project|Conventional power site/);
 assert.match(await focus.innerText(),/km straight line/);
 assert.match(await focus.innerText(),/Source:/);
 const panel=page.locator('#gridatlas-sld-panel');
 if(await panel.count())assert.equal(await panel.isVisible(),false,'layout must not cover focused asset');
 assert.equal(await card.locator('[data-vicinity-browse-toggle]').getAttribute('aria-expanded'),'false','full lists secondary');
 await page.screenshot({path:path.join(output,'01-asset-first.png')});
 const first=await focus.innerText();
 assert.match(first,/Botley West/,'first detail card must be the clicked project origin');
 assert.match(first,/REPD project \(origin\)/);
 const next=card.getByRole('button',{name:'Next vicinity point'});
 await next.click();
 await page.waitForFunction(()=>window.__GRIDATLAS_MODULES__.ukOfftakers.state.pp.swipe.index===0);
 await page.waitForTimeout(450);
 assert.notEqual(await focus.innerText(),first,'next must change displayed full card');
 const toggle=card.locator('[data-vicinity-browse-toggle]');
 await toggle.click();
 assert.equal(await toggle.getAttribute('aria-expanded'),'true');
 const rows=card.locator('[data-offtakers-row]');
 assert.ok(await rows.count()>0,'can browse original source-backed rows');
 if(await rows.count()>1){
   await rows.nth(1).click();
   await page.waitForTimeout(350);
   assert.equal(await toggle.getAttribute('aria-expanded'),'false','row tap returns to focus card');
 }
 await page.screenshot({path:path.join(output,'02-selected-asset.png')});
 const prev=card.getByRole('button',{name:'Previous vicinity point'});
 await prev.click();
 assert.match(await focus.innerText(),/Source:/);
 await card.getByRole('button',{name:'Close'}).click();
 await page.waitForFunction(()=>document.documentElement.getAttribute('data-vicinity-focus')!=='on');
 assert.equal(await page.locator('[data-offtakers-card]').count(),0);
 // The normal Layers UI remains operational even after focused Vicinity closes.
 const layers=page.locator('#gridatlas-dash-toggle');
 await layers.waitFor({timeout:10000});
 const before=await page.evaluate(()=>window.__GRIDATLAS_DASH__?.collapsed);
 await layers.click();
 const during=await page.evaluate(()=>window.__GRIDATLAS_DASH__?.collapsed);
 assert.notEqual(during,before,'Hide Layers button must still toggle');
 await layers.click();
 assert.equal(await page.evaluate(()=>window.__GRIDATLAS_DASH__?.collapsed),before);
 assert.equal(await page.locator('#gridatlas-sld-panel').count(),0,'layout never reappears after VICINITY closes');
 assert.deepEqual(errors,[],'no unhandled browser errors');
 receipt={...receipt,result:'PASS',focusCard:true,layoutSuppressed:true,sourceBackedDetail:true,originalAreaRetained:true,errors};
 console.log('PASS '+engine+' V9.195 '+JSON.stringify(receipt));
}catch(e){receipt={...receipt,result:'FAIL',message:String(e),errors};try{await page.screenshot({path:path.join(output,'failure.png')})}catch(_){}throw e}
finally{fs.writeFileSync(path.join(output,'receipt.json'),JSON.stringify(receipt,null,2));await context.close();await browser.close();await new Promise(resolve=>server.close(resolve))}

Vicinity A4 Browser

A JavaScript module in the proofs folder of GridAtlas that reads the Renewable Energy Planning Database (REPD) register.

rendergridatlas / tools/proofs/202611222325-vicinity-a4.browser.mjs · lines 1–74 of 74 · version 2026-11-22 23:25 · Entry point

What it does
It loads the REPD register. Uses libraries node:assert/strict, node:fs, node:path, playwright. Side effects: changes the web page (DOM); reads or writes files.
Why it exists in the grid workflow
Domain stage upstream_foresight (repository name word 'gridatlas'): upstream engineering foresight over GB transmission and distribution topology (TSO/DNO, 132kV and above, the REPD pipeline, data centres), which Ventus Ltd states it models for foresight. Domain terms in the code: the REPD register.
Inputs & outputs
Out: JSON file receipt.json.
Downstream impact
Used directly by 2 files: GridAtlas Cartridge Proof Workflow (gridatlas); GridAtlas PR File Size Guard Workflow (gridatlas).
What it achieves
No statement of purpose was found in the file, a README line naming it, or its name.
Why it matters
Run by GridAtlas Cartridge Proof Workflow and GridAtlas PR File Size Guard Workflow.
Application
gridatlas · tools/proofs · JavaScript module
Uses
Serve (import), GridAtlas — Atlas Page (estate URL), node:assert/strict, node:fs, node:path, playwright
Used by
run by GridAtlas Cartridge Proof Workflow (workflow run), run by GridAtlas PR File Size Guard Workflow (workflow run)
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
gridatlas@98b5004c5eda9f2ed915fb6fca4b9bbcaa426ca5 tools/proofs/202611222325-vicinity-a4.browser.mjs:1-74 · blob 413e23c9d02121c54f377b752cf2756ae218749b · GitHub at these lines
State
achieves: name · context: readme_derived · stage: output · effects: dom, filesystem · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: production_core
import assert from 'node:assert/strict';
import fs from 'node:fs';
import path from 'node:path';
import {chromium,webkit} from 'playwright';
import {createPreviewServer} from '../journey/serve.mjs';
const name=process.env.VICINITY_BROWSER||'chromium';
const engine=name==='webkit'?webkit:chromium;
const browser=await engine.launch({headless:true,...(name==='chromium'?{args:['--use-gl=angle','--use-angle=swiftshader','--enable-webgl','--ignore-gpu-blocklist']}: {})});
const server=await createPreviewServer();
const out=path.resolve('work/vicinity-v9196-'+name);fs.mkdirSync(out,{recursive:true});
const viewport={width:393,height:852};
let receipt={engine:name,softwareEmulation:true,physicalSafari:false,generation:'202611222325'};
const context=await browser.newContext({viewport,isMobile:true,hasTouch:true,acceptDownloads:true,reducedMotion:'reduce'});
const pipeline=await context.newPage(),errors=[];
pipeline.on('pageerror',e=>errors.push('pipeline '+String(e)));
try{
 await pipeline.goto('https://globalgrid2050.com/uk_renewables_pipeline/202611222222/',{waitUntil:'domcontentloaded',timeout:90000});
 await pipeline.waitForFunction(()=>document.querySelector('#tbody .pn-journey-link[href]')&&document.querySelector('#tbody .pn-report-launch'),null,{timeout:90000});
 const row=pipeline.locator('#tbody tr[id^="repd-"]').filter({has:pipeline.locator('.pn-journey-link[href]')}).first();
 const ref=(await row.getAttribute('id')).slice(5);
 const native=await row.locator('td:last-child a.pn-journey-link[href]').getAttribute('href');
 assert.equal(new URL(native).searchParams.get('repd_ref'),ref);
 assert.equal(new URL(native).origin+new URL(native).pathname,'https://ventusltd.github.io/gridatlas/atlas/');
 await row.locator('.pn-report-launch').click();
 await pipeline.locator('#pnRepdReport:not([hidden])').waitFor({timeout:15000});
 const a4=await pipeline.locator('#pnReportMap').getAttribute('href');
 assert.equal(a4,native,'A4 HTML MAP must be identical to REPD MAP');
 const downloadTask=pipeline.waitForEvent('download',{timeout:20000});
 await pipeline.locator('[data-report-action="pdf"]').click();
 const downloaded=await downloadTask;
 const pdf=(await fs.promises.readFile(await downloaded.path())).toString('latin1');
 const lit=native.replace(/\\/g,'\\\\').replace(/\(/g,'\\(').replace(/\)/g,'\\)');
 assert.ok(pdf.includes('/URI ('+lit+')'),'Downloaded A4 PDF must include exact same native MAP URL');
 assert.equal((pdf.match(/\/URI \(/g)||[]).length,1);
 await pipeline.screenshot({path:path.join(out,'pipeline-a4.png')});
 // The PDF's actual URI and the native REPD map must BOTH run the real
 // Grid Engine. No dummy receiver or mocked arrival is permitted.
 for(const entry of ['REPD-MAP','A4-PDF']){
  const map=await context.newPage();
  map.on('pageerror',e=>errors.push(entry+' '+String(e)));
  const u=new URL(entry==='REPD-MAP'?native:a4);
  const target='http://127.0.0.1:'+server.address().port+'/atlas/v/202611222325/'+u.search;
  try{
   await map.goto(target,{waitUntil:'domcontentloaded',timeout:90000});
   await map.waitForFunction(()=>window.__GRIDATLAS_ATLAS__?.generation==='202611222325'&&window.__GRIDATLAS_VICINITY_LINK_QA__&&window.__GRIDATLAS_MODULES__?.ukOfftakers?.openProjectVicinity,null,{timeout:120000});
   await map.waitForFunction(()=>window.__GRIDATLAS_NEON_LINKS__?.arrival_engine?.answered===true||window.__GRIDATLAS_NEON_LINKS__?.links_drawn>0,null,{timeout:150000});
   const result=await map.evaluate(()=>({generation:window.__GRIDATLAS_ATLAS__.generation,answer:window.__GRIDATLAS_NEON_LINKS__?.arrival_engine,
     drawn:window.__GRIDATLAS_NEON_LINKS__?.links_drawn,qa:window.__GRIDATLAS_VICINITY_LINK_QA__,scope:typeof window.__GRIDATLAS_MODULES__?.gridScope?.scope==='function'}));
   assert.equal(result.scope,true,'Actual Grid Engine module must survive');
   const vicinity=map.locator('#gridatlas-pipeline-vicinity-button');await vicinity.waitFor({timeout:15000});
   await vicinity.click();
   const card=map.locator('[data-offtakers-card]');await card.waitFor({timeout:30000});
   const layers=map.locator('#gridatlas-dash-toggle');await layers.waitFor({timeout:15000});
   const targetHit=await layers.evaluate(el=>{const b=el.getBoundingClientRect(),x=b.left+b.width/2,y=b.top+b.height/2;
      const hit=document.elementFromPoint(x,y);return{visible:b.width>=44&&b.height>=44,uncovered:hit===el||el.contains(hit),y,top:b.top,parent:el.parentElement?.tagName}});
   assert.ok(targetHit.visible&&targetHit.uncovered,'Layers toggle must be touch-clickable WHILE VICINITY CARD IS OPEN: '+JSON.stringify(targetHit));
   assert.ok(targetHit.y<Math.min(viewport.height,420),'Layers control must not hide behind bottom Vicinity card');
   const before=await map.evaluate(()=>window.__GRIDATLAS_DASH__.collapsed);
   await layers.click({timeout:12000});
   assert.notEqual(await map.evaluate(()=>window.__GRIDATLAS_DASH__.collapsed),before,'Layers control must hide/show its real panel');
   await layers.click({timeout:12000});
   assert.equal(await map.evaluate(()=>window.__GRIDATLAS_DASH__.collapsed),before,'Layers control must reopen');
   assert.equal((await card.locator('[data-vicinity-focus-card]').count()),1);
   await map.waitForFunction(()=>window.__GRIDATLAS_MODULES__.ukOfftakers.state.pp?.swipe?.entries?.length>=2,null,{timeout:100000});
   const entries=await map.evaluate(()=>window.__GRIDATLAS_MODULES__.ukOfftakers.state.pp.swipe.entries.length);
   assert.ok(entries>0&&entries<=90,'Preserve source-backed 30/30/30');
   await map.screenshot({path:path.join(out,entry+'.png')});
   receipt[entry]={ref,links:native,drawn:result.drawn,answer:result.answer,targetHit,entries,pass:true};
  }finally{await map.close()}
 }
 assert.equal(errors.length,0,'No unhandled browser errors: '+errors.join('; '));
 receipt.result='PASS';console.log('PASS V9.196 '+name+' '+JSON.stringify({ref,native,entries:receipt['REPD-MAP'].entries,grid:'answered from both origins',layers:'visible and toggled while card open'}));
}catch(e){receipt.result='FAIL';receipt.error=String(e);throw e}
finally{fs.writeFileSync(path.join(out,'receipt.json'),JSON.stringify(receipt,null,2));await pipeline.close();await context.close();await browser.close();await new Promise(resolve=>server.close(resolve))}

Layers Visible Browser

A JavaScript module in the proofs folder of GridAtlas that works with panel visible (`panelVisible`). It is built from the panel visible helper (`panelVisible`).

rendergridatlas / tools/proofs/202611222343-layers-visible.browser.mjs · lines 1–109 of 109 · version 2026-11-22 23:43 · Entry point · pattern launch (shared by 5 files)

What it does
Defines launch, fullscreen, state, panelVisible. Uses libraries node:assert/strict, node:fs, node:path, playwright. Side effects: changes the web page (DOM); reads or writes files.
Why it exists in the grid workflow
Domain stage upstream_foresight (repository name word 'gridatlas'): upstream engineering foresight over GB transmission and distribution topology (TSO/DNO, 132kV and above, the REPD pipeline, data centres), which Ventus Ltd states it models for foresight.
Inputs & outputs
Out: JSON file receipt.json.
Downstream impact
Used directly by 1 file: GridAtlas PR File Size Guard Workflow (gridatlas).
What it achieves
Defines `launch`, `fullscreen`, `state` and 1 more.
Why it matters
Run by GridAtlas PR File Size Guard Workflow.
Application
gridatlas · tools/proofs · JavaScript module
Uses
Serve (import), node:assert/strict, node:fs, node:path, playwright
Used by
run by GridAtlas PR File Size Guard Workflow (workflow run)
Produces
launch, fullscreen, state, panelVisible
Defines here
launch, fullscreen, state, panelVisible
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
gridatlas@98b5004c5eda9f2ed915fb6fca4b9bbcaa426ca5 tools/proofs/202611222343-layers-visible.browser.mjs:1-109 · blob 2db11fd58833dbf31d728a44889e96f00ec64f2e · GitHub at these lines
State
achieves: name · context: readme_derived · stage: output · effects: dom, filesystem · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: production_core
import assert from 'node:assert/strict';
import fs from 'node:fs';
import path from 'node:path';
import {chromium,webkit} from 'playwright';
import {createPreviewServer} from '../journey/serve.mjs';
const engineName=process.env.VICINITY_BROWSER||'chromium';
const engine=engineName==='webkit'?webkit:chromium;
const browser=await engine.launch({headless:true,...(engineName==='chromium'?{args:['--use-gl=angle','--use-angle=swiftshader','--enable-webgl','--ignore-gpu-blocklist']}: {})});
const server=await createPreviewServer(),base='http://127.0.0.1:'+server.address().port+'/atlas/v/';
const out=path.resolve('work/vicinity-v9197-'+engineName);fs.mkdirSync(out,{recursive:true});
const query='?repd_ref=12588&latitude=51.8132088&longitude=-1.3489728&project=Botley%20West&technology=solar&journey=vicinity';
const evidence={browser:engineName,physicalSafari:false,headlessEmulation:true,baseline:{},candidate:{}};
const contexts=[];
async function launch(generation,viewport){
 const context=await browser.newContext({viewport,isMobile:true,hasTouch:true,reducedMotion:'reduce'});
 contexts.push(context);const page=await context.newPage();
 await page.goto(base+generation+'/'+query,{waitUntil:'domcontentloaded',timeout:90000});
 await page.waitForFunction(()=>window.__GRIDATLAS_ATLAS__&&window.__GRIDATLAS_V9_MAP__&&window.__GRIDATLAS_DASH__?.installed&&window.__GRIDATLAS_MODULES__?.ukOfftakers?.openProjectVicinity&&document.getElementById('gridatlas-dash-toggle')&&document.getElementById('fs-curtain-tab')&&document.querySelectorAll('#fs-curtain-keys input[data-layer-id]').length>=40,null,{timeout:120000});
 return page;
}
async function fullscreen(page){
 // The genuine legacy entry applies fs-active even if iOS rejects requestFullscreen.
 await page.evaluate(()=>window.enterFullscreen());
 await page.waitForFunction(()=>document.body.classList.contains('fs-active'));
 await page.waitForTimeout(400);
}
async function state(page){
 return page.evaluate(()=>{const panel=document.getElementById('fs-curtain');
 const r=panel.getBoundingClientRect(),css=getComputedStyle(panel);
 return{open:panel.classList.contains('curtain-open'),display:css.display,transform:css.transform,
  rect:{top:r.top,bottom:r.bottom,height:r.height},controls:panel.querySelectorAll('input[data-layer-id]').length,
  collapsed:window.__GRIDATLAS_DASH__?.collapsed,fullscreen:document.body.classList.contains('fs-active'),
  buttonText:document.getElementById('gridatlas-dash-toggle')?.textContent};});
}
function panelVisible(s){return s.open&&s.display!=='none'&&s.rect.height>100&&s.rect.bottom>45&&s.rect.top<400;}
try{
 if(engineName==='chromium'){
  const v195=await launch('202611222130',{width:393,height:852});
  await fullscreen(v195);
  await v195.evaluate(()=>document.getElementById('fs-curtain-tab').click());
  await v195.waitForTimeout(450);
  const worked=await state(v195);
  // Historical baseline is observed, not assumed to work in native fullscreen.
  evidence.baseline.v195={...worked,actuallyVisible:panelVisible(worked)};
  console.log('BASELINE V9.195 original curtain:',JSON.stringify(evidence.baseline.v195));
  await v195.close();

  const v196=await launch('202611222325',{width:393,height:852});
  await fullscreen(v196);
  const button=v196.locator('#gridatlas-dash-toggle');
  await button.waitFor();
  const before=await state(v196);
  await button.click({timeout:15000});
  await v196.waitForTimeout(450);
  const broken=await state(v196);
  assert.equal(broken.open,false,'V9.196 reproduce: floating button must NOT open original fullscreen curtain');
  assert.notEqual(broken.collapsed,before.collapsed,'V9.196 bug: toggled unrelated hidden SCADA state instead');
  evidence.baseline.v196={before,after:broken,confirmed:'button changed SCADA state but curtain remained hidden'};
  await v196.screenshot({path:path.join(out,'baseline-v9196-broken.png')});
  await v196.close();
 }
 for(const viewport of [{width:393,height:852},{width:852,height:393}]){
  const name=viewport.width===393?'portrait':'landscape';
  const page=await launch('202611222343',viewport);
  await page.locator('#gridatlas-pipeline-vicinity-button').click({timeout:20000});
  const card=page.locator('[data-offtakers-card]');
  await card.waitFor({timeout:30000});
  await page.waitForFunction(()=>window.__GRIDATLAS_MODULES__.ukOfftakers.state.pp?.swipe?.entries?.length>1,null,{timeout:90000});
  await fullscreen(page);
  const toggle=page.locator('#gridatlas-dash-toggle');
  await toggle.waitFor();
  const initial=await state(page);
  assert.equal(initial.open,false,'start with original curtain closed');
  const hit=await toggle.evaluate(el=>{const r=el.getBoundingClientRect(),x=r.left+r.width/2,y=r.top+r.height/2;
   const target=document.elementFromPoint(x,y);
   return{rect:{width:r.width,height:r.height,top:r.top},uncovered:target===el||el.contains(target)};});
  assert.ok(hit.uncovered&&hit.rect.width>=44&&hit.rect.height>=44,'real touch hit target with card open '+JSON.stringify(hit));
  await toggle.click({timeout:20000});
  await page.waitForTimeout(500);
  const opened=await state(page);
  assert.ok(panelVisible(opened),'tap must SHOW visible original fullscreen curtain, not just change a Boolean: '+JSON.stringify(opened));
  assert.equal(opened.collapsed,initial.collapsed,'must not toggle hidden SCADA panel in fullscreen');
  assert.ok(opened.controls>=40,'actual original layer inputs must be present');
  // The original delegated GridAtlas engine should synchronise the two layer controls.
  const input=page.locator('#fs-curtain-keys input[data-layer-id]:not([disabled])').first();
  const id=await input.getAttribute('data-layer-id');
  const prior=await input.isChecked();
  await input.click({timeout:16000});
  assert.notEqual(await input.isChecked(),prior,'fullscreen curtain input must really toggle');
  const mirror=page.locator('#scada-ui-container input[data-layer-id="'+id+'"]').first();
  assert.equal(await mirror.isChecked(),!prior,'curtain must drive the original GridAtlas layer control');
  await input.click({timeout:16000});
  assert.equal(await mirror.isChecked(),prior,'original layer can be restored without stale proxy');
  await page.screenshot({path:path.join(out,name+'-real-layers-open.png')});
  await toggle.click({timeout:20000});
  await page.waitForTimeout(480);
  const closed=await state(page);
  assert.equal(closed.open,false,'same button must close original layer curtain');
  assert.ok(closed.rect.bottom<48||closed.transform!=='none','panel is no longer over the map');
  assert.equal(await card.isVisible(),true,'Vicinity swipe card remains usable');
  const entries=await page.evaluate(()=>window.__GRIDATLAS_MODULES__.ukOfftakers.state.pp.swipe.entries.length);
  assert.ok(entries>1&&entries<=90,'90-point source-backed browser preserved');
  evidence.candidate[name]={hit,initial,opened,closed,entries,layerId:id,synchronised:true};
  await page.close();
 }
 evidence.result='PASS';
 console.log('PASS V9.197 '+engineName+': V9.195 working curtain, V9.196 bug reproduced, candidate visible original curtain, real controls and full screen touch: '+JSON.stringify(evidence));
}catch(e){evidence.result='FAIL';evidence.error=String(e);throw e}
finally{fs.writeFileSync(path.join(out,'receipt.json'),JSON.stringify(evidence,null,2));for(const ctx of contexts)await ctx.close().catch(()=>{});await browser.close();await new Promise(resolve=>server.close(resolve))}

Vicinity Controls Rescue Proof

A JavaScript module in the proofs folder of GridAtlas that reads composition and substations, using SHA-256.

interactiongridatlas / tools/proofs/202611222343-vicinity-controls-rescue.proof.mjs · lines 1–76 of 76 · version 2026-11-22 23:43 · Entry point · pattern click (shared by 5 files)

What it does
It loads composition and substations. Defines click. Uses libraries node:assert/strict, node:fs, node:crypto, node:vm, node:path. Side effects: changes the web page (DOM); reads or writes files.
Why it exists in the grid workflow
Domain stage upstream_foresight (repository name word 'gridatlas'): upstream engineering foresight over GB transmission and distribution topology (TSO/DNO, 132kV and above, the REPD pipeline, data centres), which Ventus Ltd states it models for foresight. Domain terms in the code: substations.
Inputs & outputs
In: JSON file current.json; JSON file 202611222343-composition.json.
Downstream impact
Used directly by 2 files: GridAtlas Cartridge Proof Workflow (gridatlas); GridAtlas PR File Size Guard Workflow (gridatlas).
What it achieves
Defines `click`. It reads `atlas/current.json`.
Why it matters
Run by GridAtlas Cartridge Proof Workflow and GridAtlas PR File Size Guard Workflow.
Application
gridatlas · tools/proofs · JavaScript module
Uses
node:assert/strict, node:fs, node:crypto, node:vm, node:path
Used by
run by GridAtlas Cartridge Proof Workflow (workflow run), run by GridAtlas PR File Size Guard Workflow (workflow run)
Produces
click
Defines here
click
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
gridatlas@98b5004c5eda9f2ed915fb6fca4b9bbcaa426ca5 tools/proofs/202611222343-vicinity-controls-rescue.proof.mjs:1-76 · blob 5d71a8b70c433dc260a4febdbaf5a1084ab45d72 · GitHub at these lines
State
achieves: name · context: readme_derived · stage: output · effects: dom, filesystem · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: production_core
import assert from 'node:assert/strict';
import fs from 'node:fs';
import crypto from 'node:crypto';
import vm from 'node:vm';
import path from 'node:path';
const root=path.resolve(import.meta.dirname,'../..'),read=p=>fs.readFileSync(path.join(root,p),'utf8');
const live=JSON.parse(read('atlas/current.json'));
const {parent_generation,version,cut_at_utc,note,acceptance,candidate_status,...current} =
 JSON.parse(read('atlas/manifests/202611222343-composition.json'));
if(live.generation==='202611280016'){
 assert.equal(live.previous_generation,current.generation);
 assert.deepEqual(live.cartridges.slice(0,-1),current.cartridges,'all nine predecessor cartridge descriptors stay exact');
 assert.deepEqual(live.cartridge_order,[...current.cartridge_order,'vicinity-legal-evidence']);
 const addition=live.cartridges.at(-1);
 assert.equal(addition.id,'vicinity-legal-evidence');
 assert.equal(addition.after,'vicinity-controls-rescue');
 assert.equal(addition.sha256,'82a99b2522164a3ea928b3a3434728fd1191d0032bdc77ef850e15a6c48226c7');
}else if(live.generation==='202612010912'){
 assert.equal(live.previous_generation,current.generation);
 assert.deepEqual(live.cartridges.slice(0,-1),current.cartridges,'all nine predecessor cartridge descriptors stay exact');
 assert.deepEqual(live.cartridge_order,[...current.cartridge_order,'ukpn-secondary-substations']);
 const addition=live.cartridges.at(-1);
 assert.equal(addition.id,'ukpn-secondary-substations');
 assert.equal(addition.after,'vicinity-controls-rescue');
 assert.equal(crypto.createHash('sha256').update(read('atlas/modules/202612010912-ukpn-secondary-substations.js')).digest('hex'),addition.sha256);
}else{
 assert.deepEqual(live,current,'V9.197 live pointer agrees with its immutable cut');
}
const old=JSON.parse(read('atlas/v/202611222325/current.json'));
assert.equal(current.generation,'202611222343');
assert.equal(current.previous_generation,'202611222325');
assert.deepEqual(current.cartridge_order,old.cartridge_order,'nine original logical cartridges retained');
for(let i=0;i<old.cartridges.length-1;i++){
 const a=current.cartridges[i],b=old.cartridges[i];
 for(const k of ['id','generation','version','type','slot','after','sha256'])
  assert.deepEqual(a[k],b[k],'old cartridge changed: '+b.id+' '+k);
 assert.equal(a.path.replace(/^\.\//,''),b.path.replace(/^\.\.\/\.\.\//,''));
}
const target=current.cartridges.at(-1);
assert.equal(target.generation,'202611222343');
assert.equal(target.sha256,'97cb8d05c7c0855b3bdd02ba614f470fbe2d489ed2db7181ca0b7edd5313c8fc');
const src=read('atlas/modules/202611222343-vicinity-controls-rescue.js');
const oldSource=read('atlas/modules/202611222325-vicinity-controls-rescue.js');
assert.ok(src.startsWith(oldSource),'V9.196 PDF/engine and button position code preserved verbatim');
assert.equal(Buffer.byteLength(src),7367);
assert.equal(crypto.createHash('sha256').update(src).digest('hex'),target.sha256);
new vm.Script(src);
for(const token of ["D.getElementById('fs-curtain-tab')","target.click()","stopImmediatePropagation()","D.fullscreenElement||D.webkitFullscreenElement","normal-scada-panel"]){assert.ok(src.includes(token),token);}
assert.equal(read('atlas/v/202611222343/current.json'),JSON.stringify(current,null,1).replace(/": "(?:\.\/|\.\.\/)/g,'": "../../')+'\n');
assert.equal(read('atlas/v/202611222343/index.html'),read('atlas/v/202611222325/index.html'));
let onClickCapture,originalClicks=0,timer,full=true,curtainOpen=false,press=0;
const button={hidden:true,parentElement:{},style:{setProperty(){}},addEventListener(type,cb,cap){if(type==='click'&&cap)onClickCapture=cb;},
 setAttribute(name,value){this[name]=value;},textContent:''};
const curtain={parentNode:{},classList:{contains(k){return k==='curtain-open'&&curtainOpen}},getAttribute(){}};
const tab={click(){curtainOpen=!curtainOpen;}};
const body={classList:{contains(k){return k==='fs-active'&&full}}};
const doc={body,documentElement:{classList:{contains(){return false}}},
 getElementById(k){return {'gridatlas-dash-toggle':button,'fs-curtain':curtain,'fs-curtain-tab':tab,'map-container':{classList:{contains(){return false}}}}[k];},
 addEventListener(){},fullscreenElement:null,webkitFullscreenElement:null};
const win={__GRIDATLAS_DASH__:{collapsed:false},addEventListener(){}};
const bridge=src.slice(src.indexOf('(function fullscreenLayerBridge()'));
assert.ok(bridge.startsWith('(function fullscreenLayerBridge()'));
vm.runInNewContext(bridge,{window:win,document:doc,setInterval(fn){timer=fn;return 1},clearInterval(){}});
assert.equal(typeof onClickCapture,'function');
function click(){
 let stopped=false;
 onClickCapture({preventDefault(){},stopImmediatePropagation(){stopped=true}});
 if(!stopped)originalClicks++;
}
click();assert.equal(curtainOpen,true,'fullscreen button must open actual original curtain');
assert.equal(originalClicks,0,'must NOT touch hidden normal-view SCADA state');
assert.equal(button['aria-pressed'],'true');
click();assert.equal(curtainOpen,false,'same button must close real curtain');
full=false;timer();click();
assert.equal(originalClicks,1,'outside fullscreen the original SCADA click handler must remain owner');
console.log('PASS V9.197: source SHA256, no truncation, old 8 carriers unchanged, original fullscreen curtain route and normal-view delegation');

Vicinity Legal Evidence Proof

A JavaScript module in the proofs folder of GridAtlas that reads the Renewable Energy Planning Database (REPD) register, using SHA-256 from the legislation repository.

rendergridatlas / tools/proofs/202611280016-vicinity-legal-evidence.proof.mjs · lines 1–39 of 39 · version 2026-11-28 00:16 · Not reached from any entry point (candidate for review)

What it does
It loads the REPD register. Defines read, json. Uses libraries node:assert/strict, node:fs, node:path, node:vm, node:crypto. Side effects: changes the web page (DOM); reads or writes files.
Why it exists in the grid workflow
Domain stage upstream_foresight (repository name word 'gridatlas'): upstream engineering foresight over GB transmission and distribution topology (TSO/DNO, 132kV and above, the REPD pipeline, data centres), which Ventus Ltd states it models for foresight. Domain terms in the code: the REPD register.
Inputs & outputs
In: data source: legislation data; JSON file current.json.
What it achieves
Defines `read` and `json`.
Why it matters
No other file in the estate was found to import it.
Application
gridatlas · tools/proofs · JavaScript module
Uses
GridAtlas — Atlas Page (estate URL), Legislation — Legal Evidence Page (estate URL), node:assert/strict, node:fs, node:path, node:vm, node:crypto
Used by
none found
Produces
read, json
Defines here
read, json
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
gridatlas@98b5004c5eda9f2ed915fb6fca4b9bbcaa426ca5 tools/proofs/202611280016-vicinity-legal-evidence.proof.mjs:1-39 · blob 9ac29b18d6e26b1f7f6cd85e8a65e99febb65b76 · GitHub at these lines
State
achieves: name · context: readme_derived · stage: output · effects: dom, filesystem · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: unreached_review
import assert from 'node:assert/strict';
import fs from 'node:fs';
import path from 'node:path';
import vm from 'node:vm';
import {createHash} from 'node:crypto';
const gen = '202611280016', base = '202611222343';
const root = path.resolve(import.meta.dirname,'../..');
const read = p => fs.readFileSync(path.join(root,p),'utf8');
const json = p => JSON.parse(read(p));
const predecessor = json('atlas/v/'+base+'/current.json');
const candidate = json('atlas/v/'+gen+'/current.json');
assert.equal(candidate.previous_generation,base);
assert.deepEqual(candidate.cartridges.slice(0,-1),predecessor.cartridges);
assert.deepEqual(candidate.cartridge_order.slice(0,-1),predecessor.cartridge_order);
assert.equal(read('atlas/v/'+base+'/index.html'),read('atlas/v/'+gen+'/index.html'));
const descriptor = candidate.cartridges.at(-1);
const code = read('atlas/modules/'+gen+'-vicinity-legal-evidence.js');
assert.equal(createHash('sha256').update(code).digest('hex'),descriptor.sha256);
assert.equal(Buffer.byteLength(code),descriptor.bytes);
const context = {module:{exports:{}},URL};
vm.runInNewContext(code,context);
const {evidenceUrl,render} = context.module.exports;
const arrival = 'https://ventusltd.github.io/gridatlas/atlas/?repd_ref=999999999991&latitude=52&longitude=-1&project=Fictional%20project&origin_type=repd&origin_id=repd%3A999999999991&technology=Battery&capacity_mw=40';
const result = new URL(evidenceUrl(arrival,'999999999991'));
assert.deepEqual([...result.searchParams.keys()].sort(),['mw','project','repd_ref','source_app','technology']);
assert.equal(result.searchParams.get('mw'),'40');
assert.equal(result.origin+result.pathname,'https://ventusltd.github.io/legislation/legal-evidence/');
assert.equal(evidenceUrl(arrival,'1'),null);
assert.equal(evidenceUrl(arrival+'&repd_ref=2','999999999991'),null);
assert.equal(evidenceUrl(arrival.replace('repd%3A999999999991','repd%3A2'),'999999999991'),null);
assert.equal(new URL(evidenceUrl(arrival.replace('/atlas/?','/atlas/v/'+gen+'/?'),'999999999991')).searchParams.get('source_release'),gen);
let link;
const box = {querySelector:()=>link,ownerDocument:{createElement:()=>({dataset:{},remove(){link=null;}})},appendChild:a=>{assert.ok(!link);link=a;}};
const card = {isConnected:true,project:true,r:{p:{repd_ref:'999999999991'}},__vicFocus:{box,origin:true}};
render(card,arrival);render(card,arrival);
assert.equal(link.href,result.href);
card.__vicFocus.origin=false;
render(card,arrival);assert.equal(link,null);
console.log('PASS additive composition, module hash, immutable loader, canonical reader, origin identity, swiped neighbour, ambiguous inputs, release provenance');

SatNav Start Walk Proof

A JavaScript module in the proofs folder of GridAtlas.

othergridatlas / tools/proofs/202612012118-satnav-start-walk.proof.mjs · lines 1–2 of 2 · version 2026-12-01 21:18 · Not reached from any entry point (candidate for review)

Why it exists in the grid workflow
Domain stage field_execution (path word 'satnav'): on-road and off-road field navigation to the farm gate (access gates, terrain slope, ground-bearing limits, electrical hazards), as Ventus Ltd describes its SatNav work.
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
No other file in the estate was found to import it.
Application
gridatlas · tools/proofs · JavaScript module
Uses
Owner Test Proof (import)
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
gridatlas@98b5004c5eda9f2ed915fb6fca4b9bbcaa426ca5 tools/proofs/202612012118-satnav-start-walk.proof.mjs:1-2 · blob f50d0ec0d2c379884791cbe64d90117b047abba9 · GitHub at these lines
State
achieves: name · context: readme_derived · stage: unknown · effects: none found · domain stage: field_execution · users: EPC_contractor, landowner_planner · canonical: unreached_review
import {prove} from '../secondary/owner-test-proof.mjs';
prove('202612012118','satnav-start-walk');

SatNav Waypoint Map Proof

A JavaScript module in the proofs folder of GridAtlas.

othergridatlas / tools/proofs/202612012118-satnav-waypoint-map.proof.mjs · lines 1–2 of 2 · version 2026-12-01 21:18 · Not reached from any entry point (candidate for review)

Why it exists in the grid workflow
Domain stage field_execution (path word 'satnav'): on-road and off-road field navigation to the farm gate (access gates, terrain slope, ground-bearing limits, electrical hazards), as Ventus Ltd describes its SatNav work.
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
No other file in the estate was found to import it.
Application
gridatlas · tools/proofs · JavaScript module
Uses
Owner Test Proof (import)
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
gridatlas@98b5004c5eda9f2ed915fb6fca4b9bbcaa426ca5 tools/proofs/202612012118-satnav-waypoint-map.proof.mjs:1-2 · blob 90019d00e739886cd0f948fc9b67674954becb64 · GitHub at these lines
State
achieves: name · context: readme_derived · stage: unknown · effects: none found · domain stage: field_execution · users: EPC_contractor, landowner_planner · canonical: unreached_review
import {prove} from '../secondary/owner-test-proof.mjs';
prove('202612012118','satnav-waypoint-map');

UK Offtakers Overlay Proof

A JavaScript module in the proofs folder of GridAtlas.

othergridatlas / tools/proofs/202612012118-uk-offtakers-overlay.proof.mjs · lines 1–2 of 2 · version 2026-12-01 21:18 · Not reached from any entry point (candidate for review)

Why it exists in the grid workflow
Domain stage upstream_foresight (repository name word 'gridatlas'): upstream engineering foresight over GB transmission and distribution topology (TSO/DNO, 132kV and above, the REPD pipeline, data centres), which Ventus Ltd states it models for foresight.
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
No other file in the estate was found to import it.
Application
gridatlas · tools/proofs · JavaScript module
Uses
Owner Test Proof (import)
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
gridatlas@98b5004c5eda9f2ed915fb6fca4b9bbcaa426ca5 tools/proofs/202612012118-uk-offtakers-overlay.proof.mjs:1-2 · blob 9a4ec3af4984670b742cbee82a77e362fe12fd41 · GitHub at these lines
State
achieves: name · context: readme_derived · stage: unknown · effects: none found · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: unreached_review
import {prove} from '../secondary/owner-test-proof.mjs';
prove('202612012118','uk-offtakers-overlay');

Vicinity Focus Proof

A JavaScript module in the proofs folder of GridAtlas.

othergridatlas / tools/proofs/202612012118-vicinity-focus.proof.mjs · lines 1–2 of 2 · version 2026-12-01 21:18 · Entry point

Why it exists in the grid workflow
Domain stage upstream_foresight (repository name word 'gridatlas'): upstream engineering foresight over GB transmission and distribution topology (TSO/DNO, 132kV and above, the REPD pipeline, data centres), which Ventus Ltd states it models for foresight.
Downstream impact
Used directly by 1 file: GridAtlas PR File Size Guard Workflow (gridatlas).
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
Run by GridAtlas PR File Size Guard Workflow.
Application
gridatlas · tools/proofs · JavaScript module
Uses
Owner Test Proof (import)
Used by
run by GridAtlas PR File Size Guard Workflow (workflow run)
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
gridatlas@98b5004c5eda9f2ed915fb6fca4b9bbcaa426ca5 tools/proofs/202612012118-vicinity-focus.proof.mjs:1-2 · blob 2d6c771ecc05a8eb432ccfc3e9988d04f127af61 · GitHub at these lines
State
achieves: name · context: readme_derived · stage: unknown · effects: none found · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: production_core
import {prove} from '../secondary/owner-test-proof.mjs';
prove('202612012118','vicinity-focus');

Unified Owner Test Proof

A JavaScript module in the proofs folder of GridAtlas that tests composition, using SHA-256. It is built from the read step (`read`) and the digest step (`digest`).

testgridatlas / tools/proofs/202612020056-unified-owner-test.proof.mjs · lines 1–44 of 44 · version 2026-12-02 00:56 · Not reached from any entry point (candidate for review) · pattern digest (shared by 56 files)

What it does
It tests composition. Defines read, digest. Uses libraries node:assert/strict, node:fs, node:crypto, node:path, node:child_process. Side effects: reads or writes files; starts processes.
Why it exists in the grid workflow
Domain stage upstream_foresight (repository name word 'gridatlas'): upstream engineering foresight over GB transmission and distribution topology (TSO/DNO, 132kV and above, the REPD pipeline, data centres), which Ventus Ltd states it models for foresight.
Inputs & outputs
In: JSON file current.json; JSON file -composition.json.
What it achieves
V9.201 proof for the inherited shallow-checkout cartridge gate. It reads `atlas/current.json`.
Why it matters
No other file in the estate was found to import it.
Application
gridatlas · tools/proofs · JavaScript module
Uses
Unified Destination Contract Test (script call), Unified Layer Catalogue Test (script call), Unified Catalogue Independent Test (script call), node:assert/strict, node:fs, node:crypto, node:path, node:child_process, node:vm
Used by
none found
Produces
read, digest
Defines here
read, digest
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
gridatlas@98b5004c5eda9f2ed915fb6fca4b9bbcaa426ca5 tools/proofs/202612020056-unified-owner-test.proof.mjs:1-44 · blob 93611ed880df36fc36fcf999c99b5c1c360415ba · GitHub at these lines
State
achieves: comment · context: readme_derived · stage: ingest · effects: filesystem, process · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: unreached_review
// V9.201 proof for the inherited shallow-checkout cartridge gate.
import assert from 'node:assert/strict';
import {readFileSync} from 'node:fs';
import {createHash} from 'node:crypto';
import {resolve} from 'node:path';
import {execFileSync} from 'node:child_process';
import vm from 'node:vm';
const root=resolve(import.meta.dirname,'../..'), generation='202612020056';
const read=p=>readFileSync(resolve(root,p)), json=p=>JSON.parse(read(p));
const route='atlas/v/'+generation, m=json(route+'/current.json');
const old=json('atlas/v/202612012118/current.json'), ledger=json('atlas/manifests/'+generation+'-composition.json');
assert.equal(m.generation,generation);
assert.equal(m.composition_version,'v9.201');
assert.equal(m.owner_test_mode,'unified');
assert.equal(m.source_revisions.integration,'b3fd4a69c282dfb18cfc3c7777a9b83e6f118131');
assert.deepEqual(m.shell,old.shell);
assert.deepEqual(read(route+'/index.html'),read('atlas/v/202612012118/index.html'));
const pointer=read('atlas/current.json');
assert.equal(createHash('sha1').update('blob '+pointer.length+'\0').update(pointer).digest('hex'),'7b4174dfeafaa7cd80df215e070a77deee7a1e1a');
assert.deepEqual(m.cartridge_order,old.cartridge_order.filter(id=>id!=='satnav-field-layers'));
assert.equal(m.cartridges.length,17);
assert.equal(new Set(m.cartridges.map(c=>c.id)).size,17);
const changed=new Map([['satnav-waypoint-map','../../modules/satnav-unified-waypoint-map-agent1.js'],['uk-gazetteer-flyto','../../modules/unified-native-gazetteer.js']]);
const digest=(p,c)=>{const b=read(p);assert.equal(b.length,c.bytes,p+' bytes');assert.equal(createHash('sha256').update(b).digest('hex'),c.sha256,p+' hash');return b;};
for(const c of m.cartridges){
  const prior=old.cartridges.find(p=>p.id===c.id);
  assert.ok(prior,c.id);
  if(changed.has(c.id)){
    assert.equal(c.path,changed.get(c.id));
    for(const key of ['id','slot','after','replace_script','type'])assert.equal(c[key],prior[key]);
    new vm.Script(digest(resolve(root,route,c.path),c).toString('utf8'));
  }else {assert.deepEqual(c,prior,c.id+' inherited descriptor');digest(resolve(root,route,c.path),c);}
  const entry=ledger.cartridges.find(e=>e.id===c.id);
  assert.ok(entry,c.id+' ledger');
  assert.equal(resolve(root,'atlas',entry.path),resolve(root,route,c.path));
  for(const k of ['sha256','bytes','slot','after','replace_script','type'])assert.equal(entry[k],c[k]);
}
for(const k of ['generation','composition_version','composition_id','owner_test_mode','source_revisions','cartridge_order','runtime_dependency_pins'])assert.deepEqual(ledger[k],m[k]);
assert.equal(m.runtime_dependency_pins.length,12);
assert.equal(new Set(m.runtime_dependency_pins.map(p=>p.path)).size,12);
for(const p of old.runtime_dependency_pins)assert.deepEqual(m.runtime_dependency_pins.find(q=>q.path===p.path),p);
for(const p of m.runtime_dependency_pins)digest(p.path,p);
execFileSync(process.execPath,['--test','tools/proofs/unified-destination-contract.test.mjs','tools/proofs/unified-layer-catalogue.test.mjs','tools/proofs/unified-catalogue-independent.test.mjs'],{cwd:root,stdio:'inherit'});
console.log('PASS V9.201 generation proof: exact inherited descriptors, 17 cartridge hashes, 12 runtime pins, ledger, unchanged production and router; destination/catalogue tests passed.');

Owner Test Proof

A JavaScript module in the proofs folder of GridAtlas that tests composition, using SHA-256.

testgridatlas / tools/proofs/202612020205-owner-test.proof.mjs · lines 1–27 of 27 · version 2026-12-02 02:05 · Entry point · pattern verify (shared by 34 files)

What it does
It tests composition. Defines read, verify. Uses libraries node:assert/strict, node:fs, node:crypto, node:path, node:vm. Side effects: reads or writes files.
Why it exists in the grid workflow
Domain stage upstream_foresight (repository name word 'gridatlas'): upstream engineering foresight over GB transmission and distribution topology (TSO/DNO, 132kV and above, the REPD pipeline, data centres), which Ventus Ltd states it models for foresight.
Inputs & outputs
In: JSON file current.json; JSON file -composition.json.
Downstream impact
Used directly by 1 file: GridAtlas PR File Size Guard Workflow (gridatlas).
What it achieves
Defines `read` and `verify`. It reads `atlas/current.json`.
Why it matters
Run by GridAtlas PR File Size Guard Workflow.
Application
gridatlas · tools/proofs · JavaScript module
Uses
node:assert/strict, node:fs, node:crypto, node:path, node:vm
Used by
run by GridAtlas PR File Size Guard Workflow (workflow run)
Produces
read, verify
Defines here
read, verify
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
gridatlas@98b5004c5eda9f2ed915fb6fca4b9bbcaa426ca5 tools/proofs/202612020205-owner-test.proof.mjs:1-27 · blob b4f964737e78e0a8c3153d3cdd80303da222519c · GitHub at these lines
State
achieves: name · context: readme_derived · stage: ingest · effects: filesystem · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: production_core
import assert from 'node:assert/strict';
import {readFileSync} from 'node:fs';
import {createHash} from 'node:crypto';
import {resolve} from 'node:path';
import vm from 'node:vm';
const root=resolve(import.meta.dirname,'../..'),g='202612020205',old='202612020056',route='atlas/v/'+g;
const read=p=>readFileSync(resolve(root,p)),json=p=>JSON.parse(read(p));
const m=json(route+'/current.json'),p=json('atlas/v/'+old+'/current.json'),l=json('atlas/manifests/'+g+'-composition.json');
assert.equal(m.generation,g);assert.equal(m.previous_generation,old);assert.equal(m.composition_version,'v9.202');
assert.equal(m.source_revisions.integration,'8bd31a454250c00dcda7906ea4c429bc1b13c334');
assert.deepEqual(m.cartridge_order,p.cartridge_order);assert.deepEqual(m.shell,p.shell);assert.deepEqual(m.runtime_dependency_pins,p.runtime_dependency_pins);
assert.deepEqual(read(route+'/index.html'),read('atlas/v/'+old+'/index.html'));
const pointer=read('atlas/current.json');
assert.equal(createHash('sha1').update('blob '+pointer.length+'\0').update(pointer).digest('hex'),'7b4174dfeafaa7cd80df215e070a77deee7a1e1a');
const changed=new Set(['sld-sandbox','satnav-waypoint-map']);
const verify=(file,e)=>{const b=read(file);assert.equal(b.length,e.bytes,file);assert.equal(createHash('sha256').update(b).digest('hex'),e.sha256,file);return b;};
for(const c of m.cartridges){
 const before=p.cartridges.find(x=>x.id===c.id);assert.ok(before);
 if(!changed.has(c.id))assert.deepEqual(c,before);
 else {for(const k of ['id','slot','after','replace_script','type'])assert.equal(c[k],before[k]);assert.equal(c.generation,g);}
 const b=verify(resolve(root,route,c.path),c);
 if(changed.has(c.id))new vm.Script(b.toString());
 const e=l.cartridges.find(x=>x.id===c.id);assert.equal(resolve(root,'atlas',e.path),resolve(root,route,c.path));assert.equal(e.sha256,c.sha256);assert.equal(e.bytes,c.bytes);
}
for(const e of m.runtime_dependency_pins)verify(e.path,e);
for(const k of ['generation','composition_version','composition_id','source_revisions','cartridge_order','runtime_dependency_pins'])assert.deepEqual(l[k],m[k]);
console.log('PASS V9.202: two new versioned derivatives, all 17 cartridge and 12 runtime pins, immutable router, unchanged production pointer and predecessor descriptors');

Convergence Proof

A JavaScript module in the proofs folder of GridAtlas that reads composition and substations, using SHA-256.

ingestgridatlas / tools/proofs/202612020930-convergence.proof.mjs · lines 1–46 of 46 · version 2026-12-02 09:30 · Not reached from any entry point (candidate for review) · pattern normalized (shared by 4 files)

What it does
It loads composition and substations. Defines 6 functions or classes, including read, hash, verify, normalized, normalizedShell. Uses libraries node:assert/strict, node:fs, node:crypto, node:path, node:vm. Side effects: reads or writes files.
Why it exists in the grid workflow
Domain stage upstream_foresight (repository name word 'gridatlas'): upstream engineering foresight over GB transmission and distribution topology (TSO/DNO, 132kV and above, the REPD pipeline, data centres), which Ventus Ltd states it models for foresight. Domain terms in the code: substations.
Inputs & outputs
In: JSON file current.json; JSON file -composition.json.
What it achieves
It is built from the normalized step (`normalized`), the normalized shell helper (`normalizedShell`) and the normalized provenance helper (`normalizedProvenance`). Defines `read`, `hash`, `verify` and 3 more. It reads `atlas/current.json`.
Why it matters
No other file in the estate was found to import it.
Application
gridatlas · tools/proofs · JavaScript module
Uses
node:assert/strict, node:fs, node:crypto, node:path, node:vm
Used by
none found
Produces
read, hash, verify, normalized, normalizedShell, normalizedProvenance
Defines here
read, hash, verify, normalized, normalizedShell, normalizedProvenance
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
gridatlas@98b5004c5eda9f2ed915fb6fca4b9bbcaa426ca5 tools/proofs/202612020930-convergence.proof.mjs:1-46 · blob 025b6a15088673478d5335e33fa5ffec793b37ef · GitHub at these lines
State
achieves: name · context: readme_derived · stage: ingest · effects: filesystem · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: unreached_review
import assert from 'node:assert/strict';
import {readFileSync} from 'node:fs';
import {createHash} from 'node:crypto';
import {resolve} from 'node:path';
import vm from 'node:vm';

const root=resolve(import.meta.dirname,'../..'),g='202612020930',old='202612020205',route='atlas/v/'+g;
const read=p=>readFileSync(resolve(root,p)),json=p=>JSON.parse(read(p));
const m=json(route+'/current.json'),p=json('atlas/v/'+old+'/current.json'),l=json('atlas/manifests/'+g+'-composition.json');
const hash=b=>createHash('sha256').update(b).digest('hex');
const verify=(file,e)=>{const b=read(file);assert.equal(b.length,e.bytes,file);assert.equal(hash(b),e.sha256,file);return b;};
assert.equal(m.generation,g);assert.equal(m.previous_generation,old);assert.equal(m.composition_version,'v9.203');
assert.equal(m.loader,'v2');assert.equal(m.cartridges.length,19);assert.equal(m.runtime_dependency_pins.length,12);
assert.deepEqual(m.cartridge_order,[...p.cartridge_order,'g203-compact-dock','g203-compact-panel']);
assert.deepEqual(m.shell,p.shell);assert.deepEqual(m.last_known_green,p.last_known_green);
assert.deepEqual(m.runtime_dependency_pins,p.runtime_dependency_pins);
assert.deepEqual(read(route+'/index.html'),read('atlas/v/'+old+'/index.html'));
const pointer=read('atlas/current.json');
assert.equal(createHash('sha1').update('blob '+pointer.length+'\0').update(pointer).digest('hex'),'7b4174dfeafaa7cd80df215e070a77deee7a1e1a');
const normalized=(x,base)=>{const y=structuredClone(x);for(const k of ['path','contract'])if(y[k])y[k]=resolve(root,base,y[k]);return y;};
const normalizedShell=(x,base)=>({...x,index:resolve(root,base,x.index),base:resolve(root,base,x.base)});
assert.deepEqual(normalizedShell(m.shell,route),normalizedShell(l.shell,'atlas'));
assert.equal(resolve(root,route,m.composition_manifest),resolve(root,'atlas',l.composition_manifest));
const normalizedProvenance=(x,base)=>{const y=structuredClone(x);y.compute_observer.file=resolve(root,base,y.compute_observer.file);return y;};
assert.deepEqual(normalizedProvenance(m.provenance,route),normalizedProvenance(l.provenance,'atlas'));
for(const k of Object.keys(m)){if(!['shell','cartridges','composition_manifest','provenance'].includes(k))assert.deepEqual(m[k],l[k],k);}
assert.equal(l.cartridges.length,m.cartridges.length);
const changed=new Set(['substation-intelligence','vicinity-controls-rescue','ukpn-secondary-substations','satnav-waypoint-map','satnav-offline-plan']);
const added=new Set(['g203-compact-dock','g203-compact-panel']);
const byId=new Map(m.cartridges.map(c=>[c.id,c]));assert.equal(byId.size,m.cartridges.length);
const seen=new Set(),runtimePaths=new Set();
for(const id of m.cartridge_order){
 const c=byId.get(id);assert.ok(c,id);assert.ok(!seen.has(id),id);
 const e=l.cartridges.find(x=>x.id===id);assert.ok(e,id);assert.deepEqual(normalized(c,route),normalized(e,'atlas'),id);
 const before=p.cartridges.find(x=>x.id===id);
 if(added.has(id)){assert.equal(before,undefined);assert.equal(c.generation,g);}
 else if(changed.has(id)){assert.ok(before,id);for(const k of ['id','slot','after','replace_script','type'])assert.equal(c[k],before[k],id);assert.equal(c.generation,g);}
 else assert.deepEqual(c,before,id);
 if(c.slot==='after-cartridge')assert.ok(seen.has(c.after),id);
 const bytes=verify(resolve(root,route,c.path),c);
 if(changed.has(id)||added.has(id))new vm.Script(bytes.toString(),{filename:c.path});
 seen.add(id);
}
assert.equal(seen.size,19);
for(const e of m.runtime_dependency_pins){assert.ok(!runtimePaths.has(e.path),e.path);runtimePaths.add(e.path);verify(e.path,e);}
console.log('PASS V9.203: 19 ordered cartridges, 12 runtime pins, full normalized registry parity, unchanged immutable router and production fallback');

Distance Dock Proof

A JavaScript module in the proofs folder of GridAtlas that reads composition, using SHA-256.

geodesygridatlas / tools/proofs/202612021205-distance-dock.proof.mjs · lines 1–36 of 36 · version 2026-12-02 12:05 · Not reached from any entry point (candidate for review)

What it does
It loads composition. Defines hash, fix. Uses libraries node:assert/strict, node:fs, node:crypto, node:path, node:vm. Side effects: reads or writes files.
Why it exists in the grid workflow
Domain stage upstream_foresight (repository name word 'gridatlas'): upstream engineering foresight over GB transmission and distribution topology (TSO/DNO, 132kV and above, the REPD pipeline, data centres), which Ventus Ltd states it models for foresight.
Inputs & outputs
In: JSON file current.json; JSON file 202612021205-composition.json.
What it achieves
Defines `hash` and `fix`. It reads `/current.json`.
Why it matters
No other file in the estate was found to import it.
Application
gridatlas · tools/proofs · JavaScript module
Uses
Convergence Unlimited (import), Ordered Convergence Unlimited (import), Direct Convergence Unlimited (import), Unified Destination Unlimited (import), node:assert/strict, node:fs, node:crypto, node:path, node:vm, ../satnav/vendor/9698781539e549deaa6ecaa4a2b34610c1f9fd29/vendor/grid-distance-maths/src/geodesy.mjs
Used by
none found
Produces
hash, fix
Defines here
hash, fix
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
gridatlas@98b5004c5eda9f2ed915fb6fca4b9bbcaa426ca5 tools/proofs/202612021205-distance-dock.proof.mjs:1-36 · blob b5ecf6aa510903b64f09cd1126ebfa5eec42eabf · GitHub at these lines
State
achieves: name · context: readme_derived · stage: ingest · effects: filesystem · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: unreached_review
import assert from 'node:assert/strict';
import {readFileSync} from 'node:fs';
import {createHash} from 'node:crypto';
import {resolve} from 'node:path';
import vm from 'node:vm';
import * as maths from '../satnav/vendor/9698781539e549deaa6ecaa4a2b34610c1f9fd29/vendor/grid-distance-maths/src/geodesy.mjs';
import {classifyDirectLeg,directLegGeometry,prepareAssetDestination} from '../satnav/guidance/convergence-unlimited.mjs';
import {createWaypointGuidance} from '../satnav/guidance/ordered-convergence-unlimited.mjs';
import {createDirectWalk} from '../satnav/walk/direct-convergence-unlimited.mjs';
import {validateDestinationLeg} from '../../atlas/modules/unified-destination-unlimited.mjs';
const root=resolve(import.meta.dirname,'../..'),base='atlas/v/202612021205',read=p=>readFileSync(resolve(root,p));
const j=JSON.parse(read(base+'/current.json')),old=JSON.parse(read('atlas/v/202612020930/current.json')),m=JSON.parse(read('atlas/manifests/202612021205-composition.json'));
assert.equal(j.generation,'202612021205');assert.equal(j.composition_version,'v9.204');assert.deepEqual(j.cartridge_order,old.cartridge_order);
assert.deepEqual(read(base+'/index.html'),read('atlas/v/202612020930/index.html'));
const hash=b=>createHash('sha256').update(b).digest('hex');
for(const c of j.cartridges){const b=read(resolve(root,base,c.path));assert.equal(hash(b),c.sha256,c.id);assert.equal(b.length,c.bytes,c.id);const e=m.cartridges.find(x=>x.id===c.id);assert.equal(resolve(root,base,c.path),resolve(root,'atlas',e.path));assert.equal(c.sha256,e.sha256);if(c.generation==='202612021205')new vm.Script(b.toString());}
for(const c of j.runtime_dependency_pins){const b=read(c.path);assert.equal(hash(b),c.sha256,c.path);assert.equal(b.length,c.bytes,c.path);}
assert.deepEqual(j.runtime_dependency_pins,m.runtime_dependency_pins);
const from=[-0.4,51.55],to=m=>maths.destinationPoint(...from,m/1000,90);
const compass={fixQuality:()=> 'usable',guide:(f,t)=>({distanceM:maths.distanceKm(f.longitude,f.latitude,...t.coordinates)*1000,accuracyM:f.accuracyM,bearingDeg:maths.initialBearingDeg(f.longitude,f.latitude,...t.coordinates)})};
const fix=(at,timestampMs)=>({longitude:at[0],latitude:at[1],accuracyM:3,timestampMs});
for(const metres of [1999,2000,2001,4200,33000,100000,1000000]){
 const at=to(metres);assert.equal(classifyDirectLeg(maths,from,at).status,'ok');
 const line=directLegGeometry(maths,from,at);assert.deepEqual(line.coordinates[0],from);assert.deepEqual(line.coordinates.at(-1),at);assert.ok(line.coordinates.length<=65);
 assert.equal(prepareAssetDestination(maths,fix(from,1000),at,true,'usable').ok,true);
 assert.equal(validateDestinationLeg(from,at,(a,b)=>maths.distanceKm(...a,...b)).ok,true);
 const w=createDirectWalk(maths,compass);w.setTargets([{id:'to',coordinate:at}]);
 assert.equal(w.locate(fix(from,1000),1000).status,'guiding');assert.equal(w.locate(fix(at,2000),2000).status,'complete');
 const r=createWaypointGuidance(maths,compass);r.setRoute([{id:'from',coordinate:from},{id:'to',coordinate:at}]);
 assert.equal(r.locate(fix(from,1000),1000).status,'guiding');assert.equal(r.locate(fix(at,2000),2000).status,'complete');
}
assert.equal(prepareAssetDestination(maths,fix(from,1000),to(4200),true,'poor').ok,false);
assert.equal(prepareAssetDestination(maths,fix(from,1000),[181,0],true,'usable').ok,false);
assert.equal(validateDestinationLeg(from,[181,0],()=>1).ok,false);
assert.equal(directLegGeometry(maths,[179.999,0],[-179.999,0]),null);
console.log('PASS: 7 distances through 1000 km, drawing, direct/ordered guidance, asset/search transfer, GPS and coordinate guards, pinned composition');

Orient14 Proof

A JavaScript module in the proofs folder of GridAtlas that reads composition, using SHA-256.

interactiongridatlas / tools/proofs/202612030153-orient14.proof.mjs · lines 1–36 of 36 · version 2026-12-03 01:53 · Not reached from any entry point (candidate for review) · pattern exercise (shared by 3 files)

What it does
It loads composition. Defines exercise, load, msg. Uses libraries node:assert/strict, node:fs, node:crypto, node:path. Side effects: changes the web page (DOM); reads or writes files.
Why it exists in the grid workflow
Domain stage upstream_foresight (repository name word 'gridatlas'): upstream engineering foresight over GB transmission and distribution topology (TSO/DNO, 132kV and above, the REPD pipeline, data centres), which Ventus Ltd states it models for foresight.
Inputs & outputs
In: JSON file current.json; JSON file 202612030153-composition.json.
What it achieves
Defines `exercise`, `load` and `msg`. It reads `/current.json`.
Why it matters
No other file in the estate was found to import it.
Application
gridatlas · tools/proofs · JavaScript module
Uses
node:assert/strict, node:fs, node:crypto, node:path
Used by
none found
Produces
exercise, load, msg
Defines here
exercise, load, msg
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
gridatlas@98b5004c5eda9f2ed915fb6fca4b9bbcaa426ca5 tools/proofs/202612030153-orient14.proof.mjs:1-36 · blob 37c35223985fbf389462ecbaf45daf9128e3bedc · GitHub at these lines
State
achieves: name · context: readme_derived · stage: output · effects: dom, filesystem · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: unreached_review
import assert from 'node:assert/strict';
import {readFileSync} from 'node:fs';
import {createHash} from 'node:crypto';
import {resolve} from 'node:path';
const root=resolve(import.meta.dirname,'../..'), base='atlas/v/202612030153', read=p=>readFileSync(resolve(root,p));
const j=JSON.parse(read(base+'/current.json')), old=JSON.parse(read('atlas/v/202612021205/current.json')), manifest=JSON.parse(read('atlas/manifests/202612030153-composition.json'));
assert.equal(j.generation,'202612030153');assert.equal(j.composition_version,'v9.205');assert.deepEqual(j.cartridge_order,old.cartridge_order);assert.deepEqual(read(base+'/index.html'),read('atlas/v/202612021205/index.html'));
for(const c of j.cartridges){const b=read(resolve(root,base,c.path));assert.equal(createHash('sha256').update(b).digest('hex'),c.sha256,c.id);assert.equal(b.length,c.bytes,c.id);const e=manifest.cartridges.find(x=>x.id===c.id);assert.equal(resolve(root,base,c.path),resolve(root,'atlas',e.path));assert.equal(c.sha256,e.sha256);if(c.id!=='satnav-start-walk')assert.deepEqual(c,old.cartridges.find(x=>  … [line shortened here: 415 characters; full line on GitHub]
assert.deepEqual(j.runtime_dependency_pins,old.runtime_dependency_pins);for(const c of j.runtime_dependency_pins){const b=read(c.path);assert.equal(createHash('sha256').update(b).digest('hex'),c.sha256,c.path);assert.equal(b.length,c.bytes,c.path);}
async function exercise(source){
 let count=0;const cases=[];const check=(x,m)=>{if(!x)throw Error(m);count++};const group=async(name,f)=>{const prior=count;await f();cases.push({name,assertions:count-prior})};
 class E{constructor(){this.listeners={};this.style={setProperty(){}};this.hidden=false;this.disabled=false;this.textContent="";this.attrs={};}addEventListener(k,f){(this.listeners[k]??=[]).push(f)}emit(k){for(const f of this.listeners[k]??[])f({type:k})}setAttribute(k,v){this.attrs[k]=v}getAttribute(k){return this.attrs[k]}click(){if(!this.disabled)this.onclick?.()}append(){}after(...items){for(c  … [line shortened here: 492 characters; full line on GitHub]
 const nodes={},panel=new E(),mode=new E(),obj=new E(),start=new E(),stop=new E(),gps=new E(),gpsStop=new E(),loop=new E(),span=new E(),links=[new E(),new E()];mode.value="walking";obj.value="shortest";let tracking=false,starts=0,stops=0,planChanges=0,courseCalls=0,routeCalls=0,routeData=null,cameraWrites=0;let pins=[{id:"from",coordinate:[0,0]},{id:"to",coordinate:[0.1,0]}],fix={longitude:0,latit  … [line shortened here: 781 characters; full line on GitHub]
 const api={maths,getPins:()=>pins,getEndpoints:()=>[pins[0].coordinate,pins.at(-1).coordinate],getMap:()=>map,getFix:()=>fix,isTracking:()=>tracking,leaveExample(){},isExample:()=>false,replacePlan(p){planChanges++;pins=p;panel.emit("satnav:pins")}};
 panel.satnavSurvey=api;panel.querySelector=s=>({"#satnav-location":gps,"#satnav-stop":gpsStop,"[data-loop]":loop}[s]);gps.onclick=()=>{starts++;tracking=true};gpsStop.onclick=()=>{stops++;tracking=false;panel.emit("satnav:stop")};
 const to=new E(),menu=new E();nodes["satnav-compact"]=panel;nodes["satnav-to"]=to;nodes["gridatlas-menu-bar"]=menu;
 const doc=new E();doc.head=new E();doc.body=new E();doc.getElementById=id=>nodes[id];doc.createElement=tag=>{const e=new E();e.querySelector=s=>({"select":mode,"#satnav-route-objective":obj,"#satnav-walk-start":start,"#satnav-walk-stop":stop,"span":span}[s]);e.querySelectorAll=()=>links;return e};
 const win=new E();let resolver;const delayed=new Promise(r=>resolver=r);let directTargets=[];const compass={fixQuality:f=>f?"usable":"none",guide:()=>({bearingDeg:90})};const deps={
 "direct-convergence-unlimited.mjs":{createDirectWalk:()=>({setTargets:t=>directTargets=t,restart(){},locate:()=>{courseCalls++;return {status:"guiding",distanceM:11100,remainingM:11100,bearingDeg:90,targetIndex:0}}}),walkTargets:(p,from)=>p.slice(from?1:0)},
 "compass.mjs":compass,"route-follower.mjs":{createRouteFollower:()=>()=>({status:"ok",offRoute:false,remainingM:100,segmentIndex:0})},"controls.mjs":{mountGateControls:()=>({selected:()=>false,attachMap(){},select(){},end(){},begin(){}})},"plan.mjs":{prepareGateJob(){}},
 "council-router.mjs":{loadPedestrianRouter:()=>delayed}};
 const load=async u=>deps[String(u).split("/").at(-1)];
 const U=class {constructor(p,b){this.s=p}toString(){return this.s}};const P=class{has(){return false}};const logger={error(...a){throw Error(a.join(" "))}};
 const executable=source.replace("void async function ()","return async function ()").replaceAll("import(new URL(","load(new URL(");
 await new Function("document","window","location","URL","URLSearchParams","ResizeObserver","MutationObserver","console","load",executable)(doc,win,{href:"https://example.invalid",search:""},U,P,undefined,undefined,logger,load);
 const msg=()=>nodes["satnav-walk-guidance"].textContent;const change=v=>{mode.value=v;mode.onchange()};const settle=async()=>{for(let i=0;i<12;i++)await Promise.resolve()};
 await group("walking unavailable, no watch or fake geometry",async()=>{check(start.disabled,"walking start enabled");check(msg().includes("Shortest walking route unavailable"),msg());check(obj.hidden,"objective visible");start.onclick();check(starts===0,"watch started");check(routeData.features.length===0,"route drawn");check(courseCalls===0,"direct used")});
 await group("driving shortest and estimated fastest unavailable",async()=>{change("driving");check(!obj.hidden,"no objective");check(start.disabled,"start enabled");check(msg().includes("Shortest driving"),msg());obj.value="fastest";obj.onchange();check(msg().includes("Estimated fastest"),msg());check(routeData.features.length===0,"route drawn");check(courseCalls===0,"direct used")});
 const saved=pins;
 await group("explicit manual mode and long direct distance",async()=>{change("direct");check(!start.disabled,"manual disabled");check(obj.hidden,"objective shown");start.click();check(starts===1&&tracking,"watch not started once");check(msg().includes("11.10 km straight to destination"),msg());check(msg().includes("straight-line guidance"),msg());check(pins===saved&&planChanges===0,"plan mutated"  … [line shortened here: 521 characters; full line on GitHub]
 await group("pending legacy route invalidated by mode switch",async()=>{change("mapped");check(msg().includes("Checking mapped footpaths"),msg());change("driving");resolver((a,b)=>{routeCalls++;return{status:"mapped",geometry:{coordinates:[a,b]},attribution:"Synthetic source",closureNotices:"https://example.invalid",licence:"https://example.invalid"}});await settle();check(routeCalls===0,"obsolet  … [line shortened here: 578 characters; full line on GitHub]
 await group("legacy mapped path preserved, source and geometry clear",async()=>{change("mapped");await settle();check(routeCalls===1,"legacy route missing");check(routeData.features.length===1,"legacy geometry missing");check(msg().includes("shortest unverified"),msg());check(!nodes["satnav-walk-source"].hidden,"source hidden");change("walking");check(routeData.features.length===0,"route not clea  … [line shortened here: 511 characters; full line on GitHub]
 await group("saved plan notification and repeated mode changes",async()=>{pins=[{id:"new-from",coordinate:[0,0]},{id:"new-to",coordinate:[0.2,0]}];panel.emit("satnav:pins");check(directTargets[0]===pins[1],"new target not propagated");for(let i=0;i<100;i++){const v=i%2?"walking":"driving";change(v);check(start.disabled,"unavailable active");check(msg().includes("unavailable"),"bad status");check(  … [line shortened here: 735 characters; full line on GitHub]
 return {assertions:count,cases,scope:"Retrieved controller with injected DOM, GPS, map and router doubles; not browser or actual engine",baseline:"a5a3bf549e752a751d44066c2a1a11852b0a14fb"};
}
const result=await exercise(read('atlas/modules/202612030153-orient14-start-walk.js').toString('utf8'));assert.equal(result.assertions,536);console.log(JSON.stringify(result,null,2));

Orient16 Proof

A JavaScript module in the proofs folder of GridAtlas that reads composition, using SHA-256.

ingestgridatlas / tools/proofs/202612031130-orient16.proof.mjs · lines 1–6 of 6 · version 2026-12-03 11:30 · Not reached from any entry point (candidate for review)

What it does
It loads composition. Uses libraries node:assert/strict. Side effects: reads or writes files.
Why it exists in the grid workflow
Domain stage upstream_foresight (repository name word 'gridatlas'): upstream engineering foresight over GB transmission and distribution topology (TSO/DNO, 132kV and above, the REPD pipeline, data centres), which Ventus Ltd states it models for foresight.
Inputs & outputs
In: JSON file current.json; JSON file 202612031130-composition.json.
What it achieves
It reads `/current.json`.
Why it matters
No other file in the estate was found to import it.
Application
gridatlas · tools/proofs · JavaScript module
Uses
node:assert/strict
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
gridatlas@98b5004c5eda9f2ed915fb6fca4b9bbcaa426ca5 tools/proofs/202612031130-orient16.proof.mjs:1-6 · blob 92929d55e69e936a4c2c5b2d34be629d41ebbca6 · GitHub at these lines
State
achieves: name · context: readme_derived · stage: ingest · effects: filesystem · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: unreached_review
import assert from 'node:assert/strict';import {readFileSync} from 'node:fs';import {createHash} from 'node:crypto';import {resolve} from 'node:path';
const base='atlas/v/202612031130',old='atlas/v/202612030153',read=p=>readFileSync(p),j=JSON.parse(read(base+'/current.json')),prev=JSON.parse(read(old+'/current.json')),m=JSON.parse(read('atlas/manifests/202612031130-composition.json'));
assert.equal(j.composition_version,'v9.206');assert.equal(j.generation,'202612031130');assert.deepEqual(j.cartridge_order,prev.cartridge_order);assert.deepEqual(read(base+'/index.html'),read(old+'/index.html'));
for(const c of j.cartridges){const b=read(resolve(base,c.path));assert.equal(createHash('sha256').update(b).digest('hex'),c.sha256,c.id);assert.equal(b.length,c.bytes,c.id);const d=m.cartridges.find(x=>x.id===c.id);assert.equal(resolve(base,c.path),resolve('atlas',d.path));assert.equal(c.sha256,d.sha256);if(c.id!=='satnav-start-walk')assert.deepEqual(c,prev.cartridges.find(x=>x.id===c.id))}
for(const c of j.runtime_dependency_pins){const b=read(c.path);assert.equal(createHash('sha256').update(b).digest('hex'),c.sha256,c.path);assert.equal(b.length,c.bytes,c.path)}
console.log('ORIENT-16 composition integrity PASS');

Orient16 Recovery Proof

A JavaScript module in the proofs folder of GridAtlas that reads composition, using SHA-256.

ingestgridatlas / tools/proofs/202612031235-orient16-recovery.proof.mjs · lines 1–6 of 6 · version 2026-12-03 12:35 · Not reached from any entry point (candidate for review)

What it does
It loads composition. Uses libraries node:assert/strict. Side effects: reads or writes files.
Why it exists in the grid workflow
Domain stage upstream_foresight (repository name word 'gridatlas'): upstream engineering foresight over GB transmission and distribution topology (TSO/DNO, 132kV and above, the REPD pipeline, data centres), which Ventus Ltd states it models for foresight.
Inputs & outputs
In: JSON file current.json; JSON file 202612031235-composition.json.
What it achieves
It reads `/current.json`.
Why it matters
No other file in the estate was found to import it.
Application
gridatlas · tools/proofs · JavaScript module
Uses
node:assert/strict
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
gridatlas@98b5004c5eda9f2ed915fb6fca4b9bbcaa426ca5 tools/proofs/202612031235-orient16-recovery.proof.mjs:1-6 · blob 22055a1e541a17758921dcd725c3385492c47395 · GitHub at these lines
State
achieves: name · context: readme_derived · stage: ingest · effects: filesystem · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: unreached_review
import assert from 'node:assert/strict';import {readFileSync} from 'node:fs';import {createHash} from 'node:crypto';import {resolve} from 'node:path';
const base='atlas/v/202612031235',old='atlas/v/202612031130',read=p=>readFileSync(p),j=JSON.parse(read(base+'/current.json')),prev=JSON.parse(read(old+'/current.json')),m=JSON.parse(read('atlas/manifests/202612031235-composition.json'));
assert.equal(j.composition_version,'v9.207');assert.equal(j.generation,'202612031235');assert.deepEqual(j.cartridge_order,prev.cartridge_order);assert.deepEqual(read(base+'/index.html'),read(old+'/index.html'));
for(const c of j.cartridges){const b=read(resolve(base,c.path));assert.equal(createHash('sha256').update(b).digest('hex'),c.sha256,c.id);assert.equal(b.length,c.bytes,c.id);const d=m.cartridges.find(x=>x.id===c.id);assert.equal(resolve(base,c.path),resolve('atlas',d.path));assert.equal(c.sha256,d.sha256);if(c.id!=='satnav-start-walk')assert.deepEqual(c,prev.cartridges.find(x=>x.id===c.id))}
for(const c of j.runtime_dependency_pins){const b=read(c.path);assert.equal(createHash('sha256').update(b).digest('hex'),c.sha256,c.path);assert.equal(b.length,c.bytes,c.path)}
console.log('ORIENT-16 composition integrity PASS');

Orient16 Responsive Proof

A JavaScript module in the proofs folder of GridAtlas that reads composition, using SHA-256.

ingestgridatlas / tools/proofs/202612031346-orient16-responsive.proof.mjs · lines 1–6 of 6 · version 2026-12-03 13:46 · Not reached from any entry point (candidate for review)

What it does
It loads composition. Uses libraries node:assert/strict. Side effects: reads or writes files.
Why it exists in the grid workflow
Domain stage upstream_foresight (repository name word 'gridatlas'): upstream engineering foresight over GB transmission and distribution topology (TSO/DNO, 132kV and above, the REPD pipeline, data centres), which Ventus Ltd states it models for foresight.
Inputs & outputs
In: JSON file current.json; JSON file 202612031346-composition.json.
What it achieves
It reads `/current.json`.
Why it matters
No other file in the estate was found to import it.
Application
gridatlas · tools/proofs · JavaScript module
Uses
node:assert/strict
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
gridatlas@98b5004c5eda9f2ed915fb6fca4b9bbcaa426ca5 tools/proofs/202612031346-orient16-responsive.proof.mjs:1-6 · blob 57ef50a254bd20e0e66887872638400b29c420b2 · GitHub at these lines
State
achieves: name · context: readme_derived · stage: ingest · effects: filesystem · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: unreached_review
import assert from 'node:assert/strict';import {readFileSync} from 'node:fs';import {createHash} from 'node:crypto';import {resolve} from 'node:path';
const base='atlas/v/202612031346',old='atlas/v/202612031235',read=p=>readFileSync(p),j=JSON.parse(read(base+'/current.json')),prev=JSON.parse(read(old+'/current.json')),m=JSON.parse(read('atlas/manifests/202612031346-composition.json'));
assert.equal(j.composition_version,'v9.208');assert.equal(j.generation,'202612031346');assert.deepEqual(j.cartridge_order,prev.cartridge_order);assert.deepEqual(read(base+'/index.html'),read(old+'/index.html'));
for(const c of j.cartridges){const b=read(resolve(base,c.path));assert.equal(createHash('sha256').update(b).digest('hex'),c.sha256,c.id);assert.equal(b.length,c.bytes,c.id);const d=m.cartridges.find(x=>x.id===c.id);assert.equal(resolve(base,c.path),resolve('atlas',d.path));assert.equal(c.sha256,d.sha256);if(c.id!=='g203-compact-panel')assert.deepEqual(c,prev.cartridges.find(x=>x.id===c.id))}
for(const c of j.runtime_dependency_pins){const b=read(c.path);assert.equal(createHash('sha256').update(b).digest('hex'),c.sha256,c.path);assert.equal(b.length,c.bytes,c.path)}
console.log('ORIENT-16 composition integrity PASS');

Orient17 Regional Proof

A JavaScript module in the proofs folder of GridAtlas that reads composition, using SHA-256.

ingestgridatlas / tools/proofs/202612031704-orient17-regional.proof.mjs · lines 1–12 of 12 · version 2026-12-03 17:04 · Not reached from any entry point (candidate for review)

What it does
It loads composition. Uses libraries node:assert/strict, node:fs, node:crypto, node:path. Side effects: reads or writes files.
Why it exists in the grid workflow
Domain stage upstream_foresight (repository name word 'gridatlas'): upstream engineering foresight over GB transmission and distribution topology (TSO/DNO, 132kV and above, the REPD pipeline, data centres), which Ventus Ltd states it models for foresight.
Inputs & outputs
In: JSON file current.json; JSON file -composition.json.
What it achieves
It reads `/current.json`.
Why it matters
No other file in the estate was found to import it.
Application
gridatlas · tools/proofs · JavaScript module
Uses
Regional Config (dynamic import), node:assert/strict, node:fs, node:crypto, node:path
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
gridatlas@98b5004c5eda9f2ed915fb6fca4b9bbcaa426ca5 tools/proofs/202612031704-orient17-regional.proof.mjs:1-12 · blob ca65e813dbaf974fd78dd893c54e50800e736f37 · GitHub at these lines
State
achieves: name · context: readme_derived · stage: ingest · effects: filesystem · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: unreached_review
import assert from 'node:assert/strict';
import {readFileSync} from 'node:fs';
import {createHash} from 'node:crypto';
import {resolve} from 'node:path';
const gen='202612031704',base='atlas/v/'+gen,old='atlas/v/202612031346',read=p=>readFileSync(p),j=JSON.parse(read(base+'/current.json')),prev=JSON.parse(read(old+'/current.json')),m=JSON.parse(read('atlas/manifests/'+gen+'-composition.json'));
assert.equal(j.composition_version,'v9.209');assert.equal(j.generation,gen);assert.deepEqual(j.cartridge_order,prev.cartridge_order);assert.deepEqual(read(base+'/index.html'),read(old+'/index.html'));
for(const c of j.cartridges){const b=read(resolve(base,c.path));assert.equal(createHash('sha256').update(b).digest('hex'),c.sha256,c.id);assert.equal(b.length,c.bytes,c.id);const d=m.cartridges.find(x=>x.id===c.id);assert.equal(resolve(base,c.path),resolve('atlas',d.path));assert.equal(c.sha256,d.sha256);if(c.id!=='satnav-start-walk')assert.deepEqual(c,prev.cartridges.find(x=>x.id===c.id))}
for(const c of j.runtime_dependency_pins){const b=read(c.path);assert.equal(createHash('sha256').update(b).digest('hex'),c.sha256,c.path);assert.equal(b.length,c.bytes,c.path)}
assert.deepEqual(j.runtime_dependency_pins.slice(0,prev.runtime_dependency_pins.length),prev.runtime_dependency_pins);
const {regionalConfig}=await import('../satnav/regional/regional-config.mjs');
assert.equal(regionalConfig.endpoint,null);assert.equal(regionalConfig.graphRevision,null);
console.log('ORIENT-17.2 V9.209 composition and disabled-by-default deployment PASS');

Orient17b Proof

A JavaScript module in the proofs folder of GridAtlas that reads composition, using SHA-256.

ingestgridatlas / tools/proofs/202612040110-orient17b.proof.mjs · lines 1–13 of 13 · version 2026-12-04 01:10 · Not reached from any entry point (candidate for review)

What it does
It loads composition. Uses libraries node:assert/strict, node:fs, node:crypto, node:path. Side effects: reads or writes files.
Why it exists in the grid workflow
Domain stage upstream_foresight (repository name word 'gridatlas'): upstream engineering foresight over GB transmission and distribution topology (TSO/DNO, 132kV and above, the REPD pipeline, data centres), which Ventus Ltd states it models for foresight.
Inputs & outputs
In: JSON file current.json; JSON file -composition.json.
What it achieves
It reads `/current.json`.
Why it matters
No other file in the estate was found to import it.
Application
gridatlas · tools/proofs · JavaScript module
Uses
Regional Config (dynamic import), node:assert/strict, node:fs, node:crypto, node:path
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
gridatlas@98b5004c5eda9f2ed915fb6fca4b9bbcaa426ca5 tools/proofs/202612040110-orient17b.proof.mjs:1-13 · blob d7e5b7b908b0cb8989ba8f6f6348336e62792c56 · GitHub at these lines
State
achieves: name · context: readme_derived · stage: ingest · effects: filesystem · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: unreached_review
import assert from 'node:assert/strict';
import {readFileSync} from 'node:fs';
import {createHash} from 'node:crypto';
import {resolve} from 'node:path';
const gen='202612040110',base='atlas/v/'+gen,old='atlas/v/202612040055',read=p=>readFileSync(p),j=JSON.parse(read(base+'/current.json')),prev=JSON.parse(read(old+'/current.json')),m=JSON.parse(read('atlas/manifests/'+gen+'-composition.json'));
assert.equal(j.composition_version,'v9.213');assert.equal(j.generation,gen);
assert.deepEqual(j.cartridge_order,prev.cartridge_order);assert.deepEqual(read(base+'/index.html'),read(old+'/index.html'));
assert.deepEqual(j.shell,prev.shell);
for(const c of j.cartridges){const b=read(resolve(base,c.path));assert.equal(createHash('sha256').update(b).digest('hex'),c.sha256,c.id);assert.equal(b.length,c.bytes,c.id);const d=m.cartridges.find(x=>x.id===c.id);assert.equal(resolve(base,c.path),resolve('atlas',d.path));assert.equal(c.sha256,d.sha256);if(!['satnav-start-walk'].includes(c.id))assert.deepEqual(c,prev.cartridges.find(x=>x.id===c.i  … [line shortened here: 405 characters; full line on GitHub]
for(const c of j.runtime_dependency_pins){const b=read(c.path);assert.equal(createHash('sha256').update(b).digest('hex'),c.sha256,c.path);assert.equal(b.length,c.bytes,c.path);}
assert.deepEqual(j.runtime_dependency_pins.slice(0,prev.runtime_dependency_pins.length),prev.runtime_dependency_pins);
const {regionalConfig}=await import('../satnav/regional/regional-config.mjs');assert.equal(regionalConfig.endpoint,null);assert.equal(regionalConfig.graphRevision,null);
console.log('ORIENT17A V9.213 composition and pinned dependencies PASS (not functional acceptance)');

Orient17a Proof

A JavaScript module in the proofs folder of GridAtlas that reads composition, using SHA-256.

ingestgridatlas / tools/proofs/202612040127-orient17a.proof.mjs · lines 1–23 of 23 · version 2026-12-04 01:27 · Not reached from any entry point (candidate for review) · pattern inspect (shared by 40 files)

What it does
It loads composition. Defines inspect. Uses libraries node:assert/strict, node:fs, node:crypto, node:path. Side effects: reads or writes files.
Why it exists in the grid workflow
Domain stage upstream_foresight (repository name word 'gridatlas'): upstream engineering foresight over GB transmission and distribution topology (TSO/DNO, 132kV and above, the REPD pipeline, data centres), which Ventus Ltd states it models for foresight.
Inputs & outputs
In: JSON file current.json; JSON file -composition.json.
What it achieves
Defines `inspect`. It reads `/current.json`.
Why it matters
No other file in the estate was found to import it.
Application
gridatlas · tools/proofs · JavaScript module
Uses
Regional Config (dynamic import), node:assert/strict, node:fs, node:crypto, node:path
Used by
none found
Produces
inspect
Defines here
inspect
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
gridatlas@98b5004c5eda9f2ed915fb6fca4b9bbcaa426ca5 tools/proofs/202612040127-orient17a.proof.mjs:1-23 · blob e0b4a9501303cf882a1eef35894f0d562d8b2f92 · GitHub at these lines
State
achieves: name · context: readme_derived · stage: ingest · effects: filesystem · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: unreached_review
import assert from 'node:assert/strict';
import {readFileSync} from 'node:fs';
import {createHash} from 'node:crypto';
import {resolve,dirname,relative} from 'node:path';
const gen='202612040127',base='atlas/v/'+gen,old='atlas/v/202612040126',read=p=>readFileSync(p),j=JSON.parse(read(base+'/current.json')),prev=JSON.parse(read(old+'/current.json')),m=JSON.parse(read('atlas/manifests/'+gen+'-composition.json'));
assert.equal(j.composition_version,'v9.216');assert.equal(j.generation,gen);
assert.deepEqual(j.cartridge_order,prev.cartridge_order);assert.deepEqual(read(base+'/index.html'),read(old+'/index.html'));
assert.deepEqual(j.shell,prev.shell);
for(const c of j.cartridges){const b=read(resolve(base,c.path));assert.equal(createHash('sha256').update(b).digest('hex'),c.sha256,c.id);assert.equal(b.length,c.bytes,c.id);const d=m.cartridges.find(x=>x.id===c.id);assert.equal(resolve(base,c.path),resolve('atlas',d.path));assert.equal(c.sha256,d.sha256);if(!['satnav-field-compass'].includes(c.id))assert.deepEqual(c,prev.cartridges.find(x=>x.id===  … [line shortened here: 408 characters; full line on GitHub]
for(const c of j.runtime_dependency_pins){const b=read(c.path);assert.equal(createHash('sha256').update(b).digest('hex'),c.sha256,c.path);assert.equal(b.length,c.bytes,c.path);}
assert.deepEqual(j.runtime_dependency_pins.slice(0,prev.runtime_dependency_pins.length),prev.runtime_dependency_pins);
const {regionalConfig}=await import('../satnav/regional/regional-config.mjs');assert.equal(regionalConfig.endpoint,null);assert.equal(regionalConfig.graphRevision,null);
console.log('ORIENT17A V9.216 composition and pinned dependencies PASS (not functional acceptance)');

// Scope: literal relative imports from the seven known omitted roots only.
// Computed imports, workers, shell and data assets require a separate full closure audit.
const roots=["atlas/modules/unified-destination-contract.mjs","tools/satnav/orientation/heading.mjs","tools/satnav/survey/model.mjs","tools/satnav/interchange/layout-import.mjs","tools/satnav/walk/gate/jobs/controls.mjs","tools/satnav/walk/gate/jobs/plan.mjs","tools/satnav/walk/council/council-router.mjs"];
const listed=new Set(j.runtime_dependency_pins.map(p=>p.path));
const visited=new Set();
function inspect(path){if(visited.has(path))return;visited.add(path);assert.ok(listed.has(path),'Unpinned literal module: '+path);const code=read(path).toString('utf8');for(const match of code.matchAll(/(?:\bfrom\s*|\bimport\s*\(\s*|\bimport\s*)['"](\.[^'"]+)['"]/g)){inspect(relative(process.cwd(),resolve(dirname(path),match[1])).split('\\\\').join('/'));}}
for(const path of roots)inspect(path);
assert.equal(j.runtime_dependency_pins.length,53);
console.log('Seven-root literal static dependency closure verified:',visited.size,'modules; dynamic closure not claimed');