- 1
pub fn import_git_repo(path: &Path) -> Result<Import, Error> { - 2
let repo = Repository::open(path)?; - 3
let commits = collect_commits(&repo)?; - 4
- 5
// Two-phase import preserves commit signatures. - 6
// Single-pass would invalidate upstream GPG chains. - 7
let mut builder = TreeBuilder::new(); - 8
- 9
for commit in commits.iter() { - 10
let oid = commit.id(); - 11
let sig = commit.signature(); - 12
builder.add_orphan(oid, sig)?; - 13
} - 14
- 15
for commit in commits.iter() { - 16
let parents = commit.parent_ids().collect(); - 17
builder.link_parents(commit.id(), parents)?; - 18
} - 19
- 20
// Validate: every commit must have its original - 21
// signature reachable in the imported tree. - 22
let imported = builder.build()?; - 23
for commit in commits.iter() { - 24
let got = imported.signature_for(commit.id())?; - 25
ensure!(got == commit.signature(), "signature mismatch"); - 26
} - 27
- 28
Ok(Import { - 29
repo: imported, - 30
n_commits: commits.len(), - 31
..Default::default() - 32
}) - 33
}
VERSION CONTROL FOR AGENTS
Code review breaks when
half the contributors are agents.
Heddle gives every agent a name, a thread, and a signature. All three are woven into each merge.
01 Attribution
Know who wrote
which line.
Every change has an actor. Every actor is named. Heddle records the human who delegated, the agent that wrote, the model and version they used, and the confidence of each contribution. The diff is no longer a list of changes; it's a record of who changed what.
02 Threads
Every agent. One repository.
No silent rewrites.
Each agent works in its own thread. Every thread tracks its own changes. A merge creates a new state. Simple, atomic, undoable. Heddle keeps every commit, every signature.
feature/auth/middleware
claude · opus 4.7
- pkka73 scaffold session middleware
- hxe72g verify JWT signatures
- 5xtkhq rate-limit per session
- 2qpsr7 extract token store
feature/auth/tests
gpt · 5.4
- zepss6 cover login happy path
- 3jmtnk test expired tokens
- 9fbcqm fuzz the rate limiter
feature/auth/docs
grok · 4.20
- x9r2qm draft auth API reference
- vknq84 add migration notes
MERGE feature/auth
03 Context
Reasoning woven
into the code.
Annotations anchor to files, symbols, and lines, not to threads that evaporate. Heddle parses the code, so when a function moves the annotation moves with it. Each one is typed: invariant, rationale, constraint. The next engineer (or agent) inherits the reasoning, not just the diff.
invariant · signature preservation
import_git_repoline 1A single-pass import that interleaves
add_orphanwithlink_parentswill repack commits before validation, breaking the GPG chain on any signed upstream ref. Two-phase is the only structure that holds the chain intact.- 1
pub fn import_git_repo(path: &Path) -> Result<Import, Error> { - 2
let repo = Repository::open(path)?; - 3
let commits = collect_commits(&repo)?; - 4
- 5
let mut builder = TreeBuilder::new(); - 6
- 7
for commit in commits.iter() { rationale · why two phases
TreeBuilder::add_orphanline 8Splitting structural mutation from cryptographic check means a bad signature fails the import atomically, before any commit lands. Callers of
Repository::opennever observe a partial state.- 8
builder.add_orphan(commit.id(), commit.signature())?; - 9
} - 10
- 11
for commit in commits.iter() { - 12
builder.link_parents(commit.id(), commit.parent_ids())?; - 13
} - 14
- 15
let imported = builder.build()?; - 16
- 17
for commit in commits.iter() { - 18
let got = imported.signature_for(commit.id())?; constraint · atomic abort on mismatch
ensure!line 19ensure!halts mid-loop on the first signature mismatch. The transaction wrappingbuilder.build()rolls back any tree mutations, so the on-disk repo is never half-imported.- 19
ensure!(got == commit.signature(), "signature mismatch"); - 20
} - 21
- 22
Ok(Import { - 23
repo: imported, - 24
n_commits: commits.len(), - 25
..Default::default() - 26
}) - 27
}
04 Control plane
One surface.
Full authority.
Namespaces, repositories, threads, and agent activity — governed from a single pane. You set policy once. Inheritance does the rest. Click into any thread.
AGENTS CONVERGING ON HEDDLE
claude opus 4.7 Anthropic 3 threads
gpt 5.4 OpenAI 1 thread
grok 4.20 xAI 1 thread
claude sonnet 4.6 Anthropic 1 thread
heddle main · hd-d01a8b4e
6 threads · 4 repos · 100% accountability
Names, not noise.
One verified state. Every change permanent, attributed, and inspectable.
Apply.
Onboarding teams who take provenance seriously.