Skip to content

Decode and prove bounded Git OFS deltas - #5

Merged
omar07ibrahim merged 11 commits into
mainfrom
agent/bounded-ofs-delta
Aug 9, 2026
Merged

Decode and prove bounded Git OFS deltas#5
omar07ibrahim merged 11 commits into
mainfrom
agent/bounded-ofs-delta

Conversation

@omar07ibrahim

@omar07ibrahim omar07ibrahim commented Aug 9, 2026

Copy link
Copy Markdown
Owner

Outcome

Add a fail-closed, dependency-free OFS_DELTA implementation to the independent Git pack v2/index v2 lab, then prove the production path with real git pack-objects --delta-base-offset bytes and source-bound visual evidence. REF_DELTA and thin packs remain explicitly rejected.

The original non-delta pack evidence remains byte-for-byte stable. The new scenario is separate: git-pack-ofs-delta-lab/v1.

Reviewed parser boundary

  • pack/index files: at most 1 MiB; at most 64 objects
  • logical object or inflated delta program: at most 256 KiB
  • aggregate expanded output: at most 16 MiB
  • canonical biased OFS offsets: at most 3 bytes and exact earlier entry boundaries only
  • canonical base/result varints: at most 3 bytes
  • copy and literal replay, including Git's 64 KiB default copy size
  • at most depth 4 and 4,096 instructions per program
  • physical-entry CRC32 plus reconstructed logical Git OID/index binding
  • explicit rejection of REF_DELTA, thin packs, tags, duplicate logical objects, malformed zlib, trailing data, and budget drift

Real Git fixture

The production pack-ofs-* commands create two fixed 77,824-byte synthetic blobs and change exactly record 1024. Under the recorded Git 2.54.0 build, two fresh runs produce the same report and require:

  • exactly one full blob and one depth-one OFS_DELTA
  • zero REF_DELTA entries
  • pack: 77,917 bytes; SHA-1 736fdd73b58a6a68dfefec9288533a8d0a41a9e6
  • index v2: 1,128 bytes
  • base offset 12; delta offset 77855
  • backward distance 77843; exact biased bytes 83df13
  • both reconstructed 77,824-byte payloads, OIDs, offsets, and CRC32 rows cross-bound to index v2

The normalized full argv, exact OID stdin order/digest, Git version, Git frontend digest, and git-pack-objects digest are manifest-bound. Byte identity is claimed only for the recorded Git build.

Real visual evidence

Evidence receipt: 8c2b8b07e9ab48492e9de13167c86eaf8835adcceecdcff958a6080a7ae540b0.
PNG SHA-256: 2e3a4e813cebf28a18d60bc65d9d3eb5d5426b2e702ac36a560a7c52465a3041.

The 1440×1500 PNG is an actual Chromium 140.0.7339.186 render in the existing digest-pinned Playwright container with network disabled, read-only root/demo mount, all capabilities dropped, and no new privileges. The temporary read-only staging workflow was removed after adoption.

Verification

Exact head: 88993092a7099e98148941455a91a2ea1da32c83.

  • CI run 31321003256: success
    • 113 tests in 11.056s: OK
    • DAG evidence: verified
    • non-delta pack evidence: verified
    • OFS evidence: verified
    • source and wheel distributions: built and smoke-tested, including the installed-wheel OFS receipt
  • CodeQL run 31321003318: success
    • official verified github/codeql-action v4.37.6 commit pinned
    • 0 annotations
    • 0 results across 50 Python rules
  • open code-scanning alerts: 0
  • open Dependabot alerts: 0
  • open secret-scanning alerts: 0

Provenance and history

Base main: ad69434fb70753f19fe58ab20313a91750d08cb8.
Head: 88993092a7099e98148941455a91a2ea1da32c83.

The branch is exactly 11 commits ahead and 0 behind. Every commit is a single linear child, and every author and committer is exactly:

Omar Ibrahim <31526072+omar07ibrahim@users.noreply.github.com>

No amend, squash, rebase, force-push, merge commit, co-author, bot-authored commit, license change, arbitrary-pack input, network input, authentication claim, collision-resistance claim, REF_DELTA support, or thin-pack support is introduced.

Post-merge verification

GitHub recorded PR #5 as merged at 2026-08-09T15:27:23Z with merge commit SHA exactly equal to the reviewed head: 88993092a7099e98148941455a91a2ea1da32c83. The feature branch was automatically deleted.

  • main CI run 31321154217: success
    • 113 tests in 16.082s: OK
    • all three checked-in evidence packages verified
    • source/wheel build and installed-wheel OFS receipt passed
  • main CodeQL run 31321154212: success
    • main analysis 1592145411
    • exact commit 88993092a7099e98148941455a91a2ea1da32c83
    • 0 results across 50 rules; 0 annotations
  • post-main open alerts: CodeQL 0, Dependabot 0, secret scanning 0

Build a fixed two-blob fixture through git pack-objects with OFS offsets, independently require the exact physical representation, and bind its reconstructed objects to index v2. Expose receipt and inspection commands with deterministic runtime and CLI coverage while preserving the original non-delta evidence.
Bind the shared CLI source in the DAG manifest and expose the real Delta runtime as a clearly labeled README section.
Generate source-bound CLI, reconstruction, workflow, and offline report artifacts from two fresh real-Git runs. Capture Chromium in the existing digest-pinned, network-disabled boundary and expose a read-only temporary staging workflow for independent adoption.
Trigger the temporary read-only evidence job from same-repository pull-request updates so the candidate can be built before the workflow reaches the default branch.
Publish the exact two-run CLI documents, receipt-derived reconstruction and workflow SVGs, offline report, rendered DOM, and digest-pinned Chromium capture produced by the reviewed staging job.
Expose the attested report, reconstruction, workflow, and exact CLI output in the README. Add twelve provenance and mutation tests, replay the OFS evidence and installed-wheel receipt in CI, and remove the temporary staging workflow.
Move init and analyze from v3.37.6 to the verified official v4.37.6 commit before the announced v3 and Node 20 deprecation, while retaining immutable action pinning.
@omar07ibrahim omar07ibrahim changed the title Decode bounded Git OFS deltas Decode and prove bounded Git OFS deltas Aug 9, 2026
@omar07ibrahim
omar07ibrahim marked this pull request as ready for review August 9, 2026 15:26
@omar07ibrahim
omar07ibrahim merged commit 8899309 into main Aug 9, 2026
4 checks passed
@omar07ibrahim
omar07ibrahim deleted the agent/bounded-ofs-delta branch August 9, 2026 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant