GitHubivarvong

ply

main
ply5 git calls150 ms22 KiB3 cachedprotocol v2
135 lines12 KiBRaw

The refactor: target and gates

The rules are docs/STACK.md ("Rules for code in src/", "Absence", "Public API policy"). This file is the finish line in numbers, and the order the work lands in. Pre-1.0 and breaking by design: no compat shims.

Finish line (each one a gate that fails the build, not a goal)

#PropertyGateToday → done
1No platform absence outside src/absent.ts: no undefined, ?:, ?., ??scripts/absence-ratchet.mjs (in npm run typecheck)met (a7982c0): 308/375/146/260 → 0/0/0/0
2Errors are values: throw only for assertNever, an internal invariant, a stream's own protocol, and a caller's callback's value passed backscripts/throw-ratchet.mjs (in npm run typecheck)met: 377 → 23 (every one of those four kinds; no throwing wrapper is left)
3Every switch or tag chain over a closed union ends in assertNeverscripts/exhaustive.mjs (in npm run lint)holds
4The public API returns Result (0.2.0), ply-web updated in the same windowthe bundle and type tests on dist/met in ply (rounds A–D); ply-web must switch before this lands on main
5Every gate CI runs is green on every commit to main.github/workflows/ci.yml, all 26 jobsthe rewrite left 23 red. Locally on ef29502 every gate passes but push-ng (local git 2.43; fails identically on the untouched pre-rewrite tag; CI runs 2.56)

The one edge

