Artifact 9f4a2f2ff8ca74da80649d5c9d9532e84dde59438b459ad7cf492b6d8f27fc46:
- File
docs/plans/bench/step2-pickbase-unstamped-run.json
— part of check-in
[d859c6a9a5]
at
2026-07-17 22:05:15
on branch storage
— feat(§5): pickBase deep module + putArtifact lineage+chrono-window wiring with <75% accept threshold
fossil-scm-clone: zit=117528088B fossil=72245248B ratio=1.6268 [zlib 9647 frames / 92,073,728 B (78.3%, avg 9544 B); delta 57852 frames / 25,454,120 B (21.7%, avg 439 B); config 2 frames / 176 B; raw 0 frames. Header+padding overhead 3,711,845 B (3.2%). Exact accounting: 64 + zlib + delta + config == 117,528,088. Artifact types: checkin/manifest 20848 / 26,721,968 B (22.7%), other 6929 / 4,835,264 B (4.1%), file-blob 39722 / 85,970,616 B (73.1%).] | sqlite: zit=207344544B fossil=147709952B ratio=1.4037 [zlib 10847 frames / 140,422,768 B (67.7%, avg 12945 B); delta 120147 frames / 66,921,536 B (32.3%, avg 556 B); config 2 frames / 176 B; raw 0 frames. Header+padding overhead 7,212,808 B (3.5%). Exact accounting: 64 + zlib + delta + config == 207,344,544. Artifact types: checkin/manifest 36515 / 81,006,048 B (39.1%), other 4775 / 5,531,960 B (2.7%), file-blob 89704 / 120,806,296 B (58.3%).]
vs baseline: fossil-scm-clone: zit=117528088B fossil=72245248B ratio=1.627 [raw=0B/0f; zlib=92073728B/9647f (78.3%); delta=25454120B/57852f (21.7%); config=176B/2f. Header+padding overhead 3711845B (3.2%). Artifact-type: checkin/manifest 26721968B/20848, other 4835264B/6929, file-blob 85970616B/39722. Accounting exact.] | sqlite: zit=207344544B fossil=147709952B ratio=1.404 [raw=0B/0f; zlib=140422768B/10847f (67.7%); delta=66921536B/120147f (32.3%); config=176B/2f. Header+padding overhead 7212808B (3.5%). Artifact-type: checkin/manifest 81006048B/36515, other 5531960B/4775, file-blob 120806296B/89704. Accounting exact.] (user: dmestas, size: 10893) [annotate] [blame] [check-ins using] [more...]
{ "schema": "zit-storage-pickbase/1", "plan": "docs/plans/storage-delta-base-selection.md", "plan_section": "§4 (bench harness) re-run at the §8 step-2 checkpoint (pickBase deep module wired into putArtifact, accept tightened to <75%)", "step": "8/step-2 — pickBase (write path) present; CLONE/SYNC-ingest at-rest re-measure vs the §8 step-1 baseline", "stamped": false, "stamped_note": "File name is 'unstamped': the fossil-bench corpora are NOT yet pinned (corpora/corpora.json trunk_hash == null for both). Observed trunk hashes are recorded below for reproducibility, but a future run could see upstream drift until these are written back into corpora/corpora.json as pins per corpora/snapshot.sh.", "key_finding": { "summary": "pickBase (best-of-N, <75% accept) is present at this checkout, but it lives on the WRITE path (putArtifact) only. The CLONE/SYNC ingest path stores the peer's wire deltas VERBATIM via putDeltaContainer, which plan §5.2.3 leaves unchanged. Therefore a cloned store's at-rest bytes are byte-for-byte identical to the §8 step-1 baseline: 117,528,088 B (fossil-scm-clone) and 207,344,544 B (sqlite), matching baseline-unstamped-run.json exactly. This is the expected, plan-predicted outcome (§9 step-2 estimate: 'modest on clone-heavy stores — writes are not the dominant ingest path there'). The step-3 pack re-deltification pass — which re-bases verbatim wire deltas through pickBase — is the lever that moves a clone-heavy store; it has NOT run here.", "pickbase_confirmed_in_tree": true, "accept_threshold": "<75% — delta_len*4 < target_len*3 integer math (src/logstore.zig:101-114), replacing the former 9/10 write-path threshold", "clone_at_rest_unchanged_vs_step1": true }, "provenance": { "generated_utc": "2026-07-17", "host": { "os": "macOS (Darwin 25.5.0)", "kernel": "Darwin", "arch": "arm64" }, "tool_versions": { "zit": "0.0.0 (targets Fossil RFC rev 00), built -Doptimize=ReleaseFast", "fossil": "2.28 [52445a27f1] 2026-03-11", "zig": "0.16.0" }, "zit_checkout": "9aaf48584758951ba0a0ab97f6e7d8e31349b87e (branch storage)", "harnesses": [ "fossil-bench @ /Users/dmestas/fossil-bench (drivers/DRIVER_SPEC.md); loopback fossil server serving the pinned snapshot + zit clone / fossil clone; store-size = raw file bytes over the destination store", "zit build bench -- storage <path> (src/storage_benchmark.zig): frame-class bytes-at-rest + artifact-type split + compression headroom + serve CPU, read-only over the physical .zit log" ], "comparison_class": "approximate", "comparison_note": "Total store size is not like-for-like across store shapes (fossil-bench clone_store_total_bytes caveat / DRIVER_SPEC store-content-size unsupported by both drivers). fossil's number is its whole .fossil (content blobs + SQLite b-tree indices + derived tables in one file); zit's headline number is the whole .zit log (content frames + 64-byte header). zit keeps its derived index in a SEPARATE .zit-cache file (reported below), which fossil folds into its single file — so an index-inclusive total is also given. Honest comparison class: 'approximate', not 'like-for-like'." }, "ingest_path": { "method": "CLONE/SYNC — fossil server serves the snapshot over loopback; both zit and fossil clone it anonymously. This exercises zit putDeltaContainer verbatim-frame storage (the production ingest path per plan §1/§5.2.3): the peer's wire deltas land at rest verbatim, so the sender's base choice is inherited unchanged.", "both_impls_cloned_same_served_corpus": true, "correctness_gate": "PASSED — for each corpus the full leaf set of zit leaves matches fossil leaves by hash, incl. the trunk leaf; the storage harness additionally CRC-verifies every frame on openReadOnly. Trunk hash preserved end-to-end (the §3 invariant)." }, "harness_gaps": { "note": "Rule 7 — reported only what the harness measured. The following requested metrics are NOT emitted by the current storage harness and were NOT synthesized:", "chain_depth_p50_p99": "NOT MEASURED. src/storage_benchmark.zig does not emit a delta-chain-depth histogram; plan §4.3 explicitly lists this as a metric to ADD ('chain-depth histogram'). No p50/p99 fabricated.", "put_us_per_artifact": "NOT MEASURED by the storage harness. 'zig build bench -- storage' times SERVE CPU only (produce §4.1/§7.2 wire form), not the put path. A pure put microbenchmark exists (zig build bench -- put) but runs a SYNTHETIC seeded corpus, not the CLONE-ingested real corpus, so it is not substituted here (Rule 7). A clone-path ingest rate (network + decode + put, NOT a pure put) is recorded per corpus under 'clone_ingest_proxy' and is clearly labeled a proxy.", "per_frame_delta_vs_base_ratio": "NOT MEASURED (plan §4.3 second add). Not synthesized." }, "corpora": [ { "corpus": "fossil-scm-clone", "fossil_bench_name": "fossil", "tier": "medium", "source": "https://fossil-scm.org/home", "observed_trunk_leaf_hash": "61998ec8aa4f567cbb21f9ad3eeac11e8320184c1d3c822c5a4f3d82dcdaa3cd", "leaves_match_fossil": true, "pinned": false, "artifacts_cloned": 67499, "zit": { "at_rest_bytes_total": 117528088, "at_rest_bytes_note": ".zit log file (frame classes below sum to this). Derived index in separate .zit-cache = 4950808 B; index-inclusive total = 122478896 B.", "zit_cache_bytes": 4950808, "at_rest_bytes_index_inclusive": 122478896, "frame_class_bytes": { "raw": { "frames": 0, "on_disk_bytes": 0, "pct_store": 0.0 }, "zlib": { "frames": 9647, "on_disk_bytes": 92073728, "pct_store": 78.3, "avg_bytes_per_frame": 9544 }, "delta": { "frames": 57852, "on_disk_bytes": 25454120, "pct_store": 21.7, "avg_bytes_per_frame": 439 }, "config": { "frames": 2, "on_disk_bytes": 176, "pct_store": 0.0 } }, "frame_header_overhead_bytes": 3711845, "frame_header_overhead_pct": 3.2, "accounting": "exact (header 64 + raw + zlib + delta + config == 117528088)", "artifact_type_bytes": { "checkin_manifest": { "count": 20848, "on_disk_bytes": 26721968, "pct_store": 22.7 }, "other_artifact": { "count": 6929, "on_disk_bytes": 4835264, "pct_store": 4.1 }, "file_blob": { "count": 39722, "on_disk_bytes": 85970616, "pct_store": 73.1 } }, "full_form_compression_headroom": { "sampled_frames": 1024, "uncompressed": 2438684, "compressed": 1016538, "ratio_pct": 41.7 }, "serve_cpu": { "artifacts": 67499, "total_ms": 540.87, "us_per_artifact": 8.013, "mb_per_s": 200.7 } }, "fossil": { "at_rest_bytes_total": 72245248, "measure": "wc -c of fresh `fossil clone` destination (.fossil), same served corpus, no post-clone rebuild/vacuum" }, "ratio_zit_over_fossil": 1.6268, "ratio_zit_index_inclusive_over_fossil": 1.6953, "clone_ingest_proxy": { "note": "NOT the harness put metric — clone wall time / artifacts (network + decode + put). Labeled proxy only.", "zit_clone_wall_s": 54.86, "zit_us_per_artifact": 812.75, "fossil_clone_wall_s": 20.90 } }, { "corpus": "sqlite", "fossil_bench_name": "sqlite", "tier": "large", "source": "https://sqlite.org/src", "observed_trunk_leaf_hash": "6924895d2cbc50971d8da1810423ad15c638dabc31b4f1083dd6076e20492ef4", "leaves_match_fossil": true, "pinned": false, "artifacts_cloned": 130994, "zit": { "at_rest_bytes_total": 207344544, "at_rest_bytes_note": ".zit log file (frame classes below sum to this). Derived index in separate .zit-cache = 8135708 B; index-inclusive total = 215480252 B.", "zit_cache_bytes": 8135708, "at_rest_bytes_index_inclusive": 215480252, "frame_class_bytes": { "raw": { "frames": 0, "on_disk_bytes": 0, "pct_store": 0.0 }, "zlib": { "frames": 10847, "on_disk_bytes": 140422768, "pct_store": 67.7, "avg_bytes_per_frame": 12945 }, "delta": { "frames": 120147, "on_disk_bytes": 66921536, "pct_store": 32.3, "avg_bytes_per_frame": 556 }, "config": { "frames": 2, "on_disk_bytes": 176, "pct_store": 0.0 } }, "frame_header_overhead_bytes": 7212808, "frame_header_overhead_pct": 3.5, "accounting": "exact (header 64 + raw + zlib + delta + config == 207344544)", "artifact_type_bytes": { "checkin_manifest": { "count": 36515, "on_disk_bytes": 81006048, "pct_store": 39.1 }, "other_artifact": { "count": 4775, "on_disk_bytes": 5531960, "pct_store": 2.7 }, "file_blob": { "count": 89704, "on_disk_bytes": 120806296, "pct_store": 58.3 } }, "full_form_compression_headroom": { "sampled_frames": 1024, "uncompressed": 11842512, "compressed": 3279252, "ratio_pct": 27.7 }, "serve_cpu": { "artifacts": 130994, "total_ms": 1264.33, "us_per_artifact": 9.652, "mb_per_s": 151.0 } }, "fossil": { "at_rest_bytes_total": 147709952, "measure": "wc -c of fresh `fossil clone` destination (.fossil), same served corpus, no post-clone rebuild/vacuum" }, "ratio_zit_over_fossil": 1.4037, "ratio_zit_index_inclusive_over_fossil": 1.4588, "clone_ingest_proxy": { "note": "NOT the harness put metric — clone wall time / artifacts (network + decode + put). Labeled proxy only.", "zit_clone_wall_s": 133.41, "zit_us_per_artifact": 1018.44, "fossil_clone_wall_s": 107.91 } } ], "reproducibility": { "note": "Plan §4 acceptance: same corpus => same bytes. zit .zit at-rest totals and every frame-class/artifact-type count reproduce baseline-unstamped-run.json (checkout 9478fe4) BYTE-FOR-BYTE at this later checkout (9aaf485), confirming (a) deterministic clone-ingest storage and (b) that the write-path pickBase change is invisible to a clone-heavy store, as designed. Only run-to-run timing (serve CPU us/artifact, MB/s; clone wall) differs.", "byte_totals_match_step1_baseline": true }, "headline": { "note": "Baseline gap re-confirmed on both real corpora at the post-pickBase checkout via the CLONE/SYNC ingest path (verbatim wire deltas at rest). Gap is smaller than the plan §1 anchor of 2.4x (that figure was on a different corpus/measure); this run measures 1.40x-1.63x on fossil-bench's fossil + sqlite corpora. pickBase (write path) does not move a clone-heavy store — the step-3 pack re-deltification pass is the lever, and this file is the confirmed yardstick it will be measured against.", "fossil_scm_clone_ratio": 1.6268, "sqlite_ratio": 1.4037 } }