main
1// Semantic-lie fuzz: the server answers with WELL-FORMED protocol bytes that are wrong. No corruption the parsers
2// can see — only the client's content checks (oid verification, size contracts, CAS) stand between a lie and a bad push.
3// Every lie is built from real objects taken from a second repo or an older commit of the same repo.
4// node test/fuzz/liar.mjs [--n 200] [--seed 1] [--case <seed>] [--op edit|mergebase|mixed]
5// Two families. `edit`: editFile on a fixed two-commit repo (LIES). `mergebase` (issue #18): mergeBase / mergeBranch on a
6// random DAG (dag.js) behind a server that answers the commit-only `tree:0` + `deepen` walks with a cut history
7// (MERGE_LIES): ancestors omitted without a `shallow` line, omitted beside honest shallow lines, a consistent shallower
8// cut, the want itself missing, an unrequested commit, a tree in a tree:0 pack. Oracle: `git merge-base --all` and
9// `git merge-tree --write-tree`. A lied-to run must end in a typed error or exactly git's bases; an honest run must
10// equal git's bases (set equality, criss-cross included); a merge that lands must be the one git produces (I21).
11import { join } from 'node:path';
12import { mkdirSync, rmSync } from 'node:fs';
13import { spawnSync } from 'node:child_process';
14import { git, gitBuf, tmpRoot, makeBareRepo, startGitServer, commitFiles, fsckProblems, initRepo } from '../server.js';
15import { startProxy } from '../proxy.js';
16import { Rng } from './prng.js';
17import { genDag, readModel } from './dag.js';
18import { MERGE_LIES, mergeLie, fetchResponse, pktLine, FLUSH } from './mergelies.js';
19import { editFile } from '../../src/edit.js';
20import { mergeBase, mergeBranch } from '../../src/merge.js';
21import { createTransport as createTransportR } from '../../src/http.js';
22import { Tracer, arrayExporter, flattenLine } from '../../src/otel.js';
23import { withLimits } from '../../src/limits.js';
24import { TYPE } from '../../src/objects.js';
25import { concat, te } from '../../src/bytes.js';
26import { unwrapAsync } from '../unwrap.js';
28import { unwrap } from '../unwrap.js';
29// Throwing adapters over the Result API (0.2.0): the assertions below are about the throw.
30const createTransport = (...a) => unwrap(createTransportR(...a));
31const args = Object.fromEntries(process.argv.slice(2).map((a, i, arr) => a.startsWith('--') ? [a.slice(2), arr[i + 1] ?? true] : []).filter(x => x.length));
32const N = parseInt(args.n ?? '200', 10), SEED = parseInt(args.seed ?? String(Date.now() % 1e9), 10), ONLY = args.case ? parseInt(args.case, 10) : null;
33// The run seed, before any case: a clock-seeded run is replayable only if it says which seed the clock gave (#308).
34console.log(`liar: seed ${SEED}, n ${N} replay: node --import ./test/ts-resolve.mjs test/fuzz/liar.mjs --n ${N} --seed ${SEED}`);
35const OP = args.op ?? 'mixed';
36if (!['edit', 'mergebase', 'mixed'].includes(OP)) throw new Error(`--op must be edit, mergebase or mixed, not ${OP}`);
37const CODES = new Set(['pack_corrupt', 'protocol', 'network', 'timeout', 'aborted', 'not_git', 'auth', 'not_found', 'rate_limited', 'upstream_5xx', 'http', 'limit_exceeded', 'remote_error', 'match_count', 'cas_conflict', 'push_rejected', 'bad_request', 'unsupported', 'ambiguous', 'merge_conflict', 'unrelated_histories', 'not_fast_forward']);
39const obj = (bare, oid) => { const t = git(bare, ['cat-file', '-t', oid]).trim(); return { type: TYPE[t.toUpperCase()], data: new Uint8Array(gitBuf(bare, ['cat-file', t, oid])) }; };
41const FILE = 'a/b/target.txt', ORIG = 'before MARK after\n', EXPECTED = 'before XX after\n';
43// Lies. Each takes the real repo state + a decoy repo and returns a fault function for the proxy.
44const LIES = {
45 // ls-refs points at an older commit (server lagging / replica split-brain). Legit: edit lands on that base; CAS protects.
46 'ls-refs:old-commit': (R, D) => ctx => ctx.stage === 'ls-refs' ? { type: 'bytes', bytes: concat([pktLine(`${R.older} refs/heads/main\n`), FLUSH]), name: 'ls-refs old' } : { type: 'pass' },
47 // ls-refs points at a commit from an unrelated repo (that the server does not have).
48 'ls-refs:foreign-commit': (R, D) => ctx => ctx.stage === 'ls-refs' ? { type: 'bytes', bytes: concat([pktLine(`${D.head} refs/heads/main\n`), FLUSH]), name: 'ls-refs foreign' } : { type: 'pass' },
49 // ls-refs says one thing, then the push's CAS must notice the server never had that commit as main.
50 'ls-refs:fabricated-oid': (R, D) => ctx => ctx.stage === 'ls-refs' ? { type: 'bytes', bytes: concat([pktLine(`${'a'.repeat(40)} refs/heads/main\n`), FLUSH]), name: 'ls-refs fake' } : { type: 'pass' },
51 // commit fetch returns a different (older) commit object than the one wanted.
52 'commit:wrong-object': (R, D) => ctx => ctx.stage === 'fetch' && ctx.n === 0 ? { type: 'bytes', bytes: fetchResponse([obj(R.bare, R.older)], { shallow: [R.older] }), name: 'wrong commit' } : { type: 'pass' },
53 // commit fetch returns the decoy repo's commit: wrong oid, wrong tree.
54 'commit:foreign-object': (R, D) => ctx => ctx.stage === 'fetch' && ctx.n === 0 ? { type: 'bytes', bytes: fetchResponse([obj(D.bare, D.head)], { shallow: [D.head] }), name: 'foreign commit' } : { type: 'pass' },
55 // tree fetch at some level returns a tree with the same name present but pointing at a different blob (decoy content).
56 'tree:swapped-entry': (R, D) => ctx => ctx.stage === 'fetch' && ctx.n === R.leafLevel ? { type: 'bytes', bytes: fetchResponse([obj(D.bare, D.leafTree)]), name: 'swapped tree' } : { type: 'pass' },
57 // tree fetch returns the right tree bytes but for the wrong level (root instead of leaf).
58 'tree:wrong-level': (R, D) => ctx => ctx.stage === 'fetch' && ctx.n === R.leafLevel ? { type: 'bytes', bytes: fetchResponse([obj(R.bare, R.rootTree)]), name: 'wrong level' } : { type: 'pass' },
59 // blob fetch returns a different blob of the SAME size (so header size matches; only content differs).
60 'blob:same-size-other-content': (R, D) => ctx => ctx.stage === 'fetch' && ctx.n === R.blobFetch ? { type: 'bytes', bytes: fetchResponse([{ type: TYPE.BLOB, data: te.encode(ORIG.replace('MARK', 'MARX')) }]), name: 'blob same size' } : { type: 'pass' },
61 // blob fetch returns a same-size blob whose content still contains the needle elsewhere: the client scans, finds exactly one
62 // match, computes a delta against the CLAIMED base oid and pushes. The server holds the real base: the delta's base-size
63 // check or the resulting object hash must fail. Outcome must be a rejection, never a committed wrong file.
64 'blob:same-size-needle-kept': (R, D) => ctx => ctx.stage === 'fetch' && ctx.n === R.blobFetch ? { type: 'bytes', bytes: fetchResponse([{ type: TYPE.BLOB, data: te.encode('MARK before after\n') }]), name: 'blob needle kept' } : { type: 'pass' },
65 // blob fetch returns a DIFFERENT-size blob with the needle: size contract vs header is what must catch it.
66 'blob:other-size-needle-kept': (R, D) => ctx => ctx.stage === 'fetch' && ctx.n === R.blobFetch ? { type: 'bytes', bytes: fetchResponse([{ type: TYPE.BLOB, data: te.encode('x MARK y\n') }]), name: 'blob other size' } : { type: 'pass' },
67 // blob fetch returns the OLD version of the file (server serving stale object store).
68 'blob:stale-version': (R, D) => ctx => ctx.stage === 'fetch' && ctx.n === R.blobFetch ? { type: 'bytes', bytes: fetchResponse([obj(R.bare, R.olderBlob)]), name: 'stale blob' } : { type: 'pass' },
69 // blob fetch returns a tree object instead.
70 'blob:tree-instead': (R, D) => ctx => ctx.stage === 'fetch' && ctx.n === R.blobFetch ? { type: 'bytes', bytes: fetchResponse([obj(R.bare, R.rootTree)]), name: 'tree for blob' } : { type: 'pass' },
71 // blob fetch returns two objects (the blob plus junk) in a well-formed pack.
72 'blob:extra-object': (R, D) => ctx => ctx.stage === 'fetch' && ctx.n === R.blobFetch ? { type: 'bytes', bytes: fetchResponse([obj(R.bare, R.blob), obj(R.bare, R.rootTree)]), name: 'extra object' } : { type: 'pass' },
73 // every fetch answers with an empty (0-object) well-formed pack.
74 'fetch:empty-pack': (R, D) => ctx => ctx.stage === 'fetch' ? { type: 'bytes', bytes: fetchResponse([]), name: 'empty pack' } : { type: 'pass' },
75 // receive-pack says ok but did nothing (lying report).
76 'push:fake-ok': (R, D) => ctx => ctx.stage === 'receive-pack' ? { type: 'bytes', bytes: concat([pktLine('unpack ok\n'), pktLine('ok refs/heads/main\n'), FLUSH]), name: 'fake ok', noForward: true } : { type: 'pass' },
77 // receive-pack reports ok for a different ref than we pushed.
78 'push:ok-other-ref': (R, D) => ctx => ctx.stage === 'receive-pack' ? { type: 'bytes', bytes: concat([pktLine('unpack ok\n'), pktLine('ok refs/heads/other\n'), FLUSH]), name: 'ok other ref' } : { type: 'pass' },
79 // receive-pack reports ok AND ng for the same ref.
80 'push:ok-and-ng': (R, D) => ctx => ctx.stage === 'receive-pack' ? { type: 'bytes', bytes: concat([pktLine('unpack ok\n'), pktLine('ok refs/heads/main\n'), pktLine('ng refs/heads/main later\n'), FLUSH]), name: 'ok+ng' } : { type: 'pass' },
81 // receive-pack: unpack ok but no ref lines at all.
82 'push:no-ref-lines': (R, D) => ctx => ctx.stage === 'receive-pack' ? { type: 'bytes', bytes: concat([pktLine('unpack ok\n'), FLUSH]), name: 'no ref lines' } : { type: 'pass' },
83 // two lies: ls-refs old commit AND blob stale (consistent with each other: a fully lagging replica).
84 'replica:consistent-lag': (R, D) => ctx => ctx.stage === 'ls-refs' ? { type: 'bytes', bytes: concat([pktLine(`${R.older} refs/heads/main\n`), FLUSH]), name: 'lag' } : { type: 'pass' },
85};
87// one random DAG per case, pushed to a bare repo; every commit's bytes read once, up front (the fault never spawns git)
88function dagRepo(rng, i, decoy) {
89 const name = `g${i}`; const bare = makeBareRepo(root, name); const work = join(root, `gw${i}`); mkdirSync(work);
90 const dag = genDag(rng, work, { commits: rng.int(8, 26), branches: rng.int(2, 4) });
91 git(work, ['push', '-q', '--all', bare]);
92 const model = readModel(bare);
93 const commitData = new Map(); for (const c of model.commits.keys()) commitData.set(c, obj(bare, c).data);
94 const trees = new Map();
95 return { name, bare, work, model, dag, commitData, decoy, lied: 0, omitted: 0, treeOf: c => { const t = model.commits.get(c).tree; if (!trees.has(t)) trees.set(t, obj(bare, t).data); return trees.get(t); } };
96}
97const sortedBases = s => s.trim().split('\n').filter(Boolean).sort();
98const gitMergeTree = (bare, ours, theirs) => { const r = spawnSync('git', ['-C', bare, '-c', 'attr.tree=4b825dc642cb6eb9a060e54bf8d69288fbee4904', 'merge-tree', '--write-tree', '--name-only', ours, theirs], { encoding: 'utf8' }); return { clean: r.status === 0, tree: r.stdout.split('\n')[0].trim() }; };
100async function mergeBaseCase(rng, i, seed, decoy) {
101 const kinds = Object.keys(MERGE_LIES);
102 const kind = kinds[rng.int(0, kinds.length - 1)];
103 const M = dagRepo(rng, i, decoy);
104 const commits = [...M.model.commits.keys()]; // what the bare repo holds (genDag's unreferenced commits are not pushed)
105 // two distinct commits, branch heads more often than not; refs for the end-to-end merge
106 const pickC = () => rng.weighted([[rng.pick(M.dag.branchHeads), 3], [rng.pick(commits), 2], [M.dag.tip, 1]]);
107 let a = pickC(), b = pickC(); for (let k = 0; a === b && k < 20; k++) b = pickC();
108 if (a === b) b = commits.find(c => c !== a);
109 git(M.bare, ['update-ref', 'refs/heads/ours', a]); git(M.bare, ['update-ref', 'refs/heads/theirs', b]);
110 const gitBases = sortedBases(git(M.bare, ['merge-base', '--all', a, b]));
111 const op = rng.bool(0.6) ? 'mergeBase' : 'mergeBranch';
112 const maxDepth = rng.pick([undefined, undefined, 16, 32]);
113 const proxy = await startProxy(srv.url, mergeLie(M, kind, seed));
114 const exporter = arrayExporter();
115 let result = null, error = null;
116 const url = `${proxy.url}/${M.name}.git`;
117 try {
118 if (op === 'mergeBase') result = await unwrapAsync(mergeBase(createTransport(url, { tracer: new Tracer({ exporter }), limits: withLimits({ requestTimeoutMs: 3000 }) }), a, b, maxDepth ? { maxDepth } : {}));
119 else result = await unwrapAsync(mergeBranch(url, { ref: 'refs/heads/ours', from: 'refs/heads/theirs', author: { name: 'l', email: 'l@x' } }, { tracer: new Tracer({ exporter }), limits: withLimits({ requestTimeoutMs: 3000, ...(maxDepth ? { maxMergeDepth: maxDepth } : {}) }) }));
120 } catch (e) { error = e; }
121 await proxy.close();
122 const problems = [];
123 const same = (x, y) => x.length === y.length && x.every((v, k) => v === y[k]);
124 const nowOurs = git(M.bare, ['rev-parse', 'refs/heads/ours']).trim();
125 if (error && !CODES.has(error.code)) problems.push(`untyped ${error.code}: ${error.message}`);
126 if (error && nowOurs !== a) problems.push(`ref moved on error to ${nowOurs.slice(0, 8)}`);
127 const basesOf = () => (op === 'mergeBase' ? result.bases.slice().sort() : null);
128 if (!error && op === 'mergeBase' && !same(basesOf(), gitBases)) problems.push(`bases ${basesOf().map(x => x.slice(0, 8))} != git merge-base --all ${gitBases.map(x => x.slice(0, 8))}${M.lied ? ' (lied to)' : ' (HONEST server)'}`);
129 if (!error && op === 'mergeBranch') {
130 // I21: whatever landed is what git produces from git's base; a many-bases history is refused, not merged
131 if (gitBases.length !== 1 && result.outcome !== 'up_to_date') problems.push(`merged with ${gitBases.length} git bases (outcome ${result.outcome})`);
132 if (result.base !== undefined && !gitBases.includes(result.base)) problems.push(`merge used base ${String(result.base).slice(0, 8)}, git's: ${gitBases.map(x => x.slice(0, 8))}`);
133 if (result.outcome === 'merge') { const g = gitMergeTree(M.bare, a, b); if (!g.clean || g.tree !== result.tree) problems.push(`pushed merge tree ${result.tree.slice(0, 8)}; git merge-tree ${g.clean ? g.tree.slice(0, 8) : 'conflicts'}`); if (nowOurs !== result.oid) problems.push('ref is not the merge commit'); }
134 if (result.outcome === 'fast_forward' && (nowOurs !== b || gitBases[0] !== a)) problems.push('fast-forward where git has no ancestor relation');
135 if (result.outcome === 'up_to_date' && !(gitBases.length === 1 && gitBases[0] === b) && a !== b) problems.push('up_to_date but theirs is not the base');
136 const fsck = fsckProblems(M.bare); if (fsck.length) problems.push(`fsck: ${fsck[0]}`);
137 }
138 if (error && op === 'mergeBranch' && error.code === 'merge_conflict' && error.bases && !same(error.bases.slice().sort(), gitBases)) problems.push(`criss-cross refusal with bases ${error.bases.length}, git has ${gitBases.length}${M.lied ? ' (lied to)' : ' (HONEST server)'}`);
139 if (error && error.code === 'unrelated_histories' && gitBases.length) problems.push(`unrelated_histories but git has a base${M.lied ? ' (lied to)' : ' (HONEST server)'}`);
140 // lies the pack itself contradicts must be pack_corrupt (a missing want, a commit that is not an ancestor of it), with
141 // nothing landed; omissions may also surface as the depth cap (a consistent shallower cut) or a correct base.
142 if (M.lied && ['mb:omit-want', 'mb:extra-foreign'].includes(kind) && error?.code !== 'pack_corrupt') problems.push(`${kind} fired ${M.lied}× but outcome is ${error ? error.code : 'success'}`);
143 if (M.lied && error && !['pack_corrupt', 'limit_exceeded', 'protocol', 'merge_conflict', 'not_fast_forward', 'unrelated_histories'].includes(error.code)) problems.push(`lied to, unexpected code ${error.code}`);
144 const code = error ? error.code : (op === 'mergeBase' ? `ok(${result.bases.length})` : `ok:${result.outcome}`);
145 return { lie: `${kind}${M.lied ? `×${M.lied}` : ''} ${op}${maxDepth ? ` d${maxDepth}` : ''}`, code, error, problems, cleanup: () => rmSync(M.work, { recursive: true, force: true }) };
146}
148const { root, cleanup } = tmpRoot();
149const srv = await startGitServer(root);
150const outcomes = {}, fails = [];
151try {
152 const names = Object.keys(LIES);
153 const seeds = ONLY !== null ? [ONLY] : Array.from({ length: N }, (_, i) => (SEED * 7919 + i * 104729) >>> 0);
154 // the unrelated commit for mb:extra-foreign, made once
155 const dbare0 = makeBareRepo(root, 'decoy0'); const dwork0 = join(root, 'decoy0w'); mkdirSync(dwork0); initRepo(dwork0);
156 const decoy = obj(dbare0, commitFiles(dwork0, dbare0, { 'decoy.txt': 'decoy\n' }, 'decoy'));
157 for (let i = 0; i < seeds.length; i++) {
158 const rng = new Rng(seeds[i]);
159 const mb = rng.bool(1 / 3); // drawn in every mode so --op mergebase --case <seed> replays a mixed run's case
160 if (OP === 'mergebase' || (OP === 'mixed' && mb)) {
161 const r = await mergeBaseCase(rng, i, seeds[i], decoy);
162 outcomes[`${r.lie.split(/[×\s]/)[0]} → ${r.code}`] = (outcomes[`${r.lie.split(/[×\s]/)[0]} → ${r.code}`] ?? 0) + 1;
163 process.stdout.write(`${r.problems.length ? 'FAIL' : 'ok '} #${String(i).padStart(3)} seed=${seeds[i]} ${r.lie.padEnd(38)} → ${r.code.padEnd(13)} ${r.error ? r.error.message.slice(0, 70) : ''}\n`);
164 if (r.problems.length) { fails.push(seeds[i]); console.log(' ' + r.problems.join('\n ') + `\n repro: node test/fuzz/liar.mjs --op mergebase --case ${seeds[i]}`); }
165 r.cleanup();
166 continue;
167 }
168 const lie = names[rng.int(0, names.length - 1)];
169 const name = `l${i}`;
170 // real repo: two commits so there is an "older" version of everything
171 const bare = makeBareRepo(root, name); const work = join(root, `w${i}`); mkdirSync(work); initRepo(work);
172 const older = commitFiles(work, bare, { [FILE]: 'old MARK old\n', 'z.txt': 'z' }, 'older');
173 const head = commitFiles(work, bare, { [FILE]: ORIG }, 'head');
174 const R = { bare, head, older, rootTree: git(bare, ['rev-parse', 'main^{tree}']).trim(), blob: git(bare, ['rev-parse', 'main:' + FILE]).trim(), olderBlob: git(bare, [`rev-parse`, `${older}:${FILE}`]).trim(), leafLevel: 1 + 2, blobFetch: 1 + 3 };
175 // decoy repo: same path, different content
176 const dbare = makeBareRepo(root, 'd' + name); const dwork = join(root, `dw${i}`); mkdirSync(dwork); initRepo(dwork);
177 const dhead = commitFiles(dwork, dbare, { [FILE]: 'decoy MARK decoy\n' }, 'decoy');
178 const D = { bare: dbare, head: dhead, leafTree: git(dbare, ['rev-parse', 'main:a/b']).trim() };
179 const proxy = await startProxy(srv.url, LIES[lie](R, D));
180 const exporter = arrayExporter();
181 let result = null, error = null;
182 const verify = rng.bool(0.5);
183 try { result = await unwrapAsync(editFile(`${proxy.url}/${name}.git`, { path: FILE, find: 'MARK', replace: 'XX', author: { name: 'l', email: 'l@x' }, message: 'l' }, { tracer: new Tracer({ exporter }), limits: withLimits({ requestTimeoutMs: 3000 }), verify })); }
184 catch (e) { error = e; }
185 await proxy.close();
186 const problems = [];
187 const nowHead = git(bare, ['rev-parse', 'main']).trim();
188 const content = gitBuf(bare, ['cat-file', 'blob', `main:${FILE}`]).toString();
189 const fsck = fsckProblems(bare);
190 if (fsck.length) problems.push(`fsck: ${fsck[0]}`);
191 if (error) {
192 if (!CODES.has(error.code)) problems.push(`untyped ${error.code}: ${error.message}`);
193 if (error.code === 'ambiguous') { if (nowHead !== head && content !== EXPECTED) problems.push(`ambiguous but ref moved to wrong content ${JSON.stringify(content)}`); }
194 else if (nowHead !== head) problems.push(`ref moved on error to ${nowHead.slice(0, 8)} (content ${JSON.stringify(content)})`);
195 } else {
196 // a success must be a TRUE success: ref == our commit, content == expected splice of the REAL head blob
197 if (nowHead !== result.newCommit) { if (!(lie === 'push:fake-ok' && !verify)) problems.push(`claimed success but ref is ${nowHead.slice(0, 8)} not ${result.newCommit.slice(0, 8)}`); }
198 else if (content !== EXPECTED) problems.push(`claimed success with WRONG CONTENT ${JSON.stringify(content)}`);
199 else { const parent = (() => { try { return git(bare, ['rev-parse', `${result.newCommit}^`]).trim(); } catch { return null; } })(); if (parent !== head && lie !== 'ls-refs:old-commit' && lie !== 'replica:consistent-lag') problems.push('new commit parent is not the real head'); }
200 }
201 // a lying 'ok' must be caught whenever verify is on (the proxy's fake report never reaches the real server)
202 if (lie === 'push:fake-ok') { if (verify && !error) problems.push('verify=on but forged ok was believed'); if (verify && error && error.code !== 'ambiguous') problems.push(`verify=on: expected ambiguous, got ${error.code}`); }
203 const code = error ? error.code : 'ok';
204 outcomes[`${lie} → ${code}`] = (outcomes[`${lie} → ${code}`] ?? 0) + 1;
205 process.stdout.write(`${problems.length ? 'FAIL' : 'ok '} #${String(i).padStart(3)} seed=${seeds[i]} ${(lie + (verify ? ' +verify' : '')).padEnd(38)} → ${code.padEnd(13)} ${error ? error.message.slice(0, 70) : ''}\n`);
206 if (problems.length) { fails.push(seeds[i]); console.log(' ' + problems.join('\n ') + `\n repro: node test/fuzz/liar.mjs --case ${seeds[i]}`); }
207 rmSync(work, { recursive: true, force: true }); rmSync(dwork, { recursive: true, force: true });
208 }
209} finally { await srv.close(); cleanup(); }
210console.log(`\n${N} cases, ${fails.length} failures\n` + Object.entries(outcomes).sort().map(([k, v]) => `${String(v).padStart(4)} ${k}`).join('\n'));
211process.exit(fails.length ? 1 : 0);
Diagnostics4 git calls · 176 ms
CallStatusSizeTime0176 ms
discover200152 B2 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 · hit2 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=145 git.response.cache=HIT git.response.duration_ms=2 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=171 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=55Open pack map
fetch2006.8 KiB171 ms
git.upload-pack fetch http.response.status_code=200 git.response.bytes=7007 git.response.cache=MISS git.response.duration_ms=171 git.fetch.wants=055c0eb3a7370cc30a94c4df2dbe995cc384c831 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=7007 git.pkt.payload.max=6986 git.sideband.band1.bytes=6985 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
- a5e2ea933c9f4bc2
- Request
- c630a3b1…
- Protocol
- v2 · sha1
- Agent
- gitty/1.0
- Filter
- advertised
- Fetch
- shallow filter sideband-all
- Capabilities
- agent ls-refs fetch object-format