Contributing
Building
Project Structure
Running Tests
Unit Tests
dag/— Merkle tree construction, object pool CRUD, store CRUD, verificationstate/— State file round-trip, path resolution, schema versioningvolume/— rsync clone, hardlinks, excludes, permissionsdocker/— Client validation (skipped if Docker unavailable)cli/— Formatter functions
End-to-End Tests
E2E tests require a running Docker environment and are gated behindGRAFT_E2E=1:
- Start a real Postgres 16 container with a named volume
- Run the graft CLI binary against it
- Assert state.json, graft.db, and objects/ are correctly populated
- Test branch creation, commit, verify, checkout, rollback, and delete
E2E Test Smoke Test
TestE2ESmokeCLI runs every CLI subcommand against a real Postgres container, including:
graft initwith volume selectiongraft commitwith sync hashinggraft verifyon clean and dirty treesgraft checkoutfor new and existing branchesgraft rollbackto rewind stategraft deleteto clean upgraft listto verify output formats