sailfork / t3code-github / .repos/ alchemy-effect/ packages/ integration-tests/ test/ Git/ fixtures/ packs

.repos/alchemy-effect/packages/integration-tests/test/Git/fixtures/packs/README.md

Checked-in fixture packs

These packfiles were generated once by the real git CLI and are committed verbatim — they are never regenerated at test time (per DESIGN.md §9 Tier 1). pack.test.ts reads them via the Effect FileSystem service and uses them as parse/write round-trip oracles for packages/git/src/Protocol/PackParser.ts / PackWriter.ts.

The fixture repository

A three-commit repo built with a fixed identity and fixed timestamps so every object id is deterministic across regenerations:

  • identity: Fixture Author <fixture@example.com>
  • commit dates: 1700000000 +0000, 1700000100 +0000, 1700000200 +0000
  • tree: data.txt (128 → 160 repeated lines, delta-friendly), hello.txt, sub/nested.txt; annotated tag v1 on the third commit

Head oids (also recorded in manifest.json):

refoid
c19e0b5a0bd293f9feda554193a204193a2c3c5d9c
c2a54aa1a4d1bad30627948f555da8f1790e720054
c36609ad4f494d317fbe0f82ac178029fa4260a3f9
tag v17062b0b73810cec6760d5ff12342082075b62e4f

The packs

filegenerated bycontents
empty.packgit pack-objects --stdout </dev/nullheader (count 0) + SHA-1 trailer only
simple.packgit rev-list --objects --all | git pack-objects --window=0 --depth=0 --stdoutevery object, no deltas
ofs-delta.packsame rev-list, git pack-objects --delta-base-offset --window=50 --depth=50 --stdoutevery object, OFS_DELTA entries present
ref-delta.packsame rev-list, git pack-objects --window=50 --depth=50 --stdout (no --delta-base-offset)every object, REF_DELTA entries present
base.packgit rev-list --objects <c1> | git pack-objects --window=0 --depth=0 --stdoutc1's closure only — seeds the object store the thin pack resolves against
thin.packprintf '%s\n^%s\n' <c2> <c1> | git pack-objects --thin --revs --stdoutc2-only objects; thin REF_DELTA whose base lives only in base.pack

manifest.json records, per pack, the exact object-id set (from git rev-list --objects) and entry count that pack.test.ts asserts after ingestion, plus the notable individual oids (commits, tag, first tree, the delta-friendly blobs).

Regenerating (only if the fixture design changes)

The generation script lives in the coordinating session's scratchpad (gen-packs.sh); it is a straight transcription of the table above: a temp repo, three commits with the fixed dates, then the six git pack-objects invocations. Because identity, dates, and content are pinned, regeneration reproduces byte-identical object ids (pack bytes may differ across git versions; the manifest oids may not).