GitHubivarvong

ply

main
ply5 git calls184 ms62 KiB3 cachedprotocol v2
250 lines116 KiBRaw

Safety argument

Everything below is enforced by a test that runs against real git locally. No claim here rests on reasoning alone; each has a file:line that fails if the claim stops being true.

Threat model

  1. Hostile or broken server. Anything on the wire is attacker-controlled: HTTP status, content-type, pkt-line framing, v2 sections, sideband bands, pack headers, object sizes, zlib streams, deltas, ref lists. Goals: crash us, hang us, exhaust memory, make us push wrong content, make us report success falsely.
  2. Hostile or careless caller. Strings that end up inside git objects (author, message, path) or protocol command lines (ref) have no escaping mechanism in git. Goals: header injection (extra parent lines → silent merge), ref smuggling, path traversal, secrets leaking into telemetry.
  3. Our own bugs. Codec errors that produce objects git accepts but with wrong content; races that lose or duplicate commits; partial state on failure.

Invariants and where they are proven

#InvariantEnforced by
I1Every run terminates with either a correct result or an error whose code is from a fixed set. No hang: every wait of an HTTP exchange is bounded by one of three limits, limits.firstByteTimeoutMs, limits.idleTimeoutMs and limits.heldTimeoutMs (#273). On the network it is bounded by limits.firstByteTimeoutMs (to the headers, or from the hand-over of a streamed upload's last piece, so it covers the tail the platform still has buffered; it cannot fire once the headers have arrived) and limits.idleTimeoutMs (no progress: no upload piece of at most 64 KiB taken by the platform, no body chunk arriving) (#255). A network stall ends at one of them, and a run's bytes are bounded by the byte limits. Neither measures upload progress below fetch: for a streamed upload they fire on what ply can see (the platform stops taking pieces; no response after the last piece is handed over), and the bound on a stalled upload as a whole, whatever the platform has buffered, is limits.requestTimeoutMs (off by default) or the caller's signal. Idle time measures the network, not the consumer: while the consumer holds a chunk and has not asked for the next, no idle time is charged; that hold is bounded by limits.heldTimeoutMs instead (default 240 s, 4 x the idle default; from the take to the ask, started at the first clock read after the take, since the take reads no clock: the cut is never before take + heldTimeoutMs and late by at most one timer interval, the smaller of limits.idleTimeoutMs and heldTimeoutMs (heldTimeoutMs when idle is off), beyond timer latency), and a consumer that holds a chunk past it gets timeout with limit: 'heldTimeoutMs' and the upstream body is cancelled. Setting heldTimeoutMs to 0 leaves a stalled consumer bounded only by the caller's signal or limits.requestTimeoutMs. A timeout above 2147483647 ms is refused (bad_request). A wall-clock bound on a slow-but-steady exchange is opt-in (limits.requestTimeoutMs, or the caller's signal), as in stock git. Body reads end on abort even when the fetch does not tie the body to the signal. While ply waits on the network the timer is a live setTimeout that owns the AbortController (while the consumer holds a chunk the generator it holds keeps the controller reachable); AbortSignal.timeout() is not used, because after a GC that signal never fires and a stalled body hangs.deadline.test.js (#273: a hold past heldTimeoutMs is cut as heldTimeoutMs with the upstream cancelled, a hold of 999 of 1000 ms is not, idle is not charged while held, and a 5 ms hold after a 300 s network wait is not cut with idle 0 or idle 600 s), adversarial.test.js (HTTP faults × 6 stages: 5xx/401/403/404/429/html/empty/stall/partial-stall/drop/partial-drop; 30 protocol-aware mutators × 6 stages × 3 seeds; request timeout survives a GC spawns node --expose-gc test/timeout-gc.mjs), fuzz/hostile.mjs (composed random mutations, any stage)
I2On any error the ref is unchanged. Exceptions: a fault on the receive-pack response may leave the ref at exactly our commit (server applied it): that error is ambiguous; and a non-atomic multi-ref push_partial names exactly the refs that moved (I36). It is never anything else.adversarial.test.js checkInvariants, ambiguous push test, fuzz/hostile.mjs
I3A success is git-verified: ref == our commit, blob bytes == expected splice, diff --name-only is exactly the path, parent == old head, mode preserved, fsck --strict clean with receive.fsckObjects=true on the server.fuzz/run.mjs oracle (every case), adversarial (every success), edges.test.js
I4No wire-supplied size is allocated before it is checked. Every limits record is parsed once where it enters (parseLimits, #156: a transport, an operation, a public codec): a key given as anything but a finite non-negative number is bad_request there, before any request; a key left out is DEFAULT_LIMITS's, never an Infinity fallback that disables the check; past the edge the record is a total CheckedLimits and every check reads a checked number. Buffered packs are capped by maxPackObjects (100_000) and maxInflatedTotal (4 × maxObjectSize = 256 MiB), and that inflated total includes delta results resolvePack allocates on top of the inflated instructions. inflate defaults maxOutput to maxObjectSize. Tree entries, commit parents, v2 section lines (including sections this client does not interpret), report-status lines, and ls-refs bytes (maxLsRefsBytes, the same ceiling as one buffered pack) fail limit_exceeded before the next record is kept. Capability advertisements are streamed into maxPackBytes and a Content-Length past that cap is refused before the body is read. An HTTP error page keeps at most 4 KiB. The streamed single-object parser (spStep, used by fetchSingle, edit's streamed blob, readFile/openBlob and checkoutTree's single-blob stream) holds at most 21 header bytes: a size varint may not start a group past bit 63 (git's bitsizeof(size_t) <= shift), so an object header is ≤ 10 bytes, the 22nd byte of a header that never ends is pack_corrupt, and no decoded size is NaN or infinite. The same rule bounds a delta's size header (≤ 10 bytes), so applyDelta stays inside the error taxonomy. REF_DELTA bases are a Map lookup (stats.baseLookups), not a scan of the pack. Every fetch response body is capped where every consumer passes (issue #36): v2Step holds band 1 (the pack) to maxPackBytes (limit_exceeded pack bytes, got within one frame of the cap) and band 2 (progress) to the same cap (progress bytes) before the frame is yielded, so fetchSingle, fetchWide, fetchPackOnce (fetchPack, checkoutTree's tree pack and blob batches, merge-base walks), the streamed blob (edit's streamBlobEdit, readFile/openBlob, checkoutTree's single-blob stream) and any consumer added later are bounded without a check of their own; receive-pack's response is held the same way by push: every frame, band 1, 2 or 3, counts toward one report bytes cap (maxPackBytes), and a hit after the body is sent is ambiguous (original limit_exceeded, I36). Two more limits bound what push keeps of that answer and never its outcome: a reason (ng <ref> <reason>, unpack <status>) is cut at maxReportReasonBytes (4096; never below git's own longest reason, so git's classes are read whole) and the ref keeps its status (I36's echo is read from the whole status and reason before the cut: a pair that differs past the limit stays ambiguous), and band 2 past maxReportProgressBytes (8 MiB) is dropped undecoded while the report is still read; band-1 keepalives are bounded by report bytes and the timers. The read still ends at the first line that cannot be git's (no unpack line first, a ref not commanded or answered twice), so at most one line a command is kept. The only report causes of ambiguous are report bytes and report lines (push-report-bound.test.js). Every object's zlib stream is bounded by its declared size: zlibBound(S) = S + ⌈S/8⌉ + ⌈S/64⌉ + 13 (format.js) is zlib's own conservative deflateBound (deflate.c ≤ 1.2.13, non-default parameters) plus compressBound's constant; it is ≥ every form deflateBound takes for a zlib-wrapped stream (complen + 6, zlib 1.3's fixedlen and storelen, compressBound) and ≥ 65535-byte stored blocks at every S (format-facts.test.js), and node:zlib never exceeds it at any level, strategy, memLevel or windowBits (mutant-kill.test.js, fuzz/codec.mjs). The stored-block formula S + 5·⌈S/65535⌉ + 6 is not a bound of zlib's output and is not used: zlib's own empty stream is 8 bytes (it gives 6), and memLevel 1 writes 127-byte stored blocks (1,013 of 2,080 node:zlib configurations — 13 sizes × levels 0/1/6/9 × memLevel 1/2/8/9 × 5 strategies × windowBits 9/15 — exceed it). spStep refuses the streamed body on the chunk whose zlib bytes cross the bound (pack_corrupt "zlib stream longer than its declared size allows", got/max/size on the error, no count in the message, so any chunking gives the same error, I10), and inflate refuses at every block start and at the stream's end (parsePack inherits it for every object, deltas included; without an expected size the output cap stands in). A 10-byte blob therefore costs at most 26 zlib bytes plus the rest of the frame they arrived in, whatever maxPackBytes is. RFC 1951 has no such ceiling (a non-final empty stored block is 5 bytes in, 0 out, forever), so the bound is zlib's promise, not the format's; an encoder that sync-flushes between tiny chunks could exceed it, and no git server does. The streamed blob paths also refuse inflated bytes past the declared size before anything else looks at them (edit used to report an empty blob followed by a byte as match_count), and a DecompressionStream refusal reaches readFile's and checkoutTree's stream as pack_corrupt, not a platform error without a ply code. A delta cannot expand past maxDeltaResult (64 MiB): the densest in-limit copy is a 65536-byte base and a 1031-byte delta (1024 one-byte DELTA_COPY opcodes plus a 7-byte size header) producing exactly 64 MiB, a factor of 67108864/1031 (about 65091× the delta, 1024× the base). maxDeltaResult + 1 throws limit_exceeded before the output buffer exists. A chain cannot exceed maxDeltaChain (64) deltas in any pack order (REF or OFS, base-first or child-first, in-pack or thin base): resolvePack counts links from the full or external base (base.chain + 1), not recursion depth, and resolves by dependency (a delta is filed under the base it rests on and resolved when that base lands, from a queue: no recursion, and no entry visited more than three times in any pack order, stats.steps), so it returns every object or an error (limit_exceeded delta chain depth for a long chain, pack_corrupt for a base that is nowhere); a chain of any configured length, resolved or waiting on a thin base, cannot exhaust the stack (pack-resolve-linear.test.js: 100,000 links). Every step of it is capped at the same 64 MiB.adversarial.test.js I4 (2^40 object, 2^40 delta result, 8 MiB zlib bomb declared as 100 B, refs flood, shallow flood, pack flood, over-declared stream; rss delta < 64 MB; 6 × 64 MiB pack throws limit_exceeded on object 5 with got = 5 × maxObjectSize; 8_000 ref-deltas resolve with baseLookups equal to that count in under 3 s; small packs keep stats.inflated ≤ the cap), mutant-kill.test.js (missing keys, object-count header, parent and tree caps, report lines, delta aggregate room), delta-bound.test.js (the 1031-byte expansion and the one-past-cap refusal; exactly 64 deltas resolve and 65 are limit_exceeded with got 65 for REF base-first, REF child-first, OFS, thin REF both orders and OFS over a thin REF root; issue #14's 500-link and 101-object probes; a 20_000-link OFS chain over a thin root is limit_exceeded, not a stack overflow; shown failing on the previous packresolve.js), pack-resolve-linear.test.js (the check before the lookup at its boundary: a thin REF root with maxDeltaChain OFS deltas on it is a missing base, and one more OFS delta is limit_exceeded with external not called; a hand-built cycle of OFS bases is limit_exceeded delta chain depth, never a throw; external is asked once per distinct missing base id, in pack order of its first REF_DELTA), adversarial.test.js "I4 a blob fetch whose object header never ends" (PACK + count=1 + endless 0x80 against edit, readFile and checkoutTree: pack_corrupt in < 1 s having read 131 KB), mutant-kill.test.js "size varints stop at 64 bits" (10-byte headers accepted, 11-byte and the 200-byte NaN probe refused in readObjHeader, parsePack, applyDelta; spStep holds ≤ 21 bytes); issue #36: adversarial.test.js "I4 #36 matrix" (every cell of path {edit, read, checkout single, checkout batched, fetchObject, fetchPack} × body {valid, endless empty stored blocks, a stored block one byte over, trailing junk, truncated, padded to the zlib bound, one block past it} × declared size {0, 1, 65535, 65536, 1 MiB} × cap {R + 1, R, R − 1}, 630 cells, expected outcome stated per cell: never timeout, served bytes ≤ the cap + one frame and ≤ the decision frame), "I4 a blob whose zlib stream never ends", "I4 maxPackBytes bounds the streamed body on every path", mutant-kill.test.js "zlib stream length is bounded by the declared size" (26 bytes for a 10-byte blob pass, the 27th zlib byte is refused) and "v2Step holds band 1 and band 2 to maxPackBytes", props.test.js "the zlib-length bound is chunking-invariant and exact (I10)", format-facts.test.js "zlibBound", fuzz/hostile.mjs mutator zlib_endless_stored (detection site zlib_bound)
I5Caller strings reaching git objects or command lines are validated before any I/O. validateIdent is the only constructor of an author/committer/tagger: name and email follow fsck_ident (NUL, newline, <, >), time is a non-negative safe integer, and tz matches /^[+-]\d{4}$/ in the civil range (−12:00 through +14:00, minutes 00–59, extreme hours only on the hour). The result is branded; a spread or a raw object cannot reach ident(). editFile, mergeBranch, rebaseBranch, cherryPick, and revertCommit call it before operation(). encodeCommit and encodeTag reject LF or NUL in header values even if a caller bypasses the brand (the message may contain LF, not NUL), and both parse what they built with the reader (parseCommit, parseTag): a raw ident string fsck_ident refuses, an extra line that shadows a header the reader takes once, and (commit) an empty extra line or any field that would not read back as given are bad_request. Fetched idents stay on fsck's rules: checkIdent does not range-check tz (+9999 is well-formed on the wire). Refs (check-ref-format), paths, messages (NUL), push options, fetch wants/haves/shallows/filters, ref-prefixes, the User-Agent, and auth header fields reject a header or pkt-line break.adversarial.test.js I5 (the original edit cases, plus each operation × name/email/time/tz/message/ref with zero fetch calls). encodeCommit returns bad_request on an injected committer (it is a Result; it never throws); the same bytes pushed raw are still rejected by git's fsck. encode-commit-roundtrip.test.js: every refused shape against git hash-object -t commit, and 80 generated commits byte for byte against git cat-file, both ways. compliance.test.js still compares name/email to git fsck --strict
I6Secrets never reach telemetry. URL userinfo is stripped at construction and converted to auth; Authorization is never recorded; errors only ever see the redacted URL.adversarial.test.js I6 (token in auth + in URL; full JSONL dump searched for token, base64 of token, userinfo)
I6dURL userinfo is the Basic credential git sends for that URL, byte for byte (git 2.50 measured behind a Basic-auth gate on http-backend: it sends user: for a user alone and :pass for a password alone without asking for anything, and prompts only once that is refused): each part percent-decoded to bytes (%XX a byte, UTF-8 as its bytes, %FF the raw byte, an invalid escape such as %ZZ as written), joined by :. Explicit auth wins over the URL. A NUL, CR or LF in the userinfo is bad_request before any request (git refuses LF and NUL, sends CR); a URL that does not parse is bad_request without the TypeError, whose input carries the URL. A Basic user with an empty password is the whole credential and is scrubbed at ≥ 16 characters, digit or not (I6b's rule alone left a digitless GitLab token readable). Every url.full / git.<op>.url attribute is the URL without userinfo.adversarial.test.js I6d (10 userinfo forms — ghp_…, fine-grained github_pat_…, digitless glpat-… as the user; user:; user:pass; :pass; %40/%3A; UTF-8; %ZZ; %FF — real git ls-remote + push and ply readFile + editFile through the same gate; git is handed no credential in a URL: it decodes the userinfo itself (git credential fill, credential_from_url) and sends it from a credential helper set through GIT_CONFIG_* env (an empty user, which git's helper path cannot send, as http.extraHeader), because a libcurl that reports the effective URL without the userinfo makes git take a redirect and drop the credential (issue: CI image ubuntu-26.04 20261018.50, git 2.55.0, curl 8.18.0-1ubuntu2.7; on git 2.50 the old and new oracles send the same Authorization for all 29 URL forms): every ply request's Authorization equals git's; the export holds no secret, no userinfo, no Basic value, and every URL attribute is userinfo-free; a gate refusing everything and echoing the header and its decoded form → auth, nothing of the secret (whole or any 12 characters) in the error, inspect, or the export; ivar@ alone is sent as ivar: and stays readable; LF/CR/NUL and an unparseable URL → bad_request with zero fetches), workerd.test.js (a token as the URL user under workerd: the edit lands with git's Authorization, nothing in the export)
I6eEvery credential cell has one stated outcome (issue #40), git's wherever git has the same input. Sources: URL userinfo (I6d), explicit fields { user?, token? } (git: a credential helper's username=/password=), an explicit header (git: http.extraHeader). Explicit fields are sent as UTF-8 bytes (git sends a helper's tëst/päss as those bytes; before, btoa sent Latin-1 for ë and threw an untyped InvalidCharacterError past U+00FF). An explicit auth that sends nothing is bad_request: {}, { token: '' }, and { user } alone (git's helper API asks for the password there, measured; a library cannot ask; { user, token: '' } is user:, git's helper with an empty password). A header or bearer token outside printable ASCII is bad_request (fetch throws untyped past U+00FF; git sends raw UTF-8 that no scheme's grammar admits; a control character is a 400). An empty URL userinfo (http://@h, http://:@h) is Basic :, as git sends; WHATWG URL drops it. No URL-parse error quotes the URL. A transport that cannot be built inside an operation ends the root span with the error and the outcome, and the error carries span.adversarial.test.js I6e (3 sources × 6 user forms — absent, short, secret-shaped, UTF-8, LF, U+0001 — × 4 password forms — absent, empty, ASCII, UTF-8 — = 72 cells: 56 exact headers, 1 anonymous, 15 bad_request with zero requests and an ended git.read root carrying the outcome; git ran on 67 and agrees on every one (no credential in any URL or argv git is handed: URL userinfo decoded by git credential fill, helper and http.extraHeader through GIT_CONFIG_* env, as in I6d); each sendable cell also through a gate that echoes the header and its decoded form; no secret or 12-character piece of one in any error, inspect, span export, URL attribute or t.url; raw non-ASCII / control / LF headers and bearer tokens; the ssh:// cells left with the SSH transport, 2026-10-31)
I7Memory is O(1) in blob size and repo size: max single allocation = one inflate chunk (16 KiB) on a 24 MB blob; tree packs bounded by maxObjectSize.edges.test.js large blob, fuzz/run.mjs (max single alloc ≤ 70 KB asserted every case)
I8Concurrency: N writers on one ref converge with no lost or duplicated edits; every lost race is visible as a cas_conflict and a failed receive-pack span.concurrency.test.js (6 writers × 3 rounds)
I9Degenerate edits are safe: find === replace is a noop (no empty commit); replacing a whole 1-byte file with nothing sends a full empty blob (git rejects deltas < 4 bytes); match count ≠ 1 fails before any push.edges.test.js, fuzz/run.mjs (noop, zero_matches, two_matches outcomes)
I11Push outcomes are typed (I36 is the exact rule). ok only on a well-formed report naming exactly the commanded refs; cas_conflict/push_rejected only on a well-formed ng for every ref; push_partial for a well-formed non-atomic mixed report; everything else after the push body is on the wire — transport failure, any HTTP status (except a 401/403/404 at the status line, before any frame of the answer, that the receive-pack advertisement repeats with the same code: the service is not there for this caller, so it is auth / not_found, #144; a refusal the advertisement does not repeat may be a middlebox that forwarded the body, and stays ambiguous), wrong content-type, bad framing, band 3, unreadable or inconsistent report — is ambiguous (the ref may have moved; re-read it). verify: true adds one ls-refs after ok to defeat a forged report; without it a middlebox can fake success, which git's protocol cannot prevent.fuzz/liar.mjs (18 semantic lies: stale/foreign/fabricated ls-refs, wrong commit/tree/blob objects, same-size and needle-preserving blob swaps, forged/inconsistent/dropped reports), adversarial.test.js I2
I12Every pack we build is accepted by index-pack --strict, resolves to the same oids git computes for the same edit, and lands through receive-pack.fuzz/packgen.mjs (random repo/path/edit shapes over copy-op and insert-op boundaries)
I13Codecs agree with their reference implementations at scale: inflate vs zlib (all levels/strategies/window bits; truncation throws; bit flips are caught by Adler), SHA-1 vs crypto, deltas vs git patch_delta, pkt-line.fuzz/codec.mjs, 300,000 cases, 0 failures
I14The pack cache never changes an outcome: only wants-only, filtered, non-relative fetches are cached (no have, want-ref, shallow, deepen-since/not); the key covers url + credential + body; an answer reaches the store only through a streaming verifier holding O(chunk) state (pkt-line framing complete to the final flush, no in-band ERR, no sideband channel 3, the pack header, and the pack trailer equal to a running SHA-1), which errors the put's body at the first violation, after which the key is deleted (an in-band ERR, a cut answer or a pack with a wrong trailer is never stored); nothing on the cache path holds a whole answer (the cache branch queues at most CACHE_LAG_BYTES, and a client that cancels its body cancels the origin and the put); a stored entry is untrusted and is served streaming, unparsed by the cache: the client's own parse is the check, and a HIT whose answer it refuses (pack_corrupt, protocol, remote_error: a flipped byte, an ERR, a cut, an empty body, a wrong pack trailer) is deleted and refetched exactly once; a corrupt live body is never retried. Second edit at the same tree: the server sees only ls-refs, the blob stream and the push.packcache.test.js (proxy request counts are the oracle; poison all entries → 5 busts → repaired; git fsck clean; a 64 MiB answer with at most the lag window between origin and store; a HIT with zero chunks parsed by the cache)
I15A head hint cannot overwrite another writer: ls-refs always runs and always wins; the hint only decides whether the overlapped speculative commit fetch is used. A cas_conflict (receive-pack disagreeing with ls-refs: replica lag) is redone once from a fresh ls-refs.packcache.test.js, workerd.test.js (stale → 1 push, 1 root, other writer's commit is the parent); liar.mjs replica:consistent-lag → cas_conflict
I10Every pure step function (pkt-line decode, v2 state machine, single-object pack stream, find/replace scanner) is chunking-invariant: any split of the input yields identical output and state. This is what makes 1-byte TCP chunks and 64 KiB chunks equivalent.props.test.js (random splits, 200 cases each), adversarial.test.js chunking stress (1- and 7-byte chunks at every stage)

Protocol semantics: the fetch product space

Status before this section existed: the pipeline only ever issues single-object tree:0 fetches and one full-blob fetch, and that is what the earlier suites covered. The wider fetch surface (multiple wants, haves, shallow state, deepen/deepen-since/deepen-not, blob:limit, combine:, thin packs, negotiation without done) was not verified, and the earlier text implied broader coverage than existed. The client also had two real bugs there: a negotiation round that returns only acknowledgments (no packfile) was treated as a protocol error, and a REF_DELTA whose base is a later delta object in the same pack fell through to the external store. Both are fixed and covered below.

Oracles (three, independent, all local):

  1. Bound (requiredAndHad in test/fuzz/dag.js): for any request, required ⊆ got ⊆ required ∪ had, where required is the exact reachable(wants) \ reachable(haves) after the filter (haves cut at the request's shallow set, an unshallowed commit's parents added as wants, a had want's parents never walked) and had is everything the client declared. This is the property a client relies on: it never lacks an object it needs, and anything extra it already has.
  2. pack-objects oracle (test/fuzz/packobjects.js): git pack-objects invoked exactly as upload-pack invokes it, in the same repo, must yield the identical object set. Exact in both server modes.
  3. Invocation capture: uploadpack.packObjectsHook records the real argv and stdin upload-pack used; the fuzzer reconstructs them from the model and compares (flags exact; lists compared as sets because send_unshallow's re-parse may list a parent twice).

Dimensions enumerated (test/protocol.test.js, 14,256 cells, exhaustive product; test/fuzz/protocol.mjs, random with DAG repos): want kind {tip, old commit, tag, tree, blob, tip+old, tip+tree, tag+blob} × have kind {none, ancestor, old, unrelated branch, tip itself, tree, blob, tag, unknown, tip+old, old+tip} × deepen {none, 1, 2, 99, since, not} × filter {none, blob:none, blob:limit=100, blob:limit=1, tree:0, tree:1, tree:2, combine:blob:none+tree:1, combine:blob:limit=100+tree:2} × server {loose, packed without bitmap, packed with bitmap}; thin-pack, ofs-delta, done/negotiate and client-shallow state cycle deterministically across cells. Result: every non-degenerate cell is oracle-exact and invocation-exact; degenerate deepen-since/not requests (want older than since, want cut by not, no commit wants) are accepted only when the degeneracy predicate holds.

What git actually does (each item was discovered by a failing cell, then confirmed by the capture or a direct probe; none is taken from documentation):

  • Two server-side object-selection modes. Bitmap (packed bare repo after gc, pack.useBitmaps, no deepen, filter ∈ {none, blob:none, blob:limit, tree:0, combine of those}): exact reachable(wants) \ reachable(haves); a wanted tree/blob is dropped if any have reaches it. Traversal (everything else): commits reachable from haves are excluded plus the tree contents of uninteresting parents of interesting commits (mark_edges_uninteresting); a have on an unrelated branch excludes nothing; a wanted tree/blob is dropped only if it is literally a have (or inside a tree have). GitHub serves from bitmapped packs, so the bitmap mode is the production one for non-shallow fetches.
  • --thin makes pack-objects pass --objects-edge-aggressive: cmdline haves' own trees become uninteresting too.
  • tree:N from a commit omits depth ≥ N (root tree is depth 0); from a directly wanted tree its entries count as depth 0, i.e. it omits depth > N — if the want is still user-given: git filters only objects flagged NOT_USER_GIVEN, the commit walk flags each walked commit's root tree, and walking an earlier wanted tree flags whatever that walk reaches (it enters a subtree only while depth < N). Such a want is filtered like any tree (dag.js userGiven; fuzz/usergiven.mjs against git rev-list --objects --filter). tree:N includes blobs shallower than N; combine:blob:none+tree:N is the "trees only to depth N" filter.
  • Shallow: the boundary is the set of commits at exactly the requested depth (even root commits), reported as shallow lines even when excluded by haves; boundary commits are grafted for pack-objects (parents invisible, not --not); the have-walk also stops at them. Client shallow lines cut the have-walk always; a client commit inside the window that is not on the boundary is unshallowed: its parents become wants, it becomes an extra edge, and the shallow set is not recomputed (the parents get no new depth budget).
  • do_got_oid marks a have's direct parents THEY_HAVE even when the have itself was already known, and a later have already marked is dropped from the invocation. Order-dependent.
  • Tag haves peel; tag wants are sent with their target; the same commit wanted directly and via its tag yields a duplicate shallow line (client dedupes).
  • Negotiation: with done, acknowledgments is never sent, and ply refuses an answer that has one (protocol), with or without a pack after it, as git's fetch-pack does (expected 'packfile', received 'acknowledgments'; v2End, test/fetch-lying-server.test.js against real git on the same proxy). done is read once: the parsed request's value decides both the done line and how the answer is judged, and a done that is not a boolean is bad_request. Without done, NAK/ACKs arrive and the server may continue straight into packfile when ready. negotiate() implements rounds.
  • git 2.43 upload-pack dies mid-response (after shallow-info) on degenerate deepen-since/deepen-not requests (want older than since, want cut by not, or no commit wants). Surfaced as code: 'protocol'.
  • Server protocol.version config does not matter over HTTP: GIT_PROTOCOL from the client header wins; a server without v2 support could not be tested locally (git 2.43 only).

Not derived, only verified: 21 of 458 random cases and 621 of 11,880 matrix cells are "model.approx": the calibrated model over- or under-marks one or two edge-tree objects. Those cells still satisfy the bound and are pack-objects-exact and invocation-exact; the model's residual is in mark_edges_uninteresting's sparse tree-walk heuristics, which I verify against git rather than reimplement.

Git compliance: decided by git, not by me

Every rule the client enforces or assumes was replaced by a comparison with git over an enumerated input space. Each test prints its case count; zero disagreements in all of them.

SurfaceOracleCasesWhat it corrected
author/committer identindex-pack --strict (fsck_object) on a commit carrying the ident4,767 (alphabet³, name and email independently, plus curated)my validator rejected names git accepts: O'Brien, Dr. X, leading/trailing spaces, tabs, empty name/email, spaces inside an email. git's rule is only: no NUL/newline, no </>.
commit/tag/ident decision space (I35)git fsck --strict on every cell, written by git hash-object --literally58,968 cells (53,930 distinct objects)ply accepted NUL in a commit body (nulInCommit, #59), a NUL in a header, zero-padded and overflowing dates, a second < in an email, a bad tag type, and a BOM before tree; it refused fsck-clean objects: uppercase hex ids, a header line with no space, a tag with no tagger. Duplicates after the committer/tagger stay refused by design (PR #7)
ref namesgit check-ref-format1,431.lock is rejected on any component, not only the last
version:refnamegit tag -l --sort=version:refname173,664two names are versioncmp, including versionsort.suffix. Seven suffix lists: an 11,880-name listing matches a sort by it. With the release before -rc, or between -alpha and -gamma, versioncmp cycles and git's qsort of the whole list differs; every disagreed pair, rechecked as two names, matches versioncmp
tree entry namesindex-pack --strict on a tree with the name924 (alphabet², .git-variants, NTFS/HFS)hasDotgit is case-insensitive, strips trailing dots/spaces (NTFS), rejects 8.3 short names git~1, and ignores HFS+ ignorable code points (.gi‌t)
tree encodinggit mktree600 name pairs × 5 mode combinations, both orders—
commit objectsgit cat-file/git log on every shape git writes (octopus merge, gpgsig continuation lines, mergetag, encoding, unknown header, empty message, no body section)10 shapes, parse∘encode byte-identicalencoder forced a body section and a trailing newline; parser produced a phantom header on body-less commits
fetch client paritygit's own clone/fetch over file:// and ours over HTTP against the same upload-pack, with uploadpack.packObjectsHook capturing both invocations11 clone shapes (--depth 1/2/3/50, --filter blob:none / blob:limit / tree:0 / combine, --shallow-since, --shallow-exclude), 7 post-clone fetch shapes (--deepen, --depth, --unshallow, since, exclude)identical pack-objects argv+stdin, identical .git/shallow, identical object sets. git's client always requests thin-pack; clone requests include-tag (also with filters).
ls-refsgit ls-remote --symref6 prefix sets over 300+ refs, symrefs, peeled annotated tags—
pushgit push on a twin repo768 cells: 6 server configs (denyNonFastForwards, denyDeletes, unpackLimit → index-pack vs unpack-objects, fsck on/off) × 4 hooks (none, pre-receive reject, noisy accept, update rejecting one ref) × 8 commands (ff, non-ff, create, delete, multi, multi-atomic, stale old, thin blob delta) × 4 capability sets (side-band-64k, report-status-v2)same accept/reject, refs, stored objects, per-ref server reasons; hook stderr arrives on band 2; retryable classification: failed to update ref, failed to lock, bad ref (denyNonFastForwards with an unknown stale old), incorrect old value provided (git ≥ 2.50), non-fast-forward, and atomic push failure only when caused by one of those — a hook decline anywhere is non-retryable; report-status-v2 emits option lines only via proc-receive
pack readinggit pack-objects option space (window 0–250, depth 0–250, compression −1..9, --no-reuse-delta/-object, --sparse, OFS/REF, --thin with haves, core.bigFileThreshold, packed vs loose) over random DAG repos; verify-pack -v offsets and chain depths; index-pack --fix-thin for thin80 packs—
pack layout (describePack, I40)git verify-pack -v and git index-pack --fix-thin132 (120 packs + 12 limit probes)verify-pack's size column is the inflated header (a delta's instruction size), not the resolved object; a thin base is a typed id list, not a pack_corrupt message

Codec correctness (I3 depends on these)

  • Our SHA-1 == node:crypto for 0…3000 random bytes with random chunking.
  • Our inflate == node:zlib for all levels −1…9 and strategies, with exact consumed-byte count, trailing junk ignored, truncation always throws.
  • Our tree encoding hashes identically to git write-tree for names that sort differently as dir vs file (a, a-b, a.b, a0, …), unicode, spaces, leading -, symlinks, exec bits.
  • git pack-objects output across 5 window/depth/compression combinations (incl. level 0 stored blocks, depth 50 chains) parses and resolves to git cat-file truth for every object; offsets and chain depths match git verify-pack -v.
  • Our thin packs are accepted by git index-pack --fix-thin and by receive-pack with strict fsck.
  • filter semantics verified against rev-list --filter (and corrected a wrong belief: tree:N includes blobs at depth < N).

Findings during this campaign (all fixed, all now covered)

Found byIssue
issue #172 probeA streamed request body under undici was held whole for the length of the request. fetch with redirect: 'manual' or 'follow' clones the Request (HTTP-network-or-cache fetch), which tees the body, and the branch nobody read queued every chunk. A heap snapshot traced the 16 KiB chunks to { value } records in a ReadableStream queue under the Request's body.stream, on the tee's second branch. Measured live arrayBuffers for 64 MiB through a slow server: manual and follow +67,166,347, error +1,417,363. Under workerd, redirect: 'error' is refused at new Request ("does not make sense at the edge"), and a request body stream that errors is ended as a clean chunked body: the server saw a complete, short request and fetch resolved with its answer. Under undici, the same error aborts the connection. Hence the trailer rule in I41.
direct probeObject size from pack header allocated before any check → RangeError or 4 GB lazy allocation.
direct probeDelta result size from delta header allocated before any check.
issue #13 probeSize varints past ~150 bytes decoded to NaN (0 × Infinity), which passes every size > limit check: readFile returned size: NaN, applyDelta threw an untyped RangeError, and the streamed header phase (edit, read, checkout) buffered endless continuation bytes (1 MiB: 3 s, 2 MiB: 9 s). Now refused past bit 63.
issue #13 probescanStep copied its offset array on every match: a one-byte find over 128 KiB of that byte took 22 s in the scanner alone (400 s end to end in the report). It now counts matches and keeps the first 16 offsets: 9 ms.
issue #14 probemaxDeltaChain bounded recursion depth, not chain length: a memoised base came back at depth 0, so a 500-link REF chain emitted base-first resolved (stats.maxChain 500). Emitted child-first, the fixpoint stopped after 64 passes and returned 65 of 101 objects with no error; a legitimate 64-link thin chain lost its last link the same way (the pass that switches to external bases came out of the 64). Now counted per link, and the fixpoint runs to completion or throws.
adversarial I1undici TimeoutError has numeric code: 23; our "already coded" check let it through untyped.
adversarial I1pkt-line and v2 parse errors on the streaming blob path were uncoded.
adversarial I6fetch rejects credential URLs, and its error message echoed the token into the span's exception event.
adversarial I6git.edit.url attr held the raw URL.
issue #15 probeA credential echoed by the server reached errors and spans verbatim from every site but the HTTP error body: 36 of 40 echo cases (10 sites × 4 auth forms) leaked; the other 4 (a push band-2 tail cut through the secret) leaked a 19-character fragment. auth.user was never scrubbed.
issue #32 probeA URL with a user alone (https://<token>@host/…) sent no Authorization (the user became auth.user with an empty token, and an empty token meant no header): every request 401, nothing saying why. :pass sent x-access-token:pass where git sends :pass. UTF-8 in a user alone sent nothing; %ZZ or %FF threw an untyped URIError; a URL that did not parse threw Node's TypeError with the credential in input.
issue #36 probeA single-object pack with a valid header (blob, 10 bytes) and then non-final empty stored blocks forever (00 00 00 ff ff: infinite compressed input, zero inflated output) was accepted by every streamed path until the request timer: with requestTimeoutMs 8000, readFile took 932.1 MiB, editFile 910.2 MiB and checkoutTree 980.2 MiB (~115 MiB/s; ~7 GiB per request at the default 60 s) and failed timeout, not limit_exceeded: maxPackBytes was checked only by the buffered consumers, and the streamed path's only body check was on inflated bytes, of which there were none. The #36 matrix on the previous source: 402 of 630 cells wrong: 60 timeout (endless bodies on edit, read and both checkouts), 30 raw ERR_TRAILING_JUNK_AFTER_STREAM_END (no ply code) from readFile/checkoutTree, 165 ok where a refusal was due (every padded-past-bound stream on every path, every over-cap body on the streamed paths), and 147 with the wrong code or request pattern for their cap (109 pack_corrupt, 30 limit_exceeded, 8 match_count, 2 of those an empty blob followed by a byte, under the cap). Now: the probe is pack_corrupt after 65,033 B (one frame) in 78–146 ms on all three, and all 630 cells hold.
issue #40 probe49 of 102 credential cells changed. { user } alone, {}, { token: '' } and { header: '' } sent nothing (anonymous 401). Explicit UTF-8 tokens threw an untyped InvalidCharacterError (code 5) and left the root span open; a UTF-8 user with an ASCII token was sent as Latin-1, not git's UTF-8 bytes. Every bad_request from createTransport inside an operation left the root span open (never exported). ssh://user:pass@ kept the password in the login, t.url and parseSshUrl's message; a secret-shaped ssh login was in t.url and ssh.user; ssh:// was not percent-decoded (t%C3%ABst sent as written, git sends tëst). http://@h and http://:@h sent nothing (git: Basic :).
issue #15 probeNeither fetch set redirect. Under undici a 3xx to another origin was followed without Authorization (10 requests reached the target); under workerd 2026-10-23 a 307 carried ply's Basic header (the token) to the other origin on both the GET and the POST. A 301 on the POST surfaced as not_git "unexpected content-type".
issue #16 probeRepository- and server-chosen names keyed plain objects. merge: a directory named constructor (or __proto__, toString, hasOwnProperty) renamed on one side read as still present (o[name] was Object.prototype's), so the directory-rename guard was skipped and an add inside it merged clean where git conflicts (I21); a conflict at a path named __proto__ got no reason ([object Object] in the message) and a rename onto __proto__ was not listed as conflicting. attributes: [[:hasOwnProperty:]], [[:__proto__:]], [[:valueOf:]] threw an untyped TypeError out of mergeBranch; [[:constructor:]] / [[:toString:]] matched every path where git aborts the pattern, so merge=union applied where git conflicts (I28). ls-refs: every key:value attribute was copied onto the record, so oid:junk / name:refs/heads/other replaced the parsed fields (an edit failed not_found, or asked for a server-chosen oid); now only symref-target: and a 40-hex peeled: are kept, as connect.c does. Swept too: report-status-v2 option names now land on a prototype-less map, and scrubError walks prototype-less maps.
issue #18 probeThe merge-base walk took a server's silence for completeness: mergeBase accepted a graph with a missing parent whenever neither commit-only pack carried shallow lines, so a server that withheld ancestry (or stripped its shallow-info) moved the base to an older common ancestor and a merge git would not make was pushed (shown: base P for git's X, g=2 for g=1). Each walk pack is now held to the deepen contract and the answer needs a graph with no unexplored ancestry. Nearby: the blob:none walk harvested commits and trees without the checks fetchWide applies, and fetchObject served them from the harvest unchecked (a commit with no author email was served); ancestors parsed commits without them.
issue #46 probeThe blob:none fallback held every tree in the wide pack to the caller's limits, so one sibling directory over maxTreeEntries failed reads that never touch it, on blob:none-only hosts only: 16 of 120 cells wrong (readFile, listTree, editFile and mergeBranch of something within the limits, beside one or three over-limit directories: limit_exceeded where the tree:0 server answered). Prod: ply-web's viewer, maxTreeEntries 2,000, 413 on every page of public-v0/curl (tests/data, 2,135 entries) on Artifacts.
issue #31 probeSshClient read its AES-GCM nonce across an await and bumped it after: concurrent writePacket calls sealed different packets under one nonce (50 concurrent packets: 1 distinct nonce), which gives away GCM's confidentiality (XOR of the plaintexts) and its integrity (the GHASH key) for those packets. Reached in practice: editFile with a head hint on a fresh SSH transport overlaps ls-refs with a speculative fetch, both opened git-upload-pack at once, and the second CHANNEL_OPEN went out under the first one's nonce (sshd: "message authentication code incorrect"; the edit failed network); upload-pack and receive-pack opened together did the same. Nearby: two first commands for one service each opened a channel; a handshake that failed for a reason other than a timeout or abort was kept and every later command got its error without dialling; a channel that failed to open (missing repo) kept its connection until the socket's 60 s idle timeout.
fuzz/runtree:N ⊄ blob:none.
fuzz/runDeltas < 4 bytes rejected by git (DELTA_SIZE_MIN).
fuzz/runIdentical replacement created an empty commit.
fuzz/runPush-size bound omitted insert-op and zlib-block overhead.
concurrencyreceive-pack unpacks before CAS → losers leave dangling objects server-side.
fuzz/liarA push the server applied, answered with a malformed or inconsistent report, was classified push_rejected (retry loops treat as permanent; callers assume no change). Now ambiguous.
fuzz/codecgit refuses a delta whose result equals its base ("duplicate base"); the noop path keeps ply from emitting one.
fuzz/packgenSandbox git signs commits by default; a branch rule requiring signed commits would reject every ply commit (unsigned). Documented limitation.
fuzz/hostileThe sha256 detection, added during this campaign, mislabeled any malformed ls-refs line as unsupported; now only 64-hex oids are, the rest are protocol.

| I16 | Telemetry is bounded and honest: spans carry at most maxEvents events (dropped count exported), CPU is reported as measured only where a CPU clock exists (cpu_ms on node) and as a labeled estimate elsewhere (cpu_est_ms = bytes / CPU_RATE), cache put failures are counted (git.pack.cache.put.failed), the first root span of an isolate is marked (ply.isolate.cold), and a retry links to the attempt it retries. | pure.test.js, packcache.test.js, test/calibrate.mjs | | I17 | The edit bundle carries only the edit path: no delta generator, negotiation, advertisements, classes or node builtins; the full client is a superset. (Since 2026-10-23 the delta resolver rides along for the blob:none fallback, I30; budget 52 KB.) The read bundle carries no push, pack building, merge or rebase code. | bundle.test.js (esbuild metafile: module list + symbol greps + byte budget) | | I19 | An LFS pointer blob is never edited as content: the v1 magic in the first streamed bytes refuses the edit before any push (lfs_pointer); files merely mentioning git-lfs are not affected; allowLfsPointer is an explicit opt-in. | packcache.test.js | | I20 | A signed commit verifies with git and with ssh-keygen over the exact payload git signs (commit minus gpgsig); a tampered message with the same signature does not; fsck stays clean; the same code signs under workerd. | sign.test.js, workerd.test.js | | I21 | Merging is decided by git: clean merges produce the tree git merge-tree --write-tree and git merge produce, line-merged files included; every path git conflicts on is one of ours (rename shapes: the rename guards conflict and name both ends; a directory-rename target, which git computes, is covered by the reason; G1's "lost on both sides" is decided over the three trees, not the merge walk: a base path neither side holds as a file, wherever it is, including inside a subtree that is the same tree on ours and theirs and under a name one side turned into a directory; it is by path, not similarity, so it also refuses merges, rebases and picks git completes — a delete the target already has beside any added file — the accepted over-refusal until rename similarity is ported; each conflicting path is listed once and keeps the walk's reason; the guard fetches no tree twice, reads nothing when no directory was changed identically on both sides, and otherwise reads the smaller of the two sets that can rule a hidden rename out — those shared directories, or the directories one side alone changed — and the other only when the first cannot: cost under "Rename naming" below); the merge base is git's — the best common ancestors (merge-base --all), computed over commit-only packs and deepened until no unexplored ancestry could hide another, whatever the server says about completeness — each of those packs is held to the deepen contract (the want is in it as a commit, every commit in it is an ancestor of the want, a parent it lacks is behind a commit the server named shallow, every commit/tree/tag in it passes the fetch checks), else pack_corrupt and nothing is pushed (#18); more than one (criss-cross) is refused (merge_conflict with bases: git would build a virtual base) and makes a rebase not_linear; fast-forward and up-to-date follow from the base; a merge commit's parents are [ours, theirs]; nothing is pushed on conflict; a pack never carries an object twice; fsck stays clean. Path and entry names are the repository's, so nothing is looked up on a plain object: a directory or file named constructor, __proto__, toString or hasOwnProperty merges, conflicts and gets its reason like any other (#16). | merge.test.js (hand cases incl. renames, criss-cross and the summed-distance trap, both shown to fail on the previous code; adversarial.test.js #18: a proxy that strips shallow-info or withholds one ancestor made the previous code merge over a cut graph — base P instead of git's X, a pushed g=2 where git gives g=1 — and an unrequested commit, a malformed commit and a want answered by a tree were merged past or mislabelled unrelated_histories, all five now pack_corrupt with the ref untouched; Object.prototype names: a directory rename + add inside each of the four names on either side, a rename onto __proto__, a content conflict in __proto__ — 10 of the 11 cases failed on the previous code; property run with line edits, renames, merge-commit and criss-cross histories and random .gitattributes: seeds 11–15 × 80) | | I22 | Branch create is a CAS (zero old-oid → already exists/cas_conflict if present); branch delete is a CAS on the oid when the server has that oid's object: git's receive-pack update() deletes a ref whose given old oid it cannot parse regardless ("allowing deletion of corrupt ref") and reports ok (observed 2026-10-30, test/space/push-outcome.observed.js "delete with an unknown old oid"); denyDeleteCurrent surfaces as push_rejected with the server's words. | merge.test.js, push matrix create/delete cells | | I23 | Rebase equals git rebase --reapply-cherry-picks commit by commit (tree, author, message), including line-merged files and git's --empty=drop (a commit that becomes empty is dropped; one that starts empty is kept). One difference from git's default stands and is pinned by a test: git leaves out a commit whose patch id equals a commit already in onto before replaying; ply computes no patch ids and replays it, so the results differ when upstream applied the patch and later reverted it (open: merge/rebase-reapplies-upstream-cherry-picks). The chain is bounded by maxRebaseCommits and the onto walk by maxMergeDepth; a refusal names the caller's own limit; conflicts where git conflicts with the branch untouched; squash's tree equals git's rebased tip tree; cherry-pick and revert trees equal git cherry-pick / git revert; a later replayed commit merges against blobs the earlier ones produced (served from memory: they exist only in the pending push); signatures are not carried across a rewrite; the branch update is a CAS on the old tip. | rebase.test.js (property: seeds 1–4 × 60 with line edits on both sides — 0 conservative) | | I24 | SSH transport removed 2026-10-31; history on branch archive/ssh (I24, I24b and I34 were its invariants). | — | | I25 | After an acknowledged push, a failed verification read-back (transport error or a lie) is ambiguous, never the transport's own code: the push may have landed. | packcache.test.js (a lying post-push ls-refs → ambiguous), mutant-kill-tree.test.js (pushTree verify) | | I26 | Layering is a tested property: the transport contract is a plain record, implemented by http.js with no dispatch; the edit bundle carries neither the delta generator, negotiation, advertisements, classes nor node builtins; every error code is in one table with a retry policy and a matching documentation entry; every span name and attribute key follows the written convention. | bundle.test.js, pure.test.js | | I27 | The line merge is git's, for the git version you name: wherever git (merge-tree, merge-ort: histogram, zealous) merges a file cleanly we produce the same bytes or refuse the file as too large to merge (the two refusals below), never other bytes; wherever git conflicts we conflict, and where git's merge itself fails (the scanA hash-chain limit: 65 distinct lines in one bucket of the per-diff class index; 64 merges — boundary pinned) we answer undecided. Classic Myers is ported for both places git uses it — histogram's fallback (every version) and 2.54's compaction re-diff (rediff: 'myers', default; 'skip' for git < 2.54; 'undecided' for any version). Double dissociation measured: myers ≡ git master (2.56) and skip ≡ 2.43 on every diff hunk; each crossed pairing disagrees. Binary = NUL in the first 8000 bytes. Two refusals are ours, not git's, and each is a conflict for that path with reason too large to merge: an input over maxMergeBlobBytes, and a line merge that counts more than maxMergeWork diff steps for that file. The count is the module's own (every inner-loop iteration of the histogram scan and of the classic-Myers fallback, and compaction's slides; a caller's meter is written, never read), so the refusal depends on the three inputs and the limit alone. git merges such files (the 70,000-line / 3,500-hunk bulk edit counts 361,702,266 steps: merged under DEFAULT_LIMITS' 2^32, byte for byte git's, and a conflict under WORKER_LIMITS' 2^26), so the work refusal is a superset of git's conflicts, never a different merge. | test/fuzz/linemerge.mjs (merges, plain/--runs/--big), test/fuzz/diffscript.mjs (hunk-level, incl. --huge to reach xdl_split's snake heuristic and mxcost cutoffs), linemerge.test.js; the oracle's mode is picked from its version (test/gitversion.js) | | I28 | .gitattributes are read as git reads them — parse, wildmatch patterns, precedence, macros (built-in binary, root-only [attr]), git ≥ 2.44's reserved builtin_* names — equal to git check-attr --source on every path; the merge attribute picks git's driver (-merge/binary → conflict, union → ours then theirs, with git's refinement and CR/LF handling, text/unknown → text). Which tree supplies them is the caller's: attributes: null (default — git ≥ 2.46 in a bare repo), 'ours' (a worktree git merge, and git 2.43–2.45 in a bare repo with HEAD on the target), 'theirs', 'base', or a ref/commit (attr.tree). A [:class:] that is not one of git's twelve aborts the pattern as wildmatch does, Object.prototype names ([[:constructor:]], [[:hasOwnProperty:]], …) included (#16). | test/fuzz/attributes.mjs vs check-attr (2.43 and 2.56; its generator draws bogus class names from Object.prototype since #16), merge.test.js (Object.prototype class names vs check-attr and merge-tree -c attr.tree), git's own t3070 wildmatch vectors (380/380, run once; not shipped — GPL), test/fuzz/linemerge.mjs --driver union|binary vs merge-tree -c attr.tree (2.43 and 2.56), merge.test.js, rebase.test.js | | I18 | Every object fetched whole (commit, trees) is hash-verified against the oid it was wanted by, bounded by maxObjectSize, through the same single-object pack parser as the streamed blob. | fetch.js/fetchObject; liar.mjs tree:swapped-entry / tree:wrong-level → pack_corrupt; packcache.test.js poison → bust | | I29 | A read is exactly git's: readFile bytes equal git show <ref>:<path> and listTree equals git ls-tree <ref>:<path> (mode as %06o, type, oid, name) for every ref form (HEAD, full, short in git's rev-parse order — tags before branches —, annotated and lightweight tags, a commit oid) and entry kind (regular, executable, symlink = its target, gitlink and tree = not_found for a file read); a missing path, a path through a file, a missing ref, an unknown oid and a blob oid given as a ref are not_found; a bad path is bad_request before any I/O. The streamed blob keeps only its latest chunk, and releases that chunk only after the object hash and the pack trailer verify. The stream ends cleanly only if the content hashes to the wanted oid and its length equals the declared size — a server that serves a different blob errors the stream (pack_corrupt) without releasing the last chunk, so receiving every declared byte means the blob verified. | read.test.js (66 ref×path cases; mutation: dropping the hash check makes the liar case pass silently — shown failing), mutant-kill-tree.test.js (the last chunk of a corrupt blob is never yielded; a valid blob's chunks are yielded once) | | I30 | The blob:none fallback (servers that advertise filter but refuse tree:0 — Cloudflare Artifacts: HTTP 400 "only blob:none is supported") changes no outcome: it is learned from that answer only (never by host), remembered on the transport's quirks (shareable across transports; without one, a per-remote record keyed by origin + path, LRU-bounded, #136; concurrent first requests wait for the one probe), the wide pack is delta-resolved and the wanted object taken by its computed hash, the other commits/trees are harvested (bounded by maxHarvestBytes; only after every commit, tree and tag in the pack passed the fetch checks — the merge-base walk's packs too, #18 — since fetchObject serves the harvest without another look) so later levels need no round trip, and edit, read, ls-tree, merge, rebase, cherry-pick and revert results equal git's (merge-tree --write-tree, fsck --strict). Cost is on the span: git.fetch.filter.fallback, git.fetch.wide.extra_objects, git.fetch.wide.extra_bytes (Artifacts, small repo: 8.9× the bytes of tree:0 — lab_notebook/ply-artifacts-eval-2026-10-23.md). A merge-base walk under blob:none ships every tree of every commit in the deepen window. That pack fails limit_exceeded on maxPackBytes, maxPackObjects, or maxInflatedTotal (including delta results) before the resident set grows without a cap; maxMergeDepth bounds the doubling search of mergeBranch, mergeBase and readLog, and of a rebase's onto walk; a rebase's branch walk is bounded by maxRebaseCommits + 2 commits instead (10 002 at the defaults, 258 under WORKER_LIMITS; rebaseBaseOf), so under blob:none that is the deepest window whose trees are shipped, and the pack caps above are what refuse it. The caller's limits bind what it asked for, not the widening (since issue #46): what a tree:0 server would have sent (the wanted object; the walk's commits and tags) gets the full checks and any failure is the fetch's; an extra that fails a limit (a sibling directory over maxTreeEntries) is dropped — neither returned nor harvested, counted as git.fetch.wide.skipped / skipped_reason — and a later want of it is a fetch of its own under the same limits; an extra that is malformed (pack_corrupt) still fails the fetch. The split: a limit is the caller's bound on what it parses for what it reads, and an honest repository holds trees past it that the caller never reads (tree:0 would not have sent them), so failing on one made the answer depend on the host's filter support; a malformed object is one no honest server holds, so nothing in that response is trusted (#18). Hence tree:0 and blob:none servers give the same answer (oids, bytes, error code) wherever no extra is malformed; where one is, blob:none is pack_corrupt and tree:0 (which never sees it) answers. | artifacts-compat.test.js (proxy mimicking the rejection in front of git http-backend; one 400 per quirks object asserted; #136: at most one tree:0 request per remote across any order of edit/read/checkout/log/merge with no quirks passed, and in no-filter.test.js one empty_response + one advertisement probe per stock remote), adversarial.test.js I4 aggregate caps, wide-limits.test.js (server {tree:0, blob:none-only} × wanted {tree under the limit, tree over it, blob} × sibling {none, one over the limit, one malformed (git fsck treeNotSorted), three over + two under} × op {readFile, listTree, editFile, checkoutTree, mergeBranch}: 120 cells against expected outcomes, git's answers and two-server parity; mutation: skipping malformed extras too, or the wanted object too, fails 12 cells each — shown) | | I31 | A stale ref update is cas_conflict in every wording seen, and only a stale one: the class of each of git v2.50.0 receive-pack's rejection reasons is data with its justification (what a caller can safely do next), and every reason × command shape × atomic × refs cell is judged by real git (test/space/push-ng.space.js, SPACE.md "Push ng reasons"). cas: failed to update ref, atomic transaction failed (git's only report of an atomic push's lost race), bad ref (denyNonFastForwards with an unknown stale old), git ≥ 2.51's batched incorrect old value provided, reference already exists, reference does not exist, and atomic push failure only beside one of those; host wordings failed to lock, fetch first, already exists and Artifacts' only one, stale ref (also for creates over an existing ref, stale deletes and the innocent members of a multi-ref push, which Artifacts always treats as atomic); so editFile's one fresh retry fires. receive-pack's own non-fast-forward (denyNonFastForwards: the new commit does not descend from the command's own old oid) is not_fast_forward, never retried. A proc-receive hook that took a command and did not answer (proc-receive failed to report status, fail to run proc-receive hook) is ambiguous. Every other reason, and a refusal anywhere in the push, is push_rejected. | test/space/push-ng.test.js (1,057 cells through push(), 0 disagreements; 30 disagreed on train/1 77eb2c0, 2 more on git ≥ 2.51's texts; 776 observed from git 2.50 byte for byte, the v2.51+ cells from CI's git), artifacts-compat.test.js (real text; injected ng … stale ref → attempt 1 lands; mutation: removing stale ref fails both cases) | | I32 | pushTree commits exactly the caller's files: the tree oid equals git's own index for the same entries (update-index --cacheinfo + write-tree; and git add -A for filesFromDir), ls-tree -r modes/oids and a git clone checkout (bytes, owner exec bit, symlink targets, gitlinks as empty directories) match, fsck --strict is clean with receive.fsckObjects. A repeat push carries exactly git rev-list --objects new ^old (changed trees as REF_DELTAs). The head hint, one fresh cas_conflict retry (parent = the winner; tree still exactly files), strictHead (stale → no receive-pack; lost race → not retried) and verify (failed read-back → ambiguous, ref at our commit) behave as editFile's. A duplicate name in one tree (a path twice, or file and directory) is bad_request before any request — encodeTree refuses it as git fsck's duplicateEntries does; case-only twins pass both. The one tree encoder (encodeEntries, under encodeTree, pushTree, commitChanges, merge and the in-memory tree) writes no tree git fsck --strict refuses: it checks every field itself, whatever the entry's type says (name a string with a byte form, mode one of the five git writes, oid 40 lowercase hex), then fsck_tree's rules (empty name, NUL, /, ., .., every .git spelling, a name over 4096 bytes, the null oid, .gitmodules not a regular blob, .gitattributes as a tree or gitlink), and returns bad_request; it never throws and writes nothing for a refused entry. The refusal quotes at most 200 UTF-16 units of a name or mode with its true length, in the message and in entry, so the error does not grow with the caller's text; the cut never ends on the first half of a surrogate pair, so a well-formed name is quoted well-formed. Blob bytes plus LIMIT_OBJECT_OVERHEAD (3 KiB) per entry summing past maxPushBytes (the same ceiling as maxPackBytes) are limit_exceeded (push bytes) in fileEntries, before any blob is hashed or buildTree runs, so 100 000 tiny files are refused rather than exhausting a 128 MiB heap (#142); exactly the ceiling is allowed, and one maximum-sized object still fits. Any push pack over maxPackBytes is limit_exceeded (push pack bytes, measured size) with nothing sent. src/ imports node: only in ssh-node.js and tree-node.js (and, since issue #12, checkout-node.js). | push-tree.test.js (10 tests; size refusal and duplicate tests shown failing on the previous push.js/objects.js), push-budget.test.js (64 MiB matches git mktree; 3×48 MiB refuses under a 128 MiB heap), mutant-kill.test.js (encodeTree duplicates; push refusal with zero transport calls), bundle.test.js (tree entry) | | I33 | checkoutTree/checkoutDir produce exactly git clone's checkout: diff -r --no-dereference identical and every path's type, permission bits, bytes and symlink target equal (nested and unicode paths, exec bits, file/directory/dangling/upward symlinks, a gitlink as an empty directory, an empty file, one blob at two paths, a 3 MiB blob); entries equals git ls-tree -r (mode, oid, order) and each file's size and bytes equal git cat-file; path equals the clone's subdirectory. 3 requests (ls-refs, trees, blobs) where the per-file loop takes 72, also behind a blob:none-only proxy. Nothing unverified is delivered: an unwanted object in a blob batch is pack_corrupt before any file is yielded; a lone blob's stream errors on wrong bytes without releasing its last chunk, and checkoutDir removes that file; a tree pack without the wanted commit, or a tree naming one entry twice, is pack_corrupt before anything is written. A many-wants refusal falls back to one blob per request (remembered on quirks); a lie never does. Every buffered pack stays under maxPackBytes (a batch over it is split, down to single blobs, which stream; a single blob over it is limit_exceeded: since issue #36 the cap applies to streamed bodies too); entries walked ≤ maxPackObjects, depth ≤ maxPathDepth. The writer refuses .., absolute, empty and .git components, a non-empty dir (before any request), an existing name, and any write through a symlink it made. | checkout-tree.test.js (9 tests; mutation: dropping the unwanted-object check or the duplicate-name check fails the liar and duplicate tests — shown), bundle.test.js (checkout entry: no push, merge or node builtins) | | I6b | A credential never reaches an error or a span even when the server echoes it. The HTTP transport builds one scrub from every form of its credential — the Authorization value, its token part, token, bearer, the decoded Basic password, and the user when it is secret-shaped (≥ 16 characters with a digit: a deploy token or a PAT given as the user; x-access-token, oauth2, git or a login are names and stay readable) — and redacts any run of 12+ characters of a secret (shorter secrets, from 4 characters, whole), so a secret cut by a tail or a 60-character quote is caught too. It rides on the transport (t.scrub) into every span under it (clientSpan, inherited by children; an operation's root takes it): at export every attribute, event attribute and status message passes through it, and span.error(e) scrubs the error itself in place — message, stack, fields such as report and hookOutput, the cause chain — so the error the caller catches is clean. Covered: HTTP error bodies, ERR lines (ls-refs, fetch), band 3 (fetch, streamed blob, push), band 2 (fetch progress tail, push remote.messages, hookOutput), ng reasons, malformed-report text, quoted protocol lines, a redirect's Location. SSH has nothing to scrub: publickey auth never gives the server a secret string. A successful push's hookOutput returned to the caller is the caller's own data and is not rewritten. | adversarial.test.js I6b (10 echo sites × 4 auth forms through the fault proxy; every string reachable from the error — own and hidden keys, cause, span — plus util.inspect, and the full span export, searched for each secret and every 12-character fragment of it; a conventional user name survives), read.test.js credential hygiene (echoing server × 4 auth forms) | | I6c | A 3xx is never followed: both fetches pass redirect: 'manual' and any 3xx (or a browser's opaque redirect) is http with status and location (origin + path, scrubbed), before a byte reaches the target. Following would hand the Authorization header to whatever origin the server names: undici strips it cross-origin, workerd 2026-10-23 forwards it (measured, to another port and to another hostname); a 301/302/303 also turns the POST into a GET that surfaced as a content-type error. git follows only on the initial info/refs and then rebases every request; ply's first request is usually the v2 POST, so following on the GET alone would not make a moved repository work. Same-origin redirects are refused too: a moved remote is a URL the caller updates. | adversarial.test.js I6c (301/302/303/307/308 on the GET, the POST and editFile → http, the other origin's server receives zero requests; same-origin 301 on the POST → http naming the new path, one request; a Location with the token in path and query); workerd.test.js (307 on GET and POST under workerd → http, zero requests at the target) | | I35 | A tree is read only if git fsck --strict would accept it on duplicates and order (since issue #34): one name twice — whatever the two modes, adjacent or apart (a file d and a directory d sort apart: d < d.x < d/) — is pack_corrupt (tree: duplicate entry, fsck duplicateEntries), checked before the order; order is on the raw name bytes with a directory sorted as name + / when its mode is S_IFDIR in the low 16 bits, as fsck's verify_ordered (40755 sorts as a directory, a gitlink as a file). parseTree is the only tree decoder, so edit, read, ls-tree, checkout, pushTree's old trees, merge, rebase, cherry-pick, revert and the fetch harvest (assertFetched) all refuse. Case-only and NFC/NFD twins are two names and pass, as in git. Byte-distinct names are distinct names: since #43 names decode losslessly (decodeBytes), so no decode-twin rule is needed and ply agrees with fsck on every cell. | git-differential.test.js (#34 product: 5 name relations × 5 × 5 modes × adjacent/separated × sorted/unsorted = 500 trees, each against git fsck --strict; before: 16 duplicates accepted and 4 out-of-order trees accepted, 59 duplicates reported under the wrong fsck message; after: 0 disagreements), adversarial.test.js (#34: 21 operations on a served tree with d twice — before, 11 succeeded (readFile, listTree and both fetch paths returned it; pushTree, both merges, rebase and cherry-pick pushed), checkout already refused it, and the other 9 failed with a code that misnames the cause (not_found, match_count, push_rejected, merge_conflict); after, all pack_corrupt, refs unchanged), mutant-kill.test.js (parseTree error strings) | | I36 | A push outcome claims landed or not-landed only on an exact git-shaped report; every other post-send state is ambiguous. Exact: the stream framed as receive-pack frames it (plain: report pkts, flush, end; side-band: band 2 and empty band-1 keepalives around one band-1 report ending in its own flush, then the outer flush, end); unpack ok or one of unpack()'s eight failure strings, or a host's failure that every commanded ref echoes as its reason (unpack <s>, ng <ref> <s> for each ref, <s> not ok: Cloudflare Artifacts, #246); exactly one ok <ref> or ng <ref> <printable reason> per commanded ref, LF-terminated, nothing else; unpacker error exactly when unpack failed, and never for a push that sent no pack. Then: all ok → resolves; all ng → cas_conflict/not_fast_forward/push_rejected (I31), or ambiguous when a proc-receive hook did not answer; unpack failed → push_rejected; mixed and non-atomic → push_partial with landed and rejected; mixed and atomic → ambiguous. Anything else after the request may have reached the server — a cut, a missing or extra flush, trailing bytes, band 3, ERR, option lines (proc-receive), a near-miss, a limit hit while reading — is ambiguous; before it, ply's refusals keep their codes. "Before it" includes a request that provably handed nothing over (push, pushPack): a signal that had fired before the request was made (aborted/timeout, no request), and a streamed body the transport never pulled, whose failure is its own code: network, aborted, timeout, or an HTTP answer's (auth, not_found, rate_limited, upstream_5xx, http, not_git); pushPack's pack is then still unread, unlocked and uncancelled. From the first pull of the body every failure is ambiguous, and so is a failed request whose body went as bytes (test/push-pack-preabort.test.js). src/push.js has the table's shape: streamStep → classifyReport → decideOutcome, an exhaustive match whose only fallthrough is ambiguous. | test/space/push-outcome.test.js (the enumerator: all 4,331,598 cells of the product of 10 tagged-union axes through push(), 0 disagreements; 412,008 disagreed on main a7a724e, SPACE.md; 63 cells observed from real git — bytes, outcome and ref state), test/space/push-outcome-boundary.{0,1,2,3}.test.js (four slices of push-outcome-boundary.js, partition checked by push-outcome-boundary.plan.test.js: every single-bit flip, byte deletion, byte insertion and truncation of the 4,592 distinct definite cells: 12,981,904 mutants; 2,772 and 7,419,600 before #251, each its own outcome or ambiguous; on main 2,520 flips turned landed into push_rejected), prefix-closure.test.js (stream, report) | | I37 | readLog returns exactly git rev-list --first-parent -n <limit> with git log's view of each commit, or a typed error; truncated is exactly git rev-list --first-parent --count > limit. Its one deepen window is held to the deepen contract (#37): a commit that is not an ancestor of the want, or a withheld parent without a shallow line, is pack_corrupt, so a lying server cannot shorten or pad the log silently. Bad input (limit outside 1..maxMergeDepth, a path, a non-object spec or opts, no tracer) is bad_request before any I/O, never a TypeError. | log.test.js: 90 cells, server (tree:0, blob:none-only) × shape (linear, merges, root within the limit, first-parent length = limit, longer) × limit (1, n, larger) × behaviour (honest, shallow lines dropped, foreign commit), each predicted from git alone (50 pack_corrupt); a shallow server repository; the pure logWindow cases; shown failing with each contract check, the truncated rule and the first-parent choice mutated | | I38 | Commit and tag reads accept exactly what git fsck --strict accepts (issue #59), with one allowed typed refusal. parseCommit and parseTag are fsck.c's verify_headers, fsck_commit, fsck_tag_standalone and fsck_ident, rule for rule and in git's order, and refuse with git's msgId (commit: nulInCommit: …, err.msgId); every reader goes through them (readCommit/commitView, the tree walk, editFile, pushTree, checkoutTree, merge, rebase, cherry-pick/revert, and every fetched object via assertFetched, including a wide pack before it is returned or harvested). What fsck does not read is kept verbatim in extra (unknown and no-space headers, gpgsig, mergetag). The allowed refusal (duplicateHeader, PR #7): a second tree, parent, author, committer or encoding after the committer, or a second object, type, tag or tagger after the tagger, is fsck-clean but git's own views of it disagree (pretty.c's %an/%cn show the last copy, %T and the date the first), so any value ply showed would be contradicted by some git view: an author-spoofing differential. Warnings git accepts under --strict are accepted: missingTaggerEntry (pre-0.99.1 tags) and badTagName; extraHeaderEntry is IGNORE. A NUL in a tag body is accepted (fsck never reads it); in a commit it is nulInCommit. A leading BOM is a byte before tree. | fsck-space.test.js: the product of object type × header shape (tree, parents 0/1/many, author, committer, encoding, gpgsig, mergetag, unknown and duplicate headers, order, BOM, empty) × 36 ident shapes (every fsck_ident rule) × role × 9 bodies (NUL, no blank line, empty, non-UTF-8, CRLF) × LF/CRLF = 58,968 cells, 53,930 distinct objects, each judged by git fsck --strict (both streams, exit code, error in/warning in lines): 52,416 agree, 1,514 refused as designed (duplicateHeader, only from the listed header shapes), 0 wrong (main before #59: 2,628 wrong). A loose hash-object --literally -w sample must match the packed run object for object; mutant-kill.test.js pins each message. | | I39 | compareVersionRefnames is git versioncmp (version:refname), including versionsort.suffix. Names compare as the bytes git stores: UTF-8 for a well-formed string, the original bytes for a surrogate-escaped string, and an interior NUL ends the comparison. The return value is versioncmp's own magnitude (a byte difference, a longer digit run, or the distance between two matched suffixes). A suffix list that places the release among prereleases is not a strict weak order: with -alpha,-beta,,-gamma,-delta, 00.1-gamma < 00.2-alpha < 00.10-alpha and 00.10-alpha < 00.1-gamma; with ,-rc, 00.1-rc1 < 00.2 < 00.10 and 00.10 < 00.1-rc1. Two names follow versioncmp, which is what git tag -l --sort=version:refname prints for those two. A full listing is git's qsort of that relation: seven of the nine suffix lists match a sort by this function on 11,880 names, and the two cyclic lists differ, with every disagreed pair rechecked as two names. Pure, so it has no span of its own; a tag list's span belongs to the ls-refs that fetched the names. A non-string or a lone surrogate is bad_request. | test/space/version-refname.test.js (66,744 pair cells and 11,880 names × 9 lists, 49 listing disagreements confirmed by two-name git), test/version-refname.test.js | | I40 | describePack reports one pack the way git verify-pack -v does, and a thin base as data. Each object's size is the pack header's inflated size (the size column), size-in-pack is header bytes plus compressed bytes, depth and base id match, and the resolved type is commit/tree/blob/tag. An object whose base is not in the pack has a null id and a null resolved type; missingBases is those missing REF ids, first-seen in pack order, which is the set git index-pack --fix-thin appends (and, on git 2.43, the same order). resolvePack still refuses that pack with pack: ref delta base … not found. Version is 2: that is the only pack version git writes (PACK_VERSION); a 3 is pack_corrupt. The function is pure, so it has no span. Caps are the ones parse and resolve already enforce, at the measured boundary and one past it. | describe-pack.test.js; test/space/describe-pack.test.js: 5 contents × compression {0, 9} × ofs × depth {0, 1, 50} × thin = 120 packs, plus 12 limit probes (132 cells), git 2.43.0 | | I41 | Of the pack it sends, a push holds at most the deflate output of one DEFLATE_SLICE (64 KiB) input slice at a time, plus the one 16 KiB block zlib may still hold (81,940 B measured; #172): the pack is deflated twice (src/packwrite.ts). Pass 1 keeps only its length, SHA-1 (streamingSha1: Workers' native DigestStream, the pure-JS Sha1 elsewhere) and entries, so a pack over maxPackBytes is refused before the first request byte (I36 unchanged). Pass 2 is the request body, read as it goes out, and ends with the trailer only if its length and SHA-1 equal pass 1's. It never yields past pass 1's length. A pass 2 that refuses is ambiguous (original internal) whatever the server answers, and git moves no ref, because it never gets a whole pack. Packs of at most INFLATE_CHUNK are kept from pass 1 and sent as bytes. A streamed POST uses redirect: 'error' where the platform takes it: undici answers manual/follow by cloning the request, which tees the body. | test/packwrite.test.js (both passes byte-equal to buildPack across sizes and contents around INFLATE_CHUNK and DEFLATE_SLICE, DEFLATE_SLICE slices, OFS/REF entries, refusal of a pass 2 that is longer, shorter or the same length with other bytes, never past pass 1's length, a failing deflate, the transport double's streamed body and the cap), test/push-stream.test.js (git http-backend: chunked body of the declared length, an object changed between passes → ambiguous/internal and no ref moved, a 3xx on the streamed POST reaches no other origin, pushRepo's delta pack, a 32 MiB push holding < L/8 live arrayBuffers in a gc-sampled child), test/workerd.test.js (passes equal buildPack under workerd's CompressionStream; a 4 MiB streamed push lands; the changed-between-passes push moves no ref) | | I42 | The path-trees fetch (#218: readFile/listTree ask for the commit with filter combine:blob:none+tree:K, K ≤ 2, on a server known to take it) changes no outcome. Its pack is read as the blob:none fallback's (I30): every object keyed by its computed hash, the commit the wanted object under the full checks, every other commit and tree held to the caller's limits (an extra over a limit dropped, a malformed one fails the fetch), the trees harvested, so a tree the walk reads from it is one whose hash was computed from its bytes, and one that did not come is fetched by its level as before. A failed or refused deep fetch is not used at all: the tree:0 commit fetch answers, with its own answer and its own errors. It is asked only of a record on which tree:0 itself was taken (so a blob:none-only or no-filter host never sees it and #136's one refusal per remote stands); whether the server takes it is learned from its answer (git's filter 'combine' not supported, tree filter allows max depth N, a filter-refusal 400, an empty answer), never from its name, and the first ask runs beside the tree:0 commit fetch. | path-trees.test.js (git as the oracle for every answer: an open git, a git configured as GitHub is — uploadpackfilter.tree.maxDepth=0, uploadpackfilter.combine.allow=false, GitHub's two refusals byte for byte —, maxDepth=1, an Artifacts-like proxy; request counts per op and depth, one refused request per record; a proxy that answers the deep fetch with the commit alone, no commit, another commit and its trees, a forged root, a malformed extra: each falls back and answers git's; a depth-1 directory over maxTreeEntries: dropped from the deep pack (git.fetch.wide.skipped), and every read beside and through it answers as on the GitHub-configured git), path-trees-unit.test.js (state × outcome table over a fake transport, in the mutation run), read.test.js (91 of its reads go through the deep fetch, 2 error-shape cases fall back) | | I43 | Remote text (#security/remote-text-control-chars-in-errors): at the sites listed in this row, text a server wrote reaches an error message or a span attribute through remoteText / remoteQuoted (src/errors.ts); the fields listed as not covered still carry it as received. At an ERR line (capabilities, ls-refs, fetch), band 3 (fetch, push) and the HTTP error body the transport's credential scrubber runs on the text first (one pkt-line payload, or the capped body preview), so a cut inside an echoed credential leaves no remainder of it. The text is then cut to a bound (REMOTE_TEXT_MAX = 1024 UTF-16 units for running text, 60 for a quoted protocol line, 200 for an HTTP error body), so a 10 MB line costs the bound; then every control character (C0, DEL, C1), format character (bidi overrides, zero-width and tag characters), line or paragraph separator and lone surrogate is written as \uXXXX. Running text keeps tab and newline, as git's own reports do (usage.c vreportf masks every other control with ?); a quoted line is JSON-quoted first, so those are escaped too. Sites: ERR lines (capabilities, ls-refs, fetch), fetch band 3, the refused acknowledgment line (fetch, negotiate), malformed ls-refs and receive-pack advertisement lines, a non-v2 first line, the HTTP error body and content-type, push band 3 in ambiguous, the too-large ng reason, the section names in v2End's "no packfile section" (each cut to 60 units, at most 8 named), and the git.push.band2.tail attribute. Not covered (open): the attributes git.push.remote.messages, git.push.ng.reason, git.fetch.sections and git.sideband.progress.tail, hookOutput, fetch progress text and the lines / rejected detail fields, which carry remote text as data; and, in a message, the ng reason quoted by push_rejected / cas_conflict / push_partial and the object-format name in discover's unsupported. Printing those can still drive a terminal. | test/remote-text.test.js (ESC sequences, CR, NUL, C1 CSI, DEL, U+202E, a 10 MB line, a cut surrogate pair, invalid UTF-8, every code point below U+3000; the acknowledgment line at 60 / 61 units and both new fetch messages; the section names of an answer with no packfile section: escaped, 60 / 61 units, 8 / 12 names, the worst-case length; an inventory of the call sites by file, and no site in the old shapes or interpolating a section list without the helper; a credential across the 1024-unit cut at each ERR and band-3 site, by step function and through listRefs / readFile), test/lsrefs-step.test.js (the model's ERR message, rule stated by code-unit ranges) | | I44 | One object costs one object's worth of pack (fetchObject, objectAt). A want that is or may be a commit (expectType left out, COMMIT or TAG) is sent with deepen 1 on every path (tree:0, the blob:none and unfiltered wide fetches, filter: ''); a want named a tree or a blob gets none; a caller's deepen is sent as given and its refusal stands. Without the capability ply behaves as on main: a record taught by an advertisement with no shallow on fetch= sends no depth, and a default depth refused with an empty response, an ERR line or HTTP 400 while shallow is not yet known for the quirks record reads the advertisement once per record and, only if shallow is not listed, asks once more without deepen; never on 401, 403, 404, 429 or 5xx, never more than one re-ask per call, and no added request on a success path. shallow-info is read as protocol v2 defines it and nothing returned or stored says the repository is shallow. A deepen 1 request never shares a pack-cache entry with one that sent none (I14: the key covers the body). | fetchobject-deepen.test.js (git http-backend, packs counted by git verify-pack: one commit of pack for a commit want whatever the history; shallow-info; the empty-response refusal), fetchobject-deepen-paths.test.js (blob:none, unfiltered, filter: '', tag wants), fetchobject-deepen-refusal.test.js (ERR line and HTTP 400 on every path; 401/403/404/429/500 and the caller's own depth are never asked again; shallow listed: the first error stands), no-filter.test.js (request counts on a stock git), space/default-depth.test.js (1,800 cells: asked × expectType × knowledge × advertised × refusal × path, each against git; SPACE.md "Default depth") |

  • Line merge: rebase replayed commit 2 against a blob only commit 1 had produced — the server said not our ref. The merger now serves its own blobs from memory (they are already held for the push). Found by the rebase property test on its first run.
  • A pack with the same object twice (the same merged blob in two replayed commits, or at two paths) is refused by unpack-objects ("tried to add buffer twice"). uniqueObjects before every merge/rebase/pick push.
  • Rebase kept commits that became empty; git drops them (--empty=drop). Found by the property test (3 of 180 cases); fixed and the rate is now 0.
  • Rename naming: git reports rename/delete and a followed-rename content conflict at the target path; we named only the source. G1 now looks at every added path across the whole tree (one-sided directories included, fetched only when a deletion is in play — which also closed a hole where a rename target in a directory only one side touched left G1 blind), and a conflicting merge lists the added paths as possible targets. The deleted side of G1 had the same blindness and is closed the same way (merge-renames.test.js, by git merge-tree): a both-sides delete inside a subtree identical on ours and theirs, or of a file one side replaced with a directory, was invisible to the walk, so a rename out of it merged clean where git reports rename/delete or rename/rename. It is now read off the three trees. Cost, pinned by a counting transport (merge-renames.test.js, "tree reads"): nothing when no directory was changed identically on both sides (a shared directory): such a merge reads what it read before the guard. With shared directories, and no both-sides loss where the walk went, G1 can fire only if both hold: a path lost on both sides inside a shared directory, and a path one side alone added or removed. One "no" settles it, so the gate asks first the question with fewer directories to read, counting the top-most ones in the trees the walk already holds: when the shared directories are fewer than the directories exactly one side changed, it reads the shared ones (base's copy and the shared copy of each, and below them wherever those differ); otherwise it reads the one-side-changed ones (base's and that side's copy of each, and below them wherever that side changed more; ours' first, then theirs'; nothing when the trees the walk holds already show an add or a removal), stopping after the batch that holds an add or a removal. A "yes" to the first question asks the second as well (the full check: both sets are read), so the outcome never depends on which was asked first: the shared losses arm G1 only when a side added or removed a path of its own. This is not free on a clean merge: 40 shared directories beside 40 only ours edited, nothing added or removed, read 83 trees where the merge alone reads 3; 1 shared beside 80 one-side-edited read 5; none shared, 3. Sibling directories are read 8 at a time (at most 16 tree requests open at once); below a shared directory the descent is one directory at a time. No tree is fetched twice. Known over-refusal (accepted, open): G1 does not test similarity, so about half of generated git-clean rename-shaped merges are refused, and rebaseBranch / cherryPick of a delete the target already has is merge_conflict when the target also added a file.
  • Version skew, measured: all of the line merge's remaining conservative answers came from one step, the compaction re-diff that git 2.54 added (yc/histogram-hunk-shift-fix). git 2.43 has no such step. Built git master (2.56) as a second oracle, ported classic Myers (prepare-stage trim/cleanup, xdl_split with its snake heuristic and mxcost cutoff) and made the step a parameter: myers agrees with 2.56 and skip with 2.43 on every merge and every diff hunk, and each crossed pairing disagrees. The line merge's conservative count against a matched oracle is now 0.
  • Merge base was not git's (silent wrong merges, found by asking where our gaps were). (1) Criss-cross histories have two best bases; git merges them into a virtual base, we picked one: a constructed case gave f=a where git gives f=x. (2) Worse, without any criss-cross: the old rule (smallest summed distance) could pick a common ancestor that is itself an ancestor of the true base — a merge whose first parent is old. Constructed: git f=r, old ply f=y, pushed. Both fixed by computing git's best common ancestors with a completeness check; criss-cross is refused. The property generator never made merge commits in history; it does now (and fails on the old code).
  • Attribute source is version-dependent, measured: in a bare repository git 2.43 reads .gitattributes from HEAD's tree; 2.46 (and 2.45.3) reverted that for performance — 2.56 reads none unless attr.tree/--attr-source is set. So ply takes the source as an explicit option instead of guessing.
  • Protocol model gap (fuzzer's model of the server, not the client): a clock-seeded protocol.mjs run hit a want of a tree that was also a wanted commit's root, under tree:4; git omitted two objects the model required. Cause, from list-objects.c / list-objects-filter.c: filters apply only to NOT_USER_GIVEN objects, and the flag is set by the commit walk and by earlier wants' walks. Modelled exactly; 1,080 targeted cases equal git rev-list; seeds 32/33/52/236/777 × 200 clean.
  • A -U0 oracle artifact: git diff -U0 trims the common tail before diffing (xdi_diff's trim_common_tail, only at zero context); merges never do. The hunk oracle uses -U1 and rebuilds changed lines from hunk bodies.

What GitHub actually advertises (capability canary, GitHttp.discover(), 2026-10-18)

agent=git/github-41cc7379a75f-Linux, object-format=sha1, ls-refs=unborn, fetch=shallow wait-for-done filter, server-option. No ref-in-want, no bundle-uri. This is the first span in the suite that records the server's identity; the "git version matrix" gap is now "GitHub's build at this date", with a 191-byte request that can run on a schedule.

Push diagnostics

sideband is on by default for receive-pack; band 2 is recorded as git.push.remote.messages (last 64 lines). Hook stderr, and GitHub's protected-branch text, arrive there — tested with accepting and rejecting pre-receive hooks.

Measured negative results

  • Hand-rolled stored-block zlib for tiny push objects: never beats CompressionStream (zlib already emits stored blocks; ties at ≥32 random bytes, loses by 3 below). Removed; pure.test.js keeps the measurement as an assertion.

  • crypto.DigestStream (native SHA-1) under workerd on the 24 MiB edit: 798 ms vs 807 ms pure-JS (A/B knob removed after the measurement). Wall time is dominated by the server deflating the blob and 4 KiB DecompressionStream chunks, not by our hash. Kept (it is free and spares CPU-time budget), but it is not a latency lever. In node, SHA-1 is ~80% of the streamed phase's CPU (test/calibrate.mjs: 88 MB/s).

  • A cheaper pass-2 comparison than SHA-1 (I41), measured 2026-11-06 on 64 MiB pushes. Upper bound of the gain, pass 2 with no comparison at all: under workerd (native DigestStream; one process, trees alternated, 24 rounds, paired median [min–max] ms) text −15 [−580–410] of 4,215, random −115 [−340–60] of 3,430. A JS Adler-32 of 64 MiB costs about 60 ms, and pass 1 would have to compute it too (it still needs the SHA-1 for the trailer), so a checksum saves nothing measurable on Workers. Under node (pure-JS SHA-1) the bound is 176 ms text and 540 ms random of about 5 s; node is not the target. I41 keeps the SHA-1.

Borrowed from gitgrep (ivarvong/gitgrep), measured against github.com

rttwallbytes in
cold, no cache4549 ms8,318
per-colo pack cache warm4134 ms8,318 (2 × HIT)
cache warm + head hint373 ms8,173

Same 314-byte push pack, byte-identical, in all three. Wall time here is a node clock, not the Workers virtual clock.

Run record

  • 2026-11-06 (push feeds zlib 64 KiB slices, DEFLATE_SLICE): packwrite 17/17; packwrite, push-stream, push-repo and workerd 46/46; the full vitest suite 732/735 (the three are local: push-ng's git-observed cells on git 2.43, read's merge signed here on main too, and sync-ref's README example under load, 14/14 alone), the fail-site gate and npm test's fuzzers. Stryker on src/format.ts 39/39 detected. In flight per slice (the deflate output of one write, random input): 32,776 B at 16 KiB, 81,940 B at 64 KiB, the same under node and workerd. 64 MiB random push to a local http-backend (node --expose-gc, full GC every 50 ms, 3 runs): live arrayBuffers +73,009 to +85,786 B before, +82,419 to +94,823 B after; RSS +16.6 MB before, +8.2 to +8.7 MB after.

  • 2026-11-05 (issue #172 push side, #156 push Command and HttpOptions): packwrite 13/13, push-stream 9/9, push-commands 4/4 (and 4/4 against main b36f82a's src), http-options 4/4, workerd 11/11, plus push, push-repo, sync-ref, mutant-kill and the push-outcome quick space. 64 MiB random blob to a local http-backend (node --expose-gc, peak after a full GC every 50 ms): before, arrayBuffers +268,649,987 and RSS +334,688,256 (5.3 s); after, +78,115 and +14,303,232 (about 7.5 s with sampling, 9.3 s without, for two deflate and two SHA-1 passes). Without the forced GC, peak arrayBuffers was +302,102,118 before and +19,067,088 after (garbage not yet collected).

  • 2026-11-01 (issue #121, describePack, I40 — I39 is versioncmp on main): describe-pack 4/4 and the describe-pack space 132/132 against git 2.43.0 (24 thin packs, 8 with two or more missing bases, append order identical to first-seen pack order; limit probes at the git-measured boundary and one past). resolvePack still refuses a thin base. typecheck, oxlint, registry and bundle report-only.

  • 2026-11-01 (issue #124, version:refname): test/space/version-refname.test.js 173,664 cells against git 2.43.0 — 66,744 two-name git tag -l --sort=version:refname pairs (54 s) and 11,880 names × 9 versionsort.suffix lists. Seven lists match a sort by compareVersionRefnames. release-between and release-first differ (49 disagreed pairs); two-name git matches versioncmp on each, including 00.1-gamma < 00.2-alpha < 00.10-alpha < 00.1-gamma and 00.1-rc1 < 00.2 < 00.10 < 00.1-rc1. test/version-refname.test.js 3/3; registry and SPACES.md green; lint and typecheck clean; bundle budgets unchanged (the comparator is only on the full entry). Stryker on src/refs.ts: 122 killed, 8 timeout, 0 survived, score 100.

  • 2026-10-31 (spaces holes #2 and #10, ssh-faults and ssh-service): ssh-faults 107 cells + 10 pin and ssh-service 20 cells against OpenSSH 10.2p1 / git 2.50.0, all equal to their tables (1.3 s and 3.6 s); sshgit 15/15; mutant-kill and mutant-kill-tree 62/62; bundle 7/7 (budgets unchanged); workerd (workerd from ephem's node_modules) 10/10; lint clean. Against train/1's src 29 fault cells and 15 service cells fail (SPACE.md table).

  • 2026-10-30 (issue #40, credential edges): adversarial, mutant-kill, mutant-kill-tree, protocol, push, read, bundle and sshgit 121/121; workerd (workerd from ephem's node_modules) 9/9; after the last http.js change, adversarial, read, mutant-kill and workerd rerun green, bundle 7/7 after dated budget bumps (edit 63,709 B / 24,444 B gz, merge 82,181, read 48,703 / 18,909, tree 60,391 / 23,353, checkout 45,530 / 18,115; ssh 27,096 under its unchanged 30,000). I6e: 120 cells, git as the oracle on 89, all equal. Against the previous src the I6e tests fail on their first cell (http://:@h sent nothing; git sends Basic :), and a per-cell run of both trees changes 49 of 102 cells (issue #40 probe above).

  • 2026-10-30 (issue #46, the blob:none fallback's limits): artifacts-compat, read, edges, checkout-tree, merge, rebase, adversarial, mutant-kill, mutant-kill-tree, packcache, bundle and wide-limits 156/156 (bundle after dated budget bumps: edit 63,197 B / 24,217 B gz, merge 81,669, read 48,192 / 18,710, tree 59,881 / 23,141, checkout 44,697 / 17,804); lint clean; fuzz/liar.mjs --n 60 60/60 ok. wide-limits.test.js: 120 cells, 0 wrong. Before the fix (src reverted, same test): 16 cells wrong — readFile, listTree, editFile and mergeBranch of a target within the limits beside one or three over-limit directories on the blob:none-only server were limit_exceeded: tree entries 11 exceeds limit 10 where the tree:0 server answered (16 parity breaks); the other 104 cells already matched. Mutants: skipping malformed extras too, or the wanted object too, each leave 12 cells wrong.

  • 2026-10-30 (issue #32, URL userinfo): adversarial, mutant-kill, mutant-kill-tree, protocol, push, read, artifacts-compat, bundle and pure 125/125; edges, props, sshgit, checkout-tree and push-tree 56/56; workerd (workerd from ephem's node_modules) 9/9; fuzz/protocol.mjs --n 100 0 failures; fuzz/liar.mjs --n 60 60/60 ok (bundle after dated budget bumps: edit 62,836 B / 24,093 B gz, merge 81,313, read 47,831 / 18,565, tree 59,520 / 23,000, checkout 44,658 / 17,768). Before the fix (src/http.js reverted, same tests): the 3 I6d tests and the workerd one fail — a user-only URL sends no Authorization and git's ls-remote/push succeed where ply gets HTTP 401 git-upload-pack: authentication required; LF in userinfo reached fetch (network) instead of bad_request. Header for header against git 2.50: before, only user:pass matched (user alone and UTF-8 user: no header; :pass: x-access-token:pass; %ZZ, %FF: untyped URIError); after, all 7 sendable forms byte-equal.

  • 2026-10-30 (issue #18, merge base over a cut graph): merge, rebase, linemerge, adversarial, mutant-kill, protocol, props, pure, bundle, read, push-tree, checkout-tree, packcache, artifacts-compat and delta-bound 161/161 (bundle after the dated merge budget bump: 80,435 → 80,904 B; the edit, read, tree and checkout bundles unchanged); fuzz/liar.mjs --n 60 0 failures; fuzz/git-semantic.mjs --n 20 --seed 1 24 cases 0 failures; fuzz/below-hash.mjs --n 20 --seed 1 39 cases 0 failures. Before the fix (src reverted, same tests): stripping shallow-info merged over base P instead of git's X and pushed g=2 (git: g=1) after 8 fetches and a receive-pack; withholding y1 did the same after 10 fetches; an unrequested and a malformed commit were merged past; a want answered by a tree was unrelated_histories; the blob:none walk harvested a commit with no author email and fetchObject served it. After: all pack_corrupt after 2 fetches (4 for withheld y1, whose cut is past depth 8), no receive-pack, refs untouched.

  • 2026-10-30 (issue #17, SSH bounds): sshgit, adversarial, mutant-kill, protocol, props, pure, bundle, push, edges and workerd (workerd from ephem's node_modules) 112/112; fuzz/protocol.mjs --n 100 100/100 ok. SSH bundle 23,165 → 24,850 B (budget 30,000, unchanged). Before the fix: a 1 byte / 100 ms server hung the command and the handshake past 5 s (8 s probe) under node and past 40 s under workerd (HTTP: 1002 ms); an already-aborted signal was ignored (the exchange dialled and resolved), a mid-command abort hung past 8 s; 64 MiB of out-of-window CHANNEL_DATA was queued while exec waited (rss + 70 MiB). After: 1002 ms, 0 dials, 302 ms, refused at 2 MiB + 32 KiB (rss + 2 MiB).

  • 2026-10-30 (issue #16, Object.prototype names): merge, rebase, linemerge, adversarial, mutant-kill, protocol, props, pure, bundle, read, push-tree, checkout-tree, prefix-closure, push and parity 161/161 (bundle after the dated budget bump); fuzz/attributes.mjs --n 40 seeds 1–3: 6,909 paths equal to check-attr, 0 different (the previous code throws a TypeError on seed 1); fuzz/protocol.mjs --n 100 0 failures; fuzz/git-semantic.mjs --n 20 --seed 1 0 failures; fuzz/hostile.mjs --n 60 0 failures. Before the fix: 10 of the 11 Object.prototype-name merge cases disagreed with git (8 directory rename + add merged clean, the rename onto __proto__ unlisted, the __proto__ conflict reasonless); the four ls-refs attribute injections failed the edit (not_found ×3, remote_error not our ref ×1); the attributes case threw TypeError.

  • 2026-10-30 (issue #36, endless zlib stream; pack-byte cap at the choke point): lint; adversarial 29/29 (the #36 matrix 630/630 cells), mutant-kill 23/23, mutant-kill-tree 36/36, read 11/11, edges 11/11, checkout-tree 9/9, props 17/17, pure 16/16, format-facts 2/2, bundle 7/7; fuzz/hostile.mjs --n 200 --seed 424242 200 cases, 0 failures (14 carried zlib_endless_stored; 5 caught at detection site zlib_bound); fuzz/codec.mjs --n 20000 0 failures (every deflate ≤ zlibBound). The matrix on the previous source: 402/630 cells wrong.

  • 2026-10-30 (issue #15, redirects + echoed credentials): adversarial, mutant-kill, protocol, push, edges, props, pure, bundle, read, artifacts-compat, sshgit, push-tree, checkout-tree and workerd (workerd 2026-10-23) 140/140; fuzz/protocol.mjs --n 100 0 failures; fuzz/liar.mjs --n 60 0 failures. Before the fix, I6b leaked in 40/40 echo cases (36 whole, 4 as a 19-character fragment) and I6c failed on every status under node and workerd.

  • 2026-10-20 (merge base, .gitattributes, union): npm test 113/113 deterministic tests + 16 fuzz stages, 0 failures (29 min); npm run coverage 100% of 2,461 lines — now with every fuzzer seed pinned, so the number is reproducible (it had read 99.6% on a run where the clock-seeded protocol fuzzer happened not to reach multi-round negotiation; a deterministic negotiation test now covers it). Attributes vs check-attr: seeds 1–8, 40,000+ paths, 0 different on 2.43 and 2.56; union merges vs merge-tree -c attr.tree: 5,280 byte-identical on both gits; binary driver 695/695; merge property seeds 11–15 × 80 with merge-commit/criss-cross histories and random attributes: 0 wrong.

  • 2026-10-20 (line merge, Myers, git 2.54 compaction, protocol model fix): npm test 109/109 deterministic tests across 18 suites + 13 fuzz stages, 0 failures (24 min); npm run coverage 100% of 2,190 lines across all src/ modules. Line-merge campaigns: vs git 2.43 (skip) — 20,000 seeds (13,906 non-trivial merges) + 2,151 --big, 0 wrong; vs git master 2.56 (myers) — seeds 2–4, 8, 11: 7,388 merges (plain + --runs), 0 wrong, 0 conservative; diff hunks vs both gits: 1,400+ diffs incl. 125 --huge (947 snake-heuristic splits, 160+ mxcost cutoffs exercised), 0 different. fuzz/usergiven.mjs seeds 500/600/700: 1,080/1,080 equal to git rev-list. protocol.mjs seeds 32/33/52/236/777 × 200: 0 failures.

  • 2026-10-19 (ssh): 96 deterministic tests across 16 suites (incl. sshgit.test.js against OpenSSH 9.6 and the workerd run via cloudflare:sockets), fuzzers run/hostile/liar/packgen/protocol all 0 failures.

  • 2026-10-19, after the tree-shakeable split: line coverage 100% of 1,241 lines across all 21 src/ modules (npm run coverage: 8 deterministic suites + 6 fuzzers; the push matrix excluded as it adds time, not lines). Push matrix sampled 1-in-8 by a daily seed in npm test (155 cells, 1m50s), full 1,400 cells via test:push-full.

  • Deterministic suites: props 15, oracle 5, concurrency 1, edges 8, adversarial 8, protocol 1 (14,256 cells) — all pass (≈4 min, dominated by the 24 MB and 20k-entry cases and the 6×24×3 mutation matrix).

  • fuzz/run.mjs: seeds 1 (150), 2 (150), 99 (400), 11 (300) — 0 failures after the fixes above, all TARGETS buckets reached.

  • fuzz/hostile.mjs: seeds 3 (250), 12 (500), 13 (300), 42 (150), 104 (150), 112 (200) incl. the sideband-push stage — 0 failures;

  • fuzz/liar.mjs: seeds 2–5 (750), 102 (400), 113 (200) — 0 failures after the ambiguous fix.

  • fuzz/packgen.mjs: seeds 1 (200), 103 (300) — 0 failures. fuzz/codec.mjs: seed 7 (300,000) — 0 failures.

  • fuzz/run.mjs seeds 91 (150), 111 (100) over loose/packed/bitmap/MIDX-bitmap/mixed server stores — 0 failures. every error typed; every silent success git-verified.

  • fuzz/protocol.mjs: seeds 32 (400), 33 (500), 52 (150) — 0 failures; every non-degenerate case pack-objects-exact and invocation-exact.

  • compliance 5/5, parity 3/3, push 1/1 (768 cells), fuzz/packs.mjs seed 5 (80) — 0 disagreements.

Mutation testing

npm run test:mutate runs Stryker (vitest runner, vitest.stryker.config.ts, coverageAnalysis: perTest) over every module in src/. The mutant test files are props, prefix-closure, format-facts, mutant-kill, mutant-kill-tree, mutant-kill-packs, packstream, describe-pack, result, and the quick push-outcome space (every cell and unpack failure strings; MUTATION=1 skips its other two tests), plus version-refname for compareVersionRefnames, with PROP_N=4 (the two pack properties cap at min(60, PROP_N), so npm test still runs 60) and PUSH_SPACE=quick PUSH_SPACE_WORKERS=0 from vitest.stryker.config.ts (0 workers: every cell on the test's own thread, where Stryker records coverage). Each mutant runs only the files whose dry run reached it; a mutant no file reaches is NoCoverage without a run, judged exactly as a survivor. A test process that fails without reporting a failed test (a mutant that throws while its module loads, or trips Stryker's infinite-loop hit limit) is a RuntimeError, counted as detected, as any non-zero exit was Killed under the command runner. test/stryker-parent-guard.cjs (preloaded through NODE_OPTIONS) kills a mutant's test process past 3 GB resident or once its parent is gone (a pktline.js mutant reached 23 GB and took CI runners down); that is a RuntimeError too. pure.test.js stays in npm test and in CI job test; it is not in the mutator command because it scans src/ as text, and Stryker's instrumented copies no longer contain the fail('code') literals that scan counts. CI runs the full sweep on every push to main. On a pull request it mutates the mutants lying wholly inside the src/ lines the PR changed (git diff -U0 base...HEAD), and, whatever the PR changed, every line the gate judges strictly: each PARSER-named function from its declaration to the next top-level declaration (the owner rule the verdict attributes mutants by) and each bounds file whole (gatedRanges in scripts/mutate.mjs), all passed to Stryker as file:from-to ranges. A PR that only moves a parser changes none of its lines, and #198's five survivors in parseHttpOptions and parseLsRefLine first showed on main (run 41976594897); now a PR cannot pass with a gated survivor. A non-gated mutant on an unchanged line, or one spanning past the changed lines (an emptied enclosing block), is left to the full run on main. The work is split across 20 mutate-shard jobs balanced by measured cost (node scripts/mutate.mjs --plan 20; per-file and per-line seconds in scripts/mutate-weights.json, refreshed from full-run reports with --weights, as seconds on a reference runner whose dry run takes 50 s: each shard report records its runner's dry-run time and every duration is scaled by it, since runners differ up to 3x, #313), a unit costing more than a shard's share cut into line ranges that none of its mutants straddles; job mutate merges their reports, refuses a missing, extra or partial shard or any planned mutant missing or doubled, and judges the merged report with the same rules as an unsharded run. Job lint + fuzz runs node scripts/mutate.mjs --budget, which fails when the heaviest planned shard of a full run passes 60% of the shard job's timeout-minutes on the reference runner. CI splits the unit tests across 4 test-shard jobs balanced by measured per-file seconds (npx vitest run --shard i/4; the sequencer in vitest.config.ts, weights in test/durations.json), runs typecheck, oxlint and the below-hash and git-semantic fuzzers (--n 20) in job lint + fuzz, and job test fails unless all of them succeeded.

thresholds.break in stryker.conf.json is the score the full run reached. A full run (locally, and CI on main) fails if the score drops below it. A pull request mutates only the lines it changed, so that subset's percentage is not compared to the full-library break. Independently of that score, a mutant that survives or is uncovered inside a parser (parseTree, readObjHeader, applyDelta, inflate, pktStep, take, …) or in src/bytes.js / src/format.js / the pull codecs src/inflatestream.ts and src/packstream.ts (every function) fails the build on every run. scripts/mutate.mjs is what enforces both.

An equivalent mutant is justified on the line it mutates:

js
// Stryker disable next-line EqualityOperator: both sides are the length we just checked

The comment names the mutator and gives a reason. Stryker disable all, and removing a parser file from mutate, are rejected by the same script. A constant nobody reads is not equivalent — pin it from test/format-facts.test.js, where the literals live outside src/ so a mutated definition fails.

Explicitly not proven here

  • GitHub itself: fetch side now exercised, push side not. test/live-prepare.mjs ran the full pipeline minus receive-pack against github.com/elixir-ai-tools/just_bash: ls-refs, tree:0 commit want, bare tree want, bare blob want all honored (GitHub allows any-SHA wants), no band-2 progress, 426 ms for 4 roundtrips, 314-byte thin pack for a 15.9 KB README edit. That pack was then taken through real git locally — index-pack --fix-thin --strict on a git clone --bare of the same repo (2 deltas resolved against GitHub-origin bases), verify-pack, oid-for-oid agreement, git diff = one line, strict fsck, and a real receive-pack on a mirror with fsck/denyNonFastForwards/index-pack path, which accepted it and then rejected a replay on the stale old. What remains unverified is only GitHub's policy layer on receive-pack (their fsck settings, protected branches, size caps). The same code ran under local workerd (above); hosted deployment belongs to ply-web. Differences to check with test/live.mjs: band-2 progress despite no-progress, User-Agent requirements, whether allowAnySHA1InWant covers tree/blob wants (it does for partial-clone lazy fetch), receive-pack ng reason wording for the cas_conflict classifier (/failed to update ref|fetch first|non-fast-forward|lock/).
  • Server-side attribute sources. $GIT_DIR/info/attributes, core.attributesFile, system attributes, merge.default and custom merge drivers (merge.<name>.driver) are server configuration ply cannot see; a custom driver name is treated as text, as git does when the driver is not configured. Paths that are not valid UTF-8 are matched after lossy decoding.
  • Criss-cross merges are refused, not merged. git's virtual merge base (merge-ort merging the bases recursively, conflicts and all) is not ported.
  • Merge oracles: git 2.43 (installed) and git master 2.56 (built from 47fdf220). Line merge and diff are checked against both; the end-to-end merge/rebase suites run against 2.43 only (the HTTP test server uses the system git). Rename detection is not ported: rename shapes are conflicts (a superset), never silent wrong trees.
  • SHA-256 repos. object-format=sha256 is not supported. ls-refs detects a non-40-hex oid and fails with code: 'unsupported' before any pack is requested (unit-tested in props.test.js; no sha256 server round-trip).
  • Timing side channels, TLS. Out of scope; fetch is the platform's.
  • Server-side resource use of a lost CAS race. A loser's pack is unpacked before rejection. Bounded by our own push size (hundreds of bytes), but N racing writers cost the server N unpacks per round.
  • Workers runtime: now run under workerd (test/workerd.test.js, the pipeline bundled into a Worker, fetching from the local git server). The first run (2026-10, an older workerd) found fetch captured as a default parameter and called detached throwing Illegal invocation, so createTransport and cachingFetch bind globalThis.fetch. That detached call no longer reproduces: on workerd 2026-10-18 (the pinned devDependency) a bare call (const f = globalThis.fetch; f(url), f.call(null, url), a default parameter) succeeds under compatibility dates 2021-11-03 and 2024-09-23; what still throws Illegal invocation is a call with another object as this (opts.fetchImpl(url)). ply calls the bound function bare, so neither shape reaches the platform; the bind stays as the guard for the second. Node accepts all of them. Under workerd: small edit ~140 ms, 24 MB blob edit git-verified with a 1 KB push, DecompressionStream yields 4 KiB chunks (Node: 16 KiB) so peak per-chunk allocation is smaller; 10 concurrent writers in one isolate converge through cas_conflict retries (0–9 each), 11 commits, fsck clean. Not measured: production CPU-time limits (local workerd does not enforce them), subrequest limits, and real isolate memory (no heap API; our Mem counter is the only number).
1# Safety argument
3Everything below is enforced by a test that runs against real `git` locally. No claim here rests on reasoning alone; each has a file:line that fails if the claim stops being true.
5## Threat model
71. **Hostile or broken server.** Anything on the wire is attacker-controlled: HTTP status, content-type, pkt-line framing, v2 sections, sideband bands, pack headers, object sizes, zlib streams, deltas, ref lists. Goals: crash us, hang us, exhaust memory, make us push wrong content, make us report success falsely.
82. **Hostile or careless caller.** Strings that end up inside git objects (author, message, path) or protocol command lines (ref) have no escaping mechanism in git. Goals: header injection (extra `parent` lines → silent merge), ref smuggling, path traversal, secrets leaking into telemetry.
93. **Our own bugs.** Codec errors that produce objects git accepts but with wrong content; races that lose or duplicate commits; partial state on failure.
11## Invariants and where they are proven
13| # | Invariant | Enforced by |
14|---|---|---|
15| I1 | Every run terminates with either a correct result or an error whose `code` is from a fixed set. No hang: every wait of an HTTP exchange is bounded by one of three limits, `limits.firstByteTimeoutMs`, `limits.idleTimeoutMs` and `limits.heldTimeoutMs` (#273). On the network it is bounded by `limits.firstByteTimeoutMs` (to the headers, or from the hand-over of a streamed upload's last piece, so it covers the tail the platform still has buffered; it cannot fire once the headers have arrived) and `limits.idleTimeoutMs` (no progress: no upload piece of at most 64 KiB taken by the platform, no body chunk arriving) (#255). A network stall ends at one of them, and a run's bytes are bounded by the byte limits. Neither measures upload progress below fetch: for a streamed upload they fire on what ply can see (the platform stops taking pieces; no response after the last piece is handed over), and the bound on a stalled upload as a whole, whatever the platform has buffered, is `limits.requestTimeoutMs` (off by default) or the caller's signal. Idle time measures the network, not the consumer: while the consumer holds a chunk and has not asked for the next, no idle time is charged; that hold is bounded by `limits.heldTimeoutMs` instead (default 240 s, 4 x the idle default; from the take to the ask, started at the first clock read after the take, since the take reads no clock: the cut is never before take + `heldTimeoutMs` and late by at most one timer interval, the smaller of `limits.idleTimeoutMs` and `heldTimeoutMs` (`heldTimeoutMs` when idle is off), beyond timer latency), and a consumer that holds a chunk past it gets `timeout` with `limit: 'heldTimeoutMs'` and the upstream body is cancelled. Setting `heldTimeoutMs` to 0 leaves a stalled consumer bounded only by the caller's signal or `limits.requestTimeoutMs`. A timeout above 2147483647 ms is refused (`bad_request`). A wall-clock bound on a slow-but-steady exchange is opt-in (`limits.requestTimeoutMs`, or the caller's signal), as in stock git. Body reads end on abort even when the fetch does not tie the body to the signal. While ply waits on the network the timer is a live `setTimeout` that owns the `AbortController` (while the consumer holds a chunk the generator it holds keeps the controller reachable); `AbortSignal.timeout()` is not used, because after a GC that signal never fires and a stalled body hangs. | `deadline.test.js` (#273: a hold past `heldTimeoutMs` is cut as `heldTimeoutMs` with the upstream cancelled, a hold of 999 of 1000 ms is not, idle is not charged while held, and a 5 ms hold after a 300 s network wait is not cut with idle 0 or idle 600 s), `adversarial.test.js` (HTTP faults × 6 stages: 5xx/401/403/404/429/html/empty/stall/partial-stall/drop/partial-drop; 30 protocol-aware mutators × 6 stages × 3 seeds; `request timeout survives a GC` spawns `node --expose-gc test/timeout-gc.mjs`), `fuzz/hostile.mjs` (composed random mutations, any stage) |
16| I2 | On any error the ref is unchanged. Exceptions: a fault on the receive-pack **response** may leave the ref at exactly our commit (server applied it): that error is `ambiguous`; and a non-atomic multi-ref `push_partial` names exactly the refs that moved (I36). It is never anything else. | `adversarial.test.js` `checkInvariants`, `ambiguous push` test, `fuzz/hostile.mjs` |
17| I3 | A success is git-verified: ref == our commit, blob bytes == expected splice, `diff --name-only` is exactly the path, parent == old head, mode preserved, `fsck --strict` clean with `receive.fsckObjects=true` on the server. | `fuzz/run.mjs` oracle (every case), `adversarial` (every success), `edges.test.js` |
18| I4 | No wire-supplied size is allocated before it is checked. Every limits record is parsed once where it enters (`parseLimits`, #156: a transport, an operation, a public codec): a key given as anything but a finite non-negative number is `bad_request` there, before any request; a key left out is `DEFAULT_LIMITS`'s, never an `Infinity` fallback that disables the check; past the edge the record is a total `CheckedLimits` and every check reads a checked number. Buffered packs are capped by `maxPackObjects` (100_000) and `maxInflatedTotal` (4 × `maxObjectSize` = 256 MiB), and that inflated total includes delta results `resolvePack` allocates on top of the inflated instructions. `inflate` defaults `maxOutput` to `maxObjectSize`. Tree entries, commit parents, v2 section lines (including sections this client does not interpret), report-status lines, and ls-refs bytes (`maxLsRefsBytes`, the same ceiling as one buffered pack) fail `limit_exceeded` before the next record is kept. Capability advertisements are streamed into `maxPackBytes` and a `Content-Length` past that cap is refused before the body is read. An HTTP error page keeps at most 4 KiB. The streamed single-object parser (`spStep`, used by `fetchSingle`, edit's streamed blob, `readFile`/`openBlob` and `checkoutTree`'s single-blob stream) holds at most 21 header bytes: a size varint may not start a group past bit 63 (git's `bitsizeof(size_t) <= shift`), so an object header is ≤ 10 bytes, the 22nd byte of a header that never ends is `pack_corrupt`, and no decoded size is `NaN` or infinite. The same rule bounds a delta's size header (≤ 10 bytes), so `applyDelta` stays inside the error taxonomy. REF_DELTA bases are a `Map` lookup (`stats.baseLookups`), not a scan of the pack. **Every fetch response body is capped where every consumer passes (issue #36):** `v2Step` holds band 1 (the pack) to `maxPackBytes` (`limit_exceeded` `pack bytes`, `got` within one frame of the cap) and band 2 (progress) to the same cap (`progress bytes`) before the frame is yielded, so `fetchSingle`, `fetchWide`, `fetchPackOnce` (`fetchPack`, `checkoutTree`'s tree pack and blob batches, merge-base walks), the streamed blob (edit's `streamBlobEdit`, `readFile`/`openBlob`, `checkoutTree`'s single-blob stream) and any consumer added later are bounded without a check of their own; receive-pack's response is held the same way by `push`: every frame, band 1, 2 or 3, counts toward one `report bytes` cap (`maxPackBytes`), and a hit after the body is sent is `ambiguous` (original `limit_exceeded`, I36). Two more limits bound what `push` keeps of that answer and never its outcome: a reason (`ng <ref> <reason>`, `unpack <status>`) is cut at `maxReportReasonBytes` (4096; never below git's own longest reason, so git's classes are read whole) and the ref keeps its status (I36's echo is read from the whole status and reason before the cut: a pair that differs past the limit stays `ambiguous`), and band 2 past `maxReportProgressBytes` (8 MiB) is dropped undecoded while the report is still read; band-1 keepalives are bounded by `report bytes` and the timers. The read still ends at the first line that cannot be git's (no unpack line first, a ref not commanded or answered twice), so at most one line a command is kept. The only report causes of `ambiguous` are `report bytes` and `report lines` (`push-report-bound.test.js`). **Every object's zlib stream is bounded by its declared size:** `zlibBound(S) = S + ⌈S/8⌉ + ⌈S/64⌉ + 13` (`format.js`) is zlib's own conservative `deflateBound` (deflate.c ≤ 1.2.13, non-default parameters) plus `compressBound`'s constant; it is ≥ every form `deflateBound` takes for a zlib-wrapped stream (complen + 6, zlib 1.3's fixedlen and storelen, compressBound) and ≥ 65535-byte stored blocks at every S (`format-facts.test.js`), and node:zlib never exceeds it at any level, strategy, memLevel or windowBits (`mutant-kill.test.js`, `fuzz/codec.mjs`). The stored-block formula S + 5·⌈S/65535⌉ + 6 is *not* a bound of zlib's output and is not used: zlib's own empty stream is 8 bytes (it gives 6), and memLevel 1 writes 127-byte stored blocks (1,013 of 2,080 node:zlib configurations — 13 sizes × levels 0/1/6/9 × memLevel 1/2/8/9 × 5 strategies × windowBits 9/15 — exceed it). `spStep` refuses the streamed body on the chunk whose zlib bytes cross the bound (`pack_corrupt` "zlib stream longer than its declared size allows", `got`/`max`/`size` on the error, no count in the message, so any chunking gives the same error, I10), and `inflate` refuses at every block start and at the stream's end (`parsePack` inherits it for every object, deltas included; without an expected size the output cap stands in). A 10-byte blob therefore costs at most 26 zlib bytes plus the rest of the frame they arrived in, whatever `maxPackBytes` is. RFC 1951 has no such ceiling (a non-final empty stored block is 5 bytes in, 0 out, forever), so the bound is zlib's promise, not the format's; an encoder that sync-flushes between tiny chunks could exceed it, and no git server does. The streamed blob paths also refuse inflated bytes past the declared size before anything else looks at them (edit used to report an empty blob followed by a byte as `match_count`), and a `DecompressionStream` refusal reaches `readFile`'s and `checkoutTree`'s stream as `pack_corrupt`, not a platform error without a ply code. A delta cannot expand past `maxDeltaResult` (64 MiB): the densest in-limit copy is a 65536-byte base and a 1031-byte delta (1024 one-byte `DELTA_COPY` opcodes plus a 7-byte size header) producing exactly 64 MiB, a factor of 67108864/1031 (about 65091× the delta, 1024× the base). `maxDeltaResult + 1` throws `limit_exceeded` before the output buffer exists. A chain cannot exceed `maxDeltaChain` (64) deltas in any pack order (REF or OFS, base-first or child-first, in-pack or thin base): `resolvePack` counts links from the full or external base (`base.chain + 1`), not recursion depth, and resolves by dependency (a delta is filed under the base it rests on and resolved when that base lands, from a queue: no recursion, and no entry visited more than three times in any pack order, `stats.steps`), so it returns every object or an error (`limit_exceeded` `delta chain depth` for a long chain, `pack_corrupt` for a base that is nowhere); a chain of any configured length, resolved or waiting on a thin base, cannot exhaust the stack (`pack-resolve-linear.test.js`: 100,000 links). Every step of it is capped at the same 64 MiB. | `adversarial.test.js` I4 (2^40 object, 2^40 delta result, 8 MiB zlib bomb declared as 100 B, refs flood, shallow flood, pack flood, over-declared stream; rss delta < 64 MB; 6 × 64 MiB pack throws `limit_exceeded` on object 5 with `got` = 5 × `maxObjectSize`; 8_000 ref-deltas resolve with `baseLookups` equal to that count in under 3 s; small packs keep `stats.inflated` ≤ the cap), `mutant-kill.test.js` (missing keys, object-count header, parent and tree caps, report lines, delta aggregate room), `delta-bound.test.js` (the 1031-byte expansion and the one-past-cap refusal; exactly 64 deltas resolve and 65 are `limit_exceeded` with `got` 65 for REF base-first, REF child-first, OFS, thin REF both orders and OFS over a thin REF root; issue #14's 500-link and 101-object probes; a 20_000-link OFS chain over a thin root is `limit_exceeded`, not a stack overflow; shown failing on the previous `packresolve.js`), `pack-resolve-linear.test.js` (the check before the lookup at its boundary: a thin REF root with `maxDeltaChain` OFS deltas on it is a missing base, and one more OFS delta is `limit_exceeded` with `external` not called; a hand-built cycle of OFS bases is `limit_exceeded` `delta chain depth`, never a throw; `external` is asked once per distinct missing base id, in pack order of its first REF_DELTA), `adversarial.test.js` "I4 a blob fetch whose object header never ends" (PACK + count=1 + endless 0x80 against edit, readFile and checkoutTree: `pack_corrupt` in < 1 s having read 131 KB), `mutant-kill.test.js` "size varints stop at 64 bits" (10-byte headers accepted, 11-byte and the 200-byte NaN probe refused in `readObjHeader`, `parsePack`, `applyDelta`; `spStep` holds ≤ 21 bytes); issue #36: `adversarial.test.js` "I4 #36 matrix" (every cell of path {edit, read, checkout single, checkout batched, fetchObject, fetchPack} × body {valid, endless empty stored blocks, a stored block one byte over, trailing junk, truncated, padded to the zlib bound, one block past it} × declared size {0, 1, 65535, 65536, 1 MiB} × cap {R + 1, R, R − 1}, 630 cells, expected outcome stated per cell: never `timeout`, served bytes ≤ the cap + one frame and ≤ the decision frame), "I4 a blob whose zlib stream never ends", "I4 maxPackBytes bounds the streamed body on every path", `mutant-kill.test.js` "zlib stream length is bounded by the declared size" (26 bytes for a 10-byte blob pass, the 27th zlib byte is refused) and "v2Step holds band 1 and band 2 to maxPackBytes", `props.test.js` "the zlib-length bound is chunking-invariant and exact (I10)", `format-facts.test.js` "zlibBound", `fuzz/hostile.mjs` mutator `zlib_endless_stored` (detection site `zlib_bound`) |
19| I5 | Caller strings reaching git objects or command lines are validated before any I/O. `validateIdent` is the only constructor of an author/committer/tagger: name and email follow fsck_ident (NUL, newline, `<`, `>`), `time` is a non-negative safe integer, and `tz` matches `/^[+-]\d{4}$/` in the civil range (−12:00 through +14:00, minutes 00–59, extreme hours only on the hour). The result is branded; a spread or a raw object cannot reach `ident()`. `editFile`, `mergeBranch`, `rebaseBranch`, `cherryPick`, and `revertCommit` call it before `operation()`. `encodeCommit` and `encodeTag` reject LF or NUL in header values even if a caller bypasses the brand (the message may contain LF, not NUL), and both parse what they built with the reader (`parseCommit`, `parseTag`): a raw ident string `fsck_ident` refuses, an extra line that shadows a header the reader takes once, and (commit) an empty extra line or any field that would not read back as given are `bad_request`. Fetched idents stay on fsck's rules: `checkIdent` does not range-check `tz` (`+9999` is well-formed on the wire). Refs (`check-ref-format`), paths, messages (NUL), push options, fetch wants/haves/shallows/filters, ref-prefixes, the User-Agent, and auth header fields reject a header or pkt-line break. | `adversarial.test.js` I5 (the original edit cases, plus each operation × name/email/time/tz/message/ref with zero `fetch` calls). `encodeCommit` returns `bad_request` on an injected committer (it is a `Result`; it never throws); the same bytes pushed raw are still rejected by git's fsck. `encode-commit-roundtrip.test.js`: every refused shape against `git hash-object -t commit`, and 80 generated commits byte for byte against `git cat-file`, both ways. `compliance.test.js` still compares name/email to `git fsck --strict` |
20| I6 | Secrets never reach telemetry. URL userinfo is stripped at construction and converted to auth; `Authorization` is never recorded; errors only ever see the redacted URL. | `adversarial.test.js` I6 (token in auth + in URL; full JSONL dump searched for token, base64 of token, userinfo) |
21| I6d | URL userinfo is the Basic credential git sends for that URL, byte for byte (git 2.50 measured behind a Basic-auth gate on `http-backend`: it sends `user:` for a user alone and `:pass` for a password alone without asking for anything, and prompts only once that is refused): each part percent-decoded to bytes (`%XX` a byte, UTF-8 as its bytes, `%FF` the raw byte, an invalid escape such as `%ZZ` as written), joined by `:`. Explicit `auth` wins over the URL. A NUL, CR or LF in the userinfo is `bad_request` before any request (git refuses LF and NUL, sends CR); a URL that does not parse is `bad_request` without the TypeError, whose `input` carries the URL. A Basic user with an empty password is the whole credential and is scrubbed at ≥ 16 characters, digit or not (I6b's rule alone left a digitless GitLab token readable). Every `url.full` / `git.<op>.url` attribute is the URL without userinfo. | `adversarial.test.js` I6d (10 userinfo forms — `ghp_…`, fine-grained `github_pat_…`, digitless `glpat-…` as the user; `user:`; `user:pass`; `:pass`; `%40`/`%3A`; UTF-8; `%ZZ`; `%FF` — real git `ls-remote` + `push` and ply `readFile` + `editFile` through the same gate; git is handed no credential in a URL: it decodes the userinfo itself (`git credential fill`, credential_from_url) and sends it from a credential helper set through `GIT_CONFIG_*` env (an empty user, which git's helper path cannot send, as `http.extraHeader`), because a libcurl that reports the effective URL without the userinfo makes git take a redirect and drop the credential (issue: CI image ubuntu-26.04 20261018.50, git 2.55.0, curl 8.18.0-1ubuntu2.7; on git 2.50 the old and new oracles send the same Authorization for all 29 URL forms): every ply request's Authorization equals git's; the export holds no secret, no userinfo, no Basic value, and every URL attribute is userinfo-free; a gate refusing everything and echoing the header and its decoded form → `auth`, nothing of the secret (whole or any 12 characters) in the error, `inspect`, or the export; `ivar@` alone is sent as `ivar:` and stays readable; LF/CR/NUL and an unparseable URL → `bad_request` with zero fetches), `workerd.test.js` (a token as the URL user under workerd: the edit lands with git's Authorization, nothing in the export) |
22| I6e | Every credential cell has one stated outcome (issue #40), git's wherever git has the same input. Sources: URL userinfo (I6d), explicit fields `{ user?, token? }` (git: a credential helper's `username=`/`password=`), an explicit header (git: `http.extraHeader`). Explicit fields are sent as UTF-8 bytes (git sends a helper's `tëst`/`päss` as those bytes; before, `btoa` sent Latin-1 for `ë` and threw an untyped `InvalidCharacterError` past U+00FF). An explicit `auth` that sends nothing is `bad_request`: `{}`, `{ token: '' }`, and `{ user }` alone (git's helper API asks for the password there, measured; a library cannot ask; `{ user, token: '' }` is `user:`, git's helper with an empty password). A header or bearer token outside printable ASCII is `bad_request` (fetch throws untyped past U+00FF; git sends raw UTF-8 that no scheme's grammar admits; a control character is a 400). An empty URL userinfo (`http://@h`, `http://:@h`) is Basic `:`, as git sends; WHATWG URL drops it. No URL-parse error quotes the URL. A transport that cannot be built inside an operation ends the root span with the error and the outcome, and the error carries `span`. | `adversarial.test.js` I6e (3 sources × 6 user forms — absent, short, secret-shaped, UTF-8, LF, U+0001 — × 4 password forms — absent, empty, ASCII, UTF-8 — = 72 cells: 56 exact headers, 1 anonymous, 15 `bad_request` with zero requests and an ended `git.read` root carrying the outcome; git ran on 67 and agrees on every one (no credential in any URL or argv git is handed: URL userinfo decoded by `git credential fill`, helper and `http.extraHeader` through `GIT_CONFIG_*` env, as in I6d); each sendable cell also through a gate that echoes the header and its decoded form; no secret or 12-character piece of one in any error, `inspect`, span export, URL attribute or `t.url`; raw non-ASCII / control / LF headers and bearer tokens; the ssh:// cells left with the SSH transport, 2026-10-31) |
23| I7 | Memory is O(1) in blob size and repo size: max single allocation = one inflate chunk (16 KiB) on a 24 MB blob; tree packs bounded by `maxObjectSize`. | `edges.test.js` large blob, `fuzz/run.mjs` (max single alloc ≤ 70 KB asserted every case) |
24| I8 | Concurrency: N writers on one ref converge with no lost or duplicated edits; every lost race is visible as a `cas_conflict` and a failed receive-pack span. | `concurrency.test.js` (6 writers × 3 rounds) |
25| I9 | Degenerate edits are safe: `find === replace` is a `noop` (no empty commit); replacing a whole 1-byte file with nothing sends a full empty blob (git rejects deltas < 4 bytes); match count ≠ 1 fails before any push. | `edges.test.js`, `fuzz/run.mjs` (`noop`, `zero_matches`, `two_matches` outcomes) |
26| I11 | Push outcomes are typed (I36 is the exact rule). `ok` only on a well-formed report naming exactly the commanded refs; `cas_conflict`/`push_rejected` only on a well-formed `ng` for every ref; `push_partial` for a well-formed non-atomic mixed report; everything else after the push body is on the wire — transport failure, any HTTP status (except a 401/403/404 at the status line, before any frame of the answer, that the receive-pack advertisement repeats with the same code: the service is not there for this caller, so it is `auth` / `not_found`, #144; a refusal the advertisement does not repeat may be a middlebox that forwarded the body, and stays `ambiguous`), wrong content-type, bad framing, band 3, unreadable or inconsistent report — is `ambiguous` (the ref may have moved; re-read it). `verify: true` adds one `ls-refs` after `ok` to defeat a forged report; without it a middlebox can fake success, which git's protocol cannot prevent. | `fuzz/liar.mjs` (18 semantic lies: stale/foreign/fabricated ls-refs, wrong commit/tree/blob objects, same-size and needle-preserving blob swaps, forged/inconsistent/dropped reports), `adversarial.test.js` I2 |
27| I12 | Every pack we build is accepted by `index-pack --strict`, resolves to the same oids git computes for the same edit, and lands through `receive-pack`. | `fuzz/packgen.mjs` (random repo/path/edit shapes over copy-op and insert-op boundaries) |
28| I13 | Codecs agree with their reference implementations at scale: inflate vs zlib (all levels/strategies/window bits; truncation throws; bit flips are caught by Adler), SHA-1 vs crypto, deltas vs git `patch_delta`, pkt-line. | `fuzz/codec.mjs`, 300,000 cases, 0 failures |
29| I14 | The pack cache never changes an outcome: only wants-only, filtered, non-relative fetches are cached (no `have`, `want-ref`, `shallow`, `deepen-since/not`); the key covers url + credential + body; an answer reaches the store only through a streaming verifier holding O(chunk) state (pkt-line framing complete to the final flush, no in-band ERR, no sideband channel 3, the pack header, and the pack trailer equal to a running SHA-1), which errors the put's body at the first violation, after which the key is deleted (an in-band ERR, a cut answer or a pack with a wrong trailer is never stored); nothing on the cache path holds a whole answer (the cache branch queues at most `CACHE_LAG_BYTES`, and a client that cancels its body cancels the origin and the put); a stored entry is untrusted and is served streaming, unparsed by the cache: the client's own parse is the check, and a HIT whose answer it refuses (`pack_corrupt`, `protocol`, `remote_error`: a flipped byte, an ERR, a cut, an empty body, a wrong pack trailer) is deleted and refetched exactly once; a corrupt *live* body is never retried. Second edit at the same tree: the server sees only ls-refs, the blob stream and the push. | `packcache.test.js` (proxy request counts are the oracle; poison all entries → 5 busts → repaired; git fsck clean; a 64 MiB answer with at most the lag window between origin and store; a HIT with zero chunks parsed by the cache) |
30| I15 | A head hint cannot overwrite another writer: ls-refs always runs and always wins; the hint only decides whether the overlapped speculative commit fetch is used. A `cas_conflict` (receive-pack disagreeing with ls-refs: replica lag) is redone once from a fresh ls-refs. | `packcache.test.js`, `workerd.test.js` (stale → 1 push, 1 root, other writer's commit is the parent); `liar.mjs` replica:consistent-lag → cas_conflict |
31| I10 | Every pure step function (pkt-line decode, v2 state machine, single-object pack stream, find/replace scanner) is chunking-invariant: any split of the input yields identical output and state. This is what makes 1-byte TCP chunks and 64 KiB chunks equivalent. | `props.test.js` (random splits, 200 cases each), `adversarial.test.js` chunking stress (1- and 7-byte chunks at every stage) |
33## Protocol semantics: the fetch product space
35**Status before this section existed:** the pipeline only ever issues single-object `tree:0` fetches and one full-blob fetch, and that is what the earlier suites covered. The wider `fetch` surface (multiple wants, haves, shallow state, `deepen`/`deepen-since`/`deepen-not`, `blob:limit`, `combine:`, thin packs, negotiation without `done`) was *not* verified, and the earlier text implied broader coverage than existed. The client also had two real bugs there: a negotiation round that returns only `acknowledgments` (no `packfile`) was treated as a protocol error, and a `REF_DELTA` whose base is a later delta object in the same pack fell through to the external store. Both are fixed and covered below.
37**Oracles (three, independent, all local):**
391. **Bound** (`requiredAndHad` in `test/fuzz/dag.js`): for any request, `required ⊆ got ⊆ required ∪ had`, where `required` is the exact `reachable(wants) \ reachable(haves)` after the filter (haves cut at the request's shallow set, an unshallowed commit's parents added as wants, a had want's parents never walked) and `had` is everything the client declared. This is the property a client relies on: it never lacks an object it needs, and anything extra it already has.
402. **pack-objects oracle** (`test/fuzz/packobjects.js`): `git pack-objects` invoked exactly as upload-pack invokes it, in the same repo, must yield the identical object set. Exact in both server modes.
413. **Invocation capture**: `uploadpack.packObjectsHook` records the real argv and stdin upload-pack used; the fuzzer reconstructs them from the model and compares (flags exact; lists compared as sets because `send_unshallow`'s re-parse may list a parent twice).
43**Dimensions enumerated** (`test/protocol.test.js`, 14,256 cells, exhaustive product; `test/fuzz/protocol.mjs`, random with DAG repos):
44want kind {tip, old commit, tag, tree, blob, tip+old, tip+tree, tag+blob} × have kind {none, ancestor, old, unrelated branch, tip itself, tree, blob, tag, unknown, tip+old, old+tip} × deepen {none, 1, 2, 99, since, not} × filter {none, blob:none, blob:limit=100, blob:limit=1, tree:0, tree:1, tree:2, combine:blob:none+tree:1, combine:blob:limit=100+tree:2} × server {loose, packed without bitmap, packed with bitmap}; thin-pack, ofs-delta, done/negotiate and client-shallow state cycle deterministically across cells. Result: every non-degenerate cell is oracle-exact and invocation-exact; degenerate `deepen-since/not` requests (want older than since, want cut by not, no commit wants) are accepted only when the degeneracy predicate holds.
46**What git actually does** (each item was discovered by a failing cell, then confirmed by the capture or a direct probe; none is taken from documentation):
48- Two server-side object-selection modes. **Bitmap** (packed bare repo after `gc`, `pack.useBitmaps`, no deepen, filter ∈ {none, blob:none, blob:limit, tree:0, combine of those}): exact `reachable(wants) \ reachable(haves)`; a wanted tree/blob is dropped if any have reaches it. **Traversal** (everything else): commits reachable from haves are excluded plus the *tree contents of uninteresting parents of interesting commits* (`mark_edges_uninteresting`); a have on an unrelated branch excludes nothing; a wanted tree/blob is dropped only if it is literally a have (or inside a tree have). GitHub serves from bitmapped packs, so the bitmap mode is the production one for non-shallow fetches.
49- `--thin` makes pack-objects pass `--objects-edge-aggressive`: cmdline haves' own trees become uninteresting too.
50- `tree:N` from a commit omits depth ≥ N (root tree is depth 0); from a directly wanted tree its entries count as depth 0, i.e. it omits depth > N — *if the want is still user-given*: git filters only objects flagged `NOT_USER_GIVEN`, the commit walk flags each walked commit's root tree, and walking an earlier wanted tree flags whatever that walk reaches (it enters a subtree only while depth < N). Such a want is filtered like any tree (`dag.js userGiven`; `fuzz/usergiven.mjs` against `git rev-list --objects --filter`). `tree:N` includes blobs shallower than N; `combine:blob:none+tree:N` is the "trees only to depth N" filter.
51- Shallow: the boundary is the set of commits at exactly the requested depth (even root commits), reported as `shallow` lines even when excluded by haves; boundary commits are grafted for pack-objects (parents invisible, not `--not`); the have-walk also stops at them. Client `shallow` lines cut the have-walk always; a client commit inside the window that is not on the boundary is unshallowed: its parents become wants, it becomes an extra edge, and the shallow set is not recomputed (the parents get no new depth budget).
52- `do_got_oid` marks a have's direct parents `THEY_HAVE` even when the have itself was already known, and a later have already marked is dropped from the invocation. Order-dependent.
53- Tag haves peel; tag wants are sent with their target; the same commit wanted directly and via its tag yields a duplicate `shallow` line (client dedupes).
54- Negotiation: with `done`, `acknowledgments` is never sent, and ply refuses an answer that has one (`protocol`), with or without a pack after it, as git's fetch-pack does (`expected 'packfile', received 'acknowledgments'`; `v2End`, `test/fetch-lying-server.test.js` against real git on the same proxy). `done` is read once: the parsed request's value decides both the `done` line and how the answer is judged, and a `done` that is not a boolean is `bad_request`. Without `done`, `NAK`/`ACK`s arrive and the server may continue straight into `packfile` when ready. `negotiate()` implements rounds.
55- git 2.43 `upload-pack` dies mid-response (after `shallow-info`) on degenerate `deepen-since`/`deepen-not` requests (want older than since, want cut by not, or no commit wants). Surfaced as `code: 'protocol'`.
56- Server `protocol.version` config does not matter over HTTP: `GIT_PROTOCOL` from the client header wins; a server without v2 support could not be tested locally (git 2.43 only).
58**Not derived, only verified:** 21 of 458 random cases and 621 of 11,880 matrix cells are "model.approx": the calibrated model over- or under-marks one or two edge-tree objects. Those cells still satisfy the bound and are pack-objects-exact and invocation-exact; the model's residual is in `mark_edges_uninteresting`'s sparse tree-walk heuristics, which I verify against git rather than reimplement.
60## Git compliance: decided by git, not by me
62Every rule the client enforces or assumes was replaced by a comparison with git over an enumerated input space. Each test prints its case count; zero disagreements in all of them.
64| Surface | Oracle | Cases | What it corrected |
65|---|---|---|---|
66| author/committer ident | `index-pack --strict` (fsck_object) on a commit carrying the ident | 4,767 (alphabet³, name and email independently, plus curated) | my validator rejected names git accepts: `O'Brien`, `Dr. X`, leading/trailing spaces, tabs, empty name/email, spaces inside an email. git's rule is only: no NUL/newline, no `<`/`>`. |
67| commit/tag/ident decision space (I35) | `git fsck --strict` on every cell, written by `git hash-object --literally` | 58,968 cells (53,930 distinct objects) | ply accepted NUL in a commit body (`nulInCommit`, #59), a NUL in a header, zero-padded and overflowing dates, a second `<` in an email, a bad tag type, and a BOM before `tree`; it refused fsck-clean objects: uppercase hex ids, a header line with no space, a tag with no tagger. Duplicates after the committer/tagger stay refused by design (PR #7) |
68| ref names | `git check-ref-format` | 1,431 | `.lock` is rejected on *any* component, not only the last |
69| version:refname | `git tag -l --sort=version:refname` | 173,664 | two names are versioncmp, including `versionsort.suffix`. Seven suffix lists: an 11,880-name listing matches a sort by it. With the release before `-rc`, or between `-alpha` and `-gamma`, versioncmp cycles and git's qsort of the whole list differs; every disagreed pair, rechecked as two names, matches versioncmp |
70| tree entry names | `index-pack --strict` on a tree with the name | 924 (alphabet², `.git`-variants, NTFS/HFS) | `hasDotgit` is case-insensitive, strips trailing dots/spaces (NTFS), rejects 8.3 short names `git~1`, and ignores HFS+ ignorable code points (`.gi‌t`) |
71| tree encoding | `git mktree` | 600 name pairs × 5 mode combinations, both orders | — |
72| commit objects | `git cat-file`/`git log` on every shape git writes (octopus merge, gpgsig continuation lines, mergetag, encoding, unknown header, empty message, no body section) | 10 shapes, parse∘encode byte-identical | encoder forced a body section and a trailing newline; parser produced a phantom header on body-less commits |
73| fetch client parity | git's own `clone`/`fetch` over `file://` and ours over HTTP against the same upload-pack, with `uploadpack.packObjectsHook` capturing both invocations | 11 clone shapes (`--depth` 1/2/3/50, `--filter` blob:none / blob:limit / tree:0 / combine, `--shallow-since`, `--shallow-exclude`), 7 post-clone fetch shapes (`--deepen`, `--depth`, `--unshallow`, since, exclude) | identical pack-objects argv+stdin, identical `.git/shallow`, identical object sets. git's client always requests `thin-pack`; `clone` requests `include-tag` (also with filters). |
74| ls-refs | `git ls-remote --symref` | 6 prefix sets over 300+ refs, symrefs, peeled annotated tags | — |
75| push | `git push` on a twin repo | 768 cells: 6 server configs (`denyNonFastForwards`, `denyDeletes`, `unpackLimit` → index-pack vs unpack-objects, fsck on/off) × 4 hooks (none, pre-receive reject, noisy accept, update rejecting one ref) × 8 commands (ff, non-ff, create, delete, multi, multi-atomic, stale old, thin blob delta) × 4 capability sets (side-band-64k, report-status-v2) | same accept/reject, refs, stored objects, per-ref server reasons; hook stderr arrives on band 2; retryable classification: `failed to update ref`, `failed to lock`, `bad ref` (denyNonFastForwards with an unknown stale old), `incorrect old value provided` (git ≥ 2.50), `non-fast-forward`, and `atomic push failure` only when caused by one of those — a hook decline anywhere is non-retryable; `report-status-v2` emits `option` lines only via proc-receive |
76| pack reading | `git pack-objects` option space (window 0–250, depth 0–250, compression −1..9, `--no-reuse-delta/-object`, `--sparse`, OFS/REF, `--thin` with haves, `core.bigFileThreshold`, packed vs loose) over random DAG repos; `verify-pack -v` offsets and chain depths; `index-pack --fix-thin` for thin | 80 packs | — |
77| pack layout (`describePack`, I40) | `git verify-pack -v` and `git index-pack --fix-thin` | 132 (120 packs + 12 limit probes) | verify-pack's size column is the inflated header (a delta's instruction size), not the resolved object; a thin base is a typed id list, not a `pack_corrupt` message |
79## Codec correctness (I3 depends on these)
81- Our SHA-1 == `node:crypto` for 0…3000 random bytes with random chunking.
82- Our inflate == `node:zlib` for all levels −1…9 and strategies, with exact consumed-byte count, trailing junk ignored, truncation always throws.
83- Our tree encoding hashes identically to `git write-tree` for names that sort differently as dir vs file (`a`, `a-b`, `a.b`, `a0`, …), unicode, spaces, leading `-`, symlinks, exec bits.
84- `git pack-objects` output across 5 window/depth/compression combinations (incl. level 0 stored blocks, depth 50 chains) parses and resolves to `git cat-file` truth for every object; offsets and chain depths match `git verify-pack -v`.
85- Our thin packs are accepted by `git index-pack --fix-thin` and by `receive-pack` with strict fsck.
86- `filter` semantics verified against `rev-list --filter` (and corrected a wrong belief: `tree:N` includes blobs at depth < N).
88## Findings during this campaign (all fixed, all now covered)
90| Found by | Issue |
91|---|---|
92| issue #172 probe | A streamed request body under undici was held whole for the length of the request. `fetch` with `redirect: 'manual'` or `'follow'` clones the Request (HTTP-network-or-cache fetch), which tees the body, and the branch nobody read queued every chunk. A heap snapshot traced the 16 KiB chunks to `{ value }` records in a ReadableStream queue under the Request's `body.stream`, on the tee's second branch. Measured live arrayBuffers for 64 MiB through a slow server: `manual` and `follow` +67,166,347, `error` +1,417,363. Under workerd, `redirect: 'error'` is refused at `new Request` ("does not make sense at the edge"), and a request body stream that errors is ended as a clean chunked body: the server saw a complete, short request and fetch resolved with its answer. Under undici, the same error aborts the connection. Hence the trailer rule in I41. |
93| direct probe | Object size from pack header allocated before any check → `RangeError` or 4 GB lazy allocation. |
94| direct probe | Delta result size from delta header allocated before any check. |
95| issue #13 probe | Size varints past ~150 bytes decoded to `NaN` (0 × `Infinity`), which passes every `size > limit` check: `readFile` returned `size: NaN`, `applyDelta` threw an untyped `RangeError`, and the streamed header phase (edit, read, checkout) buffered endless continuation bytes (1 MiB: 3 s, 2 MiB: 9 s). Now refused past bit 63. |
96| issue #13 probe | `scanStep` copied its offset array on every match: a one-byte `find` over 128 KiB of that byte took 22 s in the scanner alone (400 s end to end in the report). It now counts matches and keeps the first 16 offsets: 9 ms. |
97| issue #14 probe | `maxDeltaChain` bounded recursion depth, not chain length: a memoised base came back at depth 0, so a 500-link REF chain emitted base-first resolved (`stats.maxChain` 500). Emitted child-first, the fixpoint stopped after 64 passes and returned 65 of 101 objects with no error; a legitimate 64-link thin chain lost its last link the same way (the pass that switches to external bases came out of the 64). Now counted per link, and the fixpoint runs to completion or throws. |
98| adversarial I1 | undici `TimeoutError` has numeric `code: 23`; our "already coded" check let it through untyped. |
99| adversarial I1 | pkt-line and v2 parse errors on the streaming blob path were uncoded. |
100| adversarial I6 | `fetch` rejects credential URLs, and its error message echoed the token into the span's exception event. |
101| adversarial I6 | `git.edit.url` attr held the raw URL. |
102| issue #15 probe | A credential echoed by the server reached errors and spans verbatim from every site but the HTTP error body: 36 of 40 echo cases (10 sites × 4 auth forms) leaked; the other 4 (a push band-2 tail cut through the secret) leaked a 19-character fragment. `auth.user` was never scrubbed. |
103| issue #32 probe | A URL with a user alone (`https://<token>@host/…`) sent no Authorization (the user became `auth.user` with an empty token, and an empty token meant no header): every request 401, nothing saying why. `:pass` sent `x-access-token:pass` where git sends `:pass`. UTF-8 in a user alone sent nothing; `%ZZ` or `%FF` threw an untyped `URIError`; a URL that did not parse threw Node's TypeError with the credential in `input`. |
104| issue #36 probe | A single-object pack with a valid header (blob, 10 bytes) and then non-final empty stored blocks forever (`00 00 00 ff ff`: infinite compressed input, zero inflated output) was accepted by every streamed path until the request timer: with `requestTimeoutMs` 8000, `readFile` took 932.1 MiB, `editFile` 910.2 MiB and `checkoutTree` 980.2 MiB (~115 MiB/s; ~7 GiB per request at the default 60 s) and failed `timeout`, not `limit_exceeded`: `maxPackBytes` was checked only by the buffered consumers, and the streamed path's only body check was on inflated bytes, of which there were none. The #36 matrix on the previous source: 402 of 630 cells wrong: 60 `timeout` (endless bodies on edit, read and both checkouts), 30 raw `ERR_TRAILING_JUNK_AFTER_STREAM_END` (no ply code) from `readFile`/`checkoutTree`, 165 `ok` where a refusal was due (every padded-past-bound stream on every path, every over-cap body on the streamed paths), and 147 with the wrong code or request pattern for their cap (109 `pack_corrupt`, 30 `limit_exceeded`, 8 `match_count`, 2 of those an empty blob followed by a byte, under the cap). Now: the probe is `pack_corrupt` after 65,033 B (one frame) in 78–146 ms on all three, and all 630 cells hold. |
105| issue #40 probe | 49 of 102 credential cells changed. `{ user }` alone, `{}`, `{ token: '' }` and `{ header: '' }` sent nothing (anonymous 401). Explicit UTF-8 tokens threw an untyped `InvalidCharacterError` (`code` 5) and left the root span open; a UTF-8 user with an ASCII token was sent as Latin-1, not git's UTF-8 bytes. Every `bad_request` from createTransport inside an operation left the root span open (never exported). `ssh://user:pass@` kept the password in the login, `t.url` and `parseSshUrl`'s message; a secret-shaped ssh login was in `t.url` and `ssh.user`; ssh:// was not percent-decoded (`t%C3%ABst` sent as written, git sends `tëst`). `http://@h` and `http://:@h` sent nothing (git: Basic `:`). |
106| issue #15 probe | Neither fetch set `redirect`. Under undici a 3xx to another origin was followed without Authorization (10 requests reached the target); under workerd 2026-10-23 a 307 carried ply's `Basic` header (the token) to the other origin on both the GET and the POST. A 301 on the POST surfaced as `not_git` "unexpected content-type". |
107| issue #16 probe | Repository- and server-chosen names keyed plain objects. merge: a directory named `constructor` (or `__proto__`, `toString`, `hasOwnProperty`) renamed on one side read as still present (`o[name]` was `Object.prototype`'s), so the directory-rename guard was skipped and an add inside it merged clean where git conflicts (I21); a conflict at a path named `__proto__` got no reason (`[object Object]` in the message) and a rename onto `__proto__` was not listed as conflicting. attributes: `[[:hasOwnProperty:]]`, `[[:__proto__:]]`, `[[:valueOf:]]` threw an untyped `TypeError` out of `mergeBranch`; `[[:constructor:]]` / `[[:toString:]]` matched every path where git aborts the pattern, so `merge=union` applied where git conflicts (I28). ls-refs: every `key:value` attribute was copied onto the record, so `oid:junk` / `name:refs/heads/other` replaced the parsed fields (an edit failed `not_found`, or asked for a server-chosen oid); now only `symref-target:` and a 40-hex `peeled:` are kept, as connect.c does. Swept too: report-status-v2 `option` names now land on a prototype-less map, and `scrubError` walks prototype-less maps. |
108| issue #18 probe | The merge-base walk took a server's silence for completeness: `mergeBase` accepted a graph with a missing parent whenever neither commit-only pack carried `shallow` lines, so a server that withheld ancestry (or stripped its shallow-info) moved the base to an older common ancestor and a merge git would not make was pushed (shown: base P for git's X, `g=2` for `g=1`). Each walk pack is now held to the deepen contract and the answer needs a graph with no unexplored ancestry. Nearby: the blob:none walk harvested commits and trees without the checks `fetchWide` applies, and `fetchObject` served them from the harvest unchecked (a commit with no author email was served); `ancestors` parsed commits without them. |
109| issue #46 probe | The blob:none fallback held every tree in the wide pack to the caller's limits, so one sibling directory over `maxTreeEntries` failed reads that never touch it, on blob:none-only hosts only: 16 of 120 cells wrong (readFile, listTree, editFile and mergeBranch of something within the limits, beside one or three over-limit directories: `limit_exceeded` where the tree:0 server answered). Prod: ply-web's viewer, `maxTreeEntries` 2,000, 413 on every page of `public-v0/curl` (tests/data, 2,135 entries) on Artifacts. |
110| issue #31 probe | `SshClient` read its AES-GCM nonce across an await and bumped it after: concurrent `writePacket` calls sealed different packets under one nonce (50 concurrent packets: 1 distinct nonce), which gives away GCM's confidentiality (XOR of the plaintexts) and its integrity (the GHASH key) for those packets. Reached in practice: editFile with a head hint on a fresh SSH transport overlaps ls-refs with a speculative fetch, both opened `git-upload-pack` at once, and the second CHANNEL_OPEN went out under the first one's nonce (sshd: "message authentication code incorrect"; the edit failed `network`); upload-pack and receive-pack opened together did the same. Nearby: two first commands for one service each opened a channel; a handshake that failed for a reason other than a timeout or abort was kept and every later command got its error without dialling; a channel that failed to open (missing repo) kept its connection until the socket's 60 s idle timeout. |
111| fuzz/run | `tree:N` ⊄ `blob:none`. |
112| fuzz/run | Deltas < 4 bytes rejected by git (`DELTA_SIZE_MIN`). |
113| fuzz/run | Identical replacement created an empty commit. |
114| fuzz/run | Push-size bound omitted insert-op and zlib-block overhead. |
115| concurrency | receive-pack unpacks before CAS → losers leave dangling objects server-side. |
116| fuzz/liar | A push the server applied, answered with a malformed or inconsistent report, was classified `push_rejected` (retry loops treat as permanent; callers assume no change). Now `ambiguous`. |
117| fuzz/codec | git refuses a delta whose result equals its base ("duplicate base"); the `noop` path keeps ply from emitting one. |
118| fuzz/packgen | Sandbox git signs commits by default; a branch rule requiring signed commits would reject every ply commit (unsigned). Documented limitation. |
119| fuzz/hostile | The sha256 detection, added during this campaign, mislabeled any malformed ls-refs line as `unsupported`; now only 64-hex oids are, the rest are `protocol`. |
121| I16 | Telemetry is bounded and honest: spans carry at most `maxEvents` events (dropped count exported), CPU is reported as measured only where a CPU clock exists (`cpu_ms` on node) and as a labeled estimate elsewhere (`cpu_est_ms = bytes / CPU_RATE`), cache put failures are counted (`git.pack.cache.put.failed`), the first root span of an isolate is marked (`ply.isolate.cold`), and a retry links to the attempt it retries. | `pure.test.js`, `packcache.test.js`, `test/calibrate.mjs` |
122| I17 | The edit bundle carries only the edit path: no delta generator, negotiation, advertisements, classes or node builtins; the full client is a superset. (Since 2026-10-23 the delta *resolver* rides along for the blob:none fallback, I30; budget 52 KB.) The read bundle carries no push, pack building, merge or rebase code. | `bundle.test.js` (esbuild metafile: module list + symbol greps + byte budget) |
123| I19 | An LFS pointer blob is never edited as content: the v1 magic in the first streamed bytes refuses the edit before any push (`lfs_pointer`); files merely mentioning git-lfs are not affected; `allowLfsPointer` is an explicit opt-in. | `packcache.test.js` |
124| I20 | A signed commit verifies with git and with ssh-keygen over the exact payload git signs (commit minus gpgsig); a tampered message with the same signature does not; fsck stays clean; the same code signs under workerd. | `sign.test.js`, `workerd.test.js` |
125| I21 | Merging is decided by git: clean merges produce the tree `git merge-tree --write-tree` and `git merge` produce, line-merged files included; every path git conflicts on is one of ours (rename shapes: the rename guards conflict and name both ends; a directory-rename target, which git computes, is covered by the reason; G1's "lost on both sides" is decided over the three trees, not the merge walk: a base path neither side holds as a file, wherever it is, including inside a subtree that is the same tree on ours and theirs and under a name one side turned into a directory; it is by path, not similarity, so it also refuses merges, rebases and picks git completes — a delete the target already has beside any added file — the accepted over-refusal until rename similarity is ported; each conflicting path is listed once and keeps the walk's reason; the guard fetches no tree twice, reads nothing when no directory was changed identically on both sides, and otherwise reads the smaller of the two sets that can rule a hidden rename out — those shared directories, or the directories one side alone changed — and the other only when the first cannot: cost under "Rename naming" below); the merge base is git's — the best common ancestors (`merge-base --all`), computed over commit-only packs and deepened until no unexplored ancestry could hide another, whatever the server says about completeness — each of those packs is held to the deepen contract (the want is in it as a commit, every commit in it is an ancestor of the want, a parent it lacks is behind a commit the server named `shallow`, every commit/tree/tag in it passes the fetch checks), else `pack_corrupt` and nothing is pushed (#18); more than one (criss-cross) is refused (`merge_conflict` with `bases`: git would build a virtual base) and makes a rebase `not_linear`; fast-forward and up-to-date follow from the base; a merge commit's parents are `[ours, theirs]`; nothing is pushed on conflict; a pack never carries an object twice; fsck stays clean. Path and entry names are the repository's, so nothing is looked up on a plain object: a directory or file named `constructor`, `__proto__`, `toString` or `hasOwnProperty` merges, conflicts and gets its reason like any other (#16). | `merge.test.js` (hand cases incl. renames, criss-cross and the summed-distance trap, both shown to fail on the previous code; `adversarial.test.js` #18: a proxy that strips shallow-info or withholds one ancestor made the previous code merge over a cut graph — base P instead of git's X, a pushed `g=2` where git gives `g=1` — and an unrequested commit, a malformed commit and a want answered by a tree were merged past or mislabelled `unrelated_histories`, all five now `pack_corrupt` with the ref untouched; Object.prototype names: a directory rename + add inside each of the four names on either side, a rename onto `__proto__`, a content conflict in `__proto__` — 10 of the 11 cases failed on the previous code; property run with line edits, renames, merge-commit and criss-cross histories and random .gitattributes: seeds 11–15 × 80) |
126| I22 | Branch create is a CAS (zero old-oid → `already exists`/`cas_conflict` if present); branch delete is a CAS on the oid **when the server has that oid's object**: git's receive-pack `update()` deletes a ref whose given old oid it cannot parse regardless ("allowing deletion of corrupt ref") and reports `ok` (observed 2026-10-30, `test/space/push-outcome.observed.js` "delete with an unknown old oid"); `denyDeleteCurrent` surfaces as `push_rejected` with the server's words. | `merge.test.js`, push matrix create/delete cells |
127| I23 | Rebase equals `git rebase --reapply-cherry-picks` commit by commit (tree, author, message), including line-merged files and git's `--empty=drop` (a commit that becomes empty is dropped; one that starts empty is kept). One difference from git's default stands and is pinned by a test: git leaves out a commit whose patch id equals a commit already in `onto` before replaying; ply computes no patch ids and replays it, so the results differ when upstream applied the patch and later reverted it (open: merge/rebase-reapplies-upstream-cherry-picks). The chain is bounded by `maxRebaseCommits` and the `onto` walk by `maxMergeDepth`; a refusal names the caller's own limit; conflicts where git conflicts with the branch untouched; squash's tree equals git's rebased tip tree; cherry-pick and revert trees equal `git cherry-pick` / `git revert`; a later replayed commit merges against blobs the earlier ones produced (served from memory: they exist only in the pending push); signatures are not carried across a rewrite; the branch update is a CAS on the old tip. | `rebase.test.js` (property: seeds 1–4 × 60 with line edits on both sides — 0 conservative) |
128| I24 | SSH transport removed 2026-10-31; history on branch archive/ssh (I24, I24b and I34 were its invariants). | — |
129| I25 | After an acknowledged push, a failed verification read-back (transport error or a lie) is `ambiguous`, never the transport's own code: the push may have landed. | `packcache.test.js` (a lying post-push ls-refs → ambiguous), `mutant-kill-tree.test.js` (pushTree verify) |
130| I26 | Layering is a tested property: the transport contract is a plain record, implemented by `http.js` with no dispatch; the edit bundle carries neither the delta generator, negotiation, advertisements, classes nor node builtins; every error code is in one table with a retry policy and a matching documentation entry; every span name and attribute key follows the written convention. | `bundle.test.js`, `pure.test.js` |
131| I27 | The line merge is git's, for the git version you name: wherever git (`merge-tree`, merge-ort: histogram, zealous) merges a file cleanly we produce the same bytes or refuse the file as `too large to merge` (the two refusals below), never other bytes; wherever git conflicts we conflict, and where git's merge itself fails (the scanA hash-chain limit: 65 distinct lines in one bucket of the per-diff class index; 64 merges — boundary pinned) we answer `undecided`. Classic Myers is ported for both places git uses it — histogram's fallback (every version) and 2.54's compaction re-diff (`rediff: 'myers'`, default; `'skip'` for git < 2.54; `'undecided'` for any version). Double dissociation measured: `myers` ≡ git master (2.56) and `skip` ≡ 2.43 on every diff hunk; each crossed pairing disagrees. Binary = NUL in the first 8000 bytes. Two refusals are ours, not git's, and each is a conflict for that path with reason `too large to merge`: an input over `maxMergeBlobBytes`, and a line merge that counts more than `maxMergeWork` diff steps for that file. The count is the module's own (every inner-loop iteration of the histogram scan and of the classic-Myers fallback, and compaction's slides; a caller's `meter` is written, never read), so the refusal depends on the three inputs and the limit alone. git merges such files (the 70,000-line / 3,500-hunk bulk edit counts 361,702,266 steps: merged under `DEFAULT_LIMITS`' 2^32, byte for byte git's, and a conflict under `WORKER_LIMITS`' 2^26), so the work refusal is a superset of git's conflicts, never a different merge. | `test/fuzz/linemerge.mjs` (merges, plain/`--runs`/`--big`), `test/fuzz/diffscript.mjs` (hunk-level, incl. `--huge` to reach xdl_split's snake heuristic and `mxcost` cutoffs), `linemerge.test.js`; the oracle's mode is picked from its version (`test/gitversion.js`) |
132| I28 | `.gitattributes` are read as git reads them — parse, wildmatch patterns, precedence, macros (built-in `binary`, root-only `[attr]`), git ≥ 2.44's reserved `builtin_*` names — equal to `git check-attr --source` on every path; the `merge` attribute picks git's driver (`-merge`/`binary` → conflict, `union` → ours then theirs, with git's refinement and CR/LF handling, `text`/unknown → text). Which tree supplies them is the caller's: `attributes: null` (default — git ≥ 2.46 in a bare repo), `'ours'` (a worktree `git merge`, and git 2.43–2.45 in a bare repo with HEAD on the target), `'theirs'`, `'base'`, or a ref/commit (`attr.tree`). A `[:class:]` that is not one of git's twelve aborts the pattern as wildmatch does, Object.prototype names (`[[:constructor:]]`, `[[:hasOwnProperty:]]`, …) included (#16). | `test/fuzz/attributes.mjs` vs `check-attr` (2.43 and 2.56; its generator draws bogus class names from Object.prototype since #16), `merge.test.js` (Object.prototype class names vs `check-attr` and `merge-tree -c attr.tree`), git's own `t3070` wildmatch vectors (380/380, run once; not shipped — GPL), `test/fuzz/linemerge.mjs --driver union|binary` vs `merge-tree -c attr.tree` (2.43 and 2.56), `merge.test.js`, `rebase.test.js` |
133| I18 | Every object fetched whole (commit, trees) is hash-verified against the oid it was wanted by, bounded by `maxObjectSize`, through the same single-object pack parser as the streamed blob. | `fetch.js/fetchObject`; `liar.mjs` tree:swapped-entry / tree:wrong-level → pack_corrupt; `packcache.test.js` poison → bust |
134| I29 | A read is exactly git's: `readFile` bytes equal `git show <ref>:<path>` and `listTree` equals `git ls-tree <ref>:<path>` (mode as `%06o`, type, oid, name) for every ref form (HEAD, full, short in git's rev-parse order — tags before branches —, annotated and lightweight tags, a commit oid) and entry kind (regular, executable, symlink = its target, gitlink and tree = `not_found` for a file read); a missing path, a path through a file, a missing ref, an unknown oid and a blob oid given as a ref are `not_found`; a bad path is `bad_request` before any I/O. The streamed blob keeps only its latest chunk, and releases that chunk only after the object hash and the pack trailer verify. The stream ends cleanly only if the content hashes to the wanted oid and its length equals the declared size — a server that serves a different blob errors the stream (`pack_corrupt`) without releasing the last chunk, so receiving every declared byte means the blob verified. | `read.test.js` (66 ref×path cases; mutation: dropping the hash check makes the liar case pass silently — shown failing), `mutant-kill-tree.test.js` (the last chunk of a corrupt blob is never yielded; a valid blob's chunks are yielded once) |
135| I30 | The blob:none fallback (servers that advertise `filter` but refuse `tree:0` — Cloudflare Artifacts: HTTP 400 "only blob:none is supported") changes no outcome: it is learned from that answer only (never by host), remembered on the transport's `quirks` (shareable across transports; without one, a per-remote record keyed by origin + path, LRU-bounded, #136; concurrent first requests wait for the one probe), the wide pack is delta-resolved and the wanted object taken by its computed hash, the other commits/trees are harvested (bounded by `maxHarvestBytes`; only after every commit, tree and tag in the pack passed the fetch checks — the merge-base walk's packs too, #18 — since `fetchObject` serves the harvest without another look) so later levels need no round trip, and edit, read, ls-tree, merge, rebase, cherry-pick and revert results equal git's (`merge-tree --write-tree`, `fsck --strict`). Cost is on the span: `git.fetch.filter.fallback`, `git.fetch.wide.extra_objects`, `git.fetch.wide.extra_bytes` (Artifacts, small repo: 8.9× the bytes of tree:0 — lab_notebook/ply-artifacts-eval-2026-10-23.md). A merge-base walk under blob:none ships every tree of every commit in the deepen window. That pack fails `limit_exceeded` on `maxPackBytes`, `maxPackObjects`, or `maxInflatedTotal` (including delta results) before the resident set grows without a cap; `maxMergeDepth` bounds the doubling search of `mergeBranch`, `mergeBase` and `readLog`, and of a rebase's `onto` walk; a rebase's branch walk is bounded by `maxRebaseCommits` + 2 commits instead (10 002 at the defaults, 258 under `WORKER_LIMITS`; `rebaseBaseOf`), so under blob:none that is the deepest window whose trees are shipped, and the pack caps above are what refuse it. The caller's limits bind what it asked for, not the widening (since issue #46): what a tree:0 server would have sent (the wanted object; the walk's commits and tags) gets the full checks and any failure is the fetch's; an extra that fails a **limit** (a sibling directory over `maxTreeEntries`) is dropped — neither returned nor harvested, counted as `git.fetch.wide.skipped` / `skipped_reason` — and a later want of it is a fetch of its own under the same limits; an extra that is **malformed** (`pack_corrupt`) still fails the fetch. The split: a limit is the caller's bound on what it parses for what it reads, and an honest repository holds trees past it that the caller never reads (tree:0 would not have sent them), so failing on one made the answer depend on the host's filter support; a malformed object is one no honest server holds, so nothing in that response is trusted (#18). Hence tree:0 and blob:none servers give the same answer (oids, bytes, error code) wherever no extra is malformed; where one is, blob:none is `pack_corrupt` and tree:0 (which never sees it) answers. | `artifacts-compat.test.js` (proxy mimicking the rejection in front of git http-backend; one 400 per quirks object asserted; #136: at most one tree:0 request per remote across any order of edit/read/checkout/log/merge with no quirks passed, and in `no-filter.test.js` one empty_response + one advertisement probe per stock remote), `adversarial.test.js` I4 aggregate caps, `wide-limits.test.js` (server {tree:0, blob:none-only} × wanted {tree under the limit, tree over it, blob} × sibling {none, one over the limit, one malformed (git fsck `treeNotSorted`), three over + two under} × op {readFile, listTree, editFile, checkoutTree, mergeBranch}: 120 cells against expected outcomes, git's answers and two-server parity; mutation: skipping malformed extras too, or the wanted object too, fails 12 cells each — shown) |
136| I31 | A stale ref update is `cas_conflict` in every wording seen, and only a stale one: the class of each of git v2.50.0 receive-pack's rejection reasons is data with its justification (what a caller can safely do next), and every reason × command shape × atomic × refs cell is judged by real git (`test/space/push-ng.space.js`, SPACE.md "Push ng reasons"). cas: `failed to update ref`, `atomic transaction failed` (git's only report of an atomic push's lost race), `bad ref` (denyNonFastForwards with an unknown stale old), git ≥ 2.51's batched `incorrect old value provided`, `reference already exists`, `reference does not exist`, and `atomic push failure` only beside one of those; host wordings `failed to lock`, `fetch first`, `already exists` and Artifacts' only one, `stale ref` (also for creates over an existing ref, stale deletes and the innocent members of a multi-ref push, which Artifacts always treats as atomic); so editFile's one fresh retry fires. receive-pack's own `non-fast-forward` (denyNonFastForwards: the new commit does not descend from the command's own old oid) is `not_fast_forward`, never retried. A proc-receive hook that took a command and did not answer (`proc-receive failed to report status`, `fail to run proc-receive hook`) is `ambiguous`. Every other reason, and a refusal anywhere in the push, is `push_rejected`. | `test/space/push-ng.test.js` (1,057 cells through `push()`, 0 disagreements; 30 disagreed on train/1 77eb2c0, 2 more on git ≥ 2.51's texts; 776 observed from git 2.50 byte for byte, the v2.51+ cells from CI's git), `artifacts-compat.test.js` (real text; injected `ng … stale ref` → attempt 1 lands; mutation: removing `stale ref` fails both cases) |
137| I32 | `pushTree` commits exactly the caller's files: the tree oid equals git's own index for the same entries (`update-index --cacheinfo` + `write-tree`; and `git add -A` for `filesFromDir`), `ls-tree -r` modes/oids and a `git clone` checkout (bytes, owner exec bit, symlink targets, gitlinks as empty directories) match, `fsck --strict` is clean with `receive.fsckObjects`. A repeat push carries exactly `git rev-list --objects new ^old` (changed trees as `REF_DELTA`s). The head hint, one fresh `cas_conflict` retry (parent = the winner; tree still exactly `files`), `strictHead` (stale → no receive-pack; lost race → not retried) and `verify` (failed read-back → `ambiguous`, ref at our commit) behave as editFile's. A duplicate name in one tree (a path twice, or file and directory) is `bad_request` before any request — `encodeTree` refuses it as git fsck's `duplicateEntries` does; case-only twins pass both. The one tree encoder (`encodeEntries`, under `encodeTree`, `pushTree`, `commitChanges`, merge and the in-memory tree) writes no tree `git fsck --strict` refuses: it checks every field itself, whatever the entry's type says (name a string with a byte form, mode one of the five git writes, oid 40 lowercase hex), then fsck_tree's rules (empty name, NUL, `/`, `.`, `..`, every `.git` spelling, a name over 4096 bytes, the null oid, `.gitmodules` not a regular blob, `.gitattributes` as a tree or gitlink), and returns `bad_request`; it never throws and writes nothing for a refused entry. The refusal quotes at most 200 UTF-16 units of a name or mode with its true length, in the message and in `entry`, so the error does not grow with the caller's text; the cut never ends on the first half of a surrogate pair, so a well-formed name is quoted well-formed. Blob bytes plus `LIMIT_OBJECT_OVERHEAD` (3 KiB) per entry summing past `maxPushBytes` (the same ceiling as `maxPackBytes`) are `limit_exceeded` (`push bytes`) in `fileEntries`, before any blob is hashed or `buildTree` runs, so 100 000 tiny files are refused rather than exhausting a 128 MiB heap (#142); exactly the ceiling is allowed, and one maximum-sized object still fits. Any push pack over `maxPackBytes` is `limit_exceeded` (`push pack bytes`, measured size) with nothing sent. `src/` imports `node:` only in `ssh-node.js` and `tree-node.js` (and, since issue #12, `checkout-node.js`). | `push-tree.test.js` (10 tests; size refusal and duplicate tests shown failing on the previous `push.js`/`objects.js`), `push-budget.test.js` (64 MiB matches `git mktree`; 3×48 MiB refuses under a 128 MiB heap), `mutant-kill.test.js` (encodeTree duplicates; push refusal with zero transport calls), `bundle.test.js` (tree entry) |
138| I33 | `checkoutTree`/`checkoutDir` produce exactly `git clone`'s checkout: `diff -r --no-dereference` identical and every path's type, permission bits, bytes and symlink target equal (nested and unicode paths, exec bits, file/directory/dangling/upward symlinks, a gitlink as an empty directory, an empty file, one blob at two paths, a 3 MiB blob); `entries` equals `git ls-tree -r` (mode, oid, order) and each file's size and bytes equal `git cat-file`; `path` equals the clone's subdirectory. 3 requests (ls-refs, trees, blobs) where the per-file loop takes 72, also behind a `blob:none`-only proxy. Nothing unverified is delivered: an unwanted object in a blob batch is `pack_corrupt` before any file is yielded; a lone blob's stream errors on wrong bytes without releasing its last chunk, and `checkoutDir` removes that file; a tree pack without the wanted commit, or a tree naming one entry twice, is `pack_corrupt` before anything is written. A many-wants refusal falls back to one blob per request (remembered on `quirks`); a lie never does. Every buffered pack stays under `maxPackBytes` (a batch over it is split, down to single blobs, which stream; a single blob over it is `limit_exceeded`: since issue #36 the cap applies to streamed bodies too); entries walked ≤ `maxPackObjects`, depth ≤ `maxPathDepth`. The writer refuses `..`, absolute, empty and `.git` components, a non-empty `dir` (before any request), an existing name, and any write through a symlink it made. | `checkout-tree.test.js` (9 tests; mutation: dropping the unwanted-object check or the duplicate-name check fails the liar and duplicate tests — shown), `bundle.test.js` (checkout entry: no push, merge or node builtins) |
139| I6b | A credential never reaches an error or a span even when the server echoes it. The HTTP transport builds one `scrub` from every form of its credential — the Authorization value, its token part, `token`, `bearer`, the decoded Basic password, and the user when it is secret-shaped (≥ 16 characters with a digit: a deploy token or a PAT given as the user; `x-access-token`, `oauth2`, `git` or a login are names and stay readable) — and redacts any run of 12+ characters of a secret (shorter secrets, from 4 characters, whole), so a secret cut by a tail or a 60-character quote is caught too. It rides on the transport (`t.scrub`) into every span under it (`clientSpan`, inherited by children; an operation's root takes it): at export every attribute, event attribute and status message passes through it, and `span.error(e)` scrubs the error itself in place — message, stack, fields such as `report` and `hookOutput`, the cause chain — so the error the caller catches is clean. Covered: HTTP error bodies, `ERR` lines (ls-refs, fetch), band 3 (fetch, streamed blob, push), band 2 (fetch progress tail, push `remote.messages`, `hookOutput`), `ng` reasons, malformed-report text, quoted protocol lines, a redirect's Location. SSH has nothing to scrub: publickey auth never gives the server a secret string. A successful push's `hookOutput` returned to the caller is the caller's own data and is not rewritten. | `adversarial.test.js` I6b (10 echo sites × 4 auth forms through the fault proxy; every string reachable from the error — own and hidden keys, cause, span — plus `util.inspect`, and the full span export, searched for each secret and every 12-character fragment of it; a conventional user name survives), `read.test.js` credential hygiene (echoing server × 4 auth forms) |
140| I6c | A 3xx is never followed: both fetches pass `redirect: 'manual'` and any 3xx (or a browser's opaque redirect) is `http` with `status` and `location` (origin + path, scrubbed), before a byte reaches the target. Following would hand the Authorization header to whatever origin the server names: undici strips it cross-origin, workerd 2026-10-23 forwards it (measured, to another port and to another hostname); a 301/302/303 also turns the POST into a GET that surfaced as a content-type error. git follows only on the initial `info/refs` and then rebases every request; ply's first request is usually the v2 POST, so following on the GET alone would not make a moved repository work. Same-origin redirects are refused too: a moved remote is a URL the caller updates. | `adversarial.test.js` I6c (301/302/303/307/308 on the GET, the POST and editFile → `http`, the other origin's server receives zero requests; same-origin 301 on the POST → `http` naming the new path, one request; a Location with the token in path and query); `workerd.test.js` (307 on GET and POST under workerd → `http`, zero requests at the target) |
141| I35 | A tree is read only if `git fsck --strict` would accept it on duplicates and order (since issue #34): one name twice — whatever the two modes, adjacent or apart (a file `d` and a directory `d` sort apart: `d` < `d.x` < `d/`) — is `pack_corrupt` (`tree: duplicate entry`, fsck `duplicateEntries`), checked before the order; order is on the raw name bytes with a directory sorted as name + `/` when its mode is S_IFDIR in the low 16 bits, as fsck's `verify_ordered` (`40755` sorts as a directory, a gitlink as a file). parseTree is the only tree decoder, so edit, read, ls-tree, checkout, pushTree's old trees, merge, rebase, cherry-pick, revert and the fetch harvest (`assertFetched`) all refuse. Case-only and NFC/NFD twins are two names and pass, as in git. Byte-distinct names are distinct names: since #43 names decode losslessly (`decodeBytes`), so no decode-twin rule is needed and ply agrees with fsck on every cell. | `git-differential.test.js` (#34 product: 5 name relations × 5 × 5 modes × adjacent/separated × sorted/unsorted = 500 trees, each against `git fsck --strict`; before: 16 duplicates accepted and 4 out-of-order trees accepted, 59 duplicates reported under the wrong fsck message; after: 0 disagreements), `adversarial.test.js` (#34: 21 operations on a served tree with `d` twice — before, 11 succeeded (readFile, listTree and both fetch paths returned it; pushTree, both merges, rebase and cherry-pick pushed), checkout already refused it, and the other 9 failed with a code that misnames the cause (not_found, match_count, push_rejected, merge_conflict); after, all `pack_corrupt`, refs unchanged), `mutant-kill.test.js` (parseTree error strings) |
142| I36 | A push outcome claims landed or not-landed only on an exact git-shaped report; every other post-send state is ambiguous. Exact: the stream framed as receive-pack frames it (plain: report pkts, flush, end; side-band: band 2 and empty band-1 keepalives around one band-1 report ending in its own flush, then the outer flush, end); `unpack ok` or one of `unpack()`'s eight failure strings, or a host's failure that every commanded ref echoes as its reason (`unpack <s>`, `ng <ref> <s>` for each ref, `<s>` not `ok`: Cloudflare Artifacts, #246); exactly one `ok <ref>` or `ng <ref> <printable reason>` per commanded ref, LF-terminated, nothing else; `unpacker error` exactly when unpack failed, and never for a push that sent no pack. Then: all ok → resolves; all ng → `cas_conflict`/`not_fast_forward`/`push_rejected` (I31), or `ambiguous` when a proc-receive hook did not answer; unpack failed → `push_rejected`; mixed and non-atomic → `push_partial` with `landed` and `rejected`; mixed and atomic → `ambiguous`. Anything else after the request may have reached the server — a cut, a missing or extra flush, trailing bytes, band 3, `ERR`, option lines (proc-receive), a near-miss, a limit hit while reading — is `ambiguous`; before it, ply's refusals keep their codes. "Before it" includes a request that provably handed nothing over (`push`, `pushPack`): a signal that had fired before the request was made (`aborted`/`timeout`, no request), and a streamed body the transport never pulled, whose failure is its own code: `network`, `aborted`, `timeout`, or an HTTP answer's (`auth`, `not_found`, `rate_limited`, `upstream_5xx`, `http`, `not_git`); `pushPack`'s pack is then still unread, unlocked and uncancelled. From the first pull of the body every failure is `ambiguous`, and so is a failed request whose body went as bytes (`test/push-pack-preabort.test.js`). `src/push.js` has the table's shape: `streamStep` → `classifyReport` → `decideOutcome`, an exhaustive match whose only fallthrough is `ambiguous`. | `test/space/push-outcome.test.js` (the enumerator: all 4,331,598 cells of the product of 10 tagged-union axes through `push()`, 0 disagreements; 412,008 disagreed on main a7a724e, SPACE.md; 63 cells observed from real git — bytes, outcome and ref state), `test/space/push-outcome-boundary.{0,1,2,3}.test.js` (four slices of `push-outcome-boundary.js`, partition checked by `push-outcome-boundary.plan.test.js`: every single-bit flip, byte deletion, byte insertion and truncation of the 4,592 distinct definite cells: 12,981,904 mutants; 2,772 and 7,419,600 before #251, each its own outcome or ambiguous; on main 2,520 flips turned landed into `push_rejected`), `prefix-closure.test.js` (stream, report) |
143| I37 | `readLog` returns exactly `git rev-list --first-parent -n <limit>` with `git log`'s view of each commit, or a typed error; `truncated` is exactly `git rev-list --first-parent --count` > `limit`. Its one `deepen` window is held to the deepen contract (#37): a commit that is not an ancestor of the want, or a withheld parent without a `shallow` line, is `pack_corrupt`, so a lying server cannot shorten or pad the log silently. Bad input (`limit` outside 1..`maxMergeDepth`, a `path`, a non-object spec or opts, no tracer) is `bad_request` before any I/O, never a TypeError. | `log.test.js`: 90 cells, server (`tree:0`, `blob:none`-only) × shape (linear, merges, root within the limit, first-parent length = limit, longer) × limit (1, n, larger) × behaviour (honest, shallow lines dropped, foreign commit), each predicted from git alone (50 `pack_corrupt`); a shallow server repository; the pure `logWindow` cases; shown failing with each contract check, the truncated rule and the first-parent choice mutated |
144| I38 | Commit and tag reads accept exactly what `git fsck --strict` accepts (issue #59), with one allowed typed refusal. `parseCommit` and `parseTag` are fsck.c's `verify_headers`, `fsck_commit`, `fsck_tag_standalone` and `fsck_ident`, rule for rule and in git's order, and refuse with git's msgId (`commit: nulInCommit: …`, `err.msgId`); every reader goes through them (`readCommit`/`commitView`, the tree walk, `editFile`, `pushTree`, `checkoutTree`, merge, rebase, cherry-pick/revert, and every fetched object via `assertFetched`, including a wide pack before it is returned or harvested). What fsck does not read is kept verbatim in `extra` (unknown and no-space headers, gpgsig, mergetag). The allowed refusal (`duplicateHeader`, PR #7): a second tree, parent, author, committer or encoding after the committer, or a second object, type, tag or tagger after the tagger, is fsck-clean but git's own views of it disagree (pretty.c's `%an`/`%cn` show the last copy, `%T` and the date the first), so any value ply showed would be contradicted by some git view: an author-spoofing differential. Warnings git accepts under `--strict` are accepted: `missingTaggerEntry` (pre-0.99.1 tags) and `badTagName`; `extraHeaderEntry` is IGNORE. A NUL in a tag body is accepted (fsck never reads it); in a commit it is `nulInCommit`. A leading BOM is a byte before `tree`. | `fsck-space.test.js`: the product of object type × header shape (tree, parents 0/1/many, author, committer, encoding, gpgsig, mergetag, unknown and duplicate headers, order, BOM, empty) × 36 ident shapes (every `fsck_ident` rule) × role × 9 bodies (NUL, no blank line, empty, non-UTF-8, CRLF) × LF/CRLF = 58,968 cells, 53,930 distinct objects, each judged by `git fsck --strict` (both streams, exit code, `error in`/`warning in` lines): 52,416 agree, 1,514 refused as designed (`duplicateHeader`, only from the listed header shapes), 0 wrong (main before #59: 2,628 wrong). A loose `hash-object --literally -w` sample must match the packed run object for object; `mutant-kill.test.js` pins each message. |
145| I39 | `compareVersionRefnames` is git `versioncmp` (`version:refname`), including `versionsort.suffix`. Names compare as the bytes git stores: UTF-8 for a well-formed string, the original bytes for a surrogate-escaped string, and an interior NUL ends the comparison. The return value is versioncmp's own magnitude (a byte difference, a longer digit run, or the distance between two matched suffixes). A suffix list that places the release among prereleases is not a strict weak order: with `-alpha,-beta,,-gamma,-delta`, `00.1-gamma` < `00.2-alpha` < `00.10-alpha` and `00.10-alpha` < `00.1-gamma`; with `,-rc`, `00.1-rc1` < `00.2` < `00.10` and `00.10` < `00.1-rc1`. Two names follow versioncmp, which is what `git tag -l --sort=version:refname` prints for those two. A full listing is git's qsort of that relation: seven of the nine suffix lists match a sort by this function on 11,880 names, and the two cyclic lists differ, with every disagreed pair rechecked as two names. Pure, so it has no span of its own; a tag list's span belongs to the ls-refs that fetched the names. A non-string or a lone surrogate is `bad_request`. | `test/space/version-refname.test.js` (66,744 pair cells and 11,880 names × 9 lists, 49 listing disagreements confirmed by two-name git), `test/version-refname.test.js` |
146| I40 | `describePack` reports one pack the way `git verify-pack -v` does, and a thin base as data. Each object's size is the pack header's inflated size (the size column), size-in-pack is header bytes plus compressed bytes, depth and base id match, and the resolved type is commit/tree/blob/tag. An object whose base is not in the pack has a null id and a null resolved type; `missingBases` is those missing REF ids, first-seen in pack order, which is the set `git index-pack --fix-thin` appends (and, on git 2.43, the same order). `resolvePack` still refuses that pack with `pack: ref delta base … not found`. Version is 2: that is the only pack version git writes (`PACK_VERSION`); a 3 is `pack_corrupt`. The function is pure, so it has no span. Caps are the ones parse and resolve already enforce, at the measured boundary and one past it. | `describe-pack.test.js`; `test/space/describe-pack.test.js`: 5 contents × compression {0, 9} × ofs × depth {0, 1, 50} × thin = 120 packs, plus 12 limit probes (132 cells), git 2.43.0 |
147| I41 | Of the pack it sends, a push holds at most the deflate output of one `DEFLATE_SLICE` (64 KiB) input slice at a time, plus the one 16 KiB block zlib may still hold (81,940 B measured; #172): the pack is deflated twice (`src/packwrite.ts`). Pass 1 keeps only its length, SHA-1 (`streamingSha1`: Workers' native `DigestStream`, the pure-JS `Sha1` elsewhere) and entries, so a pack over `maxPackBytes` is refused before the first request byte (I36 unchanged). Pass 2 is the request body, read as it goes out, and ends with the trailer only if its length and SHA-1 equal pass 1's. It never yields past pass 1's length. A pass 2 that refuses is `ambiguous` (original `internal`) whatever the server answers, and git moves no ref, because it never gets a whole pack. Packs of at most `INFLATE_CHUNK` are kept from pass 1 and sent as bytes. A streamed POST uses `redirect: 'error'` where the platform takes it: undici answers `manual`/`follow` by cloning the request, which tees the body. | `test/packwrite.test.js` (both passes byte-equal to `buildPack` across sizes and contents around `INFLATE_CHUNK` and `DEFLATE_SLICE`, `DEFLATE_SLICE` slices, OFS/REF entries, refusal of a pass 2 that is longer, shorter or the same length with other bytes, never past pass 1's length, a failing deflate, the transport double's streamed body and the cap), `test/push-stream.test.js` (git http-backend: chunked body of the declared length, an object changed between passes → `ambiguous`/`internal` and no ref moved, a 3xx on the streamed POST reaches no other origin, pushRepo's delta pack, a 32 MiB push holding < L/8 live arrayBuffers in a gc-sampled child), `test/workerd.test.js` (passes equal `buildPack` under workerd's CompressionStream; a 4 MiB streamed push lands; the changed-between-passes push moves no ref) |
148| I42 | The path-trees fetch (#218: `readFile`/`listTree` ask for the commit with `filter combine:blob:none+tree:K`, K ≤ 2, on a server known to take it) changes no outcome. Its pack is read as the blob:none fallback's (I30): every object keyed by its computed hash, the commit the wanted object under the full checks, every other commit and tree held to the caller's limits (an extra over a limit dropped, a malformed one fails the fetch), the trees harvested, so a tree the walk reads from it is one whose hash was computed from its bytes, and one that did not come is fetched by its level as before. A failed or refused deep fetch is not used at all: the `tree:0` commit fetch answers, with its own answer and its own errors. It is asked only of a record on which `tree:0` itself was taken (so a blob:none-only or no-filter host never sees it and #136's one refusal per remote stands); whether the server takes it is learned from its answer (git's `filter 'combine' not supported`, `tree filter allows max depth N`, a filter-refusal 400, an empty answer), never from its name, and the first ask runs beside the `tree:0` commit fetch. | `path-trees.test.js` (git as the oracle for every answer: an open git, a git configured as GitHub is — `uploadpackfilter.tree.maxDepth=0`, `uploadpackfilter.combine.allow=false`, GitHub's two refusals byte for byte —, `maxDepth=1`, an Artifacts-like proxy; request counts per op and depth, one refused request per record; a proxy that answers the deep fetch with the commit alone, no commit, another commit and its trees, a forged root, a malformed extra: each falls back and answers git's; a depth-1 directory over `maxTreeEntries`: dropped from the deep pack (`git.fetch.wide.skipped`), and every read beside and through it answers as on the GitHub-configured git), `path-trees-unit.test.js` (state × outcome table over a fake transport, in the mutation run), `read.test.js` (91 of its reads go through the deep fetch, 2 error-shape cases fall back) |
149| I43 | Remote text (#security/remote-text-control-chars-in-errors): at the sites listed in this row, text a server wrote reaches an error message or a span attribute through `remoteText` / `remoteQuoted` (`src/errors.ts`); the fields listed as not covered still carry it as received. At an ERR line (capabilities, ls-refs, fetch), band 3 (fetch, push) and the HTTP error body the transport's credential scrubber runs on the text first (one pkt-line payload, or the capped body preview), so a cut inside an echoed credential leaves no remainder of it. The text is then cut to a bound (`REMOTE_TEXT_MAX` = 1024 UTF-16 units for running text, 60 for a quoted protocol line, 200 for an HTTP error body), so a 10 MB line costs the bound; then every control character (C0, DEL, C1), format character (bidi overrides, zero-width and tag characters), line or paragraph separator and lone surrogate is written as `\uXXXX`. Running text keeps tab and newline, as git's own reports do (`usage.c` `vreportf` masks every other control with `?`); a quoted line is JSON-quoted first, so those are escaped too. Sites: ERR lines (capabilities, ls-refs, fetch), fetch band 3, the refused acknowledgment line (fetch, negotiate), malformed ls-refs and receive-pack advertisement lines, a non-v2 first line, the HTTP error body and content-type, push band 3 in `ambiguous`, the too-large ng reason, the section names in `v2End`'s "no packfile section" (each cut to 60 units, at most 8 named), and the `git.push.band2.tail` attribute. Not covered (open): the attributes `git.push.remote.messages`, `git.push.ng.reason`, `git.fetch.sections` and `git.sideband.progress.tail`, `hookOutput`, fetch progress text and the `lines` / `rejected` detail fields, which carry remote text as data; and, in a message, the ng reason quoted by `push_rejected` / `cas_conflict` / `push_partial` and the object-format name in discover's `unsupported`. Printing those can still drive a terminal. | `test/remote-text.test.js` (ESC sequences, CR, NUL, C1 CSI, DEL, U+202E, a 10 MB line, a cut surrogate pair, invalid UTF-8, every code point below U+3000; the acknowledgment line at 60 / 61 units and both new fetch messages; the section names of an answer with no packfile section: escaped, 60 / 61 units, 8 / 12 names, the worst-case length; an inventory of the call sites by file, and no site in the old shapes or interpolating a section list without the helper; a credential across the 1024-unit cut at each ERR and band-3 site, by step function and through `listRefs` / `readFile`), `test/lsrefs-step.test.js` (the model's ERR message, rule stated by code-unit ranges) |
150| I44 | One object costs one object's worth of pack (`fetchObject`, `objectAt`). A want that is or may be a commit (`expectType` left out, COMMIT or TAG) is sent with `deepen 1` on every path (tree:0, the blob:none and unfiltered wide fetches, `filter: ''`); a want named a tree or a blob gets none; a caller's `deepen` is sent as given and its refusal stands. Without the capability ply behaves as on main: a record taught by an advertisement with no `shallow` on `fetch=` sends no depth, and a default depth refused with an empty response, an `ERR` line or HTTP 400 while `shallow` is not yet known for the quirks record reads the advertisement once per record and, only if `shallow` is not listed, asks once more without `deepen`; never on 401, 403, 404, 429 or 5xx, never more than one re-ask per call, and no added request on a success path. `shallow-info` is read as protocol v2 defines it and nothing returned or stored says the repository is shallow. A `deepen 1` request never shares a pack-cache entry with one that sent none (I14: the key covers the body). | `fetchobject-deepen.test.js` (git http-backend, packs counted by `git verify-pack`: one commit of pack for a commit want whatever the history; shallow-info; the empty-response refusal), `fetchobject-deepen-paths.test.js` (blob:none, unfiltered, `filter: ''`, tag wants), `fetchobject-deepen-refusal.test.js` (ERR line and HTTP 400 on every path; 401/403/404/429/500 and the caller's own depth are never asked again; `shallow` listed: the first error stands), `no-filter.test.js` (request counts on a stock git), `space/default-depth.test.js` (1,800 cells: asked × expectType × knowledge × advertised × refusal × path, each against git; SPACE.md "Default depth") |
152- **Line merge: rebase replayed commit 2 against a blob only commit 1 had produced** — the server said `not our ref`. The merger now serves its own blobs from memory (they are already held for the push). Found by the rebase property test on its first run.
153- **A pack with the same object twice** (the same merged blob in two replayed commits, or at two paths) is refused by `unpack-objects` ("tried to add buffer twice"). `uniqueObjects` before every merge/rebase/pick push.
154- **Rebase kept commits that became empty**; git drops them (`--empty=drop`). Found by the property test (3 of 180 cases); fixed and the rate is now 0.
155- **Rename naming**: git reports rename/delete and a followed-rename content conflict at the *target* path; we named only the source. G1 now looks at every added path across the whole tree (one-sided directories included, fetched only when a deletion is in play — which also closed a hole where a rename target in a directory only one side touched left G1 blind), and a conflicting merge lists the added paths as possible targets. The deleted side of G1 had the same blindness and is closed the same way (`merge-renames.test.js`, by `git merge-tree`): a both-sides delete inside a subtree identical on ours and theirs, or of a file one side replaced with a directory, was invisible to the walk, so a rename out of it merged clean where git reports rename/delete or rename/rename. It is now read off the three trees. Cost, pinned by a counting transport (`merge-renames.test.js`, "tree reads"): nothing when no directory was changed identically on both sides (a shared directory): such a merge reads what it read before the guard. With shared directories, and no both-sides loss where the walk went, G1 can fire only if both hold: a path lost on both sides inside a shared directory, and a path one side alone added or removed. One "no" settles it, so the gate asks first the question with fewer directories to read, counting the top-most ones in the trees the walk already holds: when the shared directories are fewer than the directories exactly one side changed, it reads the shared ones (base's copy and the shared copy of each, and below them wherever those differ); otherwise it reads the one-side-changed ones (base's and that side's copy of each, and below them wherever that side changed more; ours' first, then theirs'; nothing when the trees the walk holds already show an add or a removal), stopping after the batch that holds an add or a removal. A "yes" to the first question asks the second as well (the full check: both sets are read), so the outcome never depends on which was asked first: the shared losses arm G1 only when a side added or removed a path of its own. This is not free on a clean merge: 40 shared directories beside 40 only ours edited, nothing added or removed, read 83 trees where the merge alone reads 3; 1 shared beside 80 one-side-edited read 5; none shared, 3. Sibling directories are read 8 at a time (at most 16 tree requests open at once); below a shared directory the descent is one directory at a time. No tree is fetched twice. Known over-refusal (accepted, open): G1 does not test similarity, so about half of generated git-clean rename-shaped merges are refused, and `rebaseBranch` / `cherryPick` of a delete the target already has is `merge_conflict` when the target also added a file.
156- **Version skew, measured**: all of the line merge's remaining conservative answers came from one step, the compaction re-diff that git 2.54 added (`yc/histogram-hunk-shift-fix`). git 2.43 has no such step. Built git master (2.56) as a second oracle, ported classic Myers (prepare-stage trim/cleanup, `xdl_split` with its snake heuristic and `mxcost` cutoff) and made the step a parameter: `myers` agrees with 2.56 and `skip` with 2.43 on every merge and every diff hunk, and each crossed pairing disagrees. The line merge's conservative count against a matched oracle is now 0.
157- **Merge base was not git's (silent wrong merges, found by asking where our gaps were).** (1) Criss-cross histories have two best bases; git merges them into a virtual base, we picked one: a constructed case gave `f=a` where git gives `f=x`. (2) Worse, without any criss-cross: the old rule (smallest summed distance) could pick a common ancestor that is itself an ancestor of the true base — a merge whose first parent is old. Constructed: git `f=r`, old ply `f=y`, pushed. Both fixed by computing git's best common ancestors with a completeness check; criss-cross is refused. The property generator never made merge commits in history; it does now (and fails on the old code).
158- **Attribute source is version-dependent, measured**: in a bare repository git 2.43 reads `.gitattributes` from HEAD's tree; 2.46 (and 2.45.3) reverted that for performance — 2.56 reads none unless `attr.tree`/`--attr-source` is set. So ply takes the source as an explicit option instead of guessing.
159- **Protocol model gap (fuzzer's model of the server, not the client)**: a clock-seeded `protocol.mjs` run hit a want of a tree that was also a wanted commit's root, under `tree:4`; git omitted two objects the model required. Cause, from `list-objects.c` / `list-objects-filter.c`: filters apply only to `NOT_USER_GIVEN` objects, and the flag is set by the commit walk and by earlier wants' walks. Modelled exactly; 1,080 targeted cases equal `git rev-list`; seeds 32/33/52/236/777 × 200 clean.
160- **A `-U0` oracle artifact**: `git diff -U0` trims the common tail before diffing (`xdi_diff`'s `trim_common_tail`, only at zero context); merges never do. The hunk oracle uses `-U1` and rebuilds changed lines from hunk bodies.
162## What GitHub actually advertises (capability canary, `GitHttp.discover()`, 2026-10-18)
164`agent=git/github-41cc7379a75f-Linux`, `object-format=sha1`, `ls-refs=unborn`, `fetch=shallow wait-for-done filter`, `server-option`. No `ref-in-want`, no `bundle-uri`. This is the first span in the suite that records the server's identity; the "git version matrix" gap is now "GitHub's build at this date", with a 191-byte request that can run on a schedule.
166## Push diagnostics
168`sideband` is on by default for receive-pack; band 2 is recorded as `git.push.remote.messages` (last 64 lines). Hook stderr, and GitHub's protected-branch text, arrive there — tested with accepting and rejecting pre-receive hooks.
170## Measured negative results
172- Hand-rolled stored-block zlib for tiny push objects: never beats `CompressionStream` (zlib already emits stored blocks; ties at ≥32 random bytes, loses by 3 below). Removed; `pure.test.js` keeps the measurement as an assertion.
173- `crypto.DigestStream` (native SHA-1) under workerd on the 24 MiB edit: 798 ms vs 807 ms pure-JS (A/B knob removed after the measurement). Wall time is dominated by the server deflating the blob and 4 KiB DecompressionStream chunks, not by our hash. Kept (it is free and spares CPU-time budget), but it is not a latency lever. In node, SHA-1 is ~80% of the streamed phase's CPU (`test/calibrate.mjs`: 88 MB/s).
175- A cheaper pass-2 comparison than SHA-1 (I41), measured 2026-11-06 on 64 MiB pushes. Upper bound of the gain, pass 2 with no comparison at all: under workerd (native `DigestStream`; one process, trees alternated, 24 rounds, paired median [min–max] ms) text −15 [−580–410] of 4,215, random −115 [−340–60] of 3,430. A JS Adler-32 of 64 MiB costs about 60 ms, and pass 1 would have to compute it too (it still needs the SHA-1 for the trailer), so a checksum saves nothing measurable on Workers. Under node (pure-JS SHA-1) the bound is 176 ms text and 540 ms random of about 5 s; node is not the target. I41 keeps the SHA-1.
177## Borrowed from gitgrep (ivarvong/gitgrep), measured against github.com
179| | rtt | wall | bytes in |
180|---|---|---|---|
181| cold, no cache | 4 | 549 ms | 8,318 |
182| per-colo pack cache warm | 4 | 134 ms | 8,318 (2 × HIT) |
183| cache warm + head hint | 3 | 73 ms | 8,173 |
185Same 314-byte push pack, byte-identical, in all three. Wall time here is a node clock, not the Workers virtual clock.
187## Run record
189- 2026-11-06 (push feeds zlib 64 KiB slices, `DEFLATE_SLICE`): packwrite 17/17; packwrite, push-stream, push-repo and workerd 46/46; the full vitest suite 732/735 (the three are local: push-ng's git-observed cells on git 2.43, read's merge `signed` here on main too, and sync-ref's README example under load, 14/14 alone), the fail-site gate and `npm test`'s fuzzers. Stryker on `src/format.ts` 39/39 detected. In flight per slice (the deflate output of one write, random input): 32,776 B at 16 KiB, 81,940 B at 64 KiB, the same under node and workerd. 64 MiB random push to a local http-backend (`node --expose-gc`, full GC every 50 ms, 3 runs): live arrayBuffers +73,009 to +85,786 B before, +82,419 to +94,823 B after; RSS +16.6 MB before, +8.2 to +8.7 MB after.
190- 2026-11-05 (issue #172 push side, #156 push Command and HttpOptions): packwrite 13/13, push-stream 9/9, push-commands 4/4 (and 4/4 against main b36f82a's src), http-options 4/4, workerd 11/11, plus push, push-repo, sync-ref, mutant-kill and the push-outcome quick space. 64 MiB random blob to a local http-backend (`node --expose-gc`, peak after a full GC every 50 ms): before, arrayBuffers +268,649,987 and RSS +334,688,256 (5.3 s); after, +78,115 and +14,303,232 (about 7.5 s with sampling, 9.3 s without, for two deflate and two SHA-1 passes). Without the forced GC, peak arrayBuffers was +302,102,118 before and +19,067,088 after (garbage not yet collected).
191- 2026-11-01 (issue #121, describePack, I40 — I39 is versioncmp on main): describe-pack 4/4 and the describe-pack space 132/132 against git 2.43.0 (24 thin packs, 8 with two or more missing bases, append order identical to first-seen pack order; limit probes at the git-measured boundary and one past). `resolvePack` still refuses a thin base. typecheck, oxlint, registry and bundle report-only.
193- 2026-11-01 (issue #124, version:refname): `test/space/version-refname.test.js` 173,664 cells against git 2.43.0 — 66,744 two-name `git tag -l --sort=version:refname` pairs (54 s) and 11,880 names × 9 `versionsort.suffix` lists. Seven lists match a sort by `compareVersionRefnames`. `release-between` and `release-first` differ (49 disagreed pairs); two-name git matches versioncmp on each, including `00.1-gamma` < `00.2-alpha` < `00.10-alpha` < `00.1-gamma` and `00.1-rc1` < `00.2` < `00.10` < `00.1-rc1`. `test/version-refname.test.js` 3/3; registry and SPACES.md green; lint and typecheck clean; bundle budgets unchanged (the comparator is only on the full entry). Stryker on `src/refs.ts`: 122 killed, 8 timeout, 0 survived, score 100.
194- 2026-10-31 (spaces holes #2 and #10, ssh-faults and ssh-service): ssh-faults 107 cells + 10 pin and ssh-service 20 cells against OpenSSH 10.2p1 / git 2.50.0, all equal to their tables (1.3 s and 3.6 s); sshgit 15/15; mutant-kill and mutant-kill-tree 62/62; bundle 7/7 (budgets unchanged); workerd (workerd from ephem's node_modules) 10/10; lint clean. Against train/1's `src` 29 fault cells and 15 service cells fail (SPACE.md table).
195- 2026-10-30 (issue #40, credential edges): adversarial, mutant-kill, mutant-kill-tree, protocol, push, read, bundle and sshgit 121/121; workerd (workerd from ephem's node_modules) 9/9; after the last http.js change, adversarial, read, mutant-kill and workerd rerun green, bundle 7/7 after dated budget bumps (edit 63,709 B / 24,444 B gz, merge 82,181, read 48,703 / 18,909, tree 60,391 / 23,353, checkout 45,530 / 18,115; ssh 27,096 under its unchanged 30,000). I6e: 120 cells, git as the oracle on 89, all equal. Against the previous `src` the I6e tests fail on their first cell (`http://:@h` sent nothing; git sends Basic `:`), and a per-cell run of both trees changes 49 of 102 cells (issue #40 probe above).
196- 2026-10-30 (issue #46, the blob:none fallback's limits): artifacts-compat, read, edges, checkout-tree, merge, rebase, adversarial, mutant-kill, mutant-kill-tree, packcache, bundle and wide-limits 156/156 (bundle after dated budget bumps: edit 63,197 B / 24,217 B gz, merge 81,669, read 48,192 / 18,710, tree 59,881 / 23,141, checkout 44,697 / 17,804); lint clean; `fuzz/liar.mjs --n 60` 60/60 ok. `wide-limits.test.js`: 120 cells, 0 wrong. Before the fix (src reverted, same test): 16 cells wrong — readFile, listTree, editFile and mergeBranch of a target within the limits beside one or three over-limit directories on the blob:none-only server were `limit_exceeded: tree entries 11 exceeds limit 10` where the tree:0 server answered (16 parity breaks); the other 104 cells already matched. Mutants: skipping malformed extras too, or the wanted object too, each leave 12 cells wrong.
198- 2026-10-30 (issue #32, URL userinfo): adversarial, mutant-kill, mutant-kill-tree, protocol, push, read, artifacts-compat, bundle and pure 125/125; edges, props, sshgit, checkout-tree and push-tree 56/56; workerd (workerd from ephem's node_modules) 9/9; `fuzz/protocol.mjs --n 100` 0 failures; `fuzz/liar.mjs --n 60` 60/60 ok (bundle after dated budget bumps: edit 62,836 B / 24,093 B gz, merge 81,313, read 47,831 / 18,565, tree 59,520 / 23,000, checkout 44,658 / 17,768). Before the fix (src/http.js reverted, same tests): the 3 I6d tests and the workerd one fail — a user-only URL sends no Authorization and git's `ls-remote`/`push` succeed where ply gets `HTTP 401 git-upload-pack: authentication required`; LF in userinfo reached `fetch` (`network`) instead of `bad_request`. Header for header against git 2.50: before, only `user:pass` matched (user alone and UTF-8 user: no header; `:pass`: `x-access-token:pass`; `%ZZ`, `%FF`: untyped `URIError`); after, all 7 sendable forms byte-equal.
200- 2026-10-30 (issue #18, merge base over a cut graph): merge, rebase, linemerge, adversarial, mutant-kill, protocol, props, pure, bundle, read, push-tree, checkout-tree, packcache, artifacts-compat and delta-bound 161/161 (bundle after the dated merge budget bump: 80,435 → 80,904 B; the edit, read, tree and checkout bundles unchanged); `fuzz/liar.mjs --n 60` 0 failures; `fuzz/git-semantic.mjs --n 20 --seed 1` 24 cases 0 failures; `fuzz/below-hash.mjs --n 20 --seed 1` 39 cases 0 failures. Before the fix (src reverted, same tests): stripping shallow-info merged over base P instead of git's X and pushed `g=2` (git: `g=1`) after 8 fetches and a receive-pack; withholding y1 did the same after 10 fetches; an unrequested and a malformed commit were merged past; a want answered by a tree was `unrelated_histories`; the blob:none walk harvested a commit with no author email and `fetchObject` served it. After: all `pack_corrupt` after 2 fetches (4 for withheld y1, whose cut is past depth 8), no receive-pack, refs untouched.
202- 2026-10-30 (issue #17, SSH bounds): sshgit, adversarial, mutant-kill, protocol, props, pure, bundle, push, edges and workerd (workerd from ephem's node_modules) 112/112; `fuzz/protocol.mjs --n 100` 100/100 ok. SSH bundle 23,165 → 24,850 B (budget 30,000, unchanged). Before the fix: a 1 byte / 100 ms server hung the command and the handshake past 5 s (8 s probe) under node and past 40 s under workerd (HTTP: 1002 ms); an already-aborted signal was ignored (the exchange dialled and resolved), a mid-command abort hung past 8 s; 64 MiB of out-of-window CHANNEL_DATA was queued while exec waited (rss + 70 MiB). After: 1002 ms, 0 dials, 302 ms, refused at 2 MiB + 32 KiB (rss + 2 MiB).
204- 2026-10-30 (issue #16, Object.prototype names): merge, rebase, linemerge, adversarial, mutant-kill, protocol, props, pure, bundle, read, push-tree, checkout-tree, prefix-closure, push and parity 161/161 (bundle after the dated budget bump); `fuzz/attributes.mjs --n 40` seeds 1–3: 6,909 paths equal to `check-attr`, 0 different (the previous code throws a `TypeError` on seed 1); `fuzz/protocol.mjs --n 100` 0 failures; `fuzz/git-semantic.mjs --n 20 --seed 1` 0 failures; `fuzz/hostile.mjs --n 60` 0 failures. Before the fix: 10 of the 11 Object.prototype-name merge cases disagreed with git (8 directory rename + add merged clean, the rename onto `__proto__` unlisted, the `__proto__` conflict reasonless); the four ls-refs attribute injections failed the edit (`not_found` ×3, `remote_error` not our ref ×1); the attributes case threw `TypeError`.
206- 2026-10-30 (issue #36, endless zlib stream; pack-byte cap at the choke point): lint; adversarial 29/29 (the #36 matrix 630/630 cells), mutant-kill 23/23, mutant-kill-tree 36/36, read 11/11, edges 11/11, checkout-tree 9/9, props 17/17, pure 16/16, format-facts 2/2, bundle 7/7; `fuzz/hostile.mjs --n 200 --seed 424242` 200 cases, 0 failures (14 carried `zlib_endless_stored`; 5 caught at detection site `zlib_bound`); `fuzz/codec.mjs --n 20000` 0 failures (every deflate ≤ zlibBound). The matrix on the previous source: 402/630 cells wrong.
208- 2026-10-30 (issue #15, redirects + echoed credentials): adversarial, mutant-kill, protocol, push, edges, props, pure, bundle, read, artifacts-compat, sshgit, push-tree, checkout-tree and workerd (workerd 2026-10-23) 140/140; `fuzz/protocol.mjs --n 100` 0 failures; `fuzz/liar.mjs --n 60` 0 failures. Before the fix, I6b leaked in 40/40 echo cases (36 whole, 4 as a 19-character fragment) and I6c failed on every status under node and workerd.
210- 2026-10-20 (merge base, .gitattributes, union): `npm test` 113/113 deterministic tests + 16 fuzz stages, 0 failures (29 min); `npm run coverage` 100% of 2,461 lines — now with every fuzzer seed pinned, so the number is reproducible (it had read 99.6% on a run where the clock-seeded protocol fuzzer happened not to reach multi-round negotiation; a deterministic negotiation test now covers it). Attributes vs `check-attr`: seeds 1–8, 40,000+ paths, 0 different on 2.43 and 2.56; union merges vs `merge-tree -c attr.tree`: 5,280 byte-identical on both gits; binary driver 695/695; merge property seeds 11–15 × 80 with merge-commit/criss-cross histories and random attributes: 0 wrong.
212- 2026-10-20 (line merge, Myers, git 2.54 compaction, protocol model fix): `npm test` 109/109 deterministic tests across 18 suites + 13 fuzz stages, 0 failures (24 min); `npm run coverage` 100% of 2,190 lines across all `src/` modules. Line-merge campaigns: vs git 2.43 (`skip`) — 20,000 seeds (13,906 non-trivial merges) + 2,151 `--big`, 0 wrong; vs git master 2.56 (`myers`) — seeds 2–4, 8, 11: 7,388 merges (plain + `--runs`), 0 wrong, 0 conservative; diff hunks vs both gits: 1,400+ diffs incl. 125 `--huge` (947 snake-heuristic splits, 160+ `mxcost` cutoffs exercised), 0 different. `fuzz/usergiven.mjs` seeds 500/600/700: 1,080/1,080 equal to `git rev-list`. `protocol.mjs` seeds 32/33/52/236/777 × 200: 0 failures.
214- 2026-10-19 (ssh): 96 deterministic tests across 16 suites (incl. `sshgit.test.js` against OpenSSH 9.6 and the workerd run via cloudflare:sockets), fuzzers run/hostile/liar/packgen/protocol all 0 failures.
216- 2026-10-19, after the tree-shakeable split: line coverage 100% of 1,241 lines across all 21 `src/` modules (`npm run coverage`: 8 deterministic suites + 6 fuzzers; the push matrix excluded as it adds time, not lines). Push matrix sampled 1-in-8 by a daily seed in `npm test` (155 cells, 1m50s), full 1,400 cells via `test:push-full`.
218- Deterministic suites: `props` 15, `oracle` 5, `concurrency` 1, `edges` 8, `adversarial` 8, `protocol` 1 (14,256 cells) — all pass (≈4 min, dominated by the 24 MB and 20k-entry cases and the 6×24×3 mutation matrix).
219- `fuzz/run.mjs`: seeds 1 (150), 2 (150), 99 (400), 11 (300) — 0 failures after the fixes above, all `TARGETS` buckets reached.
220- `fuzz/hostile.mjs`: seeds 3 (250), 12 (500), 13 (300), 42 (150), 104 (150), 112 (200) incl. the sideband-push stage — 0 failures;
221- `fuzz/liar.mjs`: seeds 2–5 (750), 102 (400), 113 (200) — 0 failures after the `ambiguous` fix.
222- `fuzz/packgen.mjs`: seeds 1 (200), 103 (300) — 0 failures. `fuzz/codec.mjs`: seed 7 (300,000) — 0 failures.
223- `fuzz/run.mjs` seeds 91 (150), 111 (100) over loose/packed/bitmap/MIDX-bitmap/mixed server stores — 0 failures. every error typed; every silent success git-verified.
224- `fuzz/protocol.mjs`: seeds 32 (400), 33 (500), 52 (150) — 0 failures; every non-degenerate case pack-objects-exact and invocation-exact.
225- `compliance` 5/5, `parity` 3/3, `push` 1/1 (768 cells), `fuzz/packs.mjs` seed 5 (80) — 0 disagreements.
227## Mutation testing
229`npm run test:mutate` runs Stryker (vitest runner, `vitest.stryker.config.ts`, `coverageAnalysis: perTest`) over every module in `src/`. The mutant test files are `props`, `prefix-closure`, `format-facts`, `mutant-kill`, `mutant-kill-tree`, `mutant-kill-packs`, `packstream`, `describe-pack`, `result`, and the quick push-outcome space (`every cell` and `unpack failure strings`; `MUTATION=1` skips its other two tests), plus `version-refname` for `compareVersionRefnames`, with `PROP_N=4` (the two pack properties cap at `min(60, PROP_N)`, so `npm test` still runs 60) and `PUSH_SPACE=quick PUSH_SPACE_WORKERS=0` from `vitest.stryker.config.ts` (0 workers: every cell on the test's own thread, where Stryker records coverage). Each mutant runs only the files whose dry run reached it; a mutant no file reaches is `NoCoverage` without a run, judged exactly as a survivor. A test process that fails without reporting a failed test (a mutant that throws while its module loads, or trips Stryker's infinite-loop hit limit) is a `RuntimeError`, counted as detected, as any non-zero exit was Killed under the command runner. `test/stryker-parent-guard.cjs` (preloaded through `NODE_OPTIONS`) kills a mutant's test process past 3 GB resident or once its parent is gone (a `pktline.js` mutant reached 23 GB and took CI runners down); that is a `RuntimeError` too. `pure.test.js` stays in `npm test` and in CI job `test`; it is not in the mutator command because it scans `src/` as text, and Stryker's instrumented copies no longer contain the `fail('code')` literals that scan counts. CI runs the full sweep on every push to `main`. On a pull request it mutates the mutants lying wholly inside the `src/` lines the PR changed (`git diff -U0 base...HEAD`), and, whatever the PR changed, every line the gate judges strictly: each `PARSER`-named function from its declaration to the next top-level declaration (the owner rule the verdict attributes mutants by) and each bounds file whole (`gatedRanges` in `scripts/mutate.mjs`), all passed to Stryker as `file:from-to` ranges. A PR that only moves a parser changes none of its lines, and #198's five survivors in `parseHttpOptions` and `parseLsRefLine` first showed on `main` (run 41976594897); now a PR cannot pass with a gated survivor. A non-gated mutant on an unchanged line, or one spanning past the changed lines (an emptied enclosing block), is left to the full run on `main`. The work is split across 20 `mutate-shard` jobs balanced by measured cost (`node scripts/mutate.mjs --plan 20`; per-file and per-line seconds in `scripts/mutate-weights.json`, refreshed from full-run reports with `--weights`, as seconds on a reference runner whose dry run takes 50 s: each shard report records its runner's dry-run time and every duration is scaled by it, since runners differ up to 3x, #313), a unit costing more than a shard's share cut into line ranges that none of its mutants straddles; job `mutate` merges their reports, refuses a missing, extra or partial shard or any planned mutant missing or doubled, and judges the merged report with the same rules as an unsharded run. Job `lint + fuzz` runs `node scripts/mutate.mjs --budget`, which fails when the heaviest planned shard of a full run passes 60% of the shard job's `timeout-minutes` on the reference runner. CI splits the unit tests across 4 `test-shard` jobs balanced by measured per-file seconds (`npx vitest run --shard i/4`; the sequencer in `vitest.config.ts`, weights in `test/durations.json`), runs typecheck, oxlint and the below-hash and git-semantic fuzzers (`--n 20`) in job `lint + fuzz`, and job `test` fails unless all of them succeeded.
231`thresholds.break` in `stryker.conf.json` is the score the full run reached. A full run (locally, and CI on `main`) fails if the score drops below it. A pull request mutates only the lines it changed, so that subset's percentage is not compared to the full-library break. Independently of that score, a mutant that **survives** or is **uncovered** inside a parser (`parseTree`, `readObjHeader`, `applyDelta`, `inflate`, `pktStep`, `take`, …) or in `src/bytes.js` / `src/format.js` / the pull codecs `src/inflatestream.ts` and `src/packstream.ts` (every function) fails the build on every run. `scripts/mutate.mjs` is what enforces both.
233An equivalent mutant is justified on the line it mutates:
235```js
236// Stryker disable next-line EqualityOperator: both sides are the length we just checked
237```
239The comment names the mutator and gives a reason. `Stryker disable all`, and removing a parser file from `mutate`, are rejected by the same script. A constant nobody reads is not equivalent — pin it from `test/format-facts.test.js`, where the literals live outside `src/` so a mutated definition fails.
241## Explicitly not proven here
243- **GitHub itself: fetch side now exercised, push side not.** `test/live-prepare.mjs` ran the full pipeline minus receive-pack against `github.com/elixir-ai-tools/just_bash`: ls-refs, `tree:0` commit want, bare tree want, bare blob want all honored (GitHub allows any-SHA wants), no band-2 progress, 426 ms for 4 roundtrips, 314-byte thin pack for a 15.9 KB README edit. That pack was then taken through real git locally — `index-pack --fix-thin --strict` on a `git clone --bare` of the same repo (2 deltas resolved against GitHub-origin bases), `verify-pack`, oid-for-oid agreement, `git diff` = one line, strict fsck, and a real `receive-pack` on a mirror with fsck/denyNonFastForwards/index-pack path, which accepted it and then rejected a replay on the stale `old`. What remains unverified is only GitHub's policy layer on receive-pack (their fsck settings, protected branches, size caps). The same code ran under local `workerd` (above); hosted deployment belongs to [ply-web](https://github.com/ivarvong/ply-web). Differences to check with `test/live.mjs`: band-2 progress despite `no-progress`, User-Agent requirements, whether `allowAnySHA1InWant` covers tree/blob wants (it does for partial-clone lazy fetch), receive-pack `ng` reason wording for the `cas_conflict` classifier (`/failed to update ref|fetch first|non-fast-forward|lock/`).
244- **Server-side attribute sources.** `$GIT_DIR/info/attributes`, `core.attributesFile`, system attributes, `merge.default` and custom merge drivers (`merge.<name>.driver`) are server configuration ply cannot see; a custom driver name is treated as `text`, as git does when the driver is not configured. Paths that are not valid UTF-8 are matched after lossy decoding.
245- **Criss-cross merges are refused, not merged.** git's virtual merge base (merge-ort merging the bases recursively, conflicts and all) is not ported.
246- **Merge oracles: git 2.43 (installed) and git master 2.56 (built from 47fdf220).** Line merge and diff are checked against both; the end-to-end merge/rebase suites run against 2.43 only (the HTTP test server uses the system git). Rename detection is not ported: rename shapes are conflicts (a superset), never silent wrong trees.
247- **SHA-256 repos.** `object-format=sha256` is not supported. ls-refs detects a non-40-hex oid and fails with `code: 'unsupported'` before any pack is requested (unit-tested in `props.test.js`; no sha256 server round-trip).
248- **Timing side channels, TLS.** Out of scope; `fetch` is the platform's.
249- **Server-side resource use of a lost CAS race.** A loser's pack is unpacked before rejection. Bounded by our own push size (hundreds of bytes), but N racing writers cost the server N unpacks per round.
250- **Workers runtime: now run under `workerd`** (`test/workerd.test.js`, the pipeline bundled into a Worker, fetching from the local git server). The first run (2026-10, an older workerd) found `fetch` captured as a default parameter and called detached throwing `Illegal invocation`, so `createTransport` and `cachingFetch` bind `globalThis.fetch`. That detached call no longer reproduces: on workerd 2026-10-18 (the pinned devDependency) a bare call (`const f = globalThis.fetch; f(url)`, `f.call(null, url)`, a default parameter) succeeds under compatibility dates 2021-11-03 and 2024-09-23; what still throws `Illegal invocation` is a call with another object as `this` (`opts.fetchImpl(url)`). ply calls the bound function bare, so neither shape reaches the platform; the bind stays as the guard for the second. Node accepts all of them. Under workerd: small edit ~140 ms, 24 MB blob edit git-verified with a 1 KB push, `DecompressionStream` yields 4 KiB chunks (Node: 16 KiB) so peak per-chunk allocation is smaller; 10 concurrent writers in one isolate converge through `cas_conflict` retries (0–9 each), 11 commits, fsck clean. Not measured: production CPU-time limits (local workerd does not enforce them), subrequest limits, and real isolate memory (no heap API; our `Mem` counter is the only number).
Diagnostics5 git calls · 184 ms
CallStatusSizeTime0184 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 · 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 · hit1 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=1
git.response.bytes=919
git.response.cache=HIT
git.response.duration_ms=1
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
fetch20045 KiB178 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=177
git.response.bytes=46309
git.response.cache=MISS
git.response.duration_ms=178
git.fetch.wants=379b6a8b40e84bc612ac565fa54ba44c51ea79b2
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=6
git.pkt.data=5
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=46309
git.pkt.payload.max=24577
git.sideband.band1.bytes=46272
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
a5e0e963a85fa140
Request
eb61c380…
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