mirror of
https://github.com/samvallad33/vestige.git
synced 2026-07-26 23:51:02 +02:00
Full multi-team audit of the living-field work (adversarial fleet + fresh-eyes pass + foundation deep-dive). 11 real bugs found and fixed; 7 false positives adversarially refuted. All re-verified live on the real brain. Pick contract: field cells were unclickable in intentions/schedule/memory-prs/ importance — the click handlers read the old text-item id off a node payload. Read the id from either shape; importance now also picks the field pass; intentions gets a dedicated filter toggle instead of flipping the filter on every click. RouteStage now picks passes top-down (front-rendered text before back-rendered field) so a background cell can't steal a foreground control's click. Proven live: cell clicks fire real promote/act with real memory ids. Empty data: /patterns went black when the cross-project set is empty (it is recomputed). Seeded a real memory-pool substrate it falls back to, like contradictions — alive at zero patterns. Correctness: memories unsuppress now honors UnsuppressResult.stillSuppressed (compounded suppression stays scarred). LivingFieldPass no longer writes the shared params[2] node_count lane (was corrupting the co-resident scene renderer on graph/observatory/memories). Finite-guard every value reaching the GPU buffer so a bad mapper can't NaN-out the field. blackbox selected-cell highlight tracks selectedRunId. graph nulls its field handle when leaving field mode. Accessibility: /memories and /importance (direct ObservatoryCanvas mounts) now honor prefers-reduced-motion via engine.setPaused — the field freezes for reduce-motion users. Gate pins reducedMotion:'no-preference' so the motion assertion is stable. Gates green: check 0/0, build ok, palace-launch-gate 22/22 + curated tour, all-routes-smoke 20/20, ChangelogResponse gains totalEvents. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 line
4.8 KiB
JavaScript
1 line
4.8 KiB
JavaScript
var Y=Object.defineProperty;var q=(f,u,m)=>u in f?Y(f,u,{enumerable:!0,configurable:!0,writable:!0,value:m}):f[u]=m;var h=(f,u,m)=>q(f,typeof u!="symbol"?u+"":u,m);import"../chunks/Bzak7iHL.js";import{o as v}from"../chunks/DAau0uzT.js";import{p as B,b as G,g as o,s as a,d as R,u as P}from"../chunks/CGq8RnJq.js";import{R as X}from"../chunks/BpEKQwpr.js";import{r as b,C as J,V as K,R as Q,I as k}from"../chunks/BMB5u1EX.js";import{T as Z}from"../chunks/D7ozXiSB.js";import{L as tt,l as et,F as g}from"../chunks/DETSv_kY.js";import{a as M}from"../chunks/D35IQVqe.js";function dt(f,u){B(u,!0);const m=[...b(J.forward),1],F=[...b(K.throughput),.96],E=[...b(Q.luciferin),.9],A=[...b(k.caution),.88],I=[...b(k.veto),.9];let l=R(null),x=R(!0),y=R(null),C=R(null);const $=P(()=>{const e=o(l)?U(o(l),o(C)):[],t=Object.fromEntries(e.map(n=>[n.metric,n.magnitude]));return{organ:"stats",nodes:[],edges:[],events:[],receipts:e,scalars:t,alive:e.length>0}});v(()=>{L()});async function L(){a(x,!0),a(y,null);try{a(l,await M.stats(),!0)}catch(e){a(l,null),a(y,e instanceof Error?e.message:String(e),!0)}finally{a(x,!1)}}async function T(e){if(e.kind==="stats-vital"){a(x,!0),a(y,null);try{a(C,await M.consolidate(),!0),a(l,await M.stats(),!0)}catch(t){a(y,t instanceof Error?t.message:String(t),!0)}finally{a(x,!1)}}}function V(e,t){const n=new D(e);n.uploadScene(t);const s=new _(e);return s.uploadScene(t),[n,s]}class D{constructor(t){h(this,"field");this.field=new tt(t)}uploadScene(t){const s=t.receipts.map(i=>({id:`stats:${i.metric}`,score:i.magnitude,hue:O(i.metric,i.magnitude),energy:.4+.6*i.magnitude,scar:(i.metric.includes("due")||i.metric.includes("Retention"))&&i.magnitude<.4,kind:"stats-vital",payload:i}));this.field.setCells(et(s,{maxRadius:.86,minCellR:.03,maxCellR:.11}))}compute(t){this.field.compute(t)}render(t){this.field.render(t)}pickAt(t,n){return this.field.pickAt(t,n)}dispose(){this.field.dispose()}}function O(e,t){return e.includes("due")||e.includes("decay")?t>.4?g.caution:g.forward:e.includes("Coverage")||e.includes("Embeddings")?t>.7?g.oxygen:g.bridge:e.includes("Retention")||e.includes("Strength")?t<.4?g.scarlet:g.oxygen:g.recall}class _{constructor(t){h(this,"text");h(this,"initPromise",null);h(this,"scene",null);h(this,"focused",null);this.text=new Z(t)}uploadScene(t){this.scene=t,this.ensureReady().then(()=>this.text.setText(this.buildItems(t)))}render(t){this.text.render(t)}pickAt(t,n){const s=this.text.pickAt(t,n),i=(s==null?void 0:s.id)??null;return i!==this.focused&&(this.focused=i,this.text.setRunDepth(i,1)),s}dispose(){this.text.dispose(),this.scene=null}async ensureReady(){this.initPromise||(this.initPromise=this.text.init()),await this.initPromise}buildItems(t){const n=t.receipts;if(n.length===0)return[];const s=.68,i=1.36/Math.max(1,n.length-1);return n.map((d,r)=>{const c=p(d.magnitude);return{id:`stats:${d.metric}`,kind:"stats-vital",text:d.label,x:-.82,y:s-r*i,size:r<4?.036:.027,color:z(d.metric,c),depth:c,weight:Math.max(.18,Math.sqrt(c)),startFrame:r*2,revealSpan:22,maxWidthEm:48,hitPadX:.03,hitPadY:.03}})}}function U(e,t){const n=Object.entries(e),s=n.map(([,r])=>typeof r=="number"&&Number.isFinite(r)?Math.abs(r):null).filter(r=>r!==null),i=Math.max(1,...s),d=n.map(([r,c],S)=>{const W=N(r,c,i);return w(r,c,W)});if(t)for(const[r,c]of Object.entries(t)){const S=`consolidate.${r}`;d.push(w(S,c,N(S,c,i),d.length))}return d}function w(e,t,n,s){return{source:{kind:"scalar",id:e,scalar:{name:e,value:n}},label:H(`${e} | ${j(e,t)}`),nodeIndices:[],metric:e,rawValue:t,magnitude:p(n)}}function N(e,t,n){if(typeof t=="number"&&Number.isFinite(t))return e.includes("Coverage")?p(t>1?t/100:t):e.includes("average")||e.includes("Retention")||e.includes("Strength")?p(t):p(Math.log10(Math.abs(t)+1)/Math.log10(n+1));if(typeof t=="string"){const s=Date.parse(t);if(Number.isFinite(s)){const i=Math.max(0,(Date.now()-s)/864e5);return p(1/(1+i/30))}return p(t.length/48)}return .5}function j(e,t){return typeof t=="number"&&Number.isFinite(t)?e.includes("Coverage")?`${t.toFixed(t>1?0:2)}%`:e.includes("average")?`${(t*100).toFixed(1)}%`:Number.isInteger(t)?t.toLocaleString():t.toFixed(3):typeof t=="string"?t:String(t)}function z(e,t){return e.includes("due")||e.includes("decay")?t>.4?A:F:e.includes("Coverage")||e.includes("Embeddings")?t>.7?E:m:e.includes("Retention")||e.includes("Strength")?t<.4?I:E:F}function H(e){return e.replace(/[\u2014\u2013]/g,"-").replace(/[\u2018\u2019]/g,"'").replace(/[\u201C\u201D]/g,'"').replace(/\u2026/g,"...").replace(/[^\x20-\x7E]/g,"?")}function p(e){return Math.min(1,Math.max(0,Number.isFinite(e)?e:.5))}{let e=P(()=>{var t,n,s;return`stats-vitals:${((t=o(l))==null?void 0:t.totalMemories)??0}:${((n=o(l))==null?void 0:n.dueForReview)??0}:${((s=o(l))==null?void 0:s.averageRetention)??0}`});X(f,{organ:"stats",get seed(){return o(e)},get scene(){return o($)},passes:V,get loading(){return o(x)},get error(){return o(y)},onpick:T})}G()}export{dt as component};
|