Absence exists where a caller's data enters, and nowhere else:

  • Options a caller may leave out are Input<Config> (src/absent.ts) and are parsed once, at the entry, by withDefaults(options, freshDefaults()) into a total Config. Past that line no code asks whether a field is there. Input<T> is allowed for exactly two things: public entry option records, and the error Extra bag.
  • Shared mutable records a caller owns and passes to every call (a transport's learned quirks) are filled in place with fillIn, so the caller's record stays the one later calls see.
  • A caller's transport is a TransportInput; asTransport fills its quirks, harvest store and scrubber at the edge (operation()).
  • Thrown values and foreign records (a JSONL line from another producer, a platform error) are read with field / readKey / fromNullish, which return Option.

Inside: absence a lookup produces is Option<T>; a total record's "none given" field is T | null; alternatives are tagged unions.

Order

  1. Green trunk (b350b96). The rewrite's seven red pushes: commitChanges limits regression, http lint, decoder and decision registries, absence ratchet, stale sweep lines; #164.
  2. Wave 1: total shared types (97802db, b2020be). Transport, OperationOpts, the thrown-value readers, otel: the types every cluster reads, so clusters convert without touching each other's files.
  3. Wave 2: clusters, in parallel (STACK.md "Converting a module"): packs, wire, write, merge, read, core. Each drove its files to zero absence, returns Result internally, and kept a throwing wrapper for what another cluster or the public API still calls. Done: a7982c0.
  4. Leftovers: LsRef total, OrMissing deleted, honest Result/wrapper names (ec02ad6, 3814e4a). Done.
  5. Cut-over (STACK.md step 3), bottom-up so a function's callers convert after it: round A codecs and validation; round B protocol, transport and operation(); round C the entries (write, read, merge in parallel); round D delete thrown/orThrow, 0.2.0, docs. Tests keep their assertions through test/unwrap.js. Done. ply-web switches catch for an exhaustive switch (r.error.code) before this lands on main.

Visible changes so far (callers can observe these)

  • A quirks record passed to a transport is filled with the defaults (treeFilter: 'tree:0', blobWants: 'many') instead of staying empty until a fallback is learned.

  • A root Span's parentSpanId is null (the exported OTLP line still omits the key).

  • Span status is a tagged union: only code: 2 carries message.

  • memtree.replaceOnce returns a Result.

  • A listed ref (LsRef) always has peeled and symref-target, null when the line carries none.

  • parsePack objects (and resolvePack's, and describePack's rows) carry base, a tagged union ({ tag: 'none' }, { tag: 'ofs', offset }, { tag: 'ref', oid }), in place of baseOffset/baseOid; resolvePack no longer writes .oid onto the caller's parsed objects. A hand-built resolvePack input gives base the same way with plain values (left out: none) and is parsed at resolvePack's edge: a bad type, base or data is bad_request (a type outside the six used to be pack_corrupt).

  • A pack object's declared size is checked where its header is read (readObjHeader's cap): fetchObject of an object past maxObjectSize is limit_exceeded with what: 'pack object size' (was 'object size'), as parsePack already said, and the scan refuses it before reading an OFS/REF base.

  • inflate() is a collector over the pull decoder, so it refuses what the pull refuses: CINFO > 7 (zlib: window size N is not a zlib window) and a back-reference past the declared window (inflate: distance too far back), both pack_corrupt (the owner's ruling on #172).

  • A wide fetch whose want cannot be a blob (a tree or commit through the blob:none or unfiltered fallback) drops the pack's blobs and their deltas as their headers arrive; they are counted in git.fetch.wide.blobs, at their declared size in git.fetch.wide.extra_bytes.

  • mergeBase with maxDepth: null, and inflate with expectedSize: null, mean "not given" (the configured limit, no expected size) instead of bad_request.

  • Parse once (#156): a fetch want is an object id. A want git's upload-pack refuses ("expected to get oid": a ref name, an abbreviation, an empty want) is bad_request (what: 'want') before any request; an upper-case id is sent lowercase (git reads either case as the same object); text after the id, which git ignores, is refused.

  • lsRefsBody refuses a prefix with a NUL, CR or LF (what: 'ref prefix', as lsRefs) instead of writing it.

  • encodeTree refuses a mode other than the five git writes (what: 'mode') and an id that is not 40 lowercase hex (what: 'oid') instead of writing them; buildCommitObjects refuses a new blob id that is not one.

  • mergeBase refuses an id that is not 40 lowercase hex (what: 'oid') before any fetch; walkPath refuses its tree id (fetchObject's refusal) even when there is no path to walk.

  • validateSpec's plan carries base as { kind: 'ref', ref } | { kind: 'commit', oid } (no baseOid flag); editFile parses the spec once, so a retry reuses the first attempt's commit time.

  • Parse once (#156): a limits record is parsed once where it enters (parseLimits): createTransport / GitHttp.create, operation() (every entry), a transport handed in (transportFrom), syncRef, and every public codec that takes limits (parseTree, parseCommit, parsePack / packParseOpts / parsePackInit, resolvePack, describePack, indexPack, verifyFetchAnswer, validatePath / parsePath, fileEntries, buildTree, validateTreeSpec, validateSpec, treeFiles, commitView, filesFromDir, writeFiles, objectsForPack, reachableObjects, planPush). A key that is present must be a finite non-negative number: the same bad_request (limits.<key> must be a finite non-negative number, what: <key>, got) as before, but refused at the entry before any request, whichever operation would have read it (it used to be refused only at the read that used it, so a bad key an operation never reached was never refused). When several keys are bad, the first in DEFAULT_LIMITS order is the refusal, and an entry parses its limits before its spec (a call with both wrong gets the limits refusal). A key that is missing, or passed as the platform missing value, takes DEFAULT_LIMITS's value (it used to be refused at its first read; validatePath(p) and parsePath(p) with no limits record used to refuse every path); null is a value, and refused. Transport.limits (and GitHttp#limits) is a CheckedLimits, branded by parseLimits alone; DEFAULT_LIMITS and WORKER_LIMITS are checked records. parseLimits, CheckedLimits and LimitsInput are exported. v2Init takes a CheckedLimits (parseLimits a caller's record first; the default is DEFAULT_LIMITS). A cachingFetch (which returns no Result) parses its limits where it verifies an answer, as before. A merge's blob reads keep their bound as the lower of maxObjectSize and maxMergeBlobBytes.

  • Parse once (#156): a fetch have and shallow is an object id, as a want is: upload-pack dies on anything else (process_haves "expected SHA1 object", process_shallow "invalid shallow line"), so one is bad_request (what: 'have' / 'shallow', invalid have: must be an object id (40 hex digits)) before any request; an upper-case id is sent lowercase; text after the id is refused. negotiate parses every have before its first round (a bad one in a later batch used to be sent rounds later, or refused only then), and an acknowledgment that is not an object id is protocol (it used to be offered back to the server as a have).

  • Parse once (#156): mergeTrees parses its base / ours / theirs tree ids at the edge (null is the empty tree; anything else must be 40 lowercase hex: bad_request, what: 'oid', in that order) before any tree is read (a bad one used to be refused by the first fetch). encodeCommit parses tree and each parent (after the header checks it always made): not 40 hex digits is bad_request what: 'tree' / 'parent' (it used to write the line; git's fsck refuses it: badTreeSha1, badParentSha1), and an upper-case id is written lowercase, as git commit-tree writes it. buildCommitObjects parses oldCommit.

  • buildPack's input (PackInput, also push's objects) gives its base as a tagged union with the read side's tags: base: { tag: 'none' } | { tag: 'ofs', index } | { tag: 'ref', oid } (left out: none), in place of baseIndex / baseOid. An ofs base names an earlier object by its index (its offset is not known until the pack is written). The quirks of the flag fields are gone: an empty baseOid meant no base, and baseIndex beside baseOid was an OFS_DELTA whose entry named no base. planPush refuses, before anything is built, an ofs base that names no earlier object, a ref base that is not an object id (what: 'base', both), and an object that still carries baseIndex / baseOid or a base outside the three tags (it used to ignore an unknown field, and send a delta as a whole object). buildPack and the streamed push writer share one entry encoder (pack.ts entryHead); their bytes are unchanged.

  • 0.2.0: every exported function that can fail returns Result<T, PlyError>; GitHttp is built with GitHttp.create(url, opts) (a Result), and its methods return the free functions' Results.

  • fail from the package is Err(plyError(…)); plyError builds the error value. thrown/orThrow are gone.

  • A value a caller-supplied transport raises that carries a ply code but is not an Error comes back as the Err, unchanged (it used to be rethrown); it is never mistaken for ply's own cas_conflict (no retry) or an unborn HEAD.

  • A value the caller's own callback throws inside an operation comes back as an Err, never as a throw: a signer or a pushDir filter is bad_request naming it in what with the thrown value as cause; a fetchImpl failure is the transport's coded Err; any other foreign throw is bad_request (what: 'callback'), or ambiguous once a push request was handed to the transport. Telemetry callbacks (exporter, onEnd) never change an outcome.

  • The user agent and the otel scope version are ply/0.2.0 / 0.2.0.

Not carried forward

Five PRs the rewrite closed and never re-landed: #167 and #168 (brands on validated refs and wire fields) and #169 (a total capabilities record) are subsumed by waves 1 and 2 in this style; #173 (pull-based stream primitives) is a separate design change and should be re-proposed against the converted wire cluster. #164 landed in step 1.

1# The refactor: target and gates
3The rules are `docs/STACK.md` ("Rules for code in src/", "Absence", "Public API policy"). This file is the finish
4line in numbers, and the order the work lands in. Pre-1.0 and breaking by design: no compat shims.
6## Finish line (each one a gate that fails the build, not a goal)
8| # | Property | Gate | Today → done |
9|---|---|---|---|
10| 1 | No platform absence outside `src/absent.ts`: no `undefined`, `?:`, `?.`, `??` | `scripts/absence-ratchet.mjs` (in `npm run typecheck`) | **met** (a7982c0): 308/375/146/260 → 0/0/0/0 |
11| 2 | Errors are values: `throw` only for `assertNever`, an `internal` invariant, a stream's own protocol, and a caller's callback's value passed back | `scripts/throw-ratchet.mjs` (in `npm run typecheck`) | **met**: 377 → 23 (every one of those four kinds; no throwing wrapper is left) |
12| 3 | Every switch or tag chain over a closed union ends in `assertNever` | `scripts/exhaustive.mjs` (in `npm run lint`) | holds |
13| 4 | The public API returns `Result` (0.2.0), ply-web updated in the same window | the bundle and type tests on `dist/` | **met** in ply (rounds A–D); ply-web must switch before this lands on main |
14| 5 | Every gate CI runs is green on every commit to main | `.github/workflows/ci.yml`, all 26 jobs | the rewrite left 23 red. Locally on ef29502 every gate passes but `push-ng` (local git 2.43; fails identically on the untouched pre-rewrite tag; CI runs 2.56) |
16## The one edge
18Absence exists where a caller's data enters, and nowhere else:
20- **Options** a caller may leave out are `Input<Config>` (`src/absent.ts`) and are parsed once, at the entry, by
21 `withDefaults(options, freshDefaults())` into a total `Config`. Past that line no code asks whether a field is
22 there. `Input<T>` is allowed for exactly two things: public entry option records, and the error `Extra` bag.
23- **Shared mutable records** a caller owns and passes to every call (a transport's learned `quirks`) are filled in
24 place with `fillIn`, so the caller's record stays the one later calls see.
25- **A caller's transport** is a `TransportInput`; `asTransport` fills its quirks, harvest store and scrubber at the
26 edge (`operation()`).
27- **Thrown values and foreign records** (a JSONL line from another producer, a platform error) are read with
28 `field` / `readKey` / `fromNullish`, which return `Option`.
30Inside: absence a lookup produces is `Option<T>`; a total record's "none given" field is `T | null`; alternatives are
31tagged unions.
33## Order
351. **Green trunk** (b350b96). The rewrite's seven red pushes: commitChanges limits regression, http lint, decoder and
36 decision registries, absence ratchet, stale sweep lines; #164.
372. **Wave 1: total shared types** (97802db, b2020be). Transport, OperationOpts, the thrown-value readers, otel: the
38 types every cluster reads, so clusters convert without touching each other's files.
393. **Wave 2: clusters, in parallel** (STACK.md "Converting a module"): packs, wire, write, merge, read, core. Each
40 drove its files to zero absence, returns `Result` internally, and kept a throwing wrapper for what another
41 cluster or the public API still calls. Done: a7982c0.
424. **Leftovers**: LsRef total, OrMissing deleted, honest Result/wrapper names (ec02ad6, 3814e4a). Done.
435. **Cut-over** (STACK.md step 3), bottom-up so a function's callers convert after it: round A codecs and validation;
44 round B protocol, transport and `operation()`; round C the entries (write, read, merge in parallel); round D
45 delete `thrown`/`orThrow`, 0.2.0, docs. Tests keep their assertions through `test/unwrap.js`. Done. ply-web
46 switches `catch` for an exhaustive `switch (r.error.code)` before this lands on main.
48## Visible changes so far (callers can observe these)
50- A `quirks` record passed to a transport is filled with the defaults (`treeFilter: 'tree:0'`, `blobWants: 'many'`)
51 instead of staying empty until a fallback is learned.
52- A root `Span`'s `parentSpanId` is `null` (the exported OTLP line still omits the key).
53- Span `status` is a tagged union: only `code: 2` carries `message`.
54- `memtree.replaceOnce` returns a `Result`.
55- A listed ref (`LsRef`) always has `peeled` and `symref-target`, `null` when the line carries none.
56- `parsePack` objects (and `resolvePack`'s, and `describePack`'s rows) carry `base`, a tagged union (`{ tag: 'none' }`,
57 `{ tag: 'ofs', offset }`, `{ tag: 'ref', oid }`), in place of `baseOffset`/`baseOid`; `resolvePack` no longer writes
58 `.oid` onto the caller's parsed objects. A hand-built `resolvePack` input gives `base` the same way with plain values
59 (left out: none) and is parsed at resolvePack's edge: a bad type, base or data is `bad_request` (a type outside the
60 six used to be `pack_corrupt`).
61- A pack object's declared size is checked where its header is read (`readObjHeader`'s cap): `fetchObject` of an object
62 past `maxObjectSize` is `limit_exceeded` with `what: 'pack object size'` (was `'object size'`), as `parsePack` already
63 said, and the scan refuses it before reading an OFS/REF base.
64- `inflate()` is a collector over the pull decoder, so it refuses what the pull refuses: CINFO > 7 (`zlib: window size N
65 is not a zlib window`) and a back-reference past the declared window (`inflate: distance too far back`), both
66 `pack_corrupt` (the owner's ruling on #172).
67- A wide fetch whose want cannot be a blob (a tree or commit through the blob:none or unfiltered fallback) drops the
68 pack's blobs and their deltas as their headers arrive; they are counted in `git.fetch.wide.blobs`, at their declared
69 size in `git.fetch.wide.extra_bytes`.
70- `mergeBase` with `maxDepth: null`, and `inflate` with `expectedSize: null`, mean "not given" (the configured limit,
71 no expected size) instead of `bad_request`.
72- Parse once (#156): a fetch want is an object id. A want git's upload-pack refuses ("expected to get oid": a ref name,
73 an abbreviation, an empty want) is `bad_request` (`what: 'want'`) before any request; an upper-case id is sent
74 lowercase (git reads either case as the same object); text after the id, which git ignores, is refused.
75- `lsRefsBody` refuses a prefix with a NUL, CR or LF (`what: 'ref prefix'`, as `lsRefs`) instead of writing it.
76- `encodeTree` refuses a mode other than the five git writes (`what: 'mode'`) and an id that is not 40 lowercase hex
77 (`what: 'oid'`) instead of writing them; `buildCommitObjects` refuses a new blob id that is not one.
78- `mergeBase` refuses an id that is not 40 lowercase hex (`what: 'oid'`) before any fetch; `walkPath` refuses its tree id
79 (fetchObject's refusal) even when there is no path to walk.
80- `validateSpec`'s plan carries `base` as `{ kind: 'ref', ref } | { kind: 'commit', oid }` (no `baseOid` flag);
81 `editFile` parses the spec once, so a retry reuses the first attempt's commit time.
82- Parse once (#156): a limits record is parsed once where it enters (`parseLimits`): `createTransport` /
83 `GitHttp.create`, `operation()` (every entry), a transport handed in (`transportFrom`), `syncRef`, and every public
84 codec that takes limits (`parseTree`, `parseCommit`, `parsePack` / `packParseOpts` / `parsePackInit`, `resolvePack`,
85 `describePack`, `indexPack`, `verifyFetchAnswer`, `validatePath` / `parsePath`, `fileEntries`, `buildTree`,
86 `validateTreeSpec`, `validateSpec`, `treeFiles`, `commitView`, `filesFromDir`, `writeFiles`, `objectsForPack`,
87 `reachableObjects`, `planPush`). A key that is present must be a finite non-negative number: the same `bad_request`
88 (`limits.<key> must be a finite non-negative number`, `what: <key>`, `got`) as before, but refused at the entry before
89 any request, whichever operation would have read it (it used to be refused only at the read that used it, so a bad
90 key an operation never reached was never refused). When several keys are bad, the first in `DEFAULT_LIMITS` order is
91 the refusal, and an entry parses its limits before its spec (a call with both wrong gets the limits refusal). A key
92 that is missing, or passed as the platform missing value, takes `DEFAULT_LIMITS`'s value (it used
93 to be refused at its first read; `validatePath(p)` and `parsePath(p)` with no limits record used to refuse every
94 path); `null` is a value, and refused. `Transport.limits` (and `GitHttp#limits`) is a `CheckedLimits`, branded by
95 `parseLimits` alone; `DEFAULT_LIMITS` and `WORKER_LIMITS` are checked records. `parseLimits`, `CheckedLimits` and
96 `LimitsInput` are exported. `v2Init` takes a `CheckedLimits` (`parseLimits` a caller's record first; the default is
97 `DEFAULT_LIMITS`). A `cachingFetch` (which returns no `Result`) parses its `limits` where it verifies an answer, as
98 before. A merge's blob reads keep their bound as the lower of `maxObjectSize` and `maxMergeBlobBytes`.
99- Parse once (#156): a fetch `have` and `shallow` is an object id, as a want is: upload-pack dies on anything else
100 (`process_haves` "expected SHA1 object", `process_shallow` "invalid shallow line"), so one is `bad_request`
101 (`what: 'have'` / `'shallow'`, `invalid have: must be an object id (40 hex digits)`) before any request; an
102 upper-case id is sent lowercase; text after the id is refused. `negotiate` parses every have before its first round
103 (a bad one in a later batch used to be sent rounds later, or refused only then), and an acknowledgment that is not an
104 object id is `protocol` (it used to be offered back to the server as a have).
105- Parse once (#156): `mergeTrees` parses its `base` / `ours` / `theirs` tree ids at the edge (`null` is the empty
106 tree; anything else must be 40 lowercase hex: `bad_request`, `what: 'oid'`, in that order) before any tree is read
107 (a bad one used to be refused by the first fetch). `encodeCommit` parses `tree` and each `parent` (after the header
108 checks it always made): not 40 hex digits is `bad_request` `what: 'tree'` / `'parent'` (it used to write the line;
109 git's fsck refuses it: `badTreeSha1`, `badParentSha1`), and an upper-case id is written lowercase, as `git
110 commit-tree` writes it. `buildCommitObjects` parses `oldCommit`.
111- `buildPack`'s input (`PackInput`, also push's `objects`) gives its base as a tagged union with the read side's tags:
112 `base: { tag: 'none' } | { tag: 'ofs', index } | { tag: 'ref', oid }` (left out: none), in place of `baseIndex` /
113 `baseOid`. An ofs base names an earlier object by its index (its offset is not known until the pack is written). The
114 quirks of the flag fields are gone: an empty `baseOid` meant no base, and `baseIndex` beside `baseOid` was an
115 OFS_DELTA whose entry named no base. `planPush` refuses, before anything is built, an ofs base that names no earlier
116 object, a ref base that is not an object id (`what: 'base'`, both), and an object that still carries `baseIndex` /
117 `baseOid` or a base outside the three tags (it used to ignore an unknown field, and send a delta as a whole object).
118 `buildPack` and the streamed push writer share one entry encoder (`pack.ts entryHead`); their bytes are unchanged.
120- 0.2.0: every exported function that can fail returns `Result<T, PlyError>`; `GitHttp` is built with
121 `GitHttp.create(url, opts)` (a `Result`), and its methods return the free functions' Results.
122- `fail` from the package is `Err(plyError(…))`; `plyError` builds the error value. `thrown`/`orThrow` are gone.
123- A value a caller-supplied transport raises that carries a ply code but is not an `Error` comes back as the Err,
124 unchanged (it used to be rethrown); it is never mistaken for ply's own `cas_conflict` (no retry) or an unborn HEAD.
125- A value the caller's own callback throws inside an operation comes back as an Err, never as a throw: a signer or a
126 `pushDir` filter is `bad_request` naming it in `what` with the thrown value as `cause`; a `fetchImpl` failure is the
127 transport's coded Err; any other foreign throw is `bad_request` (`what: 'callback'`), or `ambiguous` once a push
128 request was handed to the transport. Telemetry callbacks (exporter, `onEnd`) never change an outcome.
129- The user agent and the otel scope version are `ply/0.2.0` / `0.2.0`.
131## Not carried forward
133Five PRs the rewrite closed and never re-landed: #167 and #168 (brands on validated refs and wire fields) and #169
134(a total capabilities record) are subsumed by waves 1 and 2 in this style; #173 (pull-based stream primitives) is a
135separate design change and should be re-proposed against the converted wire cluster. #164 landed in step 1.
Diagnostics5 git calls · 150 ms
CallStatusSizeTime0150 ms
discover200191 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=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 KiB · 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=11990
git.response.cache=HIT
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=2
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 · 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=919
git.response.cache=HIT
git.response.duration_ms=2
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
fetch2005.4 KiB144 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=144
git.response.bytes=5535
git.response.cache=MISS
git.response.duration_ms=144
git.fetch.wants=4fbcfb16fb12f8434bba91ce460674a835337618
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=5535
git.pkt.payload.max=5508
git.sideband.band1.bytes=5508
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
a5e0e952bd6aa140
Request
b6cd6ec8…
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