GitHubivarvong
ply
main
1// What each error code means and where it comes from. Documentation for humans and tooling; the runtime table is
2// errors.ts (RETRY); `satisfies` makes the table exhaustive over Code at compile time, test/pure.test.js at run time.
3import type { Code } from './errors.js';
5export type CodeDoc = { readonly where: 'local' | 'remote' | 'net' | 'content'; readonly what: string };
6export const CODE_DOCS: Readonly<Record<Code, CodeDoc>> = Object.freeze({
7 bad_request: { where: 'local', what: 'an argument is malformed (ref, ident, path, oid, message, find, files: a duplicate or file/directory path; checkout: a non-empty dir, or a path that collides or would pass through a symlink)' },
8 unsupported: { where: 'remote', what: 'the server lacks a capability we need (sha256 repo, no filter, push-options not advertised, no protocol v2: what "protocol version")' },
9 network: { where: 'net', what: 'connection failed or dropped before a response was complete' },
10 timeout: { where: 'net', what: 'a request stalled past limits.firstByteTimeoutMs or limits.idleTimeoutMs, a consumer held a chunk past limits.heldTimeoutMs, or ran past an opt-in limits.requestTimeoutMs; `what` names the limit' },
11 aborted: { where: 'local', what: 'the caller\'s AbortSignal fired' },
12 http: { where: 'remote', what: 'an HTTP status we do not classify further, including any 3xx: redirects are not followed (status, location)' },
13 auth: { where: 'remote', what: '401/403' },
14 not_found: { where: 'remote', what: 'repository, ref, path or commit does not exist; miss.kind says which' },
15 rate_limited: { where: 'remote', what: 'HTTP 429; retry after a delay' },
16 upstream_5xx: { where: 'remote', what: 'HTTP 5xx' },
17 not_git: { where: 'remote', what: 'the endpoint is not a git smart-HTTP server (wrong content-type)' },
18 protocol: { where: 'remote', what: 'malformed pkt-line / v2 framing from the server; reason empty_response for a fetch answer with nothing in it' },
19 pack_corrupt: { where: 'remote', what: 'a pack or object failed verification (hash, size, zlib, delta; an unwanted object; a tree naming one entry twice)' },
20 remote_error: { where: 'remote', what: 'the server said ERR / band 3; reason not_our_ref when the text is upload-pack\'s not-our-ref' },
21 limit_exceeded: { where: 'local', what: 'a limits.* bound was hit before allocation, or a remote receive-pack rejected the request as too large (what, got, max; a byte budget charges LIMIT_OBJECT_OVERHEAD per object on top of its bytes)' },
22 match_count: { where: 'content', what: 'find matched 0 or >1 times (exactly-one-match contract)' },
23 lfs_pointer: { where: 'content', what: 'the blob is a Git LFS pointer (pass allowLfsPointer to edit it)' },
24 cas_conflict: { where: 'remote', what: 'the ref moved under us (receive-pack compare-and-swap lost)' },
25 push_rejected: { where: 'remote', what: 'a hook or policy refused the push; see hookOutput / remote messages' },
26 push_partial: { where: 'remote', what: 'a non-atomic multi-ref push was partly applied: `landed` lists the refs updated, `rejected` the refs refused with their reasons' },
27 merge_conflict: { where: 'content', what: 'both sides changed a path; `conflicts` lists them' },
28 not_fast_forward: { where: 'content', what: 'fastForwardOnly was requested and a merge commit would be needed, or the server refuses non-fast-forward updates (receive.denyNonFastForwards) and the pushed commit does not descend from the old oid, or pushRepo / syncRef refused one before sending (no force)' },
29 unrelated_histories: { where: 'content', what: 'no common ancestor within the search depth' },
30 not_linear: { where: 'content', what: 'a merge commit in a chain that must be linear (rebase, pick)' },
31 ambiguous: { where: 'remote', what: 'the push was sent and may have been applied, but no trustworthy confirmation was obtained' },
32 internal: { where: 'local', what: 'an invariant of this library failed; please report' },
33} satisfies Record<Code, CodeDoc>);
Diagnostics6 git calls · 174 ms
CallStatusSizeTime0174 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 · hit4 ms
git.upload-pack fetch http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=fetch git.upstream.dur_ms=4 git.response.bytes=4347 git.response.cache=HIT git.response.duration_ms=4 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=10Open 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=5323b9266eea5ded637285d1c5320699f12be76eOpen pack map
fetchtree:02002.4 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=2507 git.response.cache=HIT git.response.duration_ms=2 git.fetch.filter=tree:0 git.fetch.wants=8f720d29ff85ce682ffdad9c393b04a3834c3203 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=2507 git.pkt.payload.max=2480 git.sideband.band1.bytes=2480 git.sideband.band2.bytes=0 git.sideband.band3.bytes=0 git.pack.objects=1 git.pack.bytes=2480 git.pack.trailer=723b6bf1d4d6021fe5eb940c622b9ff00ee4a381Open pack map
fetch2001.8 KiB164 ms
git.upload-pack fetch http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=fetch git.upstream.dur_ms=164 git.response.bytes=1856 git.response.cache=MISS git.response.duration_ms=164 git.fetch.wants=f54e9b1dcaa7d2e97ed557a48eb0cbe5de14d321 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=1856 git.pkt.payload.max=1829 git.sideband.band1.bytes=1829 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
- a5e17fedc8383014
- Request
- cc828ab6…
- 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