Context
Split from #16543 so it can be resolved independently. #16543 keeps the substantive finding — a network exchange budgeted with a timeout sized for a local file write — which was deliberately re-scoped out of PRIO-0 because it can only fire where a harness hook runs. This half waits on nothing.
The Problem
ai/mcp/server/memory-core/helpers/TurnPresenceConfig.mjs:26 still exports:
export function resolveMemoryCoreGraphPath({env = process.env, rootDir} = {}) {
const override = env[MEMORY_CORE_GRAPH_DB_ENV];
return override ? override : path.resolve(rootDir, '.neo-ai-data/sqlite/memory-core-graph.sqlite');
}Its only caller was TurnPresenceHookWriter, replaced by PR #16527 (#16513). Verified against merged dev by walking every .mjs / .json / .md / .yaml blob in the tree: the sole file containing the symbol is the one defining it. No spec references it either.
Why a dead export here is worse than dead code generally. This function is the checkout-relative path pattern #16513 was filed to remove — path.resolve(rootDir, '.neo-ai-data/...'), where rootDir came from the caller's own module location. That produced 7192 turn-presence beacons written into maintainer checkouts that no reader ever queried, across nine agents, invisible because a writable SQLite file accepts writes happily.
Leaving it exported leaves a working, importable, apparently-sanctioned helper for exactly the mistake we just spent a ticket removing. The next author wanting a graph path will find it and it will do what it says.
The Architectural Reality
- The replacement is
recordTurnPresenceOverMcp — the store is reached over the service, never by path, because in a containerized deployment the graph is a Docker named volume with no host-visible path to point at.
MEMORY_CORE_GRAPH_DB_ENV must stay. It is separately consumed by ai/mcp/server/memory-core/configBase.mjs, so only the function and the import path it stranded are removable.
- Server-side code that legitimately needs the graph path resolves it through config, not through this helper.
The Fix
Remove resolveMemoryCoreGraphPath and the now-unused node:path import. Keep MEMORY_CORE_GRAPH_DB_ENV, TURN_PRESENCE_ENV, TURN_PRESENCE_DEFAULTS and resolveTurnPresenceRuntimeConfig.
If anyone wants it kept as a deliberate escape hatch, it needs a comment naming the shape it must not be used for — but the argument for deletion is that the escape hatch is the defect.
Acceptance Criteria
Out of Scope
- The timeout finding —
#16543.
- Any other checkout-relative path resolver. This ticket is one dead export, not a sweep; if others exist they deserve their own measurement rather than being bundled on suspicion.
Decision Record impact
none — removing an uncalled function.
Related
#16543 (the sibling finding) · #16513 / PR #16527 (removed the caller) · #16526 (the wake daemon's own host-path reads, still live).
Context
Split from
#16543so it can be resolved independently.#16543keeps the substantive finding — a network exchange budgeted with a timeout sized for a local file write — which was deliberately re-scoped out of PRIO-0 because it can only fire where a harness hook runs. This half waits on nothing.The Problem
ai/mcp/server/memory-core/helpers/TurnPresenceConfig.mjs:26still exports:export function resolveMemoryCoreGraphPath({env = process.env, rootDir} = {}) { const override = env[MEMORY_CORE_GRAPH_DB_ENV]; return override ? override : path.resolve(rootDir, '.neo-ai-data/sqlite/memory-core-graph.sqlite'); }Its only caller was
TurnPresenceHookWriter, replaced by PR #16527 (#16513). Verified against mergeddevby walking every.mjs/.json/.md/.yamlblob in the tree: the sole file containing the symbol is the one defining it. No spec references it either.Why a dead export here is worse than dead code generally. This function is the checkout-relative path pattern
#16513was filed to remove —path.resolve(rootDir, '.neo-ai-data/...'), whererootDircame from the caller's own module location. That produced 7192 turn-presence beacons written into maintainer checkouts that no reader ever queried, across nine agents, invisible because a writable SQLite file accepts writes happily.Leaving it exported leaves a working, importable, apparently-sanctioned helper for exactly the mistake we just spent a ticket removing. The next author wanting a graph path will find it and it will do what it says.
The Architectural Reality
recordTurnPresenceOverMcp— the store is reached over the service, never by path, because in a containerized deployment the graph is a Docker named volume with no host-visible path to point at.MEMORY_CORE_GRAPH_DB_ENVmust stay. It is separately consumed byai/mcp/server/memory-core/configBase.mjs, so only the function and theimport pathit stranded are removable.The Fix
Remove
resolveMemoryCoreGraphPathand the now-unusednode:pathimport. KeepMEMORY_CORE_GRAPH_DB_ENV,TURN_PRESENCE_ENV,TURN_PRESENCE_DEFAULTSandresolveTurnPresenceRuntimeConfig.If anyone wants it kept as a deliberate escape hatch, it needs a comment naming the shape it must not be used for — but the argument for deletion is that the escape hatch is the defect.
Acceptance Criteria
resolveMemoryCoreGraphPathno longer exists; a tree-wide sweep confirms zero references.MEMORY_CORE_GRAPH_DB_ENVstill resolves for itsconfigBase.mjsconsumer.resolveTurnPresenceRuntimeConfigis unchanged — the hook still reads its runtime values.Out of Scope
#16543.Decision Record impact
none— removing an uncalled function.Related
#16543(the sibling finding) ·#16513/ PR #16527 (removed the caller) ·#16526(the wake daemon's own host-path reads, still live).