Artifactspublic-v0

ply

main
ply4 git calls211 ms44 KiB2 cachedprotocol v2
354 lines20 KiBRaw
1// scanPackIndex (#236): a pack read from a stream, indexed without resolving deltas or keeping objects. Held to
2// describePack (the buffered layout) field by field, to `git verify-pack -v` on packs git wrote (this repository's
3// objects, OFS and REF deltas), and to itself across every chunking (whole, one byte, random cuts) and both source
4// kinds (ReadableStream, AsyncIterable). Then the refusals: an OFS base off an entry boundary, truncation, a bad
5// trailer, corrupt zlib, a selected object over the cap, and the source cancelled on each.
6import { test } from 'vitest';
7import assert from 'node:assert/strict';
8import { execFileSync } from 'node:child_process';
9import { mkdtempSync, rmSync, writeFileSync, readFileSync } from 'node:fs';
10import { join } from 'node:path';
11import { tmpdir } from 'node:os';
12import { Rng, splitRandom } from './fuzz/prng.js';
13import { scanPackIndex, SCAN_INDEX_ENTRY_BYTES } from '../src/packscanindex.js';
14import { describePack, encodeObjHeader, zlibDeflate } from '../src/pack.js';
15import { hashObject, TYPE } from '../src/objects.js';
16import { Sha1, fromHex } from '../src/sha1.js';
17import { concat, te } from '../src/bytes.js';
18import { withLimits } from '../src/limits.js';
19import { PACK_SIGNATURE, PACK_VERSION, PACK_HEADER_BYTES, UINT32_BYTES, OBJ_CONTINUE, OBJ_SIZE_NEXT_MASK, OBJ_SIZE_NEXT_BASE } from '../src/format.js';
20import { buildPacks } from './space/pack-fixtures.js';
21import { settledWithin } from './abortcells.js';
23const must = r => { if (r.ok) return r.value; throw Object.assign(new Error(r.error.message), { code: r.error.code }); };
25function encodeOfs(off) {
26 const out = [off & OBJ_SIZE_NEXT_MASK];
27 while ((off = Math.floor(off / OBJ_SIZE_NEXT_BASE)) > 0) out.unshift(OBJ_CONTINUE | (--off & OBJ_SIZE_NEXT_MASK));
28 return Uint8Array.of(...out);
30// entries: { type, data } whole, { data, baseOid } REF_DELTA, { data, baseIndex } OFS_DELTA to an earlier entry,
31// { data, ofsDistance } an OFS_DELTA with a raw distance (to aim it off an entry boundary).
32async function packOf(entries) {
33 const parts = [Uint8Array.of(...PACK_SIGNATURE, 0, 0, 0, PACK_VERSION), new Uint8Array(UINT32_BYTES)];
34 new DataView(parts[1].buffer).setUint32(0, entries.length);
35 const offsets = [];
36 let at = PACK_HEADER_BYTES;
37 for (const e of entries) {
38 offsets.push(at);
39 const ofs = e.baseIndex !== undefined ? at - offsets[e.baseIndex] : e.ofsDistance;
40 const type = e.baseOid ? TYPE.REF_DELTA : ofs !== undefined ? TYPE.OFS_DELTA : e.type;
41 const entry = concat([
42 encodeObjHeader(type, e.data.length),
43 ...(e.baseOid ? [fromHex(e.baseOid)] : ofs !== undefined ? [encodeOfs(ofs)] : []),
44 await zlibDeflate(e.data),
45 ]);
46 parts.push(entry);
47 at += entry.length;
48 }
49 const body = concat(parts);
50 return concat([body, new Sha1().update(body).digest()]);
52// A delta from base to target: copy nothing, insert the target (valid instructions; the scan never applies them).
53const insertDelta = (base, target) => {
54 const varint = n => { const out = []; do { let b = n & 0x7f; n >>>= 7; if (n) b |= 0x80; out.push(b); } while (n); return out; };
55 const ops = [];
56 for (let i = 0; i < target.length; i += 127) { const piece = target.subarray(i, i + 127); ops.push(piece.length, ...piece); }
57 return Uint8Array.of(...varint(base.length), ...varint(target.length), ...ops);
58};
60// Sources over the same chunks.
61const streamOf = (chunks, onCancel = () => {}) => {
62 let i = 0;
63 return new ReadableStream({ pull(c) { if (i < chunks.length) c.enqueue(chunks[i++]); else c.close(); }, cancel() { onCancel(); } });
64};
65async function* iterOf(chunks) { for (const c of chunks) yield c; }
66const feedings = (bytes, rng) => [[bytes], Array.from(bytes, b => Uint8Array.of(b)), splitRandom(rng, bytes, { allowEmpty: false })];
68const plain = e => ({ ...e });
69const rows = idx => [...idx.entries()].map(plain);
71// The fields describePack and the scan share: the layout, and the resolved type and oid where the scan can know them.
72function assertMatchesLayout(idx, layout) {
73 assert.equal(idx.count, layout.count);
74 assert.equal(idx.trailer, layout.trailer);
75 assert.equal(idx.columns.offset.length, layout.objects.length);
76 for (const [i, o] of layout.objects.entries()) {
77 const found = idx.entry(i);
78 assert.equal(found.tag, 'some', `entry ${i}`);
79 const e = found.value;
80 assert.equal(e.index, i);
81 assert.equal(e.offset, o.offset, `offset of ${i}`);
82 assert.equal(e.headerBytes, o.headerBytes, `headerBytes of ${i}`);
83 assert.equal(e.compressed, o.compressed, `compressed of ${i}`);
84 assert.equal(e.size, o.size, `size of ${i}`);
85 assert.equal(e.storedType, o.wireType, `stored type of ${i}`);
86 assert.equal(e.base.tag, o.base.tag, `base of ${i}`);
87 if (o.base.tag === 'ofs') { assert.equal(e.base.offset, o.base.offset); assert.equal(idx.columns.offset[e.base.index], o.base.offset); }
88 if (o.base.tag === 'ref') assert.equal(e.base.oid, o.base.oid);
89 if (e.type !== null) assert.equal(e.type, o.type, `resolved type of ${i}`);
90 if (e.oid !== null) assert.equal(e.oid, o.oid, `oid of ${i}`);
91 if (o.base.tag === 'none') { assert.equal(e.type, o.wireType); assert.equal(e.base.tag, 'none'); }
92 }
95test('a pack of every whole type and an OFS chain matches describePack, for every chunking and both source kinds', async () => {
96 const base = te.encode('the quick brown fox '.repeat(40));
97 const v2 = te.encode('the quick brown fox jumps '.repeat(40));
98 const v3 = te.encode('the quick brown fox jumps over '.repeat(40));
99 const pack = await packOf([
100 { type: TYPE.COMMIT, data: te.encode('tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904\nauthor A <a@b> 0 +0000\ncommitter A <a@b> 0 +0000\n\nm\n') },
101 { type: TYPE.TREE, data: new Uint8Array(0) },
102 { type: TYPE.BLOB, data: base },
103 { type: TYPE.TAG, data: te.encode('object 4b825dc642cb6eb9a060e54bf8d69288fbee4904\ntype tree\ntag t\ntagger A <a@b> 0 +0000\n\nt\n') },
104 { data: insertDelta(base, v2), baseIndex: 2 },
105 { data: insertDelta(v2, v3), baseIndex: 4 },
106 ]);
107 const layout = must(describePack(pack));
108 const rng = new Rng(236);
109 let reference = null;
110 for (let round = 0; round < 8; round++) {
111 for (const chunks of feedings(pack, rng)) {
112 for (const source of [streamOf(chunks), iterOf(chunks)]) {
113 const idx = must(await scanPackIndex(source, { oids: true }));
114 assertMatchesLayout(idx, layout);
115 assert.deepEqual([...idx.columns.type], [TYPE.COMMIT, TYPE.TREE, TYPE.BLOB, TYPE.TAG, TYPE.BLOB, TYPE.BLOB]);
116 assert.equal(idx.bytes, pack.length);
117 if (reference === null) reference = rows(idx);
118 else assert.deepEqual(rows(idx), reference);
119 }
120 }
121 }
122});
124test('REF_DELTA: a whole base earlier or later in the pack resolves with oids on; absent, a delta base, or oids off is unknown', async () => {
125 const a = te.encode('alpha '.repeat(30));
126 const b = te.encode('alpha beta '.repeat(30));
127 const c = te.encode('alpha beta gamma '.repeat(30));
128 const aOid = hashObject('blob', a);
129 const bOid = hashObject('blob', b);
130 const absent = 'ab'.repeat(20);
131 const pack = await packOf([
132 { data: insertDelta(a, b), baseOid: aOid }, // 0: base later (entry 1)
133 { type: TYPE.BLOB, data: a }, // 1: whole
134 { data: insertDelta(a, c), baseOid: aOid }, // 2: base earlier
135 { data: insertDelta(a, te.encode('three')), baseOid: absent }, // 3: base absent (thin)
136 { data: insertDelta(b, te.encode('four')), baseOid: bOid }, // 4: base is entry 0, a delta: unknown without resolving
137 // distinct results: describePack keys resolved objects by oid, and git never packs one object twice
138 { data: insertDelta(c, te.encode('five')), baseIndex: 2 }, // 5: OFS onto a resolved REF delta
139 { data: insertDelta(c, te.encode('six')), baseIndex: 3 }, // 6: OFS onto an unknown one
140 ]);
141 const on = must(await scanPackIndex(streamOf([pack]), { oids: true }));
142 assert.deepEqual([...on.columns.type], [TYPE.BLOB, TYPE.BLOB, TYPE.BLOB, 0, 0, TYPE.BLOB, 0]);
143 assert.deepEqual([...on.columns.baseIndex], [1, -1, 1, -1, -1, 2, 3]);
144 const e0 = on.entry(0);
145 assert.equal(e0.tag, 'some');
146 assert.deepEqual(e0.value.base, { tag: 'ref', oid: aOid, index: 1 });
147 assert.equal(e0.value.oid, null);
148 assert.equal(on.entry(1).value.oid, aOid);
149 assert.equal(on.entry(3).value.type, null);
150 assert.equal(on.heldBytes, 7 * (SCAN_INDEX_ENTRY_BYTES + 20 + 20));
151 const off = must(await scanPackIndex(streamOf([pack]), { oids: false }));
152 assert.deepEqual([...off.columns.type], [0, TYPE.BLOB, 0, 0, 0, 0, 0]);
153 assert.equal(off.entry(1).value.oid, null);
154 assert.equal(off.heldBytes, 7 * (SCAN_INDEX_ENTRY_BYTES + 20));
155 assertMatchesLayout(on, must(describePack(pack)));
156 assert.equal(on.entry(7).tag, 'none');
157 assert.equal(on.entry(-1).tag, 'none');
158 assert.equal(on.entry(0.5).tag, 'none');
159});
161// git's own packs: the fixtures (every type, OFS, REF, an OFS chain, a thin pack) and this repository's objects, with
162// and without --delta-base-offset, against describePack and `git verify-pack -v`.
163const gitIn = (cwd, args, input) => execFileSync('git', args, { cwd, input, maxBuffer: 1 << 30 });
164function verifyPack(pack) {
165 const dir = mkdtempSync(join(tmpdir(), 'ply-scan-index-'));
166 try {
167 const file = join(dir, 'p.pack');
168 writeFileSync(file, pack);
169 gitIn(dir, ['index-pack', file]);
170 const out = gitIn(dir, ['verify-pack', '-v', join(dir, 'p.idx')]).toString();
171 const byOffset = new Map();
172 for (const line of out.split('\n')) {
173 const m = /^([0-9a-f]{40}) (commit|tree|blob|tag)\s+(\d+) (\d+) (\d+)/.exec(line);
174 if (m) byOffset.set(Number(m[5]), { oid: m[1], type: TYPE[m[2].toUpperCase()], inPack: Number(m[4]) });
175 }
176 return byOffset;
177 } finally { rmSync(dir, { recursive: true, force: true }); }
179async function againstGit(pack) {
180 const idx = must(await scanPackIndex(iterOf(splitRandom(new Rng(pack.length), pack, { allowEmpty: false })), { oids: true }));
181 assertMatchesLayout(idx, must(describePack(pack)));
182 const git = verifyPack(pack);
183 assert.equal(git.size, idx.count);
184 let known = 0;
185 for (const e of idx.entries()) {
186 const g = git.get(e.offset);
187 assert.ok(g, `git has no object at ${e.offset}`);
188 assert.equal(e.headerBytes + e.compressed, g.inPack, `size in pack at ${e.offset}`);
189 if (e.oid !== null) assert.equal(e.oid, g.oid);
190 if (e.type !== null) { assert.equal(e.type, g.type, `type at ${e.offset}`); known += 1; }
191 }
192 return { idx, known };
195test('git-written fixture packs: every type, OFS, REF, an OFS chain, match describePack and git verify-pack', async () => {
196 const { packs } = buildPacks();
197 for (const name of ['full', 'ofs', 'ref', 'chain']) {
198 const { idx, known } = await againstGit(packs[name].bytes);
199 assert.equal(known, idx.count, `${name}: every type is known`);
200 }
201 // a thin pack: its REF bases are outside it, so those types are unknown, never guessed
202 const thin = must(await scanPackIndex(streamOf([packs.thin.bytes]), { oids: true }));
203 assertMatchesLayout(thin, must(describePack(packs.thin.bytes)));
204 for (const e of thin.entries()) if (e.base.tag === 'ref' && e.base.index === -1) assert.equal(e.type, null);
205});
207test("this repository's objects, packed by git with OFS and with REF deltas, match describePack and git verify-pack", async () => {
208 const objects = gitIn(process.cwd(), ['rev-list', '--objects', 'HEAD', '-n', '400']);
209 for (const args of [['--delta-base-offset'], []]) {
210 const pack = new Uint8Array(gitIn(process.cwd(), ['pack-objects', '--stdout', '-q', ...args], objects));
211 const { idx, known } = await againstGit(pack);
212 // CI checks out shallow: a few hundred objects there, thousands in a full clone
213 assert.ok(idx.count > 100, `only ${idx.count} objects`);
214 // OFS chains rest on whole objects in the pack: all known. REF chains know every type whose base is whole.
215 if (args.length > 0) assert.equal(known, idx.count);
216 else assert.ok(known > 0);
217 }
218});
220test('a REF_DELTA-only pack (what Artifacts sends) resolves every depth-1 delta by default, at 71 bytes per entry', async () => {
221 const objects = gitIn(process.cwd(), ['rev-list', '--objects', 'HEAD', '-n', '400']);
222 const pack = new Uint8Array(gitIn(process.cwd(), ['pack-objects', '--stdout', '-q', '--depth=1', '--no-reuse-delta'], objects));
223 const idx = must(await scanPackIndex(iterOf(splitRandom(new Rng(7), pack, { allowEmpty: false }))));
224 const stored = [...idx.columns.storedType];
225 assert.equal(stored.includes(TYPE.OFS_DELTA), false);
226 const refs = stored.filter(t => t === TYPE.REF_DELTA).length;
227 assert.ok(refs > 0, 'git wrote no REF deltas');
228 // depth 1: every base is a whole object in the pack, so every type is known
229 assert.equal([...idx.columns.type].filter(t => t === 0).length, 0);
230 assert.equal(idx.heldBytes, idx.count * (SCAN_INDEX_ENTRY_BYTES + 20 + 20));
231 const git = verifyPack(pack);
232 for (const e of idx.entries()) assert.equal(e.type, git.get(e.offset).type);
233});
235test('selected content: whole objects the caller picks, in pack order, with their oid; others are not buffered', async () => {
236 const { packs } = buildPacks();
237 const seen = [];
238 const idx = must(await scanPackIndex(streamOf([packs.full.bytes]), {
239 oids: true,
240 content: {
241 select: h => h.type === TYPE.COMMIT || h.type === TYPE.TAG,
242 take: async (o, data) => { await Promise.resolve(); seen.push({ ...o, data: new TextDecoder().decode(data) }); },
243 },
244 }));
245 assert.deepEqual(seen.map(s => s.type), [TYPE.COMMIT, TYPE.TAG]);
246 for (const s of seen) {
247 const e = idx.entry(s.index).value;
248 assert.equal(s.oid, e.oid);
249 assert.equal(hashObject(s.type === TYPE.COMMIT ? 'commit' : 'tag', te.encode(s.data)), s.oid);
250 assert.equal(s.size, e.size);
251 }
252 // over maxObjectSize: refused before it is buffered, the source cancelled
253 let cancelled = 0;
254 const big = must(describePack(packs.full.bytes)).objects.reduce((m, o) => Math.max(m, o.size), 0);
255 const r = await scanPackIndex(streamOf(splitRandom(new Rng(3), packs.full.bytes, { allowEmpty: false }), () => { cancelled += 1; }), {
256 limits: withLimits({ maxObjectSize: big - 1 }),
257 content: { select: () => true, take: () => {} },
258 });
259 assert.equal(r.ok, false);
260 assert.equal(r.error.code, 'limit_exceeded');
261 assert.equal(r.error.what, 'selected object bytes');
262 assert.equal(cancelled, 1);
263});
265test('refusals: OFS base off an entry boundary, truncation at every cut, a bad trailer, corrupt zlib; each cancels the source', async () => {
266 const a = te.encode('alpha '.repeat(30));
267 const good = await packOf([{ type: TYPE.BLOB, data: a }, { type: TYPE.BLOB, data: te.encode('b') }]);
268 // the second object's OFS distance lands one byte into the first entry
269 const off = await packOf([{ type: TYPE.BLOB, data: a }, { data: insertDelta(a, a), ofsDistance: 0 }]);
270 const firstLen = must(describePack(good)).objects[0].headerBytes + must(describePack(good)).objects[0].compressed;
271 const offBoundary = await packOf([{ type: TYPE.BLOB, data: a }, { data: insertDelta(a, a), ofsDistance: firstLen - 1 }]);
272 const run = async bytes => scanPackIndex(streamOf([bytes]));
273 const r1 = await run(offBoundary);
274 assert.equal(r1.ok, false);
275 assert.equal(r1.error.code, 'pack_corrupt');
276 assert.match(r1.error.message, /ofs delta base not at object boundary 13/);
277 assert.equal((await run(off)).error.code, 'pack_corrupt');
278 // every truncation of a good pack is pack_corrupt
279 for (let cut = 0; cut < good.length; cut++) {
280 const r = await run(good.subarray(0, cut));
281 assert.equal(r.ok, false, `cut ${cut}`);
282 assert.equal(r.error.code, 'pack_corrupt', `cut ${cut}`);
283 }
284 const badTrailer = good.slice(); badTrailer[badTrailer.length - 1] ^= 1;
285 assert.match((await run(badTrailer)).error.message, /trailer sha mismatch/);
286 // verify off: the trailer is reported, not checked
287 assert.equal(must(await scanPackIndex(streamOf([badTrailer]), { verify: false })).count, 2);
288 const badZlib = good.slice(); badZlib[PACK_HEADER_BYTES + 3] ^= 0xff;
289 assert.equal((await run(badZlib)).error.code, 'pack_corrupt');
290 // a header that claims more objects than arrive
291 const lying = good.slice(); new DataView(lying.buffer).setUint32(8, 3);
292 assert.equal((await run(lying)).error.code, 'pack_corrupt');
293 // a refusal before the input ends cancels the source: the rest of it is never read
294 let cancelled = 0;
295 let pulled = 0;
296 const oneByte = Array.from(offBoundary, b => Uint8Array.of(b));
297 const counting = new ReadableStream({ pull(c) { if (pulled < oneByte.length) c.enqueue(oneByte[pulled++]); else c.close(); }, cancel() { cancelled += 1; } });
298 assert.equal((await scanPackIndex(counting)).error.code, 'pack_corrupt');
299 assert.equal(cancelled, 1);
300 assert.ok(pulled < oneByte.length, `read ${pulled} of ${oneByte.length} bytes`);
301 // an AsyncIterable source is closed (return()) on a refusal
302 let closed = false;
303 async function* gen() { try { yield offBoundary; } finally { closed = true; } }
304 assert.equal((await scanPackIndex(gen())).ok, false);
305 assert.equal(closed, true);
306 // limits a caller passes are checked before anything is read
307 const badLimits = await scanPackIndex(streamOf([good]), { limits: { maxPackObjects: -1 } });
308 assert.equal(badLimits.ok, false);
309});
311test('maxPackObjects refuses at the header; the columns never exceed the count that arrived', async () => {
312 const pack = await packOf(Array.from({ length: 3000 }, (_, i) => ({ type: TYPE.BLOB, data: te.encode(`${i}`) })));
313 const r = await scanPackIndex(streamOf([pack]), { limits: withLimits({ maxPackObjects: 2999 }) });
314 assert.equal(r.error.code, 'limit_exceeded');
315 // the options of one call never leak into the next: the defaults are a fresh record each time
316 const idx = must(await scanPackIndex(streamOf([pack])));
317 // oids on by default: 31 bytes of columns and a 20-byte oid per entry
318 assert.equal(idx.heldBytes, 3000 * (SCAN_INDEX_ENTRY_BYTES + 20));
319 assert.equal(idx.columns.size.length, 3000);
320});
322// The Abort contract (README): an aborted scan settles `aborted` when its signal fires, whichever of the caller's
323// awaits it is parked on: its source (a stream that served the pack header and then never another byte) or its content
324// sink (a take() that never settles). Expected values are the contract's: the code `aborted`, the stream cancelled
325// once, and take() called once (the first selected object) and never again.
326test('an aborted scan settles aborted while its source stalls mid-pack and while content.take never settles', async () => {
327 const { packs } = buildPacks();
328 const bytes = packs.full.bytes;
329 let cancelled = 0, reached;
330 let parked = new Promise(r => { reached = r; });
331 let served = false;
332 const stalled = new ReadableStream({
333 pull(c) { if (!served) { served = true; c.enqueue(bytes.subarray(0, 12)); return undefined; } reached(); return new Promise(() => {}); },
334 cancel() { cancelled++; },
335 }, { highWaterMark: 0 });
336 const a = new AbortController();
337 const scanA = scanPackIndex(stalled, { signal: a.signal });
338 await parked;
339 assert.equal(await settledWithin(scanA, 20), 'pending', 'parked on the source');
340 a.abort(new Error('stop'));
341 assert.equal(await settledWithin(scanA), 'settled', 'the source stalls');
342 const ra = await scanA;
343 assert.deepEqual({ code: ra.ok ? 'ok' : ra.error.code, cancelled }, { code: 'aborted', cancelled: 1 });
344 let takes = 0;
345 parked = new Promise(r => { reached = r; });
346 const b = new AbortController();
347 const scanB = scanPackIndex(streamOf([bytes]), { signal: b.signal, content: { select: () => true, take: () => { takes++; reached(); return new Promise(() => {}); } } });
348 await parked;
349 assert.equal(await settledWithin(scanB, 20), 'pending', 'parked on take');
350 b.abort(new Error('stop'));
351 assert.equal(await settledWithin(scanB), 'settled', 'take never settles');
352 const rb = await scanB;
353 assert.deepEqual({ code: rb.ok ? 'ok' : rb.error.code, takes }, { code: 'aborted', takes: 1 });
354});
Diagnostics4 git calls · 211 ms
CallStatusSizeTime0211 ms
discover200152 B3 ms
git.upload-pack discover
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=3
git.response.bytes=152
git.server.agent=gitty/1.0
git.server.object_format=sha1
git.server.caps=agent ls-refs fetch object-format
git.server.fetch=shallow filter sideband-all
git.protocol.version=2
git.pkt.frames=8
git.pkt.data=6
git.pkt.flush=2
git.pkt.delim=0
git.pkt.bytes=152
git.pkt.payload.max=34
ls-refs200145 B · hit3 ms
git.upload-pack ls-refs
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=ls-refs
git.upstream.dur_ms=3
git.response.bytes=145
git.response.cache=HIT
git.response.duration_ms=3
git.protocol.version=2
git.pkt.frames=3
git.pkt.data=2
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=145
git.pkt.payload.max=76
git.ls_refs.count=2
git.ls_refs.head=refs/heads/main
fetchblob:none · deepen 1020038 KiB · hit3 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=205
git.response.bytes=38434
git.response.cache=HIT
git.response.duration_ms=3
git.fetch.filter=blob:none
git.fetch.filter.requested=tree:0
git.fetch.filter.fallback=blob:none
git.fetch.filter.learned=false
git.fetch.wants=19912563f540228593df0c489082e5e2508e21e4
git.fetch.haves.count=0
git.fetch.deepen=10
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=6
git.pkt.data=4
git.pkt.flush=1
git.pkt.delim=1
git.pkt.bytes=38434
git.pkt.payload.max=38339
git.sideband.band1.bytes=38338
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0
git.pack.objects=63
git.pack.bytes=38338
git.pack.ofs_delta=0
git.pack.ref_delta=8
git.pack.chain.max=8
git.pack.trailer=0bc36ab7adf82d3109177f11f1ea93f1ce071f77
git.pack.full=55
Open pack map
fetch2006.3 KiB205 ms
git.upload-pack fetch
http.response.status_code=200
git.response.bytes=6410
git.response.cache=MISS
git.response.duration_ms=205
git.fetch.wants=be895c034abba772c357570fe1bb1003b3200c2f
git.fetch.haves.count=0
git.fetch.deepen=0
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=3
git.pkt.data=2
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=6410
git.pkt.payload.max=6389
git.sideband.band1.bytes=6388
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0

Each row is one HTTP round trip ply made to the git server for this page, on one timeline. discover asks what the server speaks, ls-refs lists branch tips, fetch brings objects by id. A hit was served by Workers Cache. Tap a row for its wire details.

Remote
https://5ad2236b39de4c8bd8f6270ea63f3ea9.artifacts.cloudflare.net/git/public-v0/ply.git
Ref
refs/heads/main
Commit
19912563f540228593df0c489082e5e2508e21e4
cf-ray
a5e2f59e7ce43a24
Request
83556832…
Protocol
v2 · sha1
Agent
gitty/1.0
Filter
advertised
Fetch
shallow filter sideband-all
Capabilities
agent ls-refs fetch object-format