Artifact 63098455f1788e2ff0fb68718a4cdd12325349548afbe8456f9e491948a02588:
- File
src/root.zig
— part of check-in
[92a40960d1]
at
2026-07-28 07:02:03
on branch sub-manifest
— Sub-manifest: settings, the emission gate, and the analysis pass
Emission is off by default and turning it on is an explicit act that must name the partition parameter: there is no fallback value, enabling without one is refused, and a pinned value outside the supported range emits flat manifests and says so rather than substituting a parameter of its own. Turning it off returns the next commit to flat. The analysis pass reports what the parameter would cost over a name set; it pins nothing.
A server whose setting is off now sends the avoid-submanifests pragma, which the receiving side already latched. It leads the pragma run in both the ordinary and the clone reply, so six tests that read a reply's first card were updated to account for it; each still asserts the same content it did before, behind the new card. Fossil 2.28 tolerates the pragma and the interoperability suite is unchanged.
The parameter is repository-local. The specification requires it to propagate to clones, since sharing by content address holds only while every writer partitions identically; that shortfall is recorded rather than implied away. (user: dmestas, size: 5495) [annotate] [blame] [check-ins using]
//! zit — a Fossil version-control system implemented in Zig. //! //! zit is a direct port of the Fossil formats and protocol as specified by //! four companion Internet-Drafts, kept in `docs/rfcs/`: //! //! * delta — draft-fossil-delta-format-00 (byte-level delta encoding) //! * artifact— draft-fossil-artifact-format-00 (manifest/control-artifact cards) //! * reposta.— draft-fossil-repo-state-00 (derived branch/tag/leaf/trunk views) //! * sync — draft-fossil-sync-protocol-00 (HTTP sync/clone protocol) //! //! Implementation order follows the RFC dependency layering: //! delta -> artifact -> repostate -> sync //! //! Each module cites the section of its RFC that governs a given rule. const std = @import("std"); /// The §4.1 zlib container codec — a leaf below delta/artifact/repostate/sync, /// the single home for the container framing those layers store and transmit. pub const container = @import("container.zig"); pub const delta = @import("delta.zig"); pub const artifact = @import("artifact.zig"); pub const repostate = @import("repostate.zig"); pub const sync = @import("sync.zig"); pub const managed = @import("managed.zig"); /// The persistence layers, folded into the one embeddable `zit` module so a /// library consumer wires a single dependency instead of five peers: the /// content-addressed on-disk file (`storage`), the framed append-only log over /// it (`logstore`), the `.zit-checkout` working-state record (`checkout`), and /// the working-tree materializer (`update`). Circular file-level imports among /// these and the per-RFC modules are legal within one module; only cross-module /// edges may not cycle. pub const storage = @import("storage.zig"); pub const logstore = @import("logstore.zig"); /// The store's own byte accounting — the single physical frame walk behind /// both `zit stat` and the storage benchmark, so the two can never drift into /// reporting different totals for the same file. pub const storestat = @import("storestat.zig"); pub const checkout = @import("checkout.zig"); pub const update = @import("update.zig"); pub const bisect = @import("bisect.zig"); /// The `zit pack` re-deltification pass (storage-delta-base-selection.md §6): /// the pure store-to-store generational rewrite that re-bases every artifact /// through `logstore`'s `pickBase` policy. In the module so the CLI wiring /// (main.zig) and the DST/fuzz harnesses drive the identical transform. pub const pack = @import("pack.zig"); /// The repository facade — the deep module the north star names as the public /// repo surface: open a repository, resolve a name, read the derived view, list /// and cat content. `repoview` (the derived-view loader) is re-exported as its /// public collaborator; `repocache` stays library-internal, reached only /// through `Repository`. pub const Repository = @import("repository.zig").Repository; pub const repoview = @import("repoview.zig"); /// The zero-parse read image — the materialized hot query answers a warm read /// reloads without re-deriving. Re-exported for the simulation harness, which /// pins the round-trip property (a materialized image is query-equivalent to /// the derived state it was made from). pub const repoimage = @import("repoimage.zig"); pub const repo_filename = @import("repository.zig").repo_filename; /// draft-fossil-submanifests-00 §6.3/§8.1 — the writer-side sub-manifest /// settings, the emission decision they determine, and the §6.3 analysis pass /// that measures k. Beside the repository facade, not inside `RepoView`: see /// the namespace's own doc comment for why the derived view is the wrong home. pub const submanifest = @import("repository.zig").submanifest; /// Suite version of the specifications this implementation targets. pub const rfc_revision = "00"; test { // Aggregate every module's tests into the library test binary. _ = @import("container.zig"); _ = @import("container_test.zig"); _ = @import("delta.zig"); _ = @import("delta_test.zig"); _ = @import("artifact.zig"); _ = @import("artifact_test.zig"); _ = @import("repostate.zig"); _ = @import("repostate_test.zig"); _ = @import("sync.zig"); _ = @import("sync_test.zig"); _ = @import("managed.zig"); // The folded store layers and their sibling public-surface test files. _ = @import("storage.zig"); _ = @import("logstore.zig"); _ = @import("logstore_test.zig"); _ = @import("storestat.zig"); _ = @import("pack.zig"); _ = @import("checkout.zig"); _ = @import("update.zig"); _ = @import("update_test.zig"); // The repository facade and its derived-view collaborators. _ = @import("repoview.zig"); _ = @import("repoimage.zig"); _ = @import("repocache.zig"); _ = @import("repository.zig"); _ = @import("repository_test.zig"); // The checkout-local bisection state module (`.zit-bisect`). _ = @import("bisect.zig"); // Structural pins over the shipped source distribution (LICENSE, the // package manifest's `.paths`, the versioned ignore-glob). _ = @import("packaging_test.zig"); // Structural pins over the CI workflow (the battery it runs, the pinned // toolchain, and the build steps it deliberately skips). _ = @import("ci_test.zig"); // The dead-file guard: every src/**/*.zig must be reachable from a test root, // so a moved file cannot silently stop running its tests. _ = @import("tidy.zig"); }