Registry Mirror
Skip to content

heavy: minors from the #770 reviews (~/.local mode, README repair line, linked ~/.local) #771

Closed

Description

@scuttletoby

Follow-ups from the two reviews of #770 (lens A, lens B). Both said SAFE, with no blocking or major findings.

Minors

  1. ~/.local write mode is not checked (lens A, bin/heavy:400-402). heavy checks that ~/.local is a real folder the user owns, but not that only the user can write to it. If others could write to it, one of them could swap state for a link between the check and the next mkdir. This needs an unusual ~/.local, and the code before heavy: minors from the #764 reviews (#767) #770 did not check ~/.local at all.
  2. The README repair line misses ~/.local itself (both lenses, README.md:63-64). The heavy: fix the #727 review minors; note why the queue test failed #760 heavy, run as root with a user's HOME, could also have made ~/.local root-owned. The new heavy then refuses it (safe), but the user's own tools that write there stay broken. Add the matching chown line for ~/.local.
  3. A ~/.local that links to the user's own folder gets no second notes folder (lens B). This is common with stow-style dotfiles or on HPC systems. The README documents it. Decide: keep it (fail closed), or accept a link whose target is a folder the user owns that only the user can write.

Nits

  • The sweep's note cleanup (heavy_sweep.py) does not check ~/.local the way bin/heavy now does. The two copies of the folder rule differ only there.
  • A HOME given as a link could be swapped between the check and the mkdir. A link planted in /tmp is blocked by the kernel's protected_symlinks setting.
  • The timeout check still misses forms outside its sample table (with Popen(...), from os import waitpid). This fits the narrowed claim, and none of these forms is in today's files.

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions