Skip to content

Setup fuzzing for merge function #298

Description

@mroczect

Summary

Integrate fuzzing for the three-way merge function (merge_trees) in libvctrl_plumbing. The goal is to ensure that the merge algorithm never panics or produces corrupted output when given arbitrary tree structures.

Context

Merge logic can be complex and error-prone. Fuzzing with random trees and ancestor combinations can reveal hidden bugs.

Tasks

  • Create a fuzz target that:
    • Constructs random tree objects (with random blobs and paths) using the memory object store.
    • Calls merge_trees with the random ancestor, ours, and theirs trees.
    • Asserts that the function returns either Ok(MergeResult) or Err(VctrlError) without panicking.
    • Optionally verifies that successful merge results can be read back and decoded.
  • Add the fuzz target to the existing fuzzing setup from issue 5.1.
  • Run a short fuzz session to catch immediate crashes.
  • Document the fuzz target and how to extend it.

Acceptance Criteria

  • Fuzz target for merge exists and runs without crashing in initial tests.
  • No panic is observed during fuzzing.

Dependencies

  • Fase 3 plumbing merge_trees (3.5.3).
  • Fuzz infrastructure from issue 5.1.

Metadata

Metadata

Assignees

Labels

fuzzSee issues with this labeltestingSee issues with this label

Projects

Status
Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions