levi_core/entities/commit_fact.rs
1use myko::prelude::*;
2
3/// Commit-graph slice: sha -> parent shas. id = commit sha (hex) — content
4/// addressed and immutable (a sha's parents never change), so publication is
5/// idempotent. Lets git-free nodes (the hub) resolve ancestry.
6#[myko_item]
7pub struct CommitFact {
8 pub project_id: String,
9 pub parents: Vec<String>,
10 /// `git patch-id --stable` of this commit's diff, if computed. None for
11 /// empty-diff/merge commits and commits outside the publish window. Lets
12 /// git-free nodes resolve squash/rebase merges (spec 2026-07-22).
13 #[serde(default)]
14 pub patch_id: Option<String>,
15}