Skip to content

Don't auto-provision home directories for notification-only chat IDs #440

@dcellison

Description

@dcellison

Summary

/var/lib/kai/home/ contains a directory for -5241088228, which is a GitHub notification group chat (github_notify_chat_id), not an interactive user. The directory is empty and was never needed.

Root cause

ensure_user_home (or equivalent) appears to be called for any chat_id that passes through certain code paths, without checking whether the chat_id belongs to an actual interactive user with a workspace. Notification-only chat IDs — those that only appear as github_notify_chat_id in users.yaml — should be excluded.

Acceptance

  • Home directories are not created for chat IDs that have no interactive user entry in users.yaml
  • Existing spurious directories (e.g. -5241088228) are either cleaned up by a migration or flagged for manual removal
  • A test covers the case: resolving a home path for a notification-only chat_id does not create a directory

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions