GitHubivarvong

ply

main
ply6 git calls141 ms29 KiB3 cachedprotocol v2
290 lines20 KiBRaw
1// `npm run test:fuzz-pinned` is the last stage of `npm test`. A gate has to run the same cases every time, so every
2// fuzzer command in it must name its seed (or its case) on the command line, and a failure must say how to replay it.
3// The expectation here does not come from the runner. The owner's rule is that the gate is seeded by constants and
4// runs exactly what package.json says, so the npm scripts are held to literal strings (GATE, RANDOM below): a flag or
5// a shell operator added to the gate script changes what the gate runs and fails here. With the script known to be
6// the bare runner, the runner's bare `--list` is the command list the gate runs, and it is judged against the rule
7// "an explicit --seed <n> or --case <n> on every test/fuzz/*.mjs command", with the fuzzers' own sources saying
8// which default to the clock.
9import { test } from 'vitest';
10import assert from 'node:assert/strict';
11import { readFileSync, readdirSync, mkdtempSync, symlinkSync, rmSync, writeFileSync, chmodSync } from 'node:fs';
12import { spawnSync } from 'node:child_process';
13import { fileURLToPath } from 'node:url';
14import { tmpdir } from 'node:os';
15import { join } from 'node:path';
17const ROOT = fileURLToPath(new URL('..', import.meta.url));
18const RUNNER = 'test/fuzz/pinned.mjs';
19const GATE = 'node test/fuzz/pinned.mjs'; // no flags: the list and its seeds are constants in the runner
20const RANDOM = 'node test/fuzz/pinned.mjs --random'; // discovery by a fresh seed: nightly only
21const scripts = JSON.parse(readFileSync(ROOT + 'package.json', 'utf8')).scripts;
23// What is wrong with a package.json `scripts` object as the pinned gate. Empty: nothing.
24function gateProblems(s) {
25 const out = [];
26 if (s['test:fuzz-pinned'] !== GATE) out.push(`test:fuzz-pinned must be exactly \`${GATE}\`, is \`${s['test:fuzz-pinned']}\``);
27 if (s['test:fuzz-random'] !== RANDOM) out.push(`test:fuzz-random must be exactly \`${RANDOM}\`, is \`${s['test:fuzz-random']}\``);
28 if (!String(s.test).endsWith(' && npm run test:fuzz-pinned')) out.push('`npm test` must end with `&& npm run test:fuzz-pinned`');
29 return out;
32function runner(args, path = RUNNER) {
33 return spawnSync(process.execPath, [path, ...args], { cwd: ROOT, encoding: 'utf8' });
35function list(extra = []) {
36 const r = runner(['--list', ...extra]);
37 assert.equal(r.status, 0, r.stderr);
38 return r.stdout.split('\n').filter(Boolean);
40// The commands the gate runs: the script is the bare runner (first test), so this is the runner's bare list.
41const pinnedCommands = () => list().filter(l => l.includes('test/fuzz/'));
43test('the gate script is the bare runner: no flag and no shell operator can change what it runs', () => {
44 assert.deepEqual(gateProblems(scripts), []);
45 // The guard has to reject a weakened gate. The first five left the previous guard green (review of b706d77).
46 const weakened = [
47 'node test/fuzz/pinned.mjs --random', 'node test/fuzz/pinned.mjs --list', 'node test/fuzz/pinned.mjs --only codec',
48 'node test/fuzz/pinned.mjs || true', 'node test/fuzz/pinned.mjs --seed $RANDOM', 'node test/fuzz/pinned.mjs --timeout-s 1',
49 'true', '',
50 ];
51 for (const w of weakened) assert.equal(gateProblems({ ...scripts, 'test:fuzz-pinned': w }).length, 1, `accepted: ${w}`);
52 assert.equal(gateProblems({ ...scripts, test: scripts.test + ' || true' }).length, 1);
53 assert.equal(gateProblems({ ...scripts, test: scripts.test.replace(' && npm run test:fuzz-pinned', '') }).length, 1);
54 assert.equal(gateProblems({ ...scripts, 'test:fuzz-random': GATE }).length, 1);
55});
57test('the runner refuses what it does not understand instead of running the list', () => {
58 // `--randm` used to be ignored (the pinned list ran); a seed past 2^53 used to be rounded.
59 const bad = [['--list', '--randm'], ['--list', 'extra'], ['--list', '--seed', '99999999999999999999'], ['--list', '--seed'],
60 ['--list', '--seed', '-1'], ['--list', '--only'], ['--only', 'nosuchfuzzer'], ['--list', '--timeout-s', '0'], ['--list', '--timeout-s', 'x']];
61 for (const args of bad) {
62 const r = runner(args);
63 assert.equal(r.status, 2, `${args.join(' ')}: exit ${r.status}\n${r.stdout}${r.stderr}`);
64 assert.equal(r.stdout, '', `${args.join(' ')} listed something`);
65 assert.notEqual(r.stderr, '');
66 }
67});
69test('the runner runs when it is reached through a symlink (it used to print nothing and exit 0)', () => {
70 const tmp = mkdtempSync(join(tmpdir(), 'ply-pinned-link-'));
71 try {
72 symlinkSync(ROOT.replace(/\/$/, ''), join(tmp, 'linkrepo'));
73 const linked = join(tmp, 'linkrepo', RUNNER);
74 const bogus = runner(['--only', 'nosuchfuzzer'], linked);
75 assert.equal(bogus.status, 2, `exit ${bogus.status}: ${bogus.stdout}${bogus.stderr}`);
76 assert.match(bogus.stderr, /no such fuzzer/);
77 const listed = runner(['--list'], linked);
78 assert.equal(listed.status, 0);
79 assert.deepEqual(listed.stdout.split('\n').filter(Boolean), list());
80 } finally { rmSync(tmp, { recursive: true, force: true }); }
81});
83test('every entry prints its fuzzer and its seed before it starts', async () => {
84 const { runPinned, PINNED } = await import('./fuzz/pinned.mjs');
85 const events = [];
86 runPinned(PINNED, { spawn: argv => { events.push({ run: argv.join(' ') }); return 0; }, log: l => events.push({ log: l }) });
87 assert.equal(events.filter(e => e.run).length, PINNED.length);
88 for (const [i, e] of events.entries()) {
89 if (!e.run) continue;
90 const before = events[i - 1]?.log ?? '', n = /--(seed|case) (\d+)/.exec(e.run);
91 assert.ok(before.includes(`${n[1]}=${n[2]}`) && before.includes(fuzzer(e.run)), `no start line before ${e.run}: ${before}`);
92 }
93});
95test('a fuzzer that never exits is killed at the per-entry timeout and reported as a failure with its seed', async () => {
96 const { runPinned, spawnEntry } = await import('./fuzz/pinned.mjs');
97 assert.equal(typeof spawnEntry, 'function', 'the runner exports spawnEntry(argv, timeoutMs)');
98 // A real child that never exits (a timer that outlives any test run). Whatever the timeout, the outcome is a
99 // hang: nothing asserted here depends on how long anything takes.
100 const forever = ['-e', 'setInterval(() => {}, 1 << 30)'];
101 const hung = spawnEntry(forever, 250);
102 assert.equal(hung.hung, true);
103 assert.notEqual(hung.status, 0);
104 assert.deepEqual(spawnEntry(['-e', 'process.exit(0)'], 120_000), { status: 0, hung: false });
105 assert.deepEqual(spawnEntry(['-e', 'process.exit(3)'], 120_000), { status: 3, hung: false });
106 const lines = [], ran = [];
107 const status = runPinned([{ fuzzer: 'codec', args: ['--n', '5'], seed: 77 }, { fuzzer: 'run', args: [], seed: 78 }],
108 { spawn: argv => { ran.push(argv); return spawnEntry(forever, 250); }, log: l => lines.push(l) });
109 assert.equal(status, 1);
110 assert.equal(ran.length, 1, 'nothing runs after a hang');
111 const report = lines.join('\n');
112 assert.match(report, /FUZZ-PINNED FAIL {2}codec {2}seed=77 {2}hang/);
113 assert.ok(report.includes('replay: node --import ./test/ts-resolve.mjs test/fuzz/codec.mjs --n 5 --seed 77'), report);
114});
116const fuzzer = cmd => /test\/fuzz\/([\w-]+)\.mjs/.exec(cmd)?.[1];
117const seeded = cmd => /--(seed|case) \d+(\s|$)/.test(cmd);
119test('test:fuzz-pinned names a seed or a case on every fuzzer command', () => {
120 const cmds = pinnedCommands();
121 assert.ok(cmds.length >= 19, `the pinned stage ran 19 fuzzer commands at ec337c5; found ${cmds.length}`);
122 const unseeded = cmds.filter(c => !seeded(c));
123 // Which of those would differ between two runs: the ones whose script falls back to the clock.
124 const clock = unseeded.filter(c => /Date\.now\(\)/.test(readFileSync(`${ROOT}test/fuzz/${fuzzer(c)}.mjs`, 'utf8')));
125 assert.deepEqual(clock.map(fuzzer), [], `clock-seeded commands in test:fuzz-pinned:\n ${clock.join('\n ')}`);
126 assert.deepEqual(unseeded, [], 'every pinned command states its seed, also where the script has a fixed default');
127});
129test('the pinned list is the same on every run; --random is a separate mode that prints its seed and its replay', () => {
130 assert.deepEqual(list(), list());
131 const out = list(['--random']);
132 const m = /^fuzz-pinned: random mode, seed=(\d+)\s+replay: (node .*test\/fuzz\/pinned\.mjs --seed (\d+))$/.exec(out[0]);
133 assert.ok(m, `first line of --random names the seed and the replay command, got: ${out[0]}`);
134 assert.equal(m[1], m[3]);
135 const cmds = out.slice(1);
136 assert.ok(cmds.some(c => c.includes(`--seed ${m[1]}`)), 'the random seed reaches the fuzzers');
137 // A replay (--seed n) is the same list the random run printed.
138 assert.deepEqual(list(['--seed', m[1]]).filter(l => l.includes('test/fuzz/') && !l.startsWith('fuzz-pinned:')), cmds);
139 // Fixed regression cases (--case) keep their case in every mode.
140 assert.ok(cmds.some(c => c.includes('hostile.mjs --case 2366521731')));
141});
143test('a failing fuzzer stops the run and prints its seed and the exact command that replays it', async () => {
144 const { runPinned, PINNED } = await import('./fuzz/pinned.mjs');
145 const ran = [], lines = [];
146 // The second command fails: nothing after it may run, and the report must carry that command verbatim.
147 const status = runPinned(PINNED, { spawn: argv => { ran.push(argv.join(' ')); return ran.length === 2 ? 1 : 0; }, log: l => lines.push(l) });
148 assert.equal(status, 1);
149 assert.equal(ran.length, 2);
150 const failed = ran[1], seed = /--(?:seed|case) (\d+)/.exec(failed)[1];
151 const report = lines.join('\n');
152 assert.ok(report.includes(`seed=${seed}`) || report.includes(`case=${seed}`), report);
153 assert.ok(report.includes(`replay: node ${failed}`), report);
154});
156// codec.mjs hung under load with node waiting inside execFileSync and its git oracle waiting on stdin (no ply code
157// involved: the same call hangs in a script that imports no ply). The oracle here is a stand-in `git` that
158// initialises a repository and then never answers. The fuzzer has to kill it, fail the case by name and exit 1; the
159// expected lines come from that rule, not from the fuzzer. Without the oracle timeout this run never ends and the
160// 40 s limit below kills it (status null).
161test('codec: a git oracle that never answers is killed and fails the case, it does not hang the fuzzer', () => {
162 const bin = mkdtempSync(join(tmpdir(), 'ply-deaf-git-'));
163 try {
164 writeFileSync(join(bin, 'git'), '#!/bin/sh\nfor a in "$@"; do [ "$a" = init ] && exit 0; done\nexec sleep 600\n');
165 chmodSync(join(bin, 'git'), 0o755);
166 const r = spawnSync(process.execPath, ['--import', './test/ts-resolve.mjs', 'test/fuzz/codec.mjs', '--n', '150', '--seed', '1', '--oracle-timeout-s', '1'],
167 { cwd: ROOT, encoding: 'utf8', timeout: 40_000, killSignal: 'SIGKILL', env: { ...process.env, PATH: `${bin}:${process.env.PATH}` } });
168 assert.equal(r.status, 1, `exit status; signal=${r.signal}; output: ${r.stdout}${r.stderr}`);
169 assert.match(r.stdout, /FAIL #\d+ delta-git: oracle did not answer: git hash-object -w --stdin had not exited after 1 s and was killed/);
170 assert.match(r.stdout, /150 cases in \d+s, [1-9]\d* failures/);
171 // Every FAIL line names the seed and the command that replays it. codec draws one stream from --seed, so case
172 // #i is the (i+1)th case of that stream: `--n <i+1> --seed <seed>` (the rule scripts/nightly-fuzz.mjs applies).
173 const failLines = r.stdout.split('\n').filter(l => l.startsWith('FAIL'));
174 assert.ok(failLines.length > 0);
175 for (const l of failLines) {
176 const i = Number(/^FAIL #(\d+) /.exec(l)[1]);
177 assert.ok(l.includes(' seed=1 ') && l.endsWith(`replay: node --import ./test/ts-resolve.mjs test/fuzz/codec.mjs --n ${i + 1} --seed 1`), l);
178 }
179 } finally { rmSync(bin, { recursive: true, force: true }); }
180}, 60_000);
182// Owner decision (1) covers a fuzzer run directly, not only through the runner: `npm run fuzz:codec` passes no
183// --seed, so the seed comes from the clock and a failure can be replayed only if the run named it. Which fuzzers
184// fall back to the clock is read from their sources (the seven at ec337c5). Each is run with no --seed and a small
185// --n, and the first line it prints has to name a seed. Nothing here depends on which seed the clock gave or on
186// whether the run found a failure.
187const direct = (name, args, env = process.env) => spawnSync(process.execPath, ['--import', './test/ts-resolve.mjs', `test/fuzz/${name}.mjs`, ...args],
188 { cwd: ROOT, encoding: 'utf8', timeout: 240_000, killSignal: 'SIGKILL', env });
189const firstLine = out => out.split('\n').find(l => l.trim() !== '') ?? '';
191test('every clock-seeded fuzzer, run directly with no --seed, names its seed on its first line', () => {
192 const clock = readdirSync(`${ROOT}test/fuzz`).filter(f => f.endsWith('.mjs') && /args\.seed \?\?[^\n]*Date\.now\(\)/.test(readFileSync(`${ROOT}test/fuzz/${f}`, 'utf8'))).map(f => f.slice(0, -4)).sort();
193 assert.deepEqual(clock, ['codec', 'hostile', 'liar', 'packgen', 'packs', 'protocol', 'run']);
194 for (const name of clock) {
195 const n = name === 'codec' ? '200' : '2';
196 const r = direct(name, ['--n', n]);
197 // The run seed by name, not any `seed=`: a case line's seed=<case seed> matched the old /\bseed[= ]\d+/ and hid
198 // that packgen never logged its run seed (#308, CI 43164297129: both cases were noop edits and printed nothing).
199 assert.match(firstLine(r.stdout), new RegExp(`^${name}: seed \\d+, n ${n}\\b`), `${name} with no --seed: first line names no run seed (signal=${r.signal}): ${r.stdout.slice(0, 300)}${r.stderr.slice(0, 300)}`);
200 }
201}, 900_000);
203// #308: the same rule with no case to lean on. With --n 0 a fuzzer runs no case, so only a run-level line can name
204// the seed: a fuzzer that drops it fails here on every run, not on the 0.57% of clock seeds whose first two packgen
205// cases were noop edits. Run once from the clock and once with --seed 4242; the second line must carry 4242 and the
206// replay command that reproduces the run.
207test('#308 every clock-seeded fuzzer names its run seed and replay before any case (--n 0, clock and --seed)', () => {
208 const clock = readdirSync(`${ROOT}test/fuzz`).filter(f => f.endsWith('.mjs') && /args\.seed \?\?[^\n]*Date\.now\(\)/.test(readFileSync(`${ROOT}test/fuzz/${f}`, 'utf8'))).map(f => f.slice(0, -4)).sort();
209 assert.ok(clock.length >= 7, clock.join(' '));
210 for (const name of clock) {
211 const a = direct(name, ['--n', '0']);
212 assert.equal(a.status, 0, `${name} --n 0: exit ${a.status} signal=${a.signal}: ${a.stdout.slice(0, 300)}${a.stderr.slice(0, 300)}`);
213 assert.match(firstLine(a.stdout), new RegExp(`^${name}: seed \\d+, n 0\\b`), `${name} --n 0 with no --seed: ${a.stdout.slice(0, 300)}`);
214 const b = direct(name, ['--n', '0', '--seed', '4242']);
215 assert.equal(b.status, 0, `${name} --n 0 --seed 4242: exit ${b.status}: ${b.stdout.slice(0, 300)}${b.stderr.slice(0, 300)}`);
216 const line = firstLine(b.stdout);
217 assert.match(line, new RegExp(`^${name}: seed 4242, n 0\\b`), `${name} --seed 4242: ${line}`);
218 assert.ok(line.endsWith(`replay: node --import ./test/ts-resolve.mjs test/fuzz/${name}.mjs --n 0 --seed 4242`), `${name}: ${line}`);
219 }
220}, 300_000);
222// #308 pinned: run seed 963345382 draws two noop edits as packgen's first two cases (the CI 43164297129 shape). The
223// run still names its seed first, each skipped case names its case seed, and the summary counts 0 run, 2 skipped.
224test('#308 packgen: a run whose every case is a noop edit still names its seed and counts the skips', () => {
225 const r = direct('packgen', ['--n', '2', '--seed', '963345382']);
226 assert.equal(r.status, 0, `${r.stdout}${r.stderr}`);
227 const lines = r.stdout.split('\n').filter(l => l.trim() !== '');
228 assert.match(lines[0], /^packgen: seed 963345382, n 2 {2}replay: node --import \.\/test\/ts-resolve\.mjs test\/fuzz\/packgen\.mjs --n 2 --seed 963345382$/);
229 assert.equal(lines.filter(l => /^skip #\s*\d+ seed=\d+ noop edit /.test(l)).length, 2, r.stdout);
230 assert.ok(lines.includes('0 cases, 2 skipped (noop edit), 0 failures (seed 963345382)'), r.stdout);
231}, 60_000);
233test('codec: the seed it prints is the seed it ran, a replay with it draws the same cases', () => {
234 const a = direct('codec', ['--n', '200']);
235 const seed = /^codec: seed (\d+), n 200\b/.exec(firstLine(a.stdout))?.[1];
236 assert.ok(seed, `first line: ${firstLine(a.stdout)}`);
237 // The table after the summary counts every generator and codec choice the run drew: a different seed gives a
238 // different table, the same seed the same one. Only the elapsed seconds are cut.
239 const table = out => out.slice(out.indexOf(' cases in ')).replace(/ cases in \d+s/, '');
240 const b = direct('codec', ['--n', '200', '--seed', seed]);
241 assert.equal(b.status, a.status);
242 assert.equal(table(b.stdout), table(a.stdout));
243 assert.notEqual(table(direct('codec', ['--n', '200', '--seed', String(Number(seed) + 1)]).stdout), table(a.stdout));
244}, 120_000);
246// below-hash defaults its seed to the constant 1 (its usage line). It still says so on start, and a failure names
247// the seed and its replay. The failure is made by the oracle, not by ply: a stand-in `git` whose fsck rejects every
248// object, so each object ply accepts is a DIVERGE. The replay expected for a case is its usage line's: a fixed case
249// by name, a random case `kind#<seed>` by that seed, with the run's --n and --seed (they decide which cases exist).
250// Under vitest `command -v git` is test/git-shim, which strips its own directory from PATH and execs `git`: the
251// stand-in hands git the PATH without itself, or the shim finds the stand-in again and the two exec each other forever.
252test('below-hash: prints its seed on start, and a failure names the seed and the command that replays it', () => {
253 const realGit = spawnSync('sh', ['-c', 'command -v git'], { encoding: 'utf8' }).stdout.trim();
254 const bin = mkdtempSync(join(tmpdir(), 'ply-no-fsck-'));
255 try {
256 writeFileSync(join(bin, 'git'), `#!/bin/sh\nfor a in "$@"; do [ "$a" = fsck ] && { echo "error: stand-in fsck rejects every object"; exit 1; }; done\nPATH='${process.env.PATH}' exec "${realGit}" "$@"\n`);
257 chmodSync(join(bin, 'git'), 0o755);
258 const r = direct('below-hash', ['--n', '2'], { ...process.env, PATH: `${bin}:${process.env.PATH}` });
259 assert.equal(r.status, 1, `${r.stdout}${r.stderr}`);
260 assert.match(firstLine(r.stdout), /^below-hash: seed 1, n 2\b/);
261 const failed = r.stdout.split('\n').filter(l => /^(FAIL|DIVERGE|STRICT-NORMAL)\s/.test(l));
262 assert.ok(failed.some(l => /^DIVERGE\s+valid\s/.test(l)), r.stdout);
263 for (const l of failed) {
264 const name = /^\S+\s+(\S+?):?\s/.exec(l)[1], id = /#(\d+)$/.exec(name)?.[1] ?? name;
265 assert.ok(l.includes(' seed=1 ') && l.endsWith(`replay: node --import ./test/ts-resolve.mjs test/fuzz/below-hash.mjs --n 2 --seed 1 --case ${id}`), l);
266 }
267 } finally { rmSync(bin, { recursive: true, force: true }); }
268}, 300_000);
270// Owner decision (4). To execFileSync a timeout of 0 means no timeout, so `--oracle-timeout-s 0` switched the hang
271// guard off; a negative or non-numeric value reached it as an invalid timeout and came back as one RangeError FAIL
272// line per judged case; `5abc` and `1.5` were read as 5 and 1. The flag takes a whole number of seconds, 1 or more.
273// Anything else is a usage error before any case runs: one line on stderr naming the flag, exit status 2, nothing
274// on stdout. The deaf oracle is on PATH so that a value that slips through shows as a FAIL line or a hang, not as
275// a clean run.
276test('codec: --oracle-timeout-s 0, negative, fractional or non-numeric is a one-line usage error, exit 2', () => {
277 const bin = mkdtempSync(join(tmpdir(), 'ply-deaf-git-'));
278 try {
279 writeFileSync(join(bin, 'git'), '#!/bin/sh\nfor a in "$@"; do [ "$a" = init ] && exit 0; done\nexec sleep 600\n');
280 chmodSync(join(bin, 'git'), 0o755);
281 for (const bad of [['0'], ['-1'], ['abc'], ['5abc'], ['1.5'], ['']]) {
282 const r = spawnSync(process.execPath, ['--import', './test/ts-resolve.mjs', 'test/fuzz/codec.mjs', '--n', '150', '--seed', '1', '--oracle-timeout-s', ...bad],
283 { cwd: ROOT, encoding: 'utf8', timeout: 40_000, killSignal: 'SIGKILL', env: { ...process.env, PATH: `${bin}:${process.env.PATH}` } });
284 const what = `--oracle-timeout-s ${JSON.stringify(bad[0])}: status=${r.status} signal=${r.signal} stdout=${r.stdout.slice(0, 300)} stderr=${r.stderr.slice(0, 300)}`;
285 assert.equal(r.status, 2, what);
286 assert.match(r.stderr, /^[^\n]*--oracle-timeout-s[^\n]*\n$/, what);
287 assert.equal(r.stdout, '', what);
288 }
289 } finally { rmSync(bin, { recursive: true, force: true }); }
290}, 300_000);
Diagnostics6 git calls · 141 ms
CallStatusSizeTime0141 ms
discover200191 B4 ms
git.upload-pack discover
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=ls-refs
git.upstream.dur_ms=4
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 KiB4 ms
git.upload-pack ls-refs
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=ls-refs
git.upstream.dur_ms=4
git.response.bytes=11990
git.response.cache=UPDATING
git.response.duration_ms=4
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 · hit3 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=3
git.response.bytes=4347
git.response.cache=HIT
git.response.duration_ms=3
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 · hit3 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=3
git.response.bytes=919
git.response.cache=HIT
git.response.duration_ms=3
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=2
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
fetch2006.6 KiB129 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=129
git.response.bytes=6786
git.response.cache=MISS
git.response.duration_ms=129
git.fetch.wants=9d961fa2718592689d9c201403395accddcfdb9c
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=6786
git.pkt.payload.max=6759
git.sideband.band1.bytes=6759
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
a5e2bfc20a0689da
Request
8be64848…
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