From a31cdb8f9186f3603583b5e3433d8f1cbf688e6a Mon Sep 17 00:00:00 2001 From: Agando Date: Fri, 23 Oct 2026 21:24:04 +0200 Subject: fix(newos4): the audit stops inventing '999d unused' (v4.6.85) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit getStaleSkills() returned daysUnused=999 for a skill that had useCount 0 and no lastUsed — a placeholder rendered by the audit as '999d unused', indistinguishable from a measurement. It told the operator to archive procedural memory that had simply never been instrumented. Now: daysUnused null + neverUsed true when there is no lastUsed; real day count otherwise; the audit prints '(never used)'. Verified: probe skill with no telemetry -> {daysUnused: null, neverUsed: true}; one last used 2026-08-01 -> 83; no 999 anywhere in getStaleSkills() or the audit output. --- modules/core/module-memory-graph.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'modules/core/module-memory-graph.js') diff --git a/modules/core/module-memory-graph.js b/modules/core/module-memory-graph.js index 093d2e4..1cb0919 100644 --- a/modules/core/module-memory-graph.js +++ b/modules/core/module-memory-graph.js @@ -482,8 +482,11 @@ class MemoryGraphModule { var useCount = stats.useCount || 0; var lastUsed = stats.lastUsed ? new Date(stats.lastUsed).getTime() : 0; if (useCount === 0 && (now - lastUsed > staleThreshold || lastUsed === 0)) { - var daysUnused = lastUsed > 0 ? Math.floor((now - lastUsed) / 86400000) : 999; - stale.push({ name: name, daysUnused: daysUnused }); + // v4.6.85: never fabricate a measurement. A skill with useCount 0 and no + // lastUsed has NEVER been used — reporting it as "999d unused" invented a + // number that then appeared in the audit as if it had been observed. + var daysUnused = lastUsed > 0 ? Math.floor((now - lastUsed) / 86400000) : null; + stale.push({ name: name, daysUnused: daysUnused, neverUsed: lastUsed === 0 }); } } this._untrackedSkills = untracked; -- cgit v1.2.3