Skip to content

(engine) Make multi-file rename application transactional #408

Description

@tcballard

Priority

P2 — corpus integrity during mutation.

Problem

Multi-file rename --apply validates and writes one file at a time. If a later file is stale or its write fails, earlier files remain changed while the command returns an error. This can leave identity and inbound references out of sync.

Evidence

Acceptance criteria

  • All affected files are read, checked for staleness, and rendered before any corpus file is replaced.
  • Replacements are staged as sibling temporary files.
  • Commit/replacement failure cannot leave a silently partial rename.
  • Recovery or rollback behavior is deterministic and documented.
  • Error-injection tests cover stale plans, permission failures, and replacement failures after staging.
  • Successful application still produces a corpus that passes validation.

Blocked by the root-confinement fix: filesystem safety should land before transactional mutation is expanded.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions