The code worked perfectly. That's exactly why this bug survived four months in production.
A tester sent me 15 bug reports last week. I fixed them all — and found 10 more they never mentioned. Somewhere in the middle I opened system_context.py to double-check something, and found the real problem nobody was looking for.
snapshot() reads live CPU, RAM, GPU and the process list. The core data function. Every module calls it — response builder, context system, intent router, proactive monitor — all independently, "just to be safe," each one getting fresh data. 19 calls per single user message. The function was fine. Fast. Accurate. No errors, no logs. For four months.
The problem wasn't the code. It was that nobody coordinated who was calling it. Everyone assumed someone else handled the caching.
_SNAPSHOT_CACHE_TTL = 1.0 # seconds
def snapshot(self, force=False):
now = time.time()
if not force and self._snapshot_cache:
if (now - self._snapshot_ts) < self._SNAPSHOT_CACHE_TTL:
return self._snapshot_cache
...
self._snapshot_cache = ctx
self._snapshot_ts = now
return ctx
A 1-second TTL. 19 calls down to 1. Fresh enough to be live, short enough to share across modules.
That tester's reports also turned into a full patched release — v1.7.7: Services Manager, Startup Manager, Drivers page, hck_GPT stability. 20+ fixes, tested, VirusTotal 0/70, a new SECURITY.md in the repo.