GitHubivarvong

ply

main
ply7 git calls198 ms30 KiB4 cachedprotocol v2
269 lines19 KiBRaw
1// Telemetry-steered fuzz loop against real git.
2// node test/fuzz/run.mjs [--n 200] [--seed 1] [--case <seed>] [--out fuzz-out]
3// Every case: generate repo+edit from a seed (optionally steered toward an under-covered bucket),
4// run editFile against git http-backend, check git's truth, bucketize the OTLP spans, steer.
5import { join } from 'node:path';
6import { mkdirSync, writeFileSync, rmSync } from 'node:fs';
7import { git, gitBuf, tmpRoot, makeBareRepo, startGitServer, fsckProblems, initRepo } from '../server.js';
8import { Rng } from './prng.js';
9import { genCase, KNOBS } from './gen.js';
10import { editFile } from '../../src/edit.js';
11import { Tracer, flattenLine } from '../../src/otel.js';
12import { jsonlExporter } from '../jsonl.mjs';
13import { hashObject } from '../../src/objects.js';
14import { concat } from '../../src/bytes.js';
15import { unwrapAsync } from '../unwrap.js';
17const args = Object.fromEntries(process.argv.slice(2).map((a, i, arr) => a.startsWith('--') ? [a.slice(2), arr[i + 1] ?? true] : []).filter(x => x.length));
18const N = parseInt(args.n ?? process.env.FUZZ_N ?? '60', 10);
19const SEED = parseInt(args.seed ?? process.env.SEED ?? String(Date.now() % 1e9), 10);
20// The run seed, before any case: a clock-seeded run is replayable only if it says which seed the clock gave (#308).
21console.log(`run: seed ${SEED}, n ${N} replay: node --import ./test/ts-resolve.mjs test/fuzz/run.mjs --n ${N} --seed ${SEED}`);
22const OUT = args.out ?? 'fuzz-out';
23const ONLY = args.case ? parseInt(args.case, 10) : null;
24mkdirSync(OUT, { recursive: true });
26// ---- coverage buckets derived from spans (the steering signal) ----
27const log2b = v => (v <= 0 ? '0' : `2^${Math.floor(Math.log2(v))}`);
28export function buckets(spans) {
29 const b = new Set();
30 const root = spans.find(s => s.name === 'git.edit');
31 if (root) {
32 b.add(`outcome.${root.attrs['git.edit.outcome']}`);
33 b.add(`depth.${root.attrs['git.edit.path.depth']}`);
34 b.add(`cache_hits.${root.attrs['git.edit.tree.cache_hits'] ?? 0}`);
35 if (root.attrs['git.edit.push.ratio'] !== undefined) b.add(`push.ratio.${root.attrs['git.edit.push.ratio'] < 1 ? 'lt1' : root.attrs['git.edit.push.ratio'] < 10 ? 'lt10' : 'ge10'}`);
36 b.add(`mem.max_single.${log2b(root.attrs['mem.alloc.max_single'] ?? 0)}`);
37 }
38 for (const s of spans) {
39 const a = s.attrs;
40 if (s.name === 'git.upload-pack fetch') {
41 b.add(`fetch.filter.${a['git.fetch.filter'] || 'none'}`);
42 if (a['git.pack.inflate.stored'] > 0) b.add('inflate.stored');
43 if (a['git.pack.inflate.fixed'] > 0) b.add('inflate.fixed');
44 if (a['git.pack.inflate.dynamic'] > 0) b.add('inflate.dynamic');
45 if (a['git.pkt.carry.max'] > 0) b.add('pkt.carry');
46 if (a['git.pkt.payload.max'] >= 65516) b.add('pkt.max_payload');
47 if (a['http.response.chunks'] > 1) b.add('http.multi_chunk');
48 if (a['git.sideband.band2.frames'] > 0) b.add('sideband.band2');
49 if (a['git.fetch.shallow']?.length) b.add('fetch.shallow');
50 if (a['git.pack.objects'] !== undefined) b.add(`pack.objects.${log2b(a['git.pack.objects'])}`);
51 if (a['git.pack.chain.max'] > 0) b.add(`pack.chain.${a['git.pack.chain.max']}`);
52 }
53 if (s.name === 'git.edit.tree') {
54 b.add(`tree.entries.${log2b(a['git.edit.tree.entries'])}`);
55 b.add(`tree.mode.${a['git.edit.tree.entry.mode']}`);
56 if (a['git.edit.tree.cache_hit']) b.add('tree.cache_hit');
57 if (!a['git.edit.tree.entry.found']) b.add('tree.entry.missing');
58 }
59 if (s.name === 'git.edit.blob') {
60 b.add(`blob.base_len.${log2b(a['git.edit.blob.base_len'])}`);
61 if (a['git.edit.blob.scan.chunks'] > 1) b.add('scan.multi_chunk');
62 if (a['git.edit.blob.scan.chunks'] > 8) b.add('scan.many_chunks');
63 b.add(`scan.matches.${Math.min(3, a['git.edit.blob.scan.matches'])}`);
64 const off = a['git.edit.blob.match_offset'], cm = a['git.edit.blob.scan.chunk.max'];
65 if (off !== undefined && cm > 0 && off % cm > cm - 8) b.add('scan.match_crosses_chunk');
66 if (a['git.edit.blob.delta.copy_ops'] >= 3) b.add('delta.copy_ops>=3');
67 if (a['git.edit.blob.delta.insert_ops'] >= 2) b.add('delta.insert_ops>=2');
68 if (a['git.edit.blob.delta.insert_ops'] === 0) b.add('delta.insert_ops=0');
69 if (a['git.edit.blob.base_len'] === 0) b.add('blob.empty');
70 if (a['git.edit.blob.new_len'] === 0) b.add('blob.new_empty');
71 if (a['git.edit.blob.new_len'] < a['git.edit.blob.base_len']) b.add('blob.shrinks');
72 }
73 if (s.name === 'git.receive-pack') {
74 b.add(`push.objects.${a['git.push.pack.objects']}`);
75 b.add(`push.bytes.${log2b(a['git.push.pack.bytes'])}`);
76 if (a['git.push.ng.reason']) b.add('push.ng');
77 }
78 if (s.status?.code === 2) b.add(`error.${a['error.type'] ?? 'unknown'}`);
79 }
80 return b;
83// bucket → knob hints that are likely to reach it
84const TARGETS = {
85 'inflate.stored': { compression: '0' }, 'inflate.fixed': { blob: 'tiny' }, 'inflate.dynamic': { blob: 'text' },
86 'scan.multi_chunk': { blob: 'big' }, 'scan.many_chunks': { blob: 'big' }, 'scan.match_crosses_chunk': { blob: 'big', pos: 'chunk16k' },
87 'pkt.carry': { blob: 'big' }, 'pkt.max_payload': { blob: 'big' }, 'http.multi_chunk': { blob: 'big' },
88 'delta.copy_ops>=3': { blob: 'big', pos: 'middle' }, 'delta.insert_ops>=2': { replace: 'over127' }, 'delta.insert_ops=0': { replace: 'empty' },
89 'blob.empty': { blob: 'empty', pos: 'start', outcome: 'ok' }, 'blob.new_empty': { blob: 'empty', replace: 'empty', outcome: 'ok' }, 'blob.shrinks': { replace: 'shorter' },
90 'tree.entries.2^4': { siblings: 'many' }, 'tree.entries.2^5': { siblings: 'many' }, 'tree.mode.100755': { mode: '100755', outcome: 'ok' }, 'tree.cache_hit': { outcome: 'ok' }, 'server.bitmap': { server: 'bitmap' }, 'server.midx-bitmap': { server: 'midx-bitmap' }, 'server.mixed': { server: 'mixed' }, 'server.packed': { server: 'packed' },
91 'outcome.ok': { outcome: 'ok' }, 'outcome.noop': { replace: 'identical', outcome: 'ok' }, 'outcome.match_count': { outcome: 'zero_matches' }, 'outcome.not_found': { outcome: 'missing_path' }, 'outcome.cas_conflict': { outcome: 'cas_conflict' },
92 'scan.matches.2': { outcome: 'two_matches' }, 'scan.matches.0': { outcome: 'zero_matches' },
93 ...Object.fromEntries(KNOBS.depth.map(d => [`depth.${d}`, { depth: d }])),
94 'fetch.shallow': { history: '2' }, 'push.ratio.lt1': { blob: 'big', replace: 'same' }, 'push.ratio.ge10': { blob: 'tiny', replace: 'huge' },
95 'sortedge': { siblings: 'sortedge' }, 'compression.9': { compression: '9' }, 'compression.1': { compression: '1' },
96};
98// ---- one case ----
99// One fast-import stream onto refs/heads/main: each commit adds/replaces `files` on top of the previous tree.
100const te = new TextEncoder();
101const cquote = p => '"' + [...te.encode(p)].map(b => b === 0x22 ? '\\"' : b === 0x5c ? '\\\\' : b < 0x20 || b >= 0x7f ? '\\' + b.toString(8).padStart(3, '0') : String.fromCharCode(b)).join('') + '"';
102function commits(dir, list, fromExisting = false) {
103 const parts = [];
104 list.forEach(({ who, msg, files }, i) => {
105 parts.push(te.encode(`commit refs/heads/main\ncommitter ${who} <${who}@x> now\ndata ${te.encode(msg).length}\n${msg}\n`));
106 if (i === 0 && fromExisting) parts.push(te.encode('from refs/heads/main^0\n'));
107 for (const [p, v] of Object.entries(files)) {
108 const d = v.symlink ? te.encode(v.symlink) : typeof v.data === 'string' ? te.encode(v.data) : v.data;
109 parts.push(te.encode(`M ${v.symlink ? '120000' : v.mode} inline ${cquote(p)}\ndata ${d.length}\n`), d, te.encode('\n'));
110 }
111 });
112 parts.push(te.encode('done\n'));
113 // core.ignorecase=false: `git init` sets it on macOS, and fast-import would then fold `A` into `a` (one entry, not two)
114 gitBuf(dir, ['-c', 'core.ignorecase=false', 'fast-import', '--quiet', '--date-format=now', '--done'], concat(parts));
117async function runCase(ctx, seed, hints) {
118 const rng = new Rng(seed);
119 const c = genCase(rng, hints);
120 const name = `c${seed}`;
121 const bare = makeBareRepo(ctx.root, name);
122 git(bare, ['config', 'core.compression', String(c.compression)]);
123 git(bare, ['config', 'pack.compression', String(c.compression)]);
124 const work = join(ctx.root, `w${seed}`); mkdirSync(work); initRepo(work);
125 // Commits are built with `git fast-import`, never a checkout: case-only twins (`a/` beside `A`), valid in git, would
126 // collide in a worktree on a case-insensitive filesystem (macOS) and crash the harness. Modes and symlinks go in as-is.
127 const commit = (who, msg, files, fromExisting = false) => commits(work, [{ who, msg, files }], fromExisting);
128 // history: earlier commits with a different version of the target so trees/blobs have ancestry
129 const plan = [];
130 for (let h = 1; h < c.history; h++) plan.push({ who: 'h', msg: `h${h}`, files: { ...(h === 1 ? c.files : {}), [`hist${h}.txt`]: { mode: '100644', data: rng.bytes(rng.int(0, 50)) } } });
131 plan.push({ who: 'seed', msg: 'seed', files: c.files });
132 commits(work, plan);
133 git(work, ['push', '-q', bare, 'HEAD:refs/heads/main']);
134 // server object-store shape: GitHub serves from packed, bitmapped, multi-pack-indexed stores
135 switch (c.knobs.server) {
136 case 'packed': git(bare, ['-c', 'repack.writeBitmaps=false', 'gc', '-q']); break;
137 case 'bitmap': git(bare, ['-c', 'repack.writeBitmaps=true', 'gc', '-q']); break;
138 case 'midx-bitmap': git(bare, ['-c', 'repack.writeBitmaps=false', 'gc', '-q']); git(bare, ['multi-pack-index', 'write', '--bitmap']); git(bare, ['config', 'core.multiPackIndex', 'true']); break;
139 case 'mixed': git(bare, ['-c', 'repack.writeBitmaps=true', 'gc', '-q']); commit('l', 'late', { 'late.txt': { mode: '100644', data: 'late' } }, true); git(work, ['push', '-q', bare, 'HEAD:refs/heads/main']); break; // bitmapped pack + loose objects on top
140 }
141 const oldHead = git(bare, ['rev-parse', 'main']).trim();
143 const lines = [];
144 const tracer = new Tracer({ exporter: l => { lines.push(l); ctx.trace(l); }, resource: { 'fuzz.seed': seed } });
145 // CAS conflict injection: move main between our ls-refs and our push.
146 let raced = null;
147 const fetchImpl = c.knobs.outcome === 'cas_conflict' ? async (url, init) => {
148 if (url.endsWith('/git-receive-pack') && !raced) { commit('r', 'race', { 'race.txt': { mode: '100644', data: 'race' } }, true); git(work, ['push', '-q', bare, 'HEAD:refs/heads/main']); raced = git(bare, ['rev-parse', 'main']).trim(); }
149 return fetch(url, init);
150 } : undefined;
151 const cache = new Map();
152 let result = null, err = null;
153 const t0 = performance.now();
154 try {
155 result = await unwrapAsync(editFile(`${ctx.url}/${name}.git`, { path: c.editPath, find: c.find, replace: c.replace, author: { name: 'fuzz', email: 'fuzz@x' }, message: `fuzz ${seed}` }, { tracer, cache, fetchImpl }));
156 } catch (e) { err = e; }
157 const ms = performance.now() - t0;
158 const spans = lines.flatMap(flattenLine);
159 const head = git(bare, ['rev-parse', 'main']).trim();
160 const problems = [];
161 const outcome = err ? (err.code ?? 'error') : result?.noop ? 'noop' : 'ok';
162 if (outcome !== c.expected) problems.push(`expected ${c.expected}, got ${outcome}: ${err?.message ?? ''}`);
163 if (c.knobs.outcome === 'cas_conflict' && c.expected === 'ok' && !err) {
164 const roots = spans.filter(s => s.name === 'git.edit').sort((a, b) => a.attrs['git.edit.attempt'] - b.attrs['git.edit.attempt']);
165 if (result.attempt !== 1) problems.push(`race absorbed without a retry (attempt ${result.attempt})`);
166 if (roots.length !== 2 || roots[0].attrs['git.edit.outcome'] !== 'cas_conflict' || roots[1].attrs['git.edit.outcome'] !== 'ok') problems.push(`roots ${roots.map(r => r.attrs['git.edit.outcome']).join(',')}, expected cas_conflict,ok`);
167 if (roots[1] && (roots[1].links?.[0]?.spanId !== roots[0]?.spanId)) problems.push('retry root not linked to the lost attempt');
168 if (result.oldCommit !== raced) problems.push(`retry parent ${result.oldCommit} is not the racer's commit ${raced}`);
169 }
170 if (c.expected === 'ok' && !err) {
171 const expectedBlob = concat([c.blob.subarray(0, c.off), c.replace, c.blob.subarray(c.off + c.find.length)]);
172 if (head !== result.newCommit) problems.push('ref not advanced to new commit');
173 const got = gitBuf(bare, ['cat-file', 'blob', `main:${c.path}`]);
174 if (!Buffer.from(got).equals(Buffer.from(expectedBlob))) problems.push('blob content mismatch');
175 if (hashObject('blob', expectedBlob) !== result.newBlob) problems.push('newBlob oid mismatch');
176 const base = raced ?? oldHead; // after an absorbed race the parent is the racer's commit
177 const changed = git(bare, ['diff', '--name-only', '-z', base, head]).split('\0').filter(Boolean);
178 if (changed.length !== 1 || changed[0] !== c.path) problems.push(`diff touched ${JSON.stringify(changed)}`);
179 const log = git(bare, ['log', '-1', '--format=%P|%an|%ae|%s', head]).trim();
180 if (log !== `${base}|fuzz|fuzz@x|fuzz ${seed}`) problems.push(`commit metadata ${log}`);
181 if (git(bare, ['rev-parse', `${head}^{tree}`]).trim() !== result.newTree) problems.push('tree oid mismatch');
182 const fsck = fsckProblems(bare); if (fsck.length) problems.push(`fsck: ${fsck.join(' | ')}`); // --no-dangling: receive-pack unpacks before the CAS, so a lost attempt leaves dangling objects by design
183 const mode = git(bare, ['ls-tree', head, '--', c.path]).split(' ')[0]; if (mode !== c.files[c.path].mode) problems.push(`mode changed ${mode}`);
184 // efficiency: push bytes bounded by the edit, not the file; memory O(1) in file size
185 const depth = c.path.split('/').length;
186 // commit ~220B + per-level tree delta ≤ 80B + blob delta: insert bytes + 1 op byte/127 + zlib block overhead + copy ops per 64K of base
187 const bound = 220 + 80 * depth + c.replace.length + Math.ceil(c.replace.length / 127) + 5 * Math.ceil(c.replace.length / 16384) + 16 * Math.ceil(c.blob.length / 65536) + 40;
188 if (result.pushBytes > bound) problems.push(`push ${result.pushBytes}B exceeds bound ${bound}B`);
189 const root = spans.find(s => s.name === 'git.edit');
190 const maxSingle = root.attrs['mem.alloc.max_single'];
191 if (maxSingle > 70000 + c.find.length + c.replace.length) problems.push(`max single alloc ${maxSingle} not O(1)`);
192 // second edit on the new head must hit the tree cache for every level
193 const r2lines = []; const t2 = new Tracer({ exporter: l => r2lines.push(l) });
194 try {
195 const find2 = c.replace;
196 const occ = find2.length ? countOcc(expectedBlob, find2) : 0;
197 if (occ === 1) {
198 const j = Buffer.from(expectedBlob).indexOf(Buffer.from(find2));
199 const undoExpected = concat([expectedBlob.subarray(0, j), c.find, expectedBlob.subarray(j + find2.length)]);
200 await unwrapAsync(editFile(`${ctx.url}/${name}.git`, { path: c.path, find: find2, replace: c.find, author: { name: 'fuzz', email: 'fuzz@x' }, message: 'undo' }, { tracer: t2, cache }));
201 const hits = r2lines.flatMap(flattenLine).find(s => s.name === 'git.edit').attrs['git.edit.tree.cache_hits'];
202 if (hits !== depth) problems.push(`second edit cache hits ${hits} != ${depth}`);
203 const back = gitBuf(bare, ['cat-file', 'blob', `main:${c.path}`]);
204 if (!Buffer.from(back).equals(Buffer.from(undoExpected))) problems.push('second edit content mismatch');
205 for (const l of r2lines) { ctx.trace(l); lines.push(l); }
206 }
207 } catch (e) { problems.push(`second edit failed: ${e.message}`); }
208 } else {
209 if (head !== (raced ?? oldHead)) problems.push('ref moved on failed/noop edit');
210 if (c.expected === 'noop' && !err && spans.some(s => s.name === 'git.receive-pack')) problems.push('noop edit pushed');
211 }
212 rmSync(bare, { recursive: true, force: true }); rmSync(work, { recursive: true, force: true });
213 return { seed, knobs: c.knobs, hints, outcome, expected: c.expected, problems, ms, buckets: buckets(lines.flatMap(flattenLine)), blobLen: c.blob.length, pushBytes: result?.pushBytes, lines };
215const countOcc = (hay, n) => { let c = 0, i = -1; const s = Buffer.from(hay), t = Buffer.from(n); while ((i = s.indexOf(t, i + 1)) >= 0) c++; return c; };
217// ---- loop ----
218const { root, cleanup } = tmpRoot();
219const srv = await startGitServer(root);
220const traceOut = await jsonlExporter(join(OUT, 'trace.jsonl'));
221const ctx = { root, url: srv.url, trace: traceOut };
222const cov = new Map();
223const fails = [];
224const seen = [];
225const steer = new Rng(SEED ^ 0xabcdef);
226let totalMs = 0;
227try {
228 const seeds = ONLY !== null ? [ONLY] : Array.from({ length: N }, (_, i) => (SEED * 7919 + i * 104729) >>> 0);
229 for (let i = 0; i < seeds.length; i++) {
230 let hints = {};
231 if (ONLY === null && i > 2) {
232 const r = steer.float();
233 if (r < 0.55) { // least-covered target
234 const ranked = Object.keys(TARGETS).map(t => [t, cov.get(t) ?? 0]).sort((a, b) => a[1] - b[1]);
235 const pool = ranked.slice(0, Math.max(3, Math.ceil(ranked.length / 4)));
236 const [t] = steer.pick(pool); hints = { ...TARGETS[t], __target: t };
237 } else if (r < 0.75 && seen.length) { // mutate a rare-bucket case
238 const rare = seen.filter(s => [...s.buckets].some(b => (cov.get(b) ?? 0) <= 2));
239 const parent = steer.pick(rare.length ? rare : seen);
240 const knob = steer.pick(Object.keys(KNOBS));
241 hints = { ...parent.knobs, [knob]: steer.pick(KNOBS[knob]), __target: `mutate:${parent.seed}:${knob}` };
242 }
243 }
244 const r = await runCase(ctx, seeds[i], hints);
245 totalMs += r.ms;
246 for (const b of r.buckets) cov.set(b, (cov.get(b) ?? 0) + 1);
247 for (const b of ['sortedge', 'compression.9', 'compression.1']) if ((b === 'sortedge' && r.knobs.siblings === 'sortedge') || b === `compression.${r.knobs.compression}`) cov.set(b, (cov.get(b) ?? 0) + 1);
248 cov.set(`server.${r.knobs.server}`, (cov.get(`server.${r.knobs.server}`) ?? 0) + 1);
249 seen.push({ seed: r.seed, knobs: r.knobs, buckets: r.buckets });
250 const newB = [...r.buckets].filter(b => cov.get(b) === 1);
251 const tag = r.problems.length ? 'FAIL' : 'ok ';
252 process.stdout.write(`${tag} #${String(i).padStart(3)} seed=${r.seed} ${r.outcome.padEnd(13)} ${String(r.ms | 0).padStart(5)}ms blob=${String(r.blobLen).padStart(7)} push=${String(r.pushBytes ?? '-').padStart(5)} ${hints.__target ? '← ' + hints.__target : ''}${newB.length ? ' NEW:' + newB.join(',') : ''}\n`);
253 if (r.problems.length) {
254 fails.push(r);
255 const fp = join(OUT, `fail-${r.seed}.jsonl`);
256 writeFileSync(fp, r.lines.map(l => JSON.stringify(l)).join('\n') + '\n');
257 console.log(` ${r.problems.join('\n ')}\n knobs=${JSON.stringify(r.knobs)}\n repro: node test/fuzz/run.mjs --case ${r.seed} trace: ${fp}`);
258 }
259 }
260} finally {
261 traceOut.close(); await srv.close(); cleanup();
263console.log(`\n${seeds_len(seen)} cases, ${(totalMs / 1000).toFixed(1)}s edit time, ${fails.length} failures. Coverage (${cov.size} buckets):`);
264const rows = [...cov.entries()].sort((a, b) => a[1] - b[1] || a[0].localeCompare(b[0]));
265console.log(rows.map(([k, v]) => `${String(v).padStart(4)} ${k}`).join('\n'));
266const unreached = Object.keys(TARGETS).filter(t => !cov.has(t));
267if (unreached.length) console.log(`\nUNREACHED targets: ${unreached.join(', ')}`);
268function seeds_len(s) { return s.length; }
269process.exit(fails.length ? 1 : 0);
Diagnostics7 git calls · 198 ms
CallStatusSizeTime0198 ms
discover200191 B3 ms
git.upload-pack discover
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=2
git.response.bytes=191
git.server.agent=git/github-9922ec520325-Linux
git.server.object_format=sha1
git.server.caps=agent ls-refs fetch server-option object-format
git.server.fetch=shallow wait-for-done filter
git.protocol.version=2
git.pkt.frames=9
git.pkt.data=7
git.pkt.flush=2
git.pkt.delim=0
git.pkt.bytes=191
git.pkt.payload.max=36
ls-refs20012 KiB2 ms
git.upload-pack ls-refs
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=ls-refs
git.upstream.dur_ms=2
git.response.bytes=11990
git.response.cache=UPDATING
git.response.duration_ms=2
git.protocol.version=2
git.pkt.frames=152
git.pkt.data=151
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=11990
git.pkt.payload.max=122
git.ls_refs.count=151
git.ls_refs.head=refs/heads/main
fetchtree:0 · deepen 102004.2 KiB · hit2 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=5
git.response.bytes=4347
git.response.cache=HIT
git.response.duration_ms=2
git.fetch.filter=tree:0
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=7
git.pkt.data=5
git.pkt.flush=1
git.pkt.delim=1
git.pkt.bytes=4347
git.pkt.payload.max=4247
git.sideband.band1.bytes=4247
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0
git.pack.objects=10
git.pack.bytes=4247
git.pack.ofs_delta=0
git.pack.ref_delta=0
git.pack.chain.max=0
git.pack.trailer=a6caf8e129bea82c9bae4cbc7c130c9205add400
git.pack.full=10
Open pack map
fetchtree:0200919 B · hit5 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=2
git.response.bytes=919
git.response.cache=HIT
git.response.duration_ms=5
git.fetch.filter=tree:0
git.fetch.wants=800d30ba8923860bfc460ca884b7f9ba22083588
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=4
git.pkt.data=3
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=919
git.pkt.payload.max=892
git.sideband.band1.bytes=892
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0
git.pack.objects=1
git.pack.bytes=892
git.pack.trailer=5323b9266eea5ded637285d1c5320699f12be76e
Open pack map
fetchtree:02005.6 KiB · hit2 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=8
git.response.bytes=5724
git.response.cache=HIT
git.response.duration_ms=2
git.fetch.filter=tree:0
git.fetch.wants=58fabb6768b3f737ee9cd8bac647bdc27405fb4d
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=4
git.pkt.data=3
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=5724
git.pkt.payload.max=5697
git.sideband.band1.bytes=5697
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0
git.pack.objects=1
git.pack.bytes=5697
git.pack.trailer=be7e0453974a5fe832f9065a33bb7e3434c10e9b
Open pack map
fetchtree:0200853 B · hit8 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=177
git.response.bytes=853
git.response.cache=HIT
git.response.duration_ms=8
git.fetch.filter=tree:0
git.fetch.wants=fb781d4e4fd58ededa1f1078d937de6f4b1316a2
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=4
git.pkt.data=3
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=853
git.pkt.payload.max=826
git.sideband.band1.bytes=826
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0
git.pack.objects=1
git.pack.bytes=826
git.pack.trailer=c89bc485f6ad08d875fc515f3fdd69897096847b
Open pack map
fetch2006.7 KiB178 ms
git.upload-pack fetch
http.response.status_code=200
git.response.bytes=6854
git.response.cache=MISS
git.response.duration_ms=178
git.fetch.wants=74b3b4320162c5d5455992f6bd32b7577dec3fc6
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=4
git.pkt.data=3
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=6854
git.pkt.payload.max=6827
git.sideband.band1.bytes=6827
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://github.com/ivarvong/ply
Ref
refs/heads/main
Commit
19912563f540228593df0c489082e5e2508e21e4
cf-ray
a5e171fedf0d6102
Request
d85bb889…
Protocol
v2 · sha1
Agent
git/github-9922ec520325-Linux
Filter
advertised
Fetch
shallow wait-for-done filter
Capabilities
agent ls-refs fetch server-option object-format