aboutsummaryrefslogtreecommitdiff
path: root/modules/core/core-bundle.js
diff options
context:
space:
mode:
authorAgando <roduccomm@gmail.com>2026-10-23 21:24:04 +0200
committerAgando <roduccomm@gmail.com>2026-10-23 21:24:04 +0200
commita31cdb8f9186f3603583b5e3433d8f1cbf688e6a (patch)
tree0f89b95fd076d602dfbb36b43d7ef79b3ff6caa9 /modules/core/core-bundle.js
parentcdba58ccda05d10dd02f9dcb447f624377744b21 (diff)
fix(newos4): the audit stops inventing '999d unused' (v4.6.85)
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.
Diffstat (limited to 'modules/core/core-bundle.js')
-rw-r--r--modules/core/core-bundle.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/modules/core/core-bundle.js b/modules/core/core-bundle.js
index 0b2795a..c8a4c2e 100644
--- a/modules/core/core-bundle.js
+++ b/modules/core/core-bundle.js
@@ -17912,8 +17912,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;