Skip to content

Idempotent file writes and managed-file cleanup #15

@tale

Description

@tale

Two related improvements to make rootbeer less noisy and more predictable:

Idempotent writes

rb.file() should skip the write when the destination already exists with identical content. This avoids unnecessary disk writes, keeps file timestamps stable, and makes dry-run/diff output cleaner.

Managed-file cleanup

When a file or symlink is removed from the user's config, rootbeer currently has no way to know it should be cleaned up. After implementing state tracking (see rb status), rootbeer should:

  • Detect paths that were managed in the previous run but are absent from the current plan
  • Prompt or warn the user about orphaned managed files
  • Optionally remove them with a flag like rb apply --clean

Metadata

Metadata

Assignees

No one assigned

    Labels

    CoreCore runtime, plan/execute engine, and Lua VM

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions