Artifact 85f9f444fdb8fc544569c05e07e8b5ba69e8abf3a382da16397c5ba29c337514:
- File
src/git_import.zig
— part of check-in
[d189b0da1d]
at
2026-08-03 03:08:23
on branch sub-manifest
— import-git: classify Fossil mirror metadata as droppable
A Fossil->Git mirror carries root manifest/manifest.uuid/manifest.tags that are not project content: wapp has 252 distinct manifest blobs across 252 commits while its native history tracks no such file. The classifier proves per commit that those bytes are reconstructible from what the import already holds, so packing can drop them.
Fail-closed and cryptographic: stripped-manifest hash equals the uuid, F cards equal the tree, P cards equal validated parents, D card equals the committer instant. A real top-level file named manifest cannot satisfy that by chance, and any inconclusive signal retains every present candidate -- never a strict subset.
Three corrections to the design, all established against the corpus: presence is per-repository (fossil's manifest setting emits each of the three independently), gate 6 must exclude every present candidate since F cards list none of them, and gate 3 must strip the sterilizer line the export appends or the uuid never matches. update.zig's manifest_paths and sterilizer are now public rather than duplicated -- it already had all three names and the exact trailer.
Measured on the pinned wapp corpus: 252/252 commits validate, drop set 512 = 252 manifest + 252 manifest.uuid + 8 distinct manifest.tags.
test 3461/3461, gate, e2e 716/716, git-import-e2e 11/11, dst 6x1000. (user: dmestas, size: 2343) [annotate] [blame] [check-ins using]
const implementation = @import("git_import_impl.zig"); pub const TreeStore = implementation.TreeStore; pub const TreeFormat = implementation.TreeFormat; pub const RootView = implementation.RootView; pub const TreeCommand = implementation.TreeCommand; pub const BuildResult = implementation.BuildResult; pub const TreeError = implementation.TreeError; pub const LoadedBytes = implementation.LoadedBytes; pub const TreeStoreError = implementation.TreeStoreError; pub const Attribution = implementation.Attribution; pub const UserOptions = implementation.UserOptions; pub const SubmanifestChoice = implementation.SubmanifestChoice; pub const WorkCounters = implementation.WorkCounters; pub const ResolvedOptions = implementation.ResolvedOptions; pub const resolveOptions = implementation.resolveOptions; pub const analyzeSubmanifestK = implementation.analyzeSubmanifestK; pub const modeFromGit = implementation.modeFromGit; pub const CommitMarkState = implementation.CommitMarkState; pub const FinalizeOptions = implementation.FinalizeOptions; pub const FinalizedRef = implementation.FinalizedRef; pub const FinalizedRefs = implementation.FinalizedRefs; pub const RefCollision = implementation.RefCollision; pub const BranchHead = implementation.BranchHead; pub const BranchLabel = implementation.BranchLabel; pub const labelBranches = implementation.labelBranches; pub const MirrorRetainReason = implementation.MirrorRetainReason; pub const MirrorCensus = implementation.MirrorCensus; pub const mirror_candidate_names = implementation.mirror_candidate_names; pub const mirror_sterilizer = implementation.mirror_sterilizer; pub const MirrorDecisionKind = implementation.MirrorDecisionKind; pub const Digest = implementation.Digest; pub const tree_digest_domain = implementation.tree_digest_domain; pub const provenance_digest_domain = implementation.provenance_digest_domain; pub const formatDigest = implementation.formatDigest; pub const LedgerCandidate = implementation.LedgerCandidate; pub const LedgerCommit = implementation.LedgerCommit; pub const LedgerArtifact = implementation.LedgerArtifact; pub const VerificationLedger = implementation.VerificationLedger; /// Production imports always use the incremental tree writer. pub const Importer = implementation.Importer(implementation.IncrementalTreePolicy, implementation.NoopObserver);