main
1// The coverage matrix's types: a server behaviour, the ply operations and tests that exercise it, and its status.
2// The unit of progress is an independently validated server behaviour, not a git command (t229u). Illegal states
3// are not representable: a `verified` status carries at least one piece of evidence; evidence against git
4// http-backend names a test in this repository, evidence against Artifacts names a recorded run and one of its checks;
5// a behaviour ply cannot exercise names no ply operation, and one it can names at least one.
6import type { RunRefFor } from './runs.js';
8import type { Area, BehaviourId, NonEmpty } from '../../src/probe-types.ts';
10// The areas of server behaviour, in the order COVERAGE.md lists them, and behaviour ids, live beside the probe plans
11// that cite them (src/probe-types.ts, exported as `ply/probes`).
12export { AREAS } from '../../src/probe-types.ts';
13export type { Area, BehaviourId, NonEmpty } from '../../src/probe-types.ts';
15export const AREA_TITLES: { readonly [A in Area]: string } = {
16 refs: 'Ref advertisement and ls-refs',
17 caps: 'Capabilities and protocol v2',
18 fetch: 'Fetch: negotiation, filters, shallow, include-tag, thin packs',
19 pack: 'Packfiles: OFS/REF deltas, thin bases, malformed packs (served and pushed)',
20 push: 'Push and receive-pack',
21 concurrency: 'Concurrent updates and stale refs',
22 tags: 'Tags (lightweight and annotated)',
23 ancestry: 'Merges and rebases as ancestry exercisers',
24 errors: 'Error conditions (auth, not found, limits, corrupt input)',
25 interrupted: 'Interrupted operations',
26 http: 'HTTP transport (smart HTTP, sideband, keepalive, large bodies)',
27};
30// A ply operation: an exported function of a src/ module. test/behaviours/matrix.test.js greps the module for the export.
31export type PlyOp = { readonly module: `src/${string}.ts`; readonly symbol: string };
33// A test in this repository and an anchor: text the file contains (a test name, or the line that drives the case).
34// matrix.test.js fails if the file is missing or the anchor is not in it, so no mapping is asserted from memory.
35export type TestRef = { readonly tag: 'test'; readonly path: `test/${string}`; readonly anchor: string };
37// Who exercised the server and who judged it.
38// ply_vs_reference_git ply against git http-backend in this repository's suite, git's own output the expected
39// value (matrix.test.js checks the cited file runs real git)
40// ply_vs_artifacts ply against Cloudflare Artifacts in a recorded run
41// native_git_vs_artifacts stock git against Artifacts in a recorded run (git http-backend beside it as baseline)
42// wire_probe_vs_artifacts hand-built requests (pkt-lines, packs, HTTP framing) against Artifacts in a recorded run,
43// beside a git http-backend baseline: neither ply nor stock git sends these bytes
44export const EVIDENCE_KINDS = ['ply_vs_reference_git', 'ply_vs_artifacts', 'native_git_vs_artifacts', 'wire_probe_vs_artifacts'] as const;
45export type EvidenceKind = (typeof EVIDENCE_KINDS)[number];
46export type RunEvidenceKind = Exclude<EvidenceKind, 'ply_vs_reference_git'>;
48export type Evidence =
49 | { readonly kind: 'ply_vs_reference_git'; readonly ref: TestRef }
50 | { readonly kind: 'ply_vs_artifacts'; readonly ref: RunRefFor<'ply_vs_artifacts'> }
51 | { readonly kind: 'native_git_vs_artifacts'; readonly ref: RunRefFor<'native_git_vs_artifacts'> }
52 | { readonly kind: 'wire_probe_vs_artifacts'; readonly ref: RunRefFor<'wire_probe_vs_artifacts'> };
54// Evidence that does not involve ply: all a behaviour ply cannot exercise may carry.
55export type OtherEvidence = Extract<Evidence, { readonly kind: 'native_git_vs_artifacts' | 'wire_probe_vs_artifacts' }>;
57// unsupported ply has no operation that exercises it (`why` says so); others may have observed the server
58// implemented ply can exercise it; nothing independent has checked the server's answer
59// verified at least one independent check, of any kind
60export type Status =
61 | { readonly tag: 'unsupported'; readonly why: string; readonly observed: readonly OtherEvidence[] }
62 | { readonly tag: 'implemented' }
63 | { readonly tag: 'verified'; readonly evidence: NonEmpty<Evidence> };
65type Common<A extends Area> = {
66 readonly id: BehaviourId<A>;
67 readonly area: A;
68 readonly description: string;
69 // Any test that exercises it, including ones with a fake server; evidence is the subset an independent judge decides.
70 readonly tests: readonly TestRef[];
71 readonly notes: readonly string[];
72};
74export type BehaviourIn<A extends Area> =
75 | (Common<A> & { readonly ops: readonly []; readonly status: Extract<Status, { readonly tag: 'unsupported' }> })
76 | (Common<A> & { readonly ops: NonEmpty<PlyOp>; readonly status: Exclude<Status, { readonly tag: 'unsupported' }> });
78export type Behaviour = { readonly [A in Area]: BehaviourIn<A> }[Area];
Diagnostics4 git calls · 256 ms
CallStatusSizeTime0256 ms
discover200152 B2 ms
git.upload-pack discover http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=ls-refs git.upstream.dur_ms=2 git.response.bytes=152 git.server.agent=gitty/1.0 git.server.object_format=sha1 git.server.caps=agent ls-refs fetch object-format git.server.fetch=shallow filter sideband-all git.protocol.version=2 git.pkt.frames=8 git.pkt.data=6 git.pkt.flush=2 git.pkt.delim=0 git.pkt.bytes=152 git.pkt.payload.max=34
ls-refs200145 B · hit2 ms
git.upload-pack ls-refs http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=ls-refs git.upstream.dur_ms=2 git.response.bytes=145 git.response.cache=HIT git.response.duration_ms=2 git.protocol.version=2 git.pkt.frames=3 git.pkt.data=2 git.pkt.flush=1 git.pkt.delim=0 git.pkt.bytes=145 git.pkt.payload.max=76 git.ls_refs.count=2 git.ls_refs.head=refs/heads/main
fetchblob:none · deepen 1020038 KiB · hit2 ms
git.upload-pack fetch http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=fetch git.upstream.dur_ms=2 git.response.bytes=38434 git.response.cache=HIT git.response.duration_ms=2 git.fetch.filter=blob:none git.fetch.filter.requested=tree:0 git.fetch.filter.fallback=blob:none git.fetch.filter.learned=false git.fetch.wants=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=6 git.pkt.data=4 git.pkt.flush=1 git.pkt.delim=1 git.pkt.bytes=38434 git.pkt.payload.max=38339 git.sideband.band1.bytes=38338 git.sideband.band2.bytes=0 git.sideband.band3.bytes=0 git.pack.objects=63 git.pack.bytes=38338 git.pack.ofs_delta=0 git.pack.ref_delta=8 git.pack.chain.max=8 git.pack.trailer=0bc36ab7adf82d3109177f11f1ea93f1ce071f77 git.pack.full=55Open pack map
fetch2001.9 KiB252 ms
git.upload-pack fetch http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=fetch git.upstream.dur_ms=252 git.response.bytes=1907 git.response.cache=MISS git.response.duration_ms=252 git.fetch.wants=415ce532ed3d77c7b4afbea88ffbd9fec66eb583 git.fetch.haves.count=0 git.fetch.deepen=0 git.fetch.thin_pack=false git.fetch.ofs_delta=true git.protocol.version=2 git.pkt.frames=3 git.pkt.data=2 git.pkt.flush=1 git.pkt.delim=0 git.pkt.bytes=1907 git.pkt.payload.max=1886 git.sideband.band1.bytes=1885 git.sideband.band2.bytes=0 git.sideband.band3.bytes=0
Each row is one HTTP round trip ply made to the git server for this page, on one timeline. discover asks what the server speaks, ls-refs lists branch tips, fetch brings objects by id. A hit was served by Workers Cache. Tap a row for its wire details.
- Remote
- https://5ad2236b39de4c8bd8f6270ea63f3ea9.artifacts.cloudflare.net/git/public-v0/ply.git
- Ref
- refs/heads/main
- Commit
- 19912563f540228593df0c489082e5e2508e21e4
- cf-ray
- a5e2f4f75f9d7089
- Request
- 2f261b71…
- Protocol
- v2 · sha1
- Agent
- gitty/1.0
- Filter
- advertised
- Fetch
- shallow filter sideband-all
- Capabilities
- agent ls-refs fetch object-format