GitHubivarvong
ply
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];
Diagnostics7 git calls · 178 ms
CallStatusSizeTime0178 ms
discover200191 B3 ms
git.upload-pack discover http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=ls-refs git.upstream.dur_ms=3 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 · hit3 ms
git.upload-pack ls-refs http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=ls-refs git.upstream.dur_ms=3 git.response.bytes=11990 git.response.cache=HIT git.response.duration_ms=3 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=10Open 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=5323b9266eea5ded637285d1c5320699f12be76eOpen pack map
fetchtree:02005.6 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=5724 git.response.cache=HIT git.response.duration_ms=2 git.fetch.filter=tree:0 git.fetch.wants=58fabb6768b3f737ee9cd8bac647bdc27405fb4d 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=5724 git.pkt.payload.max=5697 git.sideband.band1.bytes=5697 git.sideband.band2.bytes=0 git.sideband.band3.bytes=0 git.pack.objects=1 git.pack.bytes=5697 git.pack.trailer=be7e0453974a5fe832f9065a33bb7e3434c10e9bOpen pack map
fetchtree:0200228 B · hit5 ms
git.upload-pack fetch http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=fetch git.upstream.dur_ms=5 git.response.bytes=228 git.response.cache=HIT git.response.duration_ms=5 git.fetch.filter=tree:0 git.fetch.wants=e8c7c6703b9e38b182804a4efd23e971d1be4edd 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=228 git.pkt.payload.max=201 git.sideband.band1.bytes=201 git.sideband.band2.bytes=0 git.sideband.band3.bytes=0 git.pack.objects=1 git.pack.bytes=201 git.pack.trailer=9d1e959816e16d9a506dd8756f47f08604e39a86Open pack map
fetch2001.9 KiB164 ms
git.upload-pack fetch http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=fetch git.upstream.dur_ms=164 git.response.bytes=1914 git.response.cache=MISS git.response.duration_ms=164 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=4 git.pkt.data=3 git.pkt.flush=1 git.pkt.delim=0 git.pkt.bytes=1914 git.pkt.payload.max=1887 git.sideband.band1.bytes=1887 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
- a5e9e3e99ad4f3c9
- Request
- 4aa86ae1…
- 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