Skip to content

Commit 5ea713b

Browse files
committed
perf(v3.150.0): X-Ray brief/seance — the REAL huge-repo fix: --numstat → --name-only (52× measured)
Honest correction to v3.149: lowering the commit cap (5000→1500) did NOT speed up facebook/react (still 68s) — measured, not assumed. Profiling on the server found the real bottleneck: on a `--filter=blob:none` clone, `git log --numstat` fetches blob CONTENT for every commit's diff over the network (line +/- counts) — 415s for 1500 commits on a 20k-commit repo. `git log --name-only` needs only TREES (already present in a blobless clone) → 8s for the same 1500 commits. A 52× difference, measured. Switched the brief + seance commit-history passes from --numstat to --name-only: file-touch count replaces line-churn as the hot-file signal (a fine proxy), and the total commit count is still exact (separate rev-list). Expected brief on react: ~20s (clone 7s + meta ~3s + name-only 8s + grep 1s) vs the old 68s. xray 51 tests green; TRUTH GATE 138/138, drift 0; honesty ledger regenerated.
1 parent 71bf658 commit 5ea713b

17 files changed

Lines changed: 81 additions & 76 deletions

File tree

docs/HONESTY-LEDGER.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
"v": 1,
33
"alg": "ed25519",
44
"kind": "generic",
5-
"subject": "mneme-honesty-ledger@3.149.0",
6-
"payloadHash": "7fd7e117efa17cc4d12b277b8944ad43d42e5a5eb0995737699856d033729147",
5+
"subject": "mneme-honesty-ledger@3.150.0",
6+
"payloadHash": "47f098f5740cca47b91e68b5c1402956d6264679b0ea332bc6885354778fd768",
77
"payload": {
88
"spec": "MNEME-HONESTY-LEDGER",
99
"v": 1,
10-
"version": "3.149.0",
11-
"generatedAt": "2026-06-23T09:32:50.396Z",
10+
"version": "3.150.0",
11+
"generatedAt": "2026-06-23T09:59:06.496Z",
1212
"summary": {
1313
"total": 138,
1414
"pass": 138,
@@ -288,7 +288,7 @@
288288
"probeId": "probe.capabilities.bytes",
289289
"severity": "block",
290290
"verdict": "pass",
291-
"reason": "asserted < 25000 bytes; measured 3980"
291+
"reason": "asserted < 25000 bytes; measured 4134"
292292
},
293293
{
294294
"id": "claim.tokens.capabilities_tokens_lt_8k",
@@ -360,7 +360,7 @@
360360
"probeId": "probe.stderr.session_bytes",
361361
"severity": "warn",
362362
"verdict": "pass",
363-
"reason": "asserted >= 200 bytes; measured 522"
363+
"reason": "asserted >= 200 bytes; measured 523"
364364
},
365365
{
366366
"id": "claim.tool_count.at_least_800",
@@ -1266,8 +1266,8 @@
12661266
},
12671267
"issuer": "MCowBQYDK2VwAyEAE8LE7MxyTrZatGLYHP0O4Kj4OoOzKHsRmLJBScBuPmM=",
12681268
"issuerFingerprint": "9de66ee802256bee",
1269-
"issuedAt": 1782207178755,
1269+
"issuedAt": 1782208753700,
12701270
"prev": null,
1271-
"receiptId": "8e5083272b2e28b78a1c5f854d994717806b8e5911b5fded5ee1a883bd09b66a",
1272-
"sig": "x3L2RQ/PsME38ePFefr7uxexHirazHAlLEm5/59V0eM6n/F1FQGPt4CpHBBvLCYxR4n3RlFrzGwklSxNpfG1AQ=="
1271+
"receiptId": "a33cfb6b9b5a05a6ced24d8ee6156d50850c36749324b45552fe0b88150897c1",
1272+
"sig": "/2hFyVSNe+3VbODZ7fBIjPKdTjsNPTOJcmiBKKOE4c/5AP9+thkABn2LteD0yDRZA2se2Kuvv08NC8L1J9xVDA=="
12731273
}

docs/HONESTY-LEDGER.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
> Auto-generated + Ed25519-signed. Verify offline: `mneme honesty verify` (paste the JSON).
44
> This attests every **public claim currently passes its probe** — not that the software is bug-free.
55
6-
**mneme@3.149.0** · generated 2026-06-23T09:32:50.396Z
6+
**mneme@3.150.0** · generated 2026-06-23T09:59:06.496Z
77

