Summary
Collapse legacy khive-sync/server branch models into Git-native VCS primitives, remove obsolete merge-engine surfaces, and add the Rust sync library boundary called for by ADR-010 and ADR-020.
Source ADRs
- F056 ADR-010 (CRIT): Canonical snapshot JSON root contains only entities and edges (from audit-foundation/e5/ADR-010.md)
- F057 ADR-010 (MAJ): Public RemoteConfig still models a remote khive-sync server for push/pull, and crates/khive-vcs/src/lib.rs:20 exports it. (from audit-foundation/e5/ADR-010.md)
- F058 ADR-010 (MAJ): VcsError still exposes remote server/auth/push-pull errors (RemoteUnreachable, AuthFailed, NonFastForward, MergeRequired) tied to custom VCS behavior. (from audit-foundation/e5/ADR-010.md)
- F059 ADR-010 (MIN): Crate docs say the full snapshot/branch/merge pipeline was superseded by ADR-048 (from audit-foundation/e5/ADR-010.md)
- F102 ADR-020 (MAJ): khive-vcs says the full snapshot/branch/merge pipeline was superseded and retains only foundational primitives (from audit-platform/e4/ADR-020.md)
- F103 ADR-020 (CRIT): khive-vcs still models immutable KgSnapshot rows stored in kg_snapshot_archives, KgBranch branch pointers, and VcsState.dirty - crates/khive-vcs/src/types.rs:87... (from audit-platform/e4/ADR-020.md)
- F104 ADR-020 (CRIT): RemoteConfig still points to a remote khive instance / khive-sync server, and VcsError still exposes remote server errors and push/pull-style non-fast-forward flow -... (from audit-platform/e4/ADR-020.md)
- F105 ADR-020 (MAJ): khive-merge is a custom KG three-way merge engine, and the workspace excludes it as not yet compilable against restructured khive-vcs - crates/Cargo.toml:26. (from audit-platform/e4/ADR-020.md)
- F106 ADR-020 (MAJ): Only kkernel sync implements a Rust NDJSON-to-SQLite rebuild (from audit-platform/e4/ADR-020.md)
Files affected
crates/khive-vcs/src/hash.rs (365 sampled LOC)
crates/khive-vcs/src/types.rs (365 sampled LOC)
crates/khive-vcs/src/error.rs (93 sampled LOC)
crates/khive-vcs/src/lib.rs (20 sampled LOC)
crates/khive-merge/src/lib.rs (21 sampled LOC)
crates/kkernel/src/sync.rs (386 sampled LOC)
crates/khive-vcs/src/sync.rs (new/planned path)
crates/khive-merge/src/merge.rs (311 sampled LOC)
crates/khive-runtime/src/portability.rs (918 sampled LOC)
crates/kkernel/src/main.rs (167 sampled LOC)
crates/Cargo.toml (59 sampled LOC)
crates/khive-vcs/Cargo.toml (24 sampled LOC)
Acceptance criteria
Dependencies
- Depends on: #[ADR-003] Runtime Backend and Substrate Coordinator
- Blocks: #[ADR-023] Dynamic Pack Loading, Template, and Pack Binary Inclusion
- Blocks: #[ADR-011] Retrieval, Embed, and Lattice Boundary
- Blocks: #[ADR-034] kkernel Engine and Admin Commands
- Blocks: #[ADR-035] Import, Export, Remote Resolver, and Sync
LOC estimate
~340 lines added/100 removed; 11 existing affected file(s) sampled at 2729 current LOC via wc -l, plus 1 new/planned path(s).
Risk notes
- Same-file dependencies must merge first; dependency list includes the exact overlapping paths.
- 1 affected path(s) are new/planned and were not present in
rg --files --hidden; create them in the owning PR rather than in independent parallel work.
- Contains CRIT findings; do not defer without owner approval.
Auto-generated by ADR alignment triage
Summary
Collapse legacy khive-sync/server branch models into Git-native VCS primitives, remove obsolete merge-engine surfaces, and add the Rust sync library boundary called for by ADR-010 and ADR-020.
Source ADRs
Files affected
crates/khive-vcs/src/hash.rs(365 sampled LOC)crates/khive-vcs/src/types.rs(365 sampled LOC)crates/khive-vcs/src/error.rs(93 sampled LOC)crates/khive-vcs/src/lib.rs(20 sampled LOC)crates/khive-merge/src/lib.rs(21 sampled LOC)crates/kkernel/src/sync.rs(386 sampled LOC)crates/khive-vcs/src/sync.rs(new/planned path)crates/khive-merge/src/merge.rs(311 sampled LOC)crates/khive-runtime/src/portability.rs(918 sampled LOC)crates/kkernel/src/main.rs(167 sampled LOC)crates/Cargo.toml(59 sampled LOC)crates/khive-vcs/Cargo.toml(24 sampled LOC)Acceptance criteria
cargo test -p khive-vcs -p kkernelpasses.cargo clippy --workspace -- -D warningspasses.make cipasses.Dependencies
LOC estimate
~340 lines added/100 removed; 11 existing affected file(s) sampled at 2729 current LOC via
wc -l, plus 1 new/planned path(s).Risk notes
rg --files --hidden; create them in the owning PR rather than in independent parallel work.Auto-generated by ADR alignment triage