Expand description
Edit engine for buildfix plans.
Responsibilities:
- Attach file preconditions (sha256) to a plan.
- Apply operations (in-memory or to disk) using
toml_edit. - Generate a unified diff preview.
Structs§
- Apply
Options - Attach
Preconditions Options - Options for attaching preconditions to a plan.
Enums§
- Edit
Error - The top-level error type for buildfix-edit operations.
- Policy
Block Error - Policy block errors that should result in exit code 2.
Functions§
- apply_
op_ to_ content - Applies a single operation to TOML content, returning the modified content.
- apply_
plan - Apply a plan. When
opts.dry_runis true, no files are written, but results and a patch are still produced. - attach_
preconditions - Attach plan-level preconditions (FileSha256) for each file touched by ops.
- check_
policy_ block - Checks if an apply result indicates a policy block.
- execute_
plan_ from_ contents - Execute a plan against pre-loaded file contents (no filesystem access).
- get_
head_ sha - Get the current git HEAD SHA for a repository.
- is_
working_ tree_ dirty - Check if the git working tree has uncommitted changes.
- preview_
patch
Type Aliases§
- Edit
Result - Result type alias using EditError.