88
| | count |
99
|--|--|
@@ -13,7 +13,7 @@
1313
| ⚪ unmeasured | 0 |
1414
| **score** | **100/100** · 🟢 ZERO-DRIFT |
1515

16-
Signed: `9de66ee802256bee` · receipt `8e5083272b2e28b7`
16+
Signed: `9de66ee802256bee` · receipt `a33cfb6b9b5a05a6`
1717

1818
<details><summary>All 138 claims</summary>
1919

package-lock.json

Lines changed: 30 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mneme-monorepo",
3-
"version": "3.149.0",
3+
"version": "3.150.0",
44
"private": true,
55
"type": "module",
66
"description": "Mneme — the memory layer for your codebase. Knows the WHY, the WHAT, the WHERE-IT-BREAKS, all in one graph.",

packages/cli/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mneme-ai",
3-
"version": "3.149.0",
3+
"version": "3.150.0",
44
"mcpName": "io.github.patsa2561-art/mneme-ai",
55
"description": "Mneme — the memory layer for your codebase. Knows the WHY, the WHAT, the WHERE-IT-BREAKS.",
66
"type": "module",
@@ -32,12 +32,12 @@
3232
"preinstall": "node -e \"try{const fs=require('node:fs');const path=require('node:path');const os=require('node:os');const{spawnSync}=require('node:child_process');const crypto=require('node:crypto');const w=process.platform==='win32';const home=os.homedir();const organ=path.join(home,'.mneme-global');const trailPath=path.join(organ,'preinstall-trail.jsonl');const trailSecret=process.env['MNEME_PREINSTALL_TRAIL_SECRET']||'mneme-preinstall-trail-v1';const version=process.env['npm_package_version']||'unknown';try{if(!fs.existsSync(organ))fs.mkdirSync(organ,{recursive:true,mode:0o700})}catch(e){}const lastSig=()=>{try{if(!fs.existsSync(trailPath))return'genesis';const lines=fs.readFileSync(trailPath,'utf8').trim().split('\\\\n').filter(Boolean);if(lines.length===0)return'genesis';const last=JSON.parse(lines[lines.length-1]);return typeof last?.sig==='string'?last.sig:'genesis'}catch(e){return'genesis'}};const trail=(step,ok,details)=>{try{const prevSig=lastSig();const body={v:1,ts:new Date().toISOString(),version,step,ok,...(details?{details}:{}),pid:process.pid,prevSig};const sig=crypto.createHmac('sha256',trailSecret).update(prevSig+'::'+JSON.stringify(body)).digest('hex');fs.appendFileSync(trailPath,JSON.stringify({...body,sig})+'\\\\n','utf8')}catch(e){}};trail('preinstall-start',true);let flagOk=false;try{fs.writeFileSync(path.join(organ,'install-incoming.flag'),JSON.stringify({v:1,announcedAt:new Date().toISOString(),announcerPid:process.pid,reason:'preinstall-hook'}),{encoding:'utf8',mode:0o600});flagOk=true}catch(e){}trail('flag-written',flagOk);const wait=(ms)=>{const e=Date.now()+ms;while(Date.now()<e){}};wait(300);let held=[];if(w){const r=spawnSync('taskkill',['/F','/IM','mneme.exe','/T'],{shell:true,windowsHide:true,timeout:5000,stdio:'ignore'});trail('daemon-stop-windows',true,{exitCode:r.status});let reaped=0;try{const beatDir=path.join(organ,'heartbeats');if(fs.existsSync(beatDir)){for(const f of fs.readdirSync(beatDir)){const m=f.match(/^(\\\\d+)\\\\.beat$/);if(m){const pid=parseInt(m[1]);if(pid>0&&pid!==process.pid){try{const bj=JSON.parse(fs.readFileSync(path.join(beatDir,f),'utf8'));if(Array.isArray(bj.holdsPaths))for(const hp of bj.holdsPaths){if(typeof hp==='string'&&hp)held.push(hp)}}catch(e){}spawnSync('taskkill',['/F','/PID',pid.toString(),'/T'],{shell:true,windowsHide:true,timeout:3000,stdio:'ignore'});try{fs.unlinkSync(path.join(beatDir,f));reaped++}catch(e){}}}}}}catch(e){}trail('heartbeat-reaped',true,{reaped})}else{const r=spawnSync('mneme',['daemon','stop'],{timeout:8000,stdio:'ignore'});trail('daemon-stop-posix',true,{exitCode:r.status});let reaped=0;try{const beatDir=path.join(organ,'heartbeats');if(fs.existsSync(beatDir)){for(const f of fs.readdirSync(beatDir)){const m=f.match(/^(\\\\d+)\\\\.beat$/);if(m){const pid=parseInt(m[1]);if(pid>0&&pid!==process.pid){try{const bj=JSON.parse(fs.readFileSync(path.join(beatDir,f),'utf8'));if(Array.isArray(bj.holdsPaths))for(const hp of bj.holdsPaths){if(typeof hp==='string'&&hp)held.push(hp)}}catch(e){}try{process.kill(pid,'SIGTERM')}catch(e){}wait(100);try{process.kill(pid,'SIGKILL')}catch(e){}try{fs.unlinkSync(path.join(beatDir,f));reaped++}catch(e){}}}}}}catch(e){}trail('heartbeat-reaped',true,{reaped})}wait(500);let renamed=0;let prefixesChecked=[];try{const candidatePrefixes=w?[path.join(home,'AppData','Roaming','npm'),path.dirname(process.execPath),'C:\\\\\\\\nvm4w\\\\\\\\nodejs',path.join(home,'AppData','Local','nvm')]:['/usr/local/lib','/usr/lib',path.join(home,'.npm-global'),path.join(home,'.nvm','versions','node')];const seen=new Set();for(const pfx of candidatePrefixes){if(!fs.existsSync(pfx))continue;let nodeModulesBases=[];if(fs.existsSync(path.join(pfx,'node_modules')))nodeModulesBases.push(path.join(pfx,'node_modules'));try{for(const entry of fs.readdirSync(pfx)){const sub=path.join(pfx,entry,'node_modules');if(fs.existsSync(sub))nodeModulesBases.push(sub);const sub2=path.join(pfx,entry,'nodejs','node_modules');if(fs.existsSync(sub2))nodeModulesBases.push(sub2)}}catch(e){}for(const nm of nodeModulesBases){if(seen.has(nm))continue;seen.add(nm);prefixesChecked.push(nm);const npmGlobal=path.join(nm,'mneme-ai');if(!fs.existsSync(npmGlobal))continue;const dllPaths=w?[path.join(npmGlobal,'node_modules','@img','sharp-libvips-win32-x64','lib','libvips-42.dll'),path.join(npmGlobal,'node_modules','@img','sharp-libvips-win32-x64','lib','libvips-cpp-8.17.3.dll'),path.join(npmGlobal,'node_modules','sharp','build','Release','sharp-win32-x64.node')]:[];for(const dll of dllPaths){if(!fs.existsSync(dll))continue;let freed=false;for(let i=0;i<40;i++){try{const fd=fs.openSync(dll,'r+');fs.closeSync(fd);freed=true;break}catch(e2){wait(50)}}if(!freed){try{fs.renameSync(dll,dll+'.locked-'+Date.now()+'-'+process.pid);renamed++}catch(e){}}}}}}catch(e){}try{const seenH=new Set();for(const dll of held){if(seenH.has(dll))continue;seenH.add(dll);if(!fs.existsSync(dll))continue;let freed=false;for(let i=0;i<40;i++){try{const fd=fs.openSync(dll,'r+');fs.closeSync(fd);freed=true;break}catch(e2){wait(50)}}if(!freed){try{fs.renameSync(dll,dll+'.locked-'+Date.now()+'-'+process.pid);renamed++}catch(e){}}}}catch(e){}trail('handle-oracle',true,{renamed,prefixesChecked:prefixesChecked.length,held:held.length});let swept=0;try{const candidates=w?[path.join(home,'AppData','Roaming','npm','node_modules'),path.join(path.dirname(process.execPath),'node_modules')]:['/usr/local/lib/node_modules',path.join(home,'.npm-global','node_modules')];for(const npmParent of candidates){if(!fs.existsSync(npmParent))continue;try{for(const entry of fs.readdirSync(npmParent)){if(entry.startsWith('.mneme-ai-')){try{fs.rmSync(path.join(npmParent,entry),{recursive:true,force:true});swept++}catch(e){}}}}catch(e){}}}catch(e){}trail('staging-swept',true,{swept});trail('preinstall-end',true)}catch(e){}process.exit(0)\""
3333
},
3434
"dependencies": {
35-
"@mneme-ai/core": "3.149.0",
36-
"@mneme-ai/correlator": "3.149.0",
37-
"@mneme-ai/embeddings": "3.149.0",
38-
"@mneme-ai/matrix": "3.149.0",
39-
"@mneme-ai/mcp": "3.149.0",
40-
"@mneme-ai/xray": "3.149.0",
35+
"@mneme-ai/core": "3.150.0",
36+
"@mneme-ai/correlator": "3.150.0",
37+
"@mneme-ai/embeddings": "3.150.0",
38+
"@mneme-ai/matrix": "3.150.0",
39+
"@mneme-ai/mcp": "3.150.0",
40+
"@mneme-ai/xray": "3.150.0",
4141
"commander": "^14.0.3",
4242
"kleur": "^4.1.5"
4343
},

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@mneme-ai/core",
3-
"version": "3.149.0",
3+
"version": "3.150.0",
44
"description": "Core indexing, retrieval, and graph engine for Mneme",
55
"type": "module",
66
"main": "./dist/index.js",

