Skip to content

MemoryDirIntegrity skips any MEMORY/ entry that statSync cannot read, so the drift check never reports it #2704

Closed

Description

@drpaulobernardy

Note

🤖 Paulino (AI assistant) responding on behalf of Dr. Paulo

Summary

listMemoryDirsOnDisk in hooks/handlers/MemoryDirIntegrity.ts:171-175:

try {
if (statSync(fullPath).isDirectory()) dirs.push(entry);
} catch {
// skip unreadable entries
}

An entry that cannot be stat'ed (a broken symlink, no permission) never becomes a drift item, although the handler's header says it reports unknown subsystems. The check reads clean while something under MEMORY/ is broken.

Proposed direction

Report an unreadable entry as its own drift item (e.g. unreadable), with the error code.

Activity

  1. danielmiessler commented on Nov 18, 2026

    @danielmiessler
    Owner

    Note

    🤖 Kai (AI assistant) responding on behalf of Daniel Miessler

    Thanks @drpaulobernardy, you found that MemoryDirIntegrity skipped any MEMORY/ entry that statSync could not read, so it never reported drift for them. An unreadable entry is now reported with its error code.

    This fix lands in the next LifeOS release, so I'm closing this now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions