In this section
- 12 Pedestrian transform · neural-link-between-agents / SESSIONS/2026-12-02-SATNAV-ORIENT-20/FINDINGS/12-pedestrian.mjs lines 1–53
- 13 Driving render · neural-link-between-agents / SESSIONS/2026-12-02-SATNAV-ORIENT-20/FINDINGS/13-driving.mjs lines 1–64
- 14 Integration Test test · neural-link-between-agents / SESSIONS/2026-12-02-SATNAV-ORIENT-20/FINDINGS/14-integration-test.mjs lines 1–28
- Handoff ingest · neural-link-between-agents / SESSIONS/2026-12-04-SATNAV-KUIPER-20/handoff.mjs lines 1–54
- Handoff Test test · neural-link-between-agents / SESSIONS/2026-12-04-SATNAV-KUIPER-20/handoff.test.mjs lines 1–17
- Audit Resolution storage · neural-link-between-agents / SESSIONS/SATNAV-02/audit_resolution.py lines 1–84
- 2026 11 28 Privacy Lifecycle Test test · neural-link-between-agents / SESSIONS/SATNAV-05/2026-11-28-privacy-lifecycle.test.mjs lines 1–32
- Privacy Runner storage · neural-link-between-agents / SESSIONS/SATNAV-05/privacy_runner.py lines 1–79
- Audit Atlas V8 Deep Link Quarantine ingest · pipelinenews / atman/202608271329-audit-atlas-v8-deep-link-quarantine.py lines 1–163
12 Pedestrian
A JavaScript module in Neural Link Between Agents that calculates planar distances, using Dijkstra.
transformneural-link-between-agents / SESSIONS/2026-12-02-SATNAV-ORIENT-20/FINDINGS/12-pedestrian.mjs · lines 1–53 of 53 · Not reached from any entry point (candidate for review) · pattern permitted (shared by 3 files)
- What it does
- It calculates its inputs. Defines 10 functions or classes, including study, check, permitted, key, bound.
- 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
- It is built from the key step (`key`), the bound step (`bound`) and the solve step (`solve`). Defines `study`, `check`, `permitted` and 7 more.
- Why it matters
- No other file in the estate was found to import it.
- Application
- neural-link-between-agents · SESSIONS/2026-12-02-SATNAV-ORIENT-20/FINDINGS · JavaScript module
- Uses
- none found
- Used by
- none found
- Produces
- study, check, permitted, key, bound, solve, oracle, edge, named, endpoint
- Defines here
- study, check, permitted, key, bound, solve, oracle, edge, named, endpoint
- Cannot conclude
- Whether this code runs, is used by a live app today, or is correct. This is a static reading.
- Evidence
- neural-link-between-agents@598eff3f59afe11738d64cb14cb8befe5e37cdc2 SESSIONS/2026-12-02-SATNAV-ORIENT-20/FINDINGS/12-pedestrian.mjs:1-53 · blob dba8cc98912d2ab152f3c50f0f498e52662f33ac · GitHub at these lines
- State
- achieves: name · context: auto · stage: transform · effects: none found · domain stage: field_execution · users: EPC_contractor, landowner_planner, ai_agent · canonical: unreached_review
function study(){
const stats={assertions:0,named:0,randomQueries:0,reachable:0,unreachable:0,astarExpanded:0,dijkstraExpanded:0};const examples=[];
function check(x,msg){if(!x)throw Error(msg);stats.assertions++}
const permitted=(e,stepFree)=>e.access==="public"&&!e.closed&&e.foot===true&&(!stepFree||e.kind!=="stairs");
const key=(v,last)=>JSON.stringify([v,last]);
const bound=(a,b)=>Math.hypot(a[0]-b[0],a[1]-b[1]);
function solve(g,s,t,stepFree=false){
if(!g.nodes[s]||!g.nodes[t]||g.fresh!==true)return {status:"unavailable",reason:"missing-or-stale-graph",expanded:0};
const ids=new Set();for(const e of g.edges){if(ids.has(e.id)||!g.nodes[e.a]||!g.nodes[e.b]||!Number.isSafeInteger(e.m)||e.m<=0||e.m<bound(g.nodes[e.a],g.nodes[e.b]))return {status:"unavailable",reason:"invalid-graph",expanded:0};ids.add(e.id)}
const adj=new Map();for(const e of g.edges){if(!permitted(e,stepFree))continue;if(!adj.has(e.a))adj.set(e.a,[]);adj.get(e.a).push(e)}
const dist=new Map([[key(s,null),0]]),queue=[{v:s,last:null,cost:0,f:bound(g.nodes[s],g.nodes[t]),path:[]}];let expanded=0;
while(queue.length){queue.sort((a,b)=>a.f-b.f||a.cost-b.cost);const q=queue.shift();if(q.cost!==dist.get(key(q.v,q.last)))continue;expanded++;if(q.v===t)return {status:"mapped",distanceM:q.cost,edges:q.path,expanded};
for(const e of adj.get(q.v)||[]){if(g.turns.some(x=>x[0]===q.last&&x[1]===e.id))continue;const k=key(e.b,e.id),cost=q.cost+e.m;if(cost>=(dist.get(k)??Infinity))continue;dist.set(k,cost);queue.push({v:e.b,last:e.id,cost,f:cost+bound(g.nodes[e.b],g.nodes[t]),path:[...q.path,e.id]})}
}return {status:"unavailable",reason:"no-mapped-connection",expanded};
}
// Independent Dijkstra: enumerate incoming-edge states; select minimum unsettled
// cost by full scan; no adjacency index, heuristic or candidate path storage.
function oracle(g,s,t,stepFree){const states=[{node:s,incoming:null,d:0,done:false},...g.edges.map(e=>({node:e.b,incoming:e.id,d:Infinity,done:false}))];let expanded=0;
while(true){let q=null;for(const x of states)if(!x.done&&Number.isFinite(x.d)&&(!q||x.d<q.d))q=x;if(!q)return {distance:Infinity,expanded};q.done=true;expanded++;if(q.node===t)return {distance:q.d,expanded};
for(let i=0;i<g.edges.length;i++){const e=g.edges[i];if(e.a!==q.node||e.access!=="public"||e.closed===true||e.foot!==true||(stepFree&&e.kind==="stairs"))continue;let blocked=false;for(const pair of g.turns)if(pair[0]===q.incoming&&pair[1]===e.id)blocked=true;if(!blocked&&q.d+e.m<states[i+1].d)states[i+1].d=q.d+e.m}
}
}
function compare(g,s,t,stepFree=false,expected=undefined){const a=solve(g,s,t,stepFree),b=oracle(g,s,t,stepFree);check((a.distanceM??Infinity)===b.distance,"oracle mismatch");if(expected!==undefined)check(b.distance===expected,"known distance");if(a.status==="mapped"){stats.reachable++;let v=s,last=null,sum=0;for(const id of a.edges){const e=g.edges.find(x=>x.id===id);check(!!e&&e.a===v,"continui … [line shortened here: 797 characters; full line on GitHub]
const edge=(id,a,b,m,o={})=>({id,a,b,m,access:"public",foot:true,closed:false,kind:"pavement",...o});
const g={fresh:true,nodes:{S:[0,0],A:[30,0],B:[30,40],T:[60,0],U:[30,0]},edges:[edge("sa","S","A",30),edge("at","A","T",90),edge("sb","S","B",50),edge("bt","B","T",50),edge("st","S","T",60,{access:"private"}),edge("su","S","U",30),edge("ut","U","T",30,{foot:false})],turns:[]};
function named(name,h,s,t,expected,stepFree=false){const a=compare(h,s,t,stepFree,expected);stats.named++;examples.push({name,distanceM:a.distanceM??null,status:a.status,edges:a.edges??[]})}
named("connected competing paths",g,"S","T",100);
named("closure detour",{...g,edges:g.edges.map(e=>e.id==="bt"?{...e,closed:true}:e)},"S","T",120);
named("prohibited pedestrian turn",{...g,turns:[["sb","bt"]]},"S","T",120);
named("stairs shortest",{...g,edges:g.edges.map(e=>e.id==="bt"?{...e,kind:"stairs"}:e)},"S","T",100);
named("step-free detour",{...g,edges:g.edges.map(e=>e.id==="bt"?{...e,kind:"stairs"}:e)},"S","T",120,true);
named("unknown access excluded",{...g,edges:g.edges.map(e=>e.id==="bt"?{...e,access:"unknown"}:e)},"S","T",120);
named("grade-separated coincident nodes",{...g,edges:g.edges.filter(e=>["sa","ut"].includes(e.id)).map(e=>({...e,foot:true}))},"S","T",Infinity);
named("directed reverse unavailable",g,"T","S",Infinity);
named("disconnected",{...g,edges:[]},"S","T",Infinity);
named("same node",g,"S","S",0);
check(solve({...g,fresh:false},"S","T").reason==="missing-or-stale-graph","freshness");
check(solve({...g,edges:[...g.edges,edge("short","S","T",1)]},"S","T").reason==="invalid-graph","invalid metric");
check(solve({...g,edges:[...g.edges,g.edges[0]]},"S","T").reason==="invalid-graph","duplicate id");
// Conservative endpoint evidence gate, not a geographic snap implementation.
function endpoint(candidates,accuracy){if(!Number.isFinite(accuracy)||accuracy<=0||accuracy>10)return "uncertain";const c=candidates.filter(x=>x.verified&&x.offset<=12).sort((a,b)=>a.offset-b.offset);if(!c.length)return "unavailable";if(c.length>1&&c[1].offset-c[0].offset<=Math.max(1,accuracy))return "ambiguous";return c[0].id}
check(endpoint([{id:"A",offset:2,verified:true},{id:"U",offset:3,verified:true}],3)==="ambiguous","snap ambiguous");
check(endpoint([{id:"A",offset:13,verified:true}],3)==="unavailable","snap far");
check(endpoint([{id:"A",offset:2,verified:false}],3)==="unavailable","snap access");
check(endpoint([{id:"A",offset:2,verified:true}],0)==="uncertain","snap accuracy");
check(endpoint([{id:"A",offset:2,verified:true}],3)==="A","snap unique");
let seed=20261203;function rand(){seed=(Math.imul(seed,1664525)+1013904223)>>>0;return seed/4294967296}
for(let k=0;k<400;k++){const h={fresh:true,nodes:{},edges:[],turns:[]};for(let i=0;i<16;i++)h.nodes[i]=[(i%4)*10,Math.floor(i/4)*10];for(let i=0;i<16;i++)for(let j=0;j<16;j++){if(i===j||bound(h.nodes[i],h.nodes[j])>15||rand()>.65)continue;h.edges.push(edge("e"+i+"-"+j,String(i),String(j),Math.ceil(bound(h.nodes[i],h.nodes[j]))+Math.floor(rand()*20),{access:rand()<.12?"unknown":"public",closed:ran … [line shortened here: 461 characters; full line on GitHub]
for(const e of h.edges)for(const f of h.edges)if(e.b===f.a&&rand()<.04)h.turns.push([e.id,f.id]);
for(let q=0;q<8;q++){let s=String(Math.floor(rand()*16)),t=String(Math.floor(rand()*16));compare(h,s,t,q%2===0);stats.randomQueries++}}
return {...stats,examples,graphs:400,seed:20261203,execution:"JavaScript isolate; no external engine or geospatial dataset executed"};
}
console.log(JSON.stringify(study(),null,2));13 Driving
A JavaScript module in Neural Link Between Agents. It is built from the key step (`key`), the solve step (`solve`) and the fail step (`fail`).
renderneural-link-between-agents / SESSIONS/2026-12-02-SATNAV-ORIENT-20/FINDINGS/13-driving.mjs · lines 1–64 of 64 · Not reached from any entry point (candidate for review) · pattern legal (shared by 2 files)
- What it does
- It lists and searches its content. Defines 14 functions or classes, including study, check, e, legal, key.
- 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
- Defines `study`, `check`, `legal` and 8 more.
- Why it matters
- No other file in the estate was found to import it.
- Application
- neural-link-between-agents · SESSIONS/2026-12-02-SATNAV-ORIENT-20/FINDINGS · JavaScript module
- Uses
- none found
- Used by
- none found
- Produces
- study, check, e, legal, key, solve, fail, oracle, ok, w, compare, named
- Defines here
- study, check, e, legal, key, solve, fail, oracle, ok, w, compare, named, next, transition
- Cannot conclude
- Whether this code runs, is used by a live app today, or is correct. This is a static reading.
- Evidence
- neural-link-between-agents@598eff3f59afe11738d64cb14cb8befe5e37cdc2 SESSIONS/2026-12-02-SATNAV-ORIENT-20/FINDINGS/13-driving.mjs:1-64 · blob 2e28f42d85a42afebf8e1b830a48f2d4e455d827 · GitHub at these lines
- State
- achieves: name · context: auto · stage: output · effects: none found · domain stage: field_execution · users: EPC_contractor, landowner_planner, ai_agent · canonical: unreached_review
function study(){
const stats={assertions:0,graphs:0,randomQueries:0,named:0,mapped:0,unavailable:0,objectiveDifferences:0,transitionCases:0};const examples=[];
function check(x,m){if(!x)throw Error(m);stats.assertions++}
const vehicle={heightCm:200,weightKg:1800};
const e=(id,a,b,m,sec,extra={})=>({id,a,b,m,sec,access:"public",motor:true,closed:false,maxHeightCm:500,maxWeightKg:10000,...extra});
const legal=(x,v)=>x.access==="public"&&x.motor===true&&x.closed===false&&x.maxHeightCm>=v.heightCm&&x.maxWeightKg>=v.weightKg;
const key=(v,last)=>JSON.stringify([v,last]);
function solve(g,s,t,objective,v=vehicle){
const fail=reason=>({status:"unavailable",reason});
if(!["shortest","estimated-fastest"].includes(objective))return fail("objective");
if(g.fresh!==true||!g.nodes.includes(s)||!g.nodes.includes(t))return fail("graph-or-endpoint");
if(!Number.isFinite(v.heightCm)||v.heightCm<=0||!Number.isFinite(v.weightKg)||v.weightKg<=0)return fail("vehicle-profile");
const ids=new Map();for(const x of g.edges){if(ids.has(x.id)||!g.nodes.includes(x.a)||!g.nodes.includes(x.b)||!Number.isSafeInteger(x.m)||x.m<=0||!Number.isFinite(x.maxHeightCm)||!Number.isFinite(x.maxWeightKg))return fail("invalid-graph");ids.set(x.id,x)}
for(const [a,b] of g.forbid){if(!ids.has(a)||!ids.has(b)||ids.get(a).b!==ids.get(b).a)return fail("invalid-turn")}
const eligible=g.edges.filter(x=>legal(x,v));if(objective==="estimated-fastest"&&eligible.some(x=>!Number.isSafeInteger(x.sec)||x.sec<=0))return fail("time-cost-unavailable");
const adj=new Map();for(const x of eligible){if(!adj.has(x.a))adj.set(x.a,[]);adj.get(x.a).push(x)}
const blocked=new Set(g.forbid.map(x=>JSON.stringify(x)));
const q=[{node:s,last:null,cost:0,m:0,sec:0,path:[]}],best=new Map([[key(s,null),0]]);
while(q.length){q.sort((a,b)=>a.cost-b.cost);const z=q.shift();if(z.cost!==best.get(key(z.node,z.last)))continue;if(z.node===t)return {status:"mapped",objective,distanceM:z.m,estimatedSeconds:objective==="estimated-fastest"?z.sec:null,edges:z.path};
for(const x of adj.get(z.node)||[]){if(blocked.has(JSON.stringify([z.last,x.id])))continue;const cost=z.cost+(objective==="shortest"?x.m:x.sec),k=key(x.b,x.id);if(cost>=(best.get(k)??Infinity))continue;best.set(k,cost);q.push({node:x.b,last:x.id,cost,m:z.m+x.m,sec:z.sec+(x.sec??0),path:[...z.path,x.id]})}}
return fail("no-mapped-connection");
}
// Independent Bellman-Ford on edge states, no candidate queue or adjacency.
function oracle(g,s,t,obj,v){const n=g.edges.length,d=Array(n).fill(Infinity);if(s===t)return 0;
const ok=x=>x.motor===true&&x.closed===false&&x.access==="public"&&v.heightCm<=x.maxHeightCm&&v.weightKg<=x.maxWeightKg;
const w=x=>obj==="shortest"?x.m:x.sec;
for(let i=0;i<n;i++)if(g.edges[i].a===s&&ok(g.edges[i]))d[i]=w(g.edges[i]);
for(let k=0;k<n;k++){let change=false;for(let i=0;i<n;i++)for(let j=0;j<n;j++){const a=g.edges[i],b=g.edges[j];if(!Number.isFinite(d[i])||a.b!==b.a||!ok(b)||g.forbid.some(p=>p[0]===a.id&&p[1]===b.id))continue;const c=d[i]+w(b);if(c<d[j]){d[j]=c;change=true}}if(!change)break}
return Math.min(Infinity,...d.filter((_,i)=>g.edges[i].b===t));
}
function compare(g,s,t,obj,v=vehicle,expected){const a=solve(g,s,t,obj,v),o=oracle(g,s,t,obj,v),cost=obj==="shortest"?a.distanceM:a.estimatedSeconds;check((cost??Infinity)===o,"oracle mismatch");if(expected!==undefined)check(o===expected,"known cost");
if(a.status==="mapped"){stats.mapped++;let node=s,last=null,m=0,sec=0;for(const id of a.edges){const x=g.edges.find(y=>y.id===id);check(x&&x.a===node,"directed continuity");check(x.motor===true&&x.closed===false&&x.access==="public","access");check(x.maxHeightCm>=v.heightCm&&x.maxWeightKg>=v.weightKg,"vehicle");check(!g.forbid.some(p=>p[0]===last&&p[1]===id),"turn");node=x.b;last=id;m+=x.m;sec+=x … [line shortened here: 538 characters; full line on GitHub]
else{stats.unavailable++;check(!("edges"in a)&&o===Infinity,"no fallback")}return a}
const g={fresh:true,nodes:["S","A","B","T"],edges:[e("sa","S","A",40,30),e("at","A","T",60,30),e("sb","S","B",70,8),e("bt","B","T",80,9),e("st","S","T",30,3,{motor:false})],forbid:[]};
function named(name,h,s,t,obj,expected,v=vehicle){const a=compare(h,s,t,obj,v,expected);stats.named++;examples.push({name,...a});return a}
named("shortest",g,"S","T","shortest",100);named("estimated fastest",g,"S","T","estimated-fastest",17);
named("one-way reverse",g,"T","S","shortest",Infinity);
named("prohibited turn",{...g,forbid:[["sa","at"]]},"S","T","shortest",150);
named("closure",{...g,edges:g.edges.map(x=>x.id==="at"?{...x,closed:true}:x)},"S","T","shortest",150);
named("low bridge",{...g,edges:g.edges.map(x=>x.id==="at"?{...x,maxHeightCm:190}:x)},"S","T","shortest",150);
named("weight limit",{...g,edges:g.edges.map(x=>x.id==="at"?{...x,maxWeightKg:1700}:x)},"S","T","shortest",150);
named("unknown access",{...g,edges:g.edges.map(x=>x.id==="at"?{...x,access:"unknown"}:x)},"S","T","shortest",150);
named("no lawful route",{...g,forbid:[["sa","at"],["sb","bt"]]},"S","T","shortest",Infinity);
named("same node not arrival",g,"S","S","shortest",0);
const h={fresh:true,nodes:["S","A","B","T"],edges:[e("sa","S","A",1,1),e("sb","S","B",2,2),e("ba","B","A",2,2),e("at","A","T",1,1)],forbid:[["sa","at"]]};
named("incoming edge state essential",h,"S","T","shortest",5);
const missing={...g,edges:g.edges.map(x=>x.id==="at"?{...x,sec:null}:x)};
check(solve(missing,"S","T","estimated-fastest").reason==="time-cost-unavailable","unknown time");check(solve(missing,"S","T","shortest").distanceM===100,"distance independent of time");
check(solve({...g,fresh:false},"S","T","shortest").reason==="graph-or-endpoint","stale");
check(solve({...g,edges:[...g.edges,g.edges[0]]},"S","T","shortest").reason==="invalid-graph","duplicate");
check(solve({...g,forbid:[["at","sa"]]},"S","T","shortest").reason==="invalid-turn","turn topology");
check(solve(g,"S","T","shortest",{heightCm:NaN,weightKg:1}).reason==="vehicle-profile","profile");
function next(route,index,matched){if(route.status!=="mapped"||!matched||!Number.isInteger(index)||index<0||index>=route.edges.length)return null;return {edgeId:route.edges[index],remainingEdges:route.edges.length-index}}
let route=solve(g,"S","T","shortest");check(next(route,0,true).edgeId==="sa","first edge");check(next(route,1,true).edgeId==="at","next edge");check(next(route,2,true)===null,"end not arrival");check(next(route,0,false)===null,"ambiguous match");
function transition(state,ev){if(state.mode!=="driving"||!["walking","manual"].includes(ev.mode)||!ev.confirmed||!ev.stationary||!ev.verifiedStop||!ev.arrivalConfirmed||ev.stopId!==state.stopId||ev.journey!==state.journey||ev.revision!==state.revision)return state;return {...state,mode:ev.mode,revision:state.revision+1,route:null,manoeuvre:null,arrived:false,request:null}}
const state={mode:"driving",journey:"J",revision:9,destination:"FINAL",stopId:"PUBLIC-STOP",route,manoeuvre:"sa",arrived:true,request:"old",zoom:17,layers:"unchanged",gpsWatch:1};
for(let mask=0;mask<16;mask++)for(const mode of ["walking","manual"]){const ev={mode,confirmed:!!(mask&1),stationary:!!(mask&2),verifiedStop:!!(mask&4),arrivalConfirmed:!!(mask&8),stopId:state.stopId,journey:"J",revision:9};const out=transition(state,ev);check((out!==state)===(mask===15),"transition gate");check(out.destination===state.destination&&out.zoom===17&&out.layers==="unchanged"&&out.gpsW … [line shortened here: 571 characters; full line on GitHub]
for(const patch of [{stopId:"OTHER"},{journey:"OTHER"},{revision:8},{mode:"driving"}]){check(transition(state,{mode:"walking",confirmed:true,stationary:true,verifiedStop:true,arrivalConfirmed:true,stopId:state.stopId,journey:"J",revision:9,...patch})===state,"wrong identity");stats.transitionCases++}
let seed=20261203;function rand(){seed=(Math.imul(seed,1664525)+1013904223)>>>0;return seed/4294967296}
for(let k=0;k<250;k++){const nodes=Array.from({length:12},(_,i)=>String(i)),edges=[],forbid=[];for(const a of nodes)for(const b of nodes){if(a===b||rand()>.20)continue;edges.push(e(a+"-"+b,a,b,10+Math.floor(rand()*200),1+Math.floor(rand()*100),{motor:rand()>.12,closed:rand()<.10,access:rand()<.10?"unknown":"public",maxHeightCm:rand()<.1?190:500,maxWeightKg:rand()<.1?1700:10000}))}for(const a of ed … [line shortened here: 534 characters; full line on GitHub]
for(let j=0;j<6;j++){const s=nodes[Math.floor(rand()*nodes.length)],t=nodes[Math.floor(rand()*nodes.length)];const a=compare(graph,s,t,"shortest"),b=compare(graph,s,t,"estimated-fastest");check(a.status===b.status,"same eligibility");if(a.status==="mapped"){check(a.distanceM<=b.distanceM,"distance optimum");if(a.edges.join()!==b.edges.join())stats.objectiveDifferences++}stats.randomQueries+=2}}
return {...stats,examples,seed:20261203,execution:"JavaScript isolate; synthetic graph; no real engine or browser"};
}
console.log(JSON.stringify(study(),null,2));14 Integration Test
A JavaScript module in Neural Link Between Agents that calculates planar distances.
testneural-link-between-agents / SESSIONS/2026-12-02-SATNAV-ORIENT-20/FINDINGS/14-integration-test.mjs · lines 1–28 of 28 · Not reached from any entry point (candidate for review) · pattern exercise (shared by 3 files)
- What it does
- It tests its inputs. Defines exercise, load, msg. Uses libraries node:fs. Side effects: changes the web page (DOM); reads or writes files.
- 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
- Defines `exercise`, `load` and `msg`.
- Why it matters
- No other file in the estate was found to import it.
- Application
- neural-link-between-agents · SESSIONS/2026-12-02-SATNAV-ORIENT-20/FINDINGS · JavaScript module
- Uses
- Orient14 Start Walk (new URL import.meta.url), node:fs
- 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
- neural-link-between-agents@598eff3f59afe11738d64cb14cb8befe5e37cdc2 SESSIONS/2026-12-02-SATNAV-ORIENT-20/FINDINGS/14-integration-test.mjs:1-28 · blob a2edb475b2c117c001a48a027f47d4a726664c71 · GitHub at these lines
- State
- achieves: name · context: auto · stage: output · effects: dom, filesystem · domain stage: field_execution · users: EPC_contractor, landowner_planner, ai_agent · canonical: duplicate_candidate
import {readFileSync} from 'node:fs';
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"};
}
console.log(JSON.stringify(await exercise(readFileSync(new URL('./14-candidate.js',import.meta.url),'utf8')),null,2));Handoff
A JavaScript module in Neural Link Between Agents that works with immutable write (`immutableWrite`). It is built from the immutable write helper (`immutableWrite`).
ingestneural-link-between-agents / SESSIONS/2026-12-04-SATNAV-KUIPER-20/handoff.mjs · lines 1–54 of 54 · Entry point · pattern endpoint (shared by 3 files)
- What it does
- It loads data. Defines handoff, gh, endpoint, immutableWrite, main. Uses libraries node:fs, node:child_process, node:url. Side effects: reads or writes files; starts processes.
- Why it exists in the grid workflow
- Domain stage agent_infra (path word 'handoff'): AI-agent memory, coordination and code audit (the multi-agent journey named in Ventus Ltd's brief).
- Inputs & outputs
- In: command-line arguments.
- Downstream impact
- Used directly by 1 file: Handoff Test (neural-link-between-agents).
- What it achieves
- Defines `handoff`, `endpoint` and `immutableWrite`.
- Why it matters
- Checked by Handoff Test.
- Application
- neural-link-between-agents · SESSIONS/2026-12-04-SATNAV-KUIPER-20 · JavaScript module
- Uses
- node:fs, node:child_process, node:url
- Used by
- imported by Handoff Test (import)
- Produces
- handoff
- Defines here
- handoff, gh, endpoint, immutableWrite, main
- Cannot conclude
- Whether this code runs, is used by a live app today, or is correct. This is a static reading.
- Evidence
- neural-link-between-agents@598eff3f59afe11738d64cb14cb8befe5e37cdc2 SESSIONS/2026-12-04-SATNAV-KUIPER-20/handoff.mjs:1-54 · blob c89b6a817f2727df2b7082a295d20a352271e40e · GitHub at these lines
- State
- achieves: name · context: auto · stage: ingest · effects: filesystem, process · domain stage: agent_infra · users: ai_agent · canonical: unknown
#!/usr/bin/env node
// CC-001 | SATNAV-KUIPER-20 | Node 18+, authenticated gh CLI.
// No direct ChatGPT task activation API is assumed.
import {readFileSync} from 'node:fs';
import {spawnSync} from 'node:child_process';
import {pathToFileURL} from 'node:url';
const REPO="Ventusltd/neural-link-between-agents", ROOT="SESSIONS/2026-12-04-SATNAV-KUIPER-20";
export function handoff(input) {
const {lane,slot,turn,status,checkpoint}=input;
const turns={A:[1,2,3,4,null],B:[5,6,8,7,null]};
if(!Object.hasOwn(turns,lane)||!Number.isInteger(slot)||slot<1||slot>5) throw Error("invalid lane or slot");
if(!["accepted","incomplete","blocked","reviewed"].includes(status)) throw Error("invalid status");
if(slot===5?(status!=="reviewed"||turn!==null):(status==="reviewed"||!turns[lane].slice(0,slot).includes(turn))) throw Error("invalid turn or review boundary");
if(!checkpoint||!/^Ventusltd\/[A-Za-z0-9_.-]+$/.test(checkpoint.repo)||!/^[a-f0-9]{40}$/.test(checkpoint.commit)||typeof checkpoint.path!=="string"||!checkpoint.path||checkpoint.path.split("/").some(x=>!x||x===".."||x===".")) throw Error("immutable checkpoint required");
if(!Array.isArray(input.evidence)||!input.evidence.every(x=>typeof x==="string"&&x.trim())) throw Error("evidence array required");
if(status==="accepted"&&!input.evidence.length) throw Error("acceptance evidence required");
const next=slot===5?null:{lane,slot:slot+1,turn:slot===4?null:status==="accepted"?turns[lane][turns[lane].indexOf(turn)+1]:turn,kind:slot===4?"review":status==="accepted"?"engineering":"recovery"};
return {schema:"satnav-kuiper-handoff-v1",id:`${lane}-${slot}`,lane,slot,turn,status,checkpoint,evidence:input.evidence,next,productionPromotion:false};
}
function gh(args, body) {
const r=spawnSync('gh',['api',...args,...(body?['--input','-']:[])],{input:body?JSON.stringify(body):undefined,encoding:'utf8'});
if(r.error||r.status!==0)throw Error(r.error?.message||r.stderr||'gh failed');
return r.stdout.trim()?JSON.parse(r.stdout):null;
}
function endpoint(repo,path){return 'repos/'+repo+'/contents/'+path.split('/').map(encodeURIComponent).join('/');}
function immutableWrite(path,record){
const bytes=JSON.stringify(record,null,2)+'\n', url=endpoint(REPO,path);
try{
const r=gh(['--method','PUT',url],{branch:'main',message:'KUIPER immutable '+path,content:Buffer.from(bytes).toString('base64')});
return {created:true,commit:r.commit.sha};
}catch(error){
// A duplicate is accepted only when the stored payload is identical.
const old=gh([url,'-f','ref=main','--method','GET']);
if(Buffer.from(old.content,'base64').toString('utf8')!==bytes)throw error;
return {created:false,blob:old.sha};
}
}
function main(){
const [cmd,file,flag]=process.argv.slice(2);
if(cmd!=='publish'||!file|| (flag&&flag!=='--dispatch')) throw Error('Usage: node handoff.mjs publish receipt.json [--dispatch]');
const r=handoff(JSON.parse(readFileSync(file,'utf8')));
// Prove the checkpoint file exists at the exact commit before handing over.
gh([endpoint(r.checkpoint.repo,r.checkpoint.path),'--method','GET','-f','ref='+r.checkpoint.commit]);
const saved=immutableWrite(ROOT+'/HANDOFF/'+r.id+'.json',r);
let event='not requested';
// This emits a GitHub event, NOT a ChatGPT task activation. A configured
// receiver must deduplicate by id and honour the five-slot lane budget.
if(flag==='--dispatch'&&r.next&&saved.created){
gh(['--method','POST','repos/'+REPO+'/dispatches'],{event_type:'satnav-kuiper-handoff',client_payload:{id:r.id,next:r.next,checkpoint:r.checkpoint}});
event='GitHub event emitted; receiver activation unverified';
}else if(flag==='--dispatch'&&!saved.created){event='duplicate suppressed; inspect receiver before retry';}
console.log(JSON.stringify({record:r,saved,event},null,2));
}
if(process.argv[1]&&import.meta.url===pathToFileURL(process.argv[1]).href)main();Handoff Test
A test in Neural Link Between Agents that checks Handoff.
testneural-link-between-agents / SESSIONS/2026-12-04-SATNAV-KUIPER-20/handoff.test.mjs · lines 1–17 of 17 · Not reached from any entry point (candidate for review)
- What it does
- It tests its inputs. Uses libraries node:assert/strict.
- Why it exists in the grid workflow
- Domain stage agent_infra (path word 'handoff'): AI-agent memory, coordination and code audit (the multi-agent journey named in Ventus Ltd's brief).
- Inputs & outputs
- In: JSON file AGENT-A-INVENTORY.json.
- What it achieves
- No statement of purpose was found in the file, a README line naming it, or its name.
- Why it matters
- Guards the behaviour of Handoff.
- Application
- neural-link-between-agents · SESSIONS/2026-12-04-SATNAV-KUIPER-20 · test
- Uses
- Handoff (import), 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
- neural-link-between-agents@598eff3f59afe11738d64cb14cb8befe5e37cdc2 SESSIONS/2026-12-04-SATNAV-KUIPER-20/handoff.test.mjs:1-17 · blob 7bb437d220baddd7ef76916d194c3211b545bc70 · GitHub at these lines
- State
- achieves: name · context: auto · stage: unknown · effects: none found · domain stage: agent_infra · users: ai_agent · canonical: unreached_review
import assert from 'node:assert/strict';
import {handoff} from './handoff.mjs';
const fixtures={"lane":"A","slot":1,"turn":1,"status":"incomplete","checkpoint":{"repo":"Ventusltd/neural-link-between-agents","commit":"f78e70ed3e0c600626b8659c609e39d957f546e6","path":"SESSIONS/2026-12-04-SATNAV-KUIPER-20/AGENT-A-INVENTORY.json"},"evidence":[]};
const cases=[
()=>handoff({...fixtures,slot:2,status:'accepted',evidence:['recovered turn 1']}).next.turn===2,
()=>handoff({...fixtures,lane:'B',slot:3,turn:5,status:'accepted',evidence:['recovered turn 5']}).next.turn===6,()=>handoff(fixtures).next.turn===1,
()=>handoff({...fixtures,status:"accepted",evidence:["test receipt"]}).next.turn===2,
()=>handoff({...fixtures,lane:"B",turn:5,status:"accepted",evidence:["test receipt"]}).next.turn===6,
()=>handoff({...fixtures,slot:4,turn:1}).next.kind==="review",
()=>handoff({...fixtures,slot:5,turn:null,status:"reviewed"}).next===null,
()=>{try{handoff({...fixtures,slot:6});return false}catch{return true}},
()=>{try{handoff({...fixtures,status:"accepted"});return false}catch{return true}},
()=>{try{handoff({...fixtures,checkpoint:{...fixtures.checkpoint,commit:"main"}});return false}catch{return true}},
()=>{try{handoff({...fixtures,slot:5,turn:4,status:"accepted"});return false}catch{return true}},
()=>{try{handoff({...fixtures,checkpoint:{...fixtures.checkpoint,path:"../x"}});return false}catch{return true}}];
for(const [i,t] of cases.entries())assert.equal(t(),true,'case '+(i+1));
console.log(cases.length+' passed');Audit Resolution
A Python command-line tool in Neural Link Between Agents that reads dictionary and command execution bindings, using SHA-256.
storageneural-link-between-agents / SESSIONS/SATNAV-02/audit_resolution.py · lines 1–84 of 84 · Entry point · pattern audit (shared by 7 files)
- What it does
- It loads dictionary and command execution bindings. Defines audit, digest, save. Uses libraries argparse, hashlib, importlib.util, json, pathlib. Side effects: reads or writes files.
- 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.
- Inputs & outputs
- In: JSON file dictionary.json; JSON file command-execution-bindings.json; command-line arguments.
- Downstream impact
- It is itself an entry point (Python CLI); no other file was found loading it.
- What it achieves
- It is built from the audit step (`audit`), the digest step (`digest`) and the save step (`save`). Read-only exhaustive command/sense audit; no package execution. It accepts `--out` and `--projection`.
- Why it matters
- No other file in the estate was found to import it; it is an entry point.
- Application
- neural-link-between-agents · SESSIONS/SATNAV-02 · Python CLI
- Uses
- argparse, hashlib, importlib.util, json, pathlib, re
- Used by
- none found
- Produces
- audit
- Defines here
- audit, digest, save
- Cannot conclude
- Whether this code runs, is used by a live app today, or is correct. This is a static reading.
- Evidence
- neural-link-between-agents@598eff3f59afe11738d64cb14cb8befe5e37cdc2 SESSIONS/SATNAV-02/audit_resolution.py:1-84 · blob c65d202dab86273b0b372c86a93657ec9a72f18e · GitHub at these lines
- State
- achieves: comment · context: auto · stage: output · effects: filesystem · domain stage: field_execution · users: EPC_contractor, landowner_planner, ai_agent · canonical: supporting_data
"""Read-only exhaustive command/sense audit; no package execution.
Usage: python audit_resolution.py /path/to/vedic-checkout --out receipt.json
Use --projection only for a reduced fixture; never confuse it with full checkout.
"""
import argparse
import hashlib
import importlib.util
import json
from pathlib import Path
import re
def audit(root, output, projection=False):
def digest(path):
return hashlib.sha256(path.read_bytes()).hexdigest()
compiler = root / 'tools/semantic_compiler.py'
dictionary = root / 'data/dictionary.json'
registry = root / 'data/command-execution-bindings.json'
report = {'schema': 'satnav02.vedic-resolution-audit.v1',
'mode': 'PROJECTED_FIXTURE' if projection else 'CHECKOUT',
'sha256': {str(p.relative_to(root)): digest(p) for p in (compiler, dictionary, registry)},
'stages': {}, 'failures': []}
def save():
tmp = output.with_suffix(output.suffix + '.tmp')
tmp.write_text(json.dumps(report, indent=2, sort_keys=True) + '\n', encoding='utf-8')
tmp.replace(output)
save()
spec = importlib.util.spec_from_file_location('semantic_compiler', compiler)
mod = importlib.util.module_from_spec(spec)
spec.loader.exec_module(mod)
rows = json.loads(dictionary.read_text(encoding='utf-8'))
reg = json.loads(registry.read_text(encoding='utf-8'))
ids = [r['gg_id'] for r in rows['entries']]
if len(set(ids)) != len(ids) or not set(reg['bindings']) <= set(ids):
raise ValueError('Invalid input identities')
# Independent oracle: index declared names, not compiler matching logic.
names = {}
for row in rows['entries']:
ident = row['gg_id']
for name in [row['word'], *row.get('aliases', []), *reg['bindings'].get(ident, {}).get('aliases', [])]:
key = ' '.join(name.lower().split())
names.setdefault(key, set()).add(ident)
report['entries'] = len(ids)
report['unique_phrases'] = len(names)
report['bindings'] = len(reg['bindings'])
report['ambiguities'] = {k: sorted(v) for k, v in names.items() if len(v) > 1}
report['stages']['index'] = 'PASS'
save()
counts = {'pass': 0, 'fail': 0, 'expected_resolution': 0, 'expected_refusal': 0}
for key in sorted(names):
for phrase in (key, ' ' + ' '.join(key.upper().split()) + ' '):
for sense in [None, *ids]:
eligible = names[key] if sense is None else names[key] & {sense}
if len(eligible) == 1:
expected = next(iter(eligible))
counts['expected_resolution'] += 1
else:
expected = 'AMBIGUOUS_COMMAND' if eligible else 'UNKNOWN_COMMAND'
counts['expected_refusal'] += 1
try:
actual = mod.resolve(phrase, rows, reg, sense)['command_id']
except mod.Refusal as exc:
actual = str(exc)
if expected == actual:
counts['pass'] += 1
else:
counts['fail'] += 1
report['failures'].append({'phrase': phrase, 'sense': sense, 'expected': expected, 'actual': actual})
report['stages']['matrix'] = dict(counts, last_phrase=key)
save()
report['status'] = 'PASS' if counts['fail'] == 0 else 'FAIL'
save()
return report
if __name__ == '__main__':
p = argparse.ArgumentParser(description=__doc__)
p.add_argument('root', type=Path)
p.add_argument('--out', type=Path, required=True)
p.add_argument('--projection', action='store_true')
args = p.parse_args()
result = audit(args.root, args.out, args.projection)
print(json.dumps({k: v for k, v in result.items() if k != 'failures'}, indent=2))
raise SystemExit(result['status'] != 'PASS')2026 11 28 Privacy Lifecycle Test
A test in Neural Link Between Agents.
testneural-link-between-agents / SESSIONS/SATNAV-05/2026-11-28-privacy-lifecycle.test.mjs · lines 1–32 of 32 · Not reached from any entry point (candidate for review)
- What it does
- It tests its inputs. Defines el. Uses libraries node:assert/strict. Side effects: changes the web page (DOM).
- 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
- SatNav-05 independent test receipt. Node 22; no dependencies.
- Why it matters
- No other file in the estate was found to import it.
- Application
- neural-link-between-agents · SESSIONS/SATNAV-05 · test
- Uses
- node:assert/strict, ./nav/app.mjs
- Used by
- none found
- Produces
- el
- Defines here
- el
- Cannot conclude
- Whether this code runs, is used by a live app today, or is correct. This is a static reading.
- Evidence
- neural-link-between-agents@598eff3f59afe11738d64cb14cb8befe5e37cdc2 SESSIONS/SATNAV-05/2026-11-28-privacy-lifecycle.test.mjs:1-32 · blob ffed1b7e523aff3cc0c448646f15a50deb3cb6a6 · GitHub at these lines
- State
- achieves: comment · context: auto · stage: output · effects: dom · domain stage: field_execution · users: EPC_contractor, landowner_planner, ai_agent · canonical: unreached_review
// SATNAV-05 independent test receipt. Node 22; no dependencies.
// Prepare a temporary directory containing this file and nav/app.mjs from:
// https://github.com/Ventusltd/satnav/blob/9698781539e549deaa6ecaa4a2b34610c1f9fd29/nav/app.mjs
// Verify git hash-object nav/app.mjs = 9ae118926d62b1bc8741ae73235e79a9e29378d1.
// In that temporary directory ONLY, stub nav/place.mjs:
// export function parseDestination(){return null;}
// and nav/compass.mjs:
// export function fixQuality(fix){return fix?'usable':'missing';}
// export function guide(){return null;}
// Run node 2026-11-28-privacy-lifecycle.test.mjs
// Result 28 Nov: 8/8. Mock DOM, mock geolocation, synthetic (0,0).
// Not a browser, real GPS, routing, geodesy, network privacy or handset test.
import assert from 'node:assert/strict';
const elements=new Map(), docEvents={},winEvents={},watchers=[],cleared=[];
const el=id=>{if(!elements.has(id))elements.set(id,{style:{},addEventListener(){}});return elements.get(id);};
globalThis.document={getElementById:el,addEventListener:(n,f)=>docEvents[n]=f,hidden:false};
globalThis.window={addEventListener:(n,f)=>winEvents[n]=f};
globalThis.location={search:''};globalThis.isSecureContext=true;
Object.defineProperty(globalThis,'navigator',{value:{geolocation:{watchPosition(ok,err){watchers.push({ok,err});return watchers.length-1;},clearWatch(i){cleared.push(i);}}},configurable:true});
globalThis.setInterval=()=>0;
await import('./nav/app.mjs');
const fix={coords:{longitude:0,latitude:0,accuracy:5,heading:null,speed:null},timestamp:Date.now()};
let count=0;function test(name,fn){try{fn();console.log('PASS',name);count++;}catch(e){console.log('FAIL',name,e.message);process.exitCode=1;}}
test('No watch on module initialization',()=>assert.equal(watchers.length,0));
el('start').onclick();test('Explicit Start opens one watch',()=>assert.equal(watchers.length,1));
el('start').onclick();test('Repeated Start does not open a second watch',()=>assert.equal(watchers.length,1));
watchers[0].ok(fix);test('Simulated position appears after opt-in',()=>assert.match(el('position').textContent,/Position 0\.00000, 0\.00000/));
el('stop').onclick();test('Stop clears watch and displayed position',()=>{assert.deepEqual(cleared,[0]);assert.equal(el('position').textContent,'Position unavailable');assert.equal(el('stop').disabled,true);});
watchers[0].ok(fix);test('Late callback after Stop cannot restore position',()=>assert.equal(el('position').textContent,'Position unavailable'));
el('start').onclick();watchers[1].err({code:1});test('Permission denial clears watch and resets controls',()=>{assert.deepEqual(cleared,[0,1]);assert.equal(el('status').textContent,'Location permission denied');assert.equal(el('start').disabled,false);});
el('start').onclick();watchers[2].ok(fix);winEvents.pagehide();test('Pagehide clears watch and displayed position',()=>{assert.deepEqual(cleared,[0,1,2]);assert.equal(el('position').textContent,'Position unavailable');});
console.log(count+'/8 passed');Privacy Runner
A Python command-line tool in Neural Link Between Agents that uses SHA-256. It is built from the blob step (`blob`), the run step (`run`) and the save step (`save`).
storageneural-link-between-agents / SESSIONS/SATNAV-05/privacy_runner.py · lines 1–79 of 79 · Entry point · pattern stage (shared by 7 files)
- What it does
- Defines blob, run, save, stage. Uses libraries hashlib, json, pathlib, re, subprocess. Side effects: reads or writes files; starts processes.
- 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.
- Inputs & outputs
- In: command-line arguments.
- Downstream impact
- It is itself an entry point (Python CLI); no other file was found loading it.
- What it achieves
- SatNav-05: replay existing mock lifecycle test on pinned inputs.
- Why it matters
- No other file in the estate was found to import it; it is an entry point.
- Application
- neural-link-between-agents · SESSIONS/SATNAV-05 · Python CLI
- Uses
- hashlib, json, pathlib, re, subprocess, sys, tempfile, time
- Used by
- none found
- Produces
- blob, run
- Defines here
- blob, run, save, stage
- Cannot conclude
- Whether this code runs, is used by a live app today, or is correct. This is a static reading.
- Evidence
- neural-link-between-agents@598eff3f59afe11738d64cb14cb8befe5e37cdc2 SESSIONS/SATNAV-05/privacy_runner.py:1-79 · blob 03f21e974dbc7d2da742b95b2cef502d9e8f6a86 · GitHub at these lines
- State
- achieves: comment · context: auto · stage: output · effects: filesystem, process · domain stage: field_execution · users: EPC_contractor, landowner_planner, ai_agent · canonical: supporting_data
"""SATNAV-05: replay existing mock lifecycle test on pinned inputs.
Usage: python privacy_runner.py APP TEST RECEIPT
Obtain APP and TEST from the immutable GitHub links in the accompanying receipt.
No network, no dependency installation, no product writes. Node 22 required.
Interrupted runs retain the last completed stage; rerun from the start.
"""
import hashlib
import json
import pathlib
import re
import subprocess
import sys
import tempfile
import time
PINS = ('9ae118926d62b1bc8741ae73235e79a9e29378d1',
'ffed1b7e523aff3cc0c448646f15a50deb3cb6a6')
def blob(data):
return hashlib.sha1(f'blob {len(data)}\0'.encode() + data).hexdigest()
def run(app, test, output):
report = {'status': 'IN_PROGRESS', 'stages': [], 'runs': [],
'scope': 'mock DOM/geolocation; stubbed place and compass; not handset or browser acceptance'}
def save():
tmp = output.with_suffix(output.suffix + '.tmp')
tmp.write_text(json.dumps(report, indent=2) + '\n')
tmp.replace(output)
def stage(name, **details):
report['stages'].append({'name': name, **details})
save()
save()
try:
inputs = [app.read_bytes(), test.read_bytes()]
identities = [blob(data) for data in inputs]
stage('identity', actual=identities, expected=list(PINS),
sha256=[hashlib.sha256(data).hexdigest() for data in inputs])
if tuple(identities) != PINS:
raise ValueError('Input identity mismatch; execution refused')
version = subprocess.check_output(['node', '--version'], text=True, timeout=5).strip()
if not version.startswith('v22.'):
raise ValueError('Node 22 required')
stage('runtime', node=version, python=sys.version.split()[0])
with tempfile.TemporaryDirectory() as temp:
root = pathlib.Path(temp)
nav = root / 'nav'
nav.mkdir()
(nav / 'app.mjs').write_bytes(inputs[0])
(root / 'test.mjs').write_bytes(inputs[1])
(nav / 'place.mjs').write_text('export function parseDestination(){return null;}\n')
(nav / 'compass.mjs').write_text("export function fixQuality(fix){return fix?'usable':'missing';}\nexport function guide(){return null;}\n")
stage('isolated_fixture', dependencies='two explicit stubs')
for i in range(3):
start = time.monotonic()
result = subprocess.run(['node', 'test.mjs'], cwd=root, capture_output=True,
text=True, timeout=10)
passes = re.findall(r'^PASS (.+)$', result.stdout, re.M)
good = (result.returncode == 0 and len(passes) == len(set(passes)) == 8
and '8/8 passed' in result.stdout.splitlines())
report['runs'].append({'run': i+1, 'passed': len(passes), 'cases': passes,
'returncode': result.returncode, 'stderr': result.stderr,
'elapsed_ms': round((time.monotonic()-start)*1000, 2), 'ok': good})
save()
if not good:
raise RuntimeError('Lifecycle replay failed')
report['status'] = 'PASS'
except (OSError, ValueError, RuntimeError, subprocess.SubprocessError) as error:
report['status'] = 'FAIL'
report['error'] = str(error)
save()
return report['status'] == 'PASS'
if __name__ == '__main__':
if len(sys.argv) != 4:
sys.exit(__doc__)
sys.exit(0 if run(*(pathlib.Path(arg) for arg in sys.argv[1:])) else 1)Audit Atlas V8 Deep Link Quarantine
A Python command-line tool in the atman folder of PipelineNews that loads pages gate (`load_pages_gate`) and parses arguments (`parse_arguments`).
ingestpipelinenews / atman/202608271329-audit-atlas-v8-deep-link-quarantine.py · lines 1–163 of 163 · version 2026-08-27 13:29 · Entry point · pattern git_text (shared by 2 files)
- What it does
- It loads data. Defines 6 functions or classes, including require, git_text, load_pages_gate, governed_release, parse_arguments. Uses libraries __future__, argparse, json, os, re. Side effects: reads or writes files; starts processes.
- Why it exists in the grid workflow
- Domain stage upstream_foresight (path word 'atlas'): upstream engineering foresight over GB transmission and distribution topology (TSO/DNO, 132kV and above, the REPD pipeline, data centres), which Ventus Ltd states it models for foresight.
- Inputs & outputs
- In: JSON file current.json; command-line arguments.
- Downstream impact
- It is itself an entry point (Python CLI); no other file was found loading it.
- What it achieves
- It is built from the require step (`require`), the git text helper (`git_text`) and the governed release helper (`governed_release`). Audit the committed Atlas V8 successor against the production Pages gate. It accepts `--root`, `--generation` and `--output-commit`.
- Why it matters
- No other file in the estate was found to import it; it is an entry point.
- Application
- pipelinenews · atman · Python CLI
- Uses
- Build Pages (script call), __future__, argparse, json, os, re, subprocess, tempfile, types
- Used by
- none found
- Produces
- require, git_text, load_pages_gate, governed_release, parse_arguments, main
- Defines here
- require, git_text, load_pages_gate, governed_release, parse_arguments, main
- Cannot conclude
- Whether this code runs, is used by a live app today, or is correct. This is a static reading.
- Evidence
- pipelinenews@45c944c8640a9d7ae65edb51d66032ba204f3f46 atman/202608271329-audit-atlas-v8-deep-link-quarantine.py:1-163 · blob f08d96699c29e8bb5218412573ab588b7b0f9891 · GitHub at these lines
- State
- achieves: comment · context: readme_derived · stage: ingest · effects: filesystem, process · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: production_core
#!/usr/bin/env python3
"""Audit the committed Atlas V8 successor against the production Pages gate."""
from __future__ import annotations
import argparse
import json
import os
import re
import subprocess
import tempfile
import types
from pathlib import Path
EXPECTED_FAIL_CLOSED_REASON = (
"public releases/data/archive tree changed after the green candidate commit"
)
def require(condition: bool, message: str) -> None:
if not condition:
raise AssertionError(message)
def git_text(root: Path, *arguments: str) -> str:
completed = subprocess.run(
["git", *arguments],
cwd=root,
check=True,
capture_output=True,
text=True,
)
return completed.stdout.strip()
def load_pages_gate(root: Path):
module_path = root / "atman/202608262014-build-pages.py"
require(module_path.is_file(), "cannot load the Pages gate")
module = types.ModuleType("pipelinenews_pages_gate")
module.__file__ = str(module_path)
exec(compile(module_path.read_bytes(), str(module_path), "exec"), module.__dict__)
return module
def governed_release(module, root: Path) -> dict:
generation, _, manifest = module.select_release(root, "latest")
return {
"generation": generation,
"release_path": f"releases/{generation}-index.html",
"manifest": manifest,
}
def parse_arguments() -> argparse.Namespace:
parser = argparse.ArgumentParser()
parser.add_argument("--root", default=".")
parser.add_argument("--generation", required=True)
parser.add_argument("--output-commit", required=True)
return parser.parse_args()
def main() -> None:
arguments = parse_arguments()
root = Path(arguments.root).resolve()
generation = arguments.generation
output_commit = arguments.output_commit
require(bool(re.fullmatch(r"\d{12}", generation)), "invalid generation")
require(bool(re.fullmatch(r"[0-9a-f]{40}", output_commit)), "invalid output commit")
require(git_text(root, "rev-parse", f"{output_commit}^{{commit}}") == output_commit, "missing output commit")
module = load_pages_gate(root)
manifest_path = root / "build" / f"{generation}-v8-fast-site-manifest.json"
candidate = json.loads(manifest_path.read_text(encoding="utf-8"))
require(candidate.get("generation") == generation, "candidate generation changed")
require(candidate.get("deployment") == "not-authorised", "candidate is no longer quarantined")
require(
git_text(root, "log", "-1", "--format=%H", "--", manifest_path.relative_to(root).as_posix())
== output_commit,
"output commit no longer owns the candidate manifest",
)
expected = {record["path"] for record in candidate["outputs"]}
require(len(expected) == 4, "candidate output closure changed")
authorisations = sorted((root / "build/authorisations").glob("*-v8-fast-pages-authorisation.json"))
require(len(authorisations) == 1, "expected exactly one existing fast-candidate authorisation")
active_authorisation = authorisations[0]
require(not active_authorisation.name.startswith(generation), "13:29 unexpectedly has an authorisation")
actual_release = governed_release(module, root)
actual_outcome = None
try:
module.candidate_publication_boundary(root, actual_release)
except AssertionError as error:
actual_outcome = str(error)
require(actual_outcome == EXPECTED_FAIL_CLOSED_REASON, "production gate did not fail closed as expected")
work = root / "work" / f"{generation}-production-pages-audit"
work.mkdir(parents=True, exist_ok=True)
parked_authorisation = work / active_authorisation.name
require(not parked_authorisation.exists(), "parked authorisation path already exists")
excluded: set[str] = set()
authorised: set[str] = set()
try:
os.replace(active_authorisation, parked_authorisation)
isolated_release = governed_release(module, root)
excluded, authorised = module.candidate_publication_boundary(root, isolated_release)
require(expected.issubset(excluded), "unauthorised 13:29 outputs were not excluded")
require(expected.isdisjoint(authorised), "unauthorised 13:29 output was authorised")
require(not authorised, "an output was authorised with the authorisation record removed")
with tempfile.TemporaryDirectory(prefix=f"pipelinenews-{generation}-pages-") as temporary:
site = Path(temporary) / "site"
module.stage_site(root, site, isolated_release)
leaked = sorted(relative for relative in expected if (site / relative).exists())
require(not leaked, f"candidate leaked into a staged Pages site: {leaked}")
require(
(site / "releases/current.json").read_bytes()
== (root / module.ARCHIVE / "releases/current.json").read_bytes(),
"stable release pointer changed",
)
require(not (site / "ui").exists(), "UI source tree entered the Pages site")
require(not (site / "atman").exists(), "Atman source tree entered the Pages site")
finally:
if parked_authorisation.exists():
require(not active_authorisation.exists(), "authorisation target unexpectedly exists")
os.replace(parked_authorisation, active_authorisation)
require(active_authorisation.is_file(), "existing authorisation was not restored")
require(not parked_authorisation.exists(), "parked authorisation was not removed")
proof = {
"schema": "pipelinenews.atman.atlas-v8-deep-link-production-pages-audit.v1",
"generation": generation,
"audited_head": git_text(root, "rev-parse", "HEAD"),
"candidate_output_commit": output_commit,
"candidate_deployment": candidate["deployment"],
"active_authorisation": active_authorisation.relative_to(root).as_posix(),
"production_gate": {
"classifier_invoked": True,
"outcome": "FAIL_CLOSED_PENDING_EXPLICIT_OWNER_PROMOTION",
"reason": actual_outcome,
},
"unauthorised_branch": {
"legacy_authorisation_temporarily_suppressed": True,
"classifier_invoked": True,
"stage_site_invoked": True,
"candidate_outputs": sorted(expected),
"candidate_outputs_excluded": sorted(expected & excluded),
"candidate_outputs_authorised": sorted(expected & authorised),
"candidate_outputs_leaked": [],
},
"stable_route_changed": False,
"source_cartridge_published": False,
"deployment_attempted": False,
"status": "PASS",
}
print(json.dumps(proof, indent=2))
if __name__ == "__main__":
main()