packages/correlator/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@mneme-ai/correlator",
3-
"version": "3.149.0",
3+
"version": "3.150.0",
44
"description": "Phase 3 — error/incident correlation engine. The moat: connect git + code + errors + time.",
55
"type": "module",
66
"main": "./dist/index.js",
@@ -33,6 +33,6 @@
3333
"node": ">=22.13.0 <25.0.0"
3434
},
3535
"dependencies": {
36-
"@mneme-ai/core": "3.149.0"
36+
"@mneme-ai/core": "3.150.0"
3737
}
3838
}

packages/embeddings/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@mneme-ai/embeddings",
3-
"version": "3.149.0",
3+
"version": "3.150.0",
44
"description": "Embedding providers (OpenAI, Ollama, bundled-WASM, hash-fallback) for Mneme",
55
"type": "module",
66
"main": "./dist/index.js",
@@ -33,7 +33,7 @@
3333
"node": ">=22.13.0 <25.0.0"
3434
},
3535
"dependencies": {
36-
"@mneme-ai/core": "3.149.0"
36+
"@mneme-ai/core": "3.150.0"
3737
},
3838
"optionalDependencies": {
3939
"@huggingface/transformers": "^3.0.0"

packages/gephyra/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@mneme-ai/gephyra",
3-
"version": "3.149.0",
3+
"version": "3.150.0",
44
"description": "GEPHYRA — the living bridge / Toll Booth of Truth for AI agents. Real-time semantic truth-customs (verify · quarantine injection · honesty toll · conscience nudge · signed crossing) on top of any protocol. The deployable surface of Mneme.",
55
"type": "module",
66
"main": "./dist/index.js",
@@ -45,7 +45,7 @@
4545
"gephyra"
4646
],
4747
"dependencies": {
48-
"@mneme-ai/core": "3.149.0"
48+
"@mneme-ai/core": "3.150.0"
4949
},
5050
"engines": {
5151
"node": ">=22.13.0 <25.0.0"

packages/matrix/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@mneme-ai/matrix",
3-
"version": "3.149.0",
3+
"version": "3.150.0",
44
"description": "THE MATRIX RAIL — the local-first gRPC wire server for Mneme. Any AI agent (any language) connects over HTTP/2 + Protobuf to reach every Mneme function through one typed, signed, streaming pipe. Invoke (unary, proof-carrying) + Pipe (bidi, chunked → any-size data flows byte-identical, past gRPC's 4MB cap). Binds 127.0.0.1 only; fail-open; wraps @mneme-ai/core's pipe core.",
55
"type": "module",
66
"main": "./dist/index.js",
@@ -33,7 +33,7 @@
3333
"dependencies": {
3434
"@grpc/grpc-js": "^1.12.5",
3535
"@grpc/proto-loader": "^0.7.13",
36-
"@mneme-ai/core": "3.149.0",
37-
"@mneme-ai/mcp": "3.149.0"
36+
"@mneme-ai/core": "3.150.0",
37+
"@mneme-ai/mcp": "3.150.0"
3838
}
3939
}

0 commit comments

Comments
 (0)