main
ply4 git calls403 ms45 KiB2 cachedprotocol v2
298 lines18 KiBRaw
1// The public namespace's credential rules as pure functions: which URLs get the Worker's read token, how the token
2// source caches and refreshes, that a caller's credential always wins, and the scrubber. The end-to-end checks against
3// real git under workerd are in test/public-worker.test.js.
4import { test } from 'node:test';
5import assert from 'node:assert/strict';
6import {
7 PUBLIC_GIT_HOST, PUBLIC_GIT_ORIGIN, PUBLIC_NAMESPACE, READ_TOKEN_REFRESH_S, READ_TOKEN_TTL_S,
8 createTokenSource, EMPTY_PUBLIC_REPOS, isPublicNamespaceRemote, isPublicRepoName, listPublicRepos, publicRemote, publicRepoOfRemote, publicUploadPackRepo,
9 scrubSecrets, withPublicReadCredential, type ArtifactsNamespace, EXISTS_TTL_MS, EXISTS_REFRESH_AHEAD_MS, publicRepoExistsMemo,
10} from '../src/public.ts';
11import { PUBLIC_NAMESPACE as CONFIG_NAMESPACE } from '../src/public-namespace.ts';
13/** Null and a missing value take the fallback. An empty string and 0 stay. */
14function fill<T>(value: unknown, fallback: T): T {
15 return value === null || value === void 0 ? fallback : value as T;
18/** One property. A null receiver and a missing key are holes. A stored null stays null. */
19function slot(receiver: unknown, key: string): unknown {
20 if (receiver === null || receiver === void 0) return void 0;
21 if (typeof receiver !== 'object' && typeof receiver !== 'function') return void 0;
22 return (receiver as Record<string, unknown>)[key];
25const O = PUBLIC_GIT_ORIGIN;
26const NS = PUBLIC_NAMESPACE;
27const TOKEN = `art_v1_${'ab12'.repeat(10)}?expires=4102444800`;
29test('listPublicRepos is the list /view and /r/ share; unavailable only when list() throws', async () => {
30 const get = async () => { throw new Error('unused'); };
31 assert.deepEqual(await listPublicRepos(null, 0), EMPTY_PUBLIC_REPOS);
32 assert.deepEqual(await listPublicRepos({ get }, 0), EMPTY_PUBLIC_REPOS);
33 const down = { get, list: async () => { throw new Error('upstream'); } };
34 assert.deepEqual(await listPublicRepos(down, 0), { names: [], unavailable: true });
35 const names = ['ply', 'curl', 'ply-web', 'deepfile'];
36 const up = { get, list: async () => ({ repos: names.map(name => ({ name, status: 'ready' as const })) }) };
37 const page = await listPublicRepos(up, 0);
38 assert.deepEqual(page, { names: ['curl', 'deepfile', 'ply', 'ply-web'], unavailable: false });
39 assert.deepEqual(await listPublicRepos(down, 1_000), page);
40 assert.deepEqual(await listPublicRepos({ get, list: async () => ({ repos: [{ name: 'only' }] }) }, 120_000), { names: ['only'], unavailable: false });
41});
43test('the namespace is one constant, shared by the binding config and the URL rules', () => {
44 assert.equal(NS, 'public-v0');
45 assert.equal(CONFIG_NAMESPACE, NS);
46 assert.equal(publicRemote('ply'), `${O}/git/${NS}/ply.git`);
47 assert.equal(PUBLIC_GIT_ORIGIN, `https://${PUBLIC_GIT_HOST}`);
48});
50test('the read token is attached only to upload-pack on exactly /git/<namespace>/<repo>', () => {
51 const ok: [string, string, string][] = [
52 ['GET', `${O}/git/${NS}/ply.git/info/refs?service=git-upload-pack`, 'ply'],
53 ['GET', `${O}/git/${NS}/ply/info/refs?service=git-upload-pack`, 'ply'],
54 ['POST', `${O}/git/${NS}/ply.git/git-upload-pack`, 'ply'],
55 ['post', `${O}/git/${NS}/my_repo-1.x.git/git-upload-pack`, 'my_repo-1.x'],
56 ];
57 for (const [m, u, repo] of ok) assert.equal(publicUploadPackRepo(m, u), repo, `${m} ${u}`);
58 const denied: [string, string][] = [
59 // receive-pack, in every form
60 ['GET', `${O}/git/${NS}/ply.git/info/refs?service=git-receive-pack`],
61 ['POST', `${O}/git/${NS}/ply.git/git-receive-pack`],
62 ['GET', `${O}/git/${NS}/ply.git/info/refs?service=git-upload-pack&service=git-receive-pack`],
63 // wrong verb, query, or endpoint
64 ['POST', `${O}/git/${NS}/ply.git/info/refs?service=git-upload-pack`],
65 ['GET', `${O}/git/${NS}/ply.git/git-upload-pack`],
66 ['POST', `${O}/git/${NS}/ply.git/git-upload-pack?x=1`],
67 ['GET', `${O}/git/${NS}/ply.git/info/refs`],
68 ['GET', `${O}/git/${NS}/ply.git/info/refs?service=git-upload-pack#f`],
69 ['GET', `${O}/git/${NS}/ply.git/HEAD`],
70 ['GET', `${O}/git/${NS}/ply.git/objects/info/packs`],
71 // another namespace, a prefix or suffix of the namespace, a nested path, the namespace itself
72 ['GET', `${O}/git/default/ply.git/info/refs?service=git-upload-pack`],
73 ['GET', `${O}/git/${NS}x/ply.git/info/refs?service=git-upload-pack`],
74 ['GET', `${O}/git/x${NS}/ply.git/info/refs?service=git-upload-pack`],
75 ['GET', `${O}/git/${NS.toUpperCase()}/ply.git/info/refs?service=git-upload-pack`],
76 ['GET', `${O}/git/${NS}/a/ply.git/info/refs?service=git-upload-pack`],
77 ['GET', `${O}/git/${NS}/info/refs?service=git-upload-pack`],
78 ['GET', `${O}/${NS}/ply.git/info/refs?service=git-upload-pack`],
79 // traversal and encodings
80 ['GET', `${O}/git/${NS}/../default/ply.git/info/refs?service=git-upload-pack`],
81 ['GET', `${O}/git/${NS}/./ply.git/info/refs?service=git-upload-pack`],
82 ['GET', `${O}/git/${NS}/%2e%2e/default/ply.git/info/refs?service=git-upload-pack`],
83 ['GET', `${O}/git/${NS}/%2E%2E/default/ply.git/info/refs?service=git-upload-pack`],
84 ['GET', `${O}/git/${NS}%2fply.git/info/refs?service=git-upload-pack`],
85 ['GET', `${O}/git/${NS}/ply.git%2finfo%2frefs?service=git-upload-pack`],
86 ['GET', `${O}/git/${NS}/ply%252egit/info/refs?service=git-upload-pack`],
87 ['GET', `${O}/git/${NS}/ply.git\\..\\x/info/refs?service=git-upload-pack`],
88 ['GET', `${O}/git/${NS}//ply.git/info/refs?service=git-upload-pack`],
89 ['GET', `${O}/git/${NS}/..ply.git/info/refs?service=git-upload-pack`],
90 ['GET', `${O}/git/${NS}/.ply.git/info/refs?service=git-upload-pack`],
91 ['GET', `${O}/git/${NS}/ply.git.git/info/refs?service=git-upload-pack`],
92 ['GET', `${O}/git/${NS}/p ly.git/info/refs?service=git-upload-pack`],
93 ['GET', `${O}/git/${NS}/ply\u0000.git/info/refs?service=git-upload-pack`],
94 // another host, scheme, port, userinfo, case, trailing dot, lookalikes
95 ['GET', `https://github.com/git/${NS}/ply.git/info/refs?service=git-upload-pack`],
96 ['GET', `http://${PUBLIC_GIT_HOST}/git/${NS}/ply.git/info/refs?service=git-upload-pack`],
97 ['GET', `https://${PUBLIC_GIT_HOST}:443/git/${NS}/ply.git/info/refs?service=git-upload-pack`],
98 ['GET', `https://${PUBLIC_GIT_HOST}:8443/git/${NS}/ply.git/info/refs?service=git-upload-pack`],
99 ['GET', `https://${PUBLIC_GIT_HOST}./git/${NS}/ply.git/info/refs?service=git-upload-pack`],
100 ['GET', `https://${PUBLIC_GIT_HOST.toUpperCase()}/git/${NS}/ply.git/info/refs?service=git-upload-pack`],
101 ['GET', `https://${PUBLIC_GIT_HOST}.evil.example/git/${NS}/ply.git/info/refs?service=git-upload-pack`],
102 ['GET', `https://evil.example/${PUBLIC_GIT_HOST}/git/${NS}/ply.git/info/refs?service=git-upload-pack`],
103 ['GET', `https://x@${PUBLIC_GIT_HOST}/git/${NS}/ply.git/info/refs?service=git-upload-pack`],
104 ['GET', `https://other.artifacts.cloudflare.net/git/${NS}/ply.git/info/refs?service=git-upload-pack`],
105 ['GET', `/git/${NS}/ply.git/info/refs?service=git-upload-pack`],
106 ['GET', ''],
107 ];
108 for (const [m, u] of denied) assert.equal(publicUploadPackRepo(m, u), null, `${m} ${u}`);
109});
111test('repo names and remotes: the viewer and /v1 accept one repo directly under the namespace', () => {
112 for (const n of ['ply', 'a', 'A9', 'x.y_z-1']) assert.equal(isPublicRepoName(n), true, n);
113 for (const n of ['', '.x', '-x', '_x', 'a..b', 'a/b', 'a.git', 'a%2f', 'a b', 'x'.repeat(101)]) assert.equal(isPublicRepoName(n), false, n);
114 assert.equal(publicRepoOfRemote(`${O}/git/${NS}/ply.git`), 'ply');
115 assert.equal(publicRepoOfRemote(`${O}/git/${NS}/ply`), 'ply');
116 for (const u of [`${O}/git/${NS}/a/ply.git`, `${O}/git/other/ply.git`, `${O}/git/${NS}/ply.git/info/refs`, `${O}/git/${NS}/..%2fx.git`, `https://github.com/git/${NS}/ply.git`]) {
117 assert.equal(publicRepoOfRemote(u), null, u);
118 }
119 // write refusal is broad on purpose: any case, any depth under the namespace
120 for (const u of [`${O}/git/${NS}/ply.git`, `${O}/git/${NS.toUpperCase()}/ply.git`, `${O}/git/${NS}/a/b.git`, `https://${PUBLIC_GIT_HOST.toUpperCase()}/git/${NS}/ply`]) {
121 assert.equal(isPublicNamespaceRemote(u), true, u);
122 }
123 for (const u of [`${O}/git/default/ply.git`, `${O}/git/${NS}x/ply.git`, `https://github.com/git/${NS}/ply.git`, 'not a url']) {
124 assert.equal(isPublicNamespaceRemote(u), false, u);
125 }
126});
128type Mint = { repo: string; scope: string; ttl: number };
130function fakeBinding(opts: { now: () => number } & Partial<{ known: string[]; ttlS: number; fail: Error }> = { now: Date.now }) {
131 const mints: Mint[] = [];
132 let disposed = 0;
133 let n = 0;
134 const binding: ArtifactsNamespace = {
135 async get(name) {
136 if (opts.fail) throw opts.fail;
137 if (!fill(opts.known, ['ply']).includes(name)) throw new Error(`repo not found: ${name}`);
138 return {
139 async createToken(scope, ttl) {
140 mints.push({ repo: name, scope, ttl });
141 n += 1;
142 const exp = Math.floor(opts.now() / 1000) + fill(opts.ttlS, ttl);
143 return { plaintext: `art_v1_${String(n).padStart(40, '0')}?expires=${exp}`, expiresAt: new Date(exp * 1000).toISOString() };
144 },
145 [Symbol.dispose]() { disposed += 1; },
146 };
147 },
148 };
149 return { binding, mints, disposed: () => disposed };
152test('token source: read scope only, one mint per repo while fresh, shared by concurrent callers, refreshed near expiry', async () => {
153 let clock = 1_800_000_000_000;
154 const now = () => clock;
155 const fake = fakeBinding({ known: ['ply', 'b'], now });
156 const src = createTokenSource(fake.binding, now);
157 const [a, b, c] = await Promise.all([src.readToken('ply'), src.readToken('ply'), src.readToken('ply')]);
158 assert.equal(a, b); assert.equal(b, c);
159 assert.equal(fake.mints.length, 1, 'concurrent callers share one mint');
160 assert.deepEqual(fake.mints[0], { repo: 'ply', scope: 'read', ttl: READ_TOKEN_TTL_S });
161 assert.equal(fake.disposed(), 1, 'the repo handle is released');
162 clock += (READ_TOKEN_TTL_S - READ_TOKEN_REFRESH_S - 1) * 1000;
163 assert.equal(await src.readToken('ply'), a, 'still fresh: cached');
164 assert.equal(fake.mints.length, 1);
165 clock += 2000;
166 const fresh = await src.readToken('ply');
167 assert.notEqual(fresh, a, 'inside the refresh window: re-minted');
168 assert.equal(fake.mints.length, 2);
169 await src.readToken('b');
170 assert.equal(fake.mints.length, 3);
171 assert.ok(fake.mints.every(m => m.scope === 'read'));
172 // the retired token is still scrubbed
173 const secrets = src.secrets();
174 for (const t of [a, fresh]) { assert.ok(secrets.includes(t)); assert.ok(secrets.includes(t.split('?')[0] as string)); }
175 await assert.rejects(src.readToken('../x'), { code: 'bad_request' });
176 await assert.rejects(src.readToken('nope'), { code: 'not_found' });
177 await assert.rejects(createTokenSource(fakeBinding({ now, fail: new Error('boom') }).binding, now).readToken('ply'), { code: 'upstream_5xx' });
178});
180// The Workers binding's get() returns an RpcPromise: a method called on it is pipelined into the same round trip.
181function pipelinedBinding(opts: { known: string[] }) {
182 const log: string[] = [];
183 let disposed = 0;
184 const binding = {
185 get(name: string) {
186 log.push(`get ${name}`);
187 const known = opts.known.includes(name);
188 const handle = { async createToken() { throw new Error('the handle was awaited: not pipelined'); }, [Symbol.dispose]() { disposed += 1; } };
189 // get answers only after a tick, so a pipelined createToken must not wait for it
190 const p = new Promise<typeof handle>((resolve, reject) => { setTimeout(() => (known ? resolve(handle) : reject(new Error(`repo not found: ${name}`))), 5); });
191 return Object.assign(p, {
192 async createToken(scope: 'read' | 'write', ttl: number) {
193 log.push(`createToken ${scope} ${ttl} (pipelined)`);
194 if (!known) throw new Error(`repo not found: ${name}`);
195 return { plaintext: `art_v1_${'1'.repeat(40)}?expires=${Math.floor(Date.now() / 1000) + ttl}` };
196 },
197 });
198 },
199 } as unknown as ArtifactsNamespace;
200 return { binding, log, disposed: () => disposed };
203test('token source: on a pipelining binding, createToken rides get\'s round trip; the handle is still released', async () => {
204 const fake = pipelinedBinding({ known: ['ply'] });
205 const src = createTokenSource(fake.binding);
206 const t = await src.readToken('ply');
207 assert.match(t, /^art_v1_1{40}\?expires=\d+$/);
208 assert.deepEqual(fake.log, ['get ply', `createToken read ${READ_TOKEN_TTL_S} (pipelined)`]);
209 assert.equal(fake.disposed(), 1, 'the repo handle is released');
210 await assert.rejects(src.readToken('nope'), { code: 'not_found' });
211});
213test('withPublicReadCredential: adds Bearer only on a public upload-pack URL with no Authorization; a caller credential wins', async () => {
214 const fake = fakeBinding({ now: Date.now });
215 const src = createTokenSource(fake.binding);
216 const seen: { url: string; method: string; auth: string | null }[] = [];
217 const inner: typeof globalThis.fetch = async (input, init) => {
218 seen.push({ url: String(input), method: fill(slot(init, 'method'), 'GET'), auth: new Headers(slot(init, 'headers') as HeadersInit).get('authorization') });
219 return new Response('ok');
220 };
221 const f = withPublicReadCredential(inner, src);
222 await f(`${O}/git/${NS}/ply.git/info/refs?service=git-upload-pack`, { headers: { 'git-protocol': 'version=2' } });
223 await f(`${O}/git/${NS}/ply.git/git-upload-pack`, { method: 'POST', body: new Uint8Array([1]) });
224 await f(`${O}/git/${NS}/ply.git/git-receive-pack`, { method: 'POST', body: new Uint8Array([1]) });
225 await f(`${O}/git/default/ply.git/info/refs?service=git-upload-pack`);
226 await f(`https://github.com/git/${NS}/ply.git/info/refs?service=git-upload-pack`);
227 await f(`${O}/git/${NS}/ply.git/info/refs?service=git-upload-pack`, { headers: { Authorization: 'Bearer caller' } });
228 const token = await src.readToken('ply');
229 assert.deepEqual(seen.map(s => s.auth), [`Bearer ${token}`, `Bearer ${token}`, null, null, null, 'Bearer caller']);
230 assert.equal(new Headers({ 'git-protocol': 'version=2' }).get('git-protocol'), 'version=2');
231 // no token source (no binding): pass-through
232 const plain = withPublicReadCredential(inner, null);
233 await plain(`${O}/git/${NS}/ply.git/info/refs?service=git-upload-pack`);
234 assert.equal(slot(seen.at(-1), 'auth'), null);
235});
237test('scrubSecrets removes every form, longest first', () => {
238 const scrub = scrubSecrets([TOKEN, TOKEN.split('?')[0] as string, btoa(`x-access-token:${TOKEN}`), 'short']);
239 const text = `a ${TOKEN} b ${TOKEN.split('?')[0]} c ${btoa(`x-access-token:${TOKEN}`)} short`;
240 const out = scrub(text);
241 assert.equal(out.includes('art_v1_'), false);
242 assert.equal(out.includes(btoa(`x-access-token:${TOKEN}`)), false);
243 assert.match(out, /short$/, 'strings under 8 chars are not treated as secrets');
244});
246test('publicRepoExistsMemo remembers a yes for a minute and never remembers a no', async () => {
247 const known = new Set(['ply']);
248 let calls = 0;
249 const binding = { async get(name: string) { calls++; if (!known.has(name)) throw new Error(`repo not found: ${name}`); return {}; } };
250 assert.equal(await publicRepoExistsMemo(binding, 'ply', 1_000), true);
251 assert.equal(await publicRepoExistsMemo(binding, 'ply', 1_000 + EXISTS_TTL_MS - 1), true);
252 assert.equal(calls, 1, 'the second ask within the minute is the memo');
253 known.delete('ply');
254 assert.equal(await publicRepoExistsMemo(binding, 'ply', 1_000 + EXISTS_TTL_MS), false, 'past the minute the binding is asked again');
255 assert.equal(calls, 2);
256 assert.equal(await publicRepoExistsMemo(binding, 'ply', 1_000 + EXISTS_TTL_MS + 1), false);
257 assert.equal(calls, 3, 'a no is not remembered');
258 known.add('ply');
259 assert.equal(await publicRepoExistsMemo(binding, 'ply', 1_000 + EXISTS_TTL_MS + 2), true, 'a repo that appears is seen at once');
260 const other = { async get() { calls++; return {}; } };
261 assert.equal(await publicRepoExistsMemo(other, 'ply', 1_000 + EXISTS_TTL_MS + 2), true);
262 assert.equal(calls, 5, 'the memo is per binding object');
263 assert.equal(await publicRepoExistsMemo(null, 'ply'), 'unknown');
264 assert.equal(await publicRepoExistsMemo(binding, '../x'), false);
265});
267test('publicRepoExistsMemo refreshes ahead in the background: never blocks on the binding while the memo is live, never trusts a yes past its minute', async () => {
268 let present = true;
269 let calls = 0;
270 const binding = { async get(name: string) { calls += 1; if (!present) throw new Error(`repo not found: ${name}`); return {}; } };
271 const deferred: Promise<unknown>[] = [];
272 const defer = (p: Promise<unknown>) => { deferred.push(p); };
273 assert.equal(await publicRepoExistsMemo(binding, 'ply', 1_000, defer), true);
274 assert.equal(calls, 1, 'a cold memo asks the binding on the request path');
275 assert.equal(await publicRepoExistsMemo(binding, 'ply', 1_000 + EXISTS_TTL_MS - EXISTS_REFRESH_AHEAD_MS - 1, defer), true);
276 assert.equal(deferred.length, 0, 'before the refresh window: no refresh');
277 const late = 1_000 + EXISTS_TTL_MS - 5;
278 assert.equal(await publicRepoExistsMemo(binding, 'ply', late, defer), true, 'inside the window: answered from the memo');
279 assert.equal(await publicRepoExistsMemo(binding, 'ply', late, defer), true);
280 assert.equal(deferred.length, 1, 'one refresh in flight at a time');
281 await Promise.all(deferred);
282 assert.equal(calls, 2);
283 assert.equal(await publicRepoExistsMemo(binding, 'ply', 1_000 + EXISTS_TTL_MS + 10, null), true, 'the refresh extended the memo from when it started');
284 assert.equal(calls, 2);
285 // a refresh that finds the repo gone drops the memo at once: the next request asks again and gets the 404
286 present = false;
287 const late2 = late + EXISTS_TTL_MS - 5;
288 assert.equal(await publicRepoExistsMemo(binding, 'ply', late2, defer), true);
289 await Promise.all(deferred);
290 assert.equal(await publicRepoExistsMemo(binding, 'ply', late2 + 1, defer), false);
291 // without a waitUntil the memo just expires, as before
292 present = true;
293 const other = { async get() { calls += 1; return {}; } };
294 await publicRepoExistsMemo(other, 'ply', 0, null);
295 const before = calls;
296 assert.equal(await publicRepoExistsMemo(other, 'ply', EXISTS_TTL_MS - 1, null), true);
297 assert.equal(calls, before);
298});
Diagnostics4 git calls · 403 ms
CallStatusSizeTime0403 ms
discover200152 B2 ms
git.upload-pack discover
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=ls-refs
git.upstream.dur_ms=2
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 1020040 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=41349
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=526b305930b8ef382f2d7a1f9c0238730a585921
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=41349
git.pkt.payload.max=41254
git.sideband.band1.bytes=41253
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0
git.pack.objects=61
git.pack.bytes=41253
git.pack.ofs_delta=0
git.pack.ref_delta=0
git.pack.chain.max=0
git.pack.trailer=ab60efef4b7243678c75de64a4386986ee885c1c
git.pack.full=61
Open pack map
fetch2004.7 KiB398 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=398
git.response.bytes=4838
git.response.cache=MISS
git.response.duration_ms=398
git.fetch.wants=063958c9720b2ffc30dfa46bf2c9faf34a6c185e
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=4838
git.pkt.payload.max=4817
git.sideband.band1.bytes=4816
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-web.git
Ref
refs/heads/main
Commit
526b305930b8ef382f2d7a1f9c0238730a585921
cf-ray
a5e2fdc28b5dcf81
Request
d3ebbe33…
Protocol
v2 · sha1
Agent
gitty/1.0
Filter
advertised
Fetch
shallow filter sideband-all
Capabilities
agent ls-refs fetch object-format