// The Git behaviour coverage matrix: every server behaviour ply can exercise (or cannot yet), the ply operations and // tests that exercise it, and who has independently checked the server's answer. ply is a conformance and behaviour // testing instrument for Cloudflare Artifacts as well as a client; the unit of progress is an independently validated // server behaviour or failure mode, not a git command. // // Rules (test/behaviours/matrix.test.js enforces each): // - every op is an export of its src/ module and every test anchor is text in the cited file (grep, not memory); // - ply_vs_reference_git evidence cites a file that runs real git; // - run evidence cites a run in runs.ts and a check that run recorded (the types refuse anything else); // - COVERAGE.md is `npm run coverage-matrix -- --md` of this file. // Status rule: `verified` needs at least one independent check of any kind. Evidence against git http-backend shows // ply's probe is right against the reference; only Artifacts evidence says anything about Artifacts. COVERAGE.md // reports both counts so a behaviour verified against git alone shows as an Artifacts gap. import type { Area, Behaviour, BehaviourIn, Evidence, NonEmpty, OtherEvidence, PlyOp, Status, TestRef } from './types.js'; import type { CheckOf } from './runs.js'; const op = (module: PlyOp['module'], symbol: string): PlyOp => ({ module, symbol }); const t = (path: TestRef['path'], anchor: string): TestRef => ({ tag: 'test', path, anchor }); // Evidence, one constructor per source. The check argument is typed by the run: a check the run did not record does // not compile. const git = (path: TestRef['path'], anchor: string): Evidence => ({ kind: 'ply_vs_reference_git', ref: t(path, anchor) }); const validatePly = (check: CheckOf<'validate-7b0c310f'>): Evidence => ({ kind: 'ply_vs_artifacts', ref: { tag: 'run', run: 'validate-7b0c310f', check } }); const validateGit = (check: CheckOf<'validate-7b0c310f'>): Evidence => ({ kind: 'native_git_vs_artifacts', ref: { tag: 'run', run: 'validate-7b0c310f', check } }); const plyWorker = (check: CheckOf<'loadgen-phase6-plyw-20261025'>): Evidence => ({ kind: 'ply_vs_artifacts', ref: { tag: 'run', run: 'loadgen-phase6-plyw-20261025', check } }); const compat = (check: CheckOf<'loadgen-compat-20261024'>): OtherEvidence => ({ kind: 'native_git_vs_artifacts', ref: { tag: 'run', run: 'loadgen-compat-20261024', check } }); const phase2Git = (check: CheckOf<'loadgen-phase2-20261025'>): OtherEvidence => ({ kind: 'native_git_vs_artifacts', ref: { tag: 'run', run: 'loadgen-phase2-20261025', check } }); const phase2Wire = (check: CheckOf<'loadgen-phase2-20261025'>): OtherEvidence => ({ kind: 'wire_probe_vs_artifacts', ref: { tag: 'run', run: 'loadgen-phase2-20261025', check } }); const phase3Git = (check: CheckOf<'loadgen-phase3-20261025'>): OtherEvidence => ({ kind: 'native_git_vs_artifacts', ref: { tag: 'run', run: 'loadgen-phase3-20261025', check } }); const hostile = (check: CheckOf<'loadgen-phase4-hostile-20261025'>): OtherEvidence => ({ kind: 'wire_probe_vs_artifacts', ref: { tag: 'run', run: 'loadgen-phase4-hostile-20261025', check } }); const hostileWrite = (check: CheckOf<'loadgen-phase4-hostile-write-20261025'>): OtherEvidence => ({ kind: 'wire_probe_vs_artifacts', ref: { tag: 'run', run: 'loadgen-phase4-hostile-write-20261025', check } }); const deltaGit = (check: CheckOf<'loadgen-phase5-delta-20261025'>): OtherEvidence => ({ kind: 'native_git_vs_artifacts', ref: { tag: 'run', run: 'loadgen-phase5-delta-20261025', check } }); const deltaWire = (check: CheckOf<'loadgen-phase5-delta-20261025'>): OtherEvidence => ({ kind: 'wire_probe_vs_artifacts', ref: { tag: 'run', run: 'loadgen-phase5-delta-20261025', check } }); // The differential probe run, full matrix (test/probes, scripts/probes.mjs --artifacts): one scenario per check, `/art-ply` // for ply against Artifacts, `/art-git` for stock git against it; the same plans run in CI against the reference. const probePly = (check: CheckOf<'probes-20261114t2226-yyjq'> & `${string}/art-ply`): Evidence => ({ kind: 'ply_vs_artifacts', ref: { tag: 'run', run: 'probes-20261114t2226-yyjq', check } }); const probeGit = (check: CheckOf<'probes-20261114t2226-yyjq'> & `${string}/art-git`): OtherEvidence => ({ kind: 'native_git_vs_artifacts', ref: { tag: 'run', run: 'probes-20261114t2226-yyjq', check } }); // The malformed-pack run (probes-20261115t1926-gfhc): the 21 scenarios of 24cafa1 against Artifacts. const malPly = (check: CheckOf<'probes-20261115t1926-gfhc'> & `${string}/art-ply`): Evidence => ({ kind: 'ply_vs_artifacts', ref: { tag: 'run', run: 'probes-20261115t1926-gfhc', check } }); const malGit = (check: CheckOf<'probes-20261115t1926-gfhc'> & `${string}/art-git`): OtherEvidence => ({ kind: 'native_git_vs_artifacts', ref: { tag: 'run', run: 'probes-20261115t1926-gfhc', check } }); // The HTTP-framing wire run (wire-20261115t2038-ee4x): raw socket and curl (`/art-raw`, `/art-curl`), stock git (`/art-git`) and ply // (`/art-ply`) against Artifacts; the same plans run in CI against the reference (test/probes/wire.test.js). const wireArt = (check: CheckOf<'wire-20261115t2038-ee4x'> & (`${string}/art-raw` | `${string}/art-curl`)): OtherEvidence => ({ kind: 'wire_probe_vs_artifacts', ref: { tag: 'run', run: 'wire-20261115t2038-ee4x', check } }); const wireGit = (check: CheckOf<'wire-20261115t2038-ee4x'> & `${string}/art-git`): OtherEvidence => ({ kind: 'native_git_vs_artifacts', ref: { tag: 'run', run: 'wire-20261115t2038-ee4x', check } }); const wirePly = (check: CheckOf<'wire-20261115t2038-ee4x'> & `${string}/art-ply`): Evidence => ({ kind: 'ply_vs_artifacts', ref: { tag: 'run', run: 'wire-20261115t2038-ee4x', check } }); // Phase 4 (15 Nov): ref and tag-object semantics (probes-20261115t2113-phhp, the directory/file three in // probes-20261115t2126-d4jn) and the ref-name, capability, dumb-HTTP and listing wire plans (wire-20261115t2116-1nam). const semPly = (check: CheckOf<'probes-20261115t2113-phhp'> & `${string}/art-ply`): Evidence => ({ kind: 'ply_vs_artifacts', ref: { tag: 'run', run: 'probes-20261115t2113-phhp', check } }); const semGit = (check: CheckOf<'probes-20261115t2113-phhp'> & `${string}/art-git`): OtherEvidence => ({ kind: 'native_git_vs_artifacts', ref: { tag: 'run', run: 'probes-20261115t2113-phhp', check } }); const dfPly = (check: CheckOf<'probes-20261115t2126-d4jn'> & `${string}/art-ply`): Evidence => ({ kind: 'ply_vs_artifacts', ref: { tag: 'run', run: 'probes-20261115t2126-d4jn', check } }); const dfGit = (check: CheckOf<'probes-20261115t2126-d4jn'> & `${string}/art-git`): OtherEvidence => ({ kind: 'native_git_vs_artifacts', ref: { tag: 'run', run: 'probes-20261115t2126-d4jn', check } }); const rpPly = (check: CheckOf<'probes-20261115t2133-txqj'> & `${string}/art-ply`): Evidence => ({ kind: 'ply_vs_artifacts', ref: { tag: 'run', run: 'probes-20261115t2133-txqj', check } }); const rpGit = (check: CheckOf<'probes-20261115t2133-txqj'> & `${string}/art-git`): OtherEvidence => ({ kind: 'native_git_vs_artifacts', ref: { tag: 'run', run: 'probes-20261115t2133-txqj', check } }); const w4Art = (check: CheckOf<'wire-20261115t2116-1nam'> & (`${string}/art-raw` | `${string}/art-curl`)): OtherEvidence => ({ kind: 'wire_probe_vs_artifacts', ref: { tag: 'run', run: 'wire-20261115t2116-1nam', check } }); const w4Git = (check: CheckOf<'wire-20261115t2116-1nam'> & `${string}/art-git`): OtherEvidence => ({ kind: 'native_git_vs_artifacts', ref: { tag: 'run', run: 'wire-20261115t2116-1nam', check } }); const w4Ply = (check: CheckOf<'wire-20261115t2116-1nam'> & `${string}/art-ply`): Evidence => ({ kind: 'ply_vs_artifacts', ref: { tag: 'run', run: 'wire-20261115t2116-1nam', check } }); const WIRE_TEST = 'reference: ${plan.id} meets its answer with every sender'; const verified = (...evidence: NonEmpty): Extract => ({ tag: 'verified', evidence }); const IMPLEMENTED: Extract = { tag: 'implemented' }; const unsupported = (why: string, ...observed: readonly OtherEvidence[]): Extract => ({ tag: 'unsupported', why, observed }); // Each entry is checked against its own area's type (the id's prefix must be the area). const b = (x: BehaviourIn): BehaviourIn => x; // ply's operations, named once. const LS_REFS = op('src/lsrefs.ts', 'lsRefs'); const LIST_REFS = op('src/refops.ts', 'listRefs'); const DISCOVER = op('src/discover.ts', 'discover'); const PARSE_CAPS = op('src/caps.ts', 'parseCapabilitiesV2'); const REQUIRED_V2 = op('src/closed.ts', 'checkRequiredV2'); const OBJECT_FORMAT = op('src/closed.ts', 'decideObjectFormat'); const RECEIVE_CAPS = op('src/receivecaps.ts', 'receiveCaps'); const CHECK_PUSH_CAPS = op('src/receivecaps.ts', 'checkPushCaps'); const FETCH_PACK = op('src/fetchpack.ts', 'fetchPack'); const FETCH_FILTERED = op('src/fetchpack.ts', 'fetchPackFiltered'); const FETCH_OBJECT = op('src/fetch.ts', 'fetchObject'); const FETCH_REQUEST = op('src/fetch.ts', 'fetchRequest'); const NEGOTIATE = op('src/negotiate.ts', 'negotiate'); const SIDEBAND = op('src/fetch.ts', 'parseSideband'); const LEARN_FILTER = op('src/transport.ts', 'learnFilter'); const PARSE_PACK = op('src/packresolve.ts', 'parsePack'); const RESOLVE_PACK = op('src/packresolve.ts', 'resolvePack'); const RESOLVE_RANGE = op('src/packrangeresolve.ts', 'resolvePackRange'); const SCAN_PACK = op('src/pullstream.ts', 'scanPack'); const PUSH = op('src/push.ts', 'push'); const PUSH_PACK = op('src/receivecaps.ts', 'pushPack'); const CLASSIFY_REPORT = op('src/push.ts', 'classifyReport'); const EDIT_FILE = op('src/edit.ts', 'editFile'); const COMMIT_CHANGES = op('src/changes.ts', 'commitChanges'); const PUSH_TREE = op('src/tree.ts', 'pushTree'); const CREATE_BRANCH = op('src/refops.ts', 'createBranch'); const DELETE_BRANCH = op('src/refops.ts', 'deleteBranch'); const CREATE_TAG = op('src/refops.ts', 'createTag'); const DELETE_TAG = op('src/refops.ts', 'deleteTag'); const READ_FILE = op('src/read.ts', 'readFile'); const LIST_TREE = op('src/read.ts', 'listTree'); const READ_COMMIT = op('src/read.ts', 'readCommit'); const READ_LOG = op('src/log.ts', 'readLog'); const MERGE_BASE = op('src/merge.ts', 'mergeBase'); const MERGE_BRANCH = op('src/merge.ts', 'mergeBranch'); const REBASE_BRANCH = op('src/rebase.ts', 'rebaseBranch'); const CHERRY_PICK = op('src/rebase.ts', 'cherryPick'); const REVERT_COMMIT = op('src/rebase.ts', 'revertCommit'); const RUN_TRANSFER = op('src/transfer.ts', 'runTransfer'); const CREATE_TRANSPORT = op('src/http.ts', 'createTransport'); const REDIRECT_POLICY = op('src/http.ts', 'redirectPolicy'); const EXCHANGE_CLOCK = op('src/deadline.ts', 'exchangeClock'); const PARITY_LSREFS = 'ls-refs == git ls-remote (prefixes, symrefs, peeled tags, many refs)'; const MATRIX = 'exhaustive fetch matrix: wants × haves × deepen × filter × server'; const CLONE_SHAPES = 'clone --depth N / --filter / --shallow-since / --shallow-exclude: same invocation, same shallow set, same objects'; const ADV_PUSH = 'push: request × advertised atomic × advertised push-options × object-format, judged by git push'; const BAND3_NO_REPORT = 'push outcome (SAFETY.md I36): the exact report shapes, the decision, and the fields the enumerator does not compare'; const PROBES = 'probe ${s.id}: ply and stock git against the reference meet the expectation and leave the same repository'; const ADV_REAL = 'real git http-backend configurations advertise exactly what the renderer writes for their cell'; const REFS: readonly BehaviourIn<'refs'>[] = [ b({ id: 'refs.ls-refs-listing', area: 'refs', description: 'v2 ls-refs lists every ref with its object id.', ops: [LS_REFS, LIST_REFS], tests: [t('test/parity.test.js', PARITY_LSREFS), t('test/e2e-customer.test.js', 'listRefs is for-each-ref, before the deletes'), t('test/probes/wire.test.js', WIRE_TEST)], status: verified(git('test/parity.test.js', PARITY_LSREFS), validatePly('refs list (peeled tags)'), plyWorker('refs/small'), compat('ls_remote/small/v2'), validateGit('git judge: fsck --strict, refs, history'), git('test/probes/wire.test.js', WIRE_TEST), w4Ply('refs.ls-refs-listing#two-thousand-refs/art-ply'), w4Git('refs.ls-refs-listing#two-thousand-refs/art-git'), w4Art('refs.ls-refs-listing#two-thousand-refs/art-raw'), w4Art('refs.ls-refs-listing#two-thousand-refs/art-curl'), w4Art('refs.ls-refs-listing#unknown-argument/art-raw'), w4Art('refs.ls-refs-listing#unknown-argument/art-curl')), notes: ['The two-thousand-refs plan lists 1500 branches, 500 annotated tags and HEAD and compares a digest of the whole listing.'], }), b({ id: 'refs.ref-prefix', area: 'refs', description: 'ls-refs `ref-prefix` arguments restrict the listing to refs under the given prefixes.', ops: [LS_REFS, LIST_REFS], tests: [t('test/parity.test.js', "['refs/heads/main', 'refs/tags/v1'], ['HEAD']")], status: verified(git('test/parity.test.js', "['refs/heads/main', 'refs/tags/v1'], ['HEAD']"), plyWorker('refs/prefix'), plyWorker('refs/prefix_tags'), compat('ls_remote_ref_prefix/small/v2')), notes: [], }), b({ id: 'refs.symref-head', area: 'refs', description: 'ls-refs `symrefs` reports the target of HEAD, and the target is the default branch.', ops: [LS_REFS, PUSH], tests: [t('test/parity.test.js', PARITY_LSREFS), t('test/probes/probes.test.js', PROBES)], status: verified(git('test/parity.test.js', PARITY_LSREFS), plyWorker('refs/n4_head'), plyWorker('refs/n4'), git('test/probes/probes.test.js', PROBES), semPly('refs.symref-head#delete-default-branch/art-ply'), semGit('refs.symref-head#delete-default-branch/art-git'), rpPly('refs.symref-head#delete-default-branch/art-ply'), rpGit('refs.symref-head#delete-default-branch/art-git')), notes: ['The delete-default-branch probe asks for a delete of the branch HEAD names and reads HEAD back with ls-remote --symref.'], }), b({ id: 'refs.directory-file-conflict', area: 'refs', description: 'A ref cannot be both a name and a directory: creating refs/heads/a/b while refs/heads/a exists (or the reverse, or both in one push) is refused and leaves the existing ref as it was.', ops: [PUSH], tests: [t('test/probes/probes.test.js', PROBES)], status: verified(git('test/probes/probes.test.js', PROBES), dfPly('refs.directory-file-conflict#file-then-dir/art-ply'), dfGit('refs.directory-file-conflict#file-then-dir/art-git'), dfPly('refs.directory-file-conflict#dir-then-file/art-ply'), dfGit('refs.directory-file-conflict#dir-then-file/art-git'), dfPly('refs.directory-file-conflict#both-in-one-push/art-ply'), dfGit('refs.directory-file-conflict#both-in-one-push/art-git'), rpPly('refs.directory-file-conflict#file-then-dir/art-ply'), rpGit('refs.directory-file-conflict#file-then-dir/art-git'), rpPly('refs.directory-file-conflict#dir-then-file/art-ply'), rpGit('refs.directory-file-conflict#dir-then-file/art-git'), rpPly('refs.directory-file-conflict#both-in-one-push/art-ply'), rpGit('refs.directory-file-conflict#both-in-one-push/art-git')), notes: [], }), b({ id: 'refs.peeled-tags', area: 'refs', description: 'ls-refs `peel` attaches the peeled id to annotated tags, and only to them.', ops: [LS_REFS, LIST_REFS], tests: [t('test/parity.test.js', PARITY_LSREFS)], status: verified(git('test/parity.test.js', PARITY_LSREFS), validatePly('refs list (peeled tags)'), compat('ls_remote_tags/small/v2')), notes: [], }), b({ id: 'refs.unborn-empty-repo', area: 'refs', description: 'An empty repository lists no refs, and ls-refs `unborn` names the branch HEAD will be born on.', ops: [LS_REFS], tests: [t('test/lsrefs-unborn.test.js', 'lsRefs unborn: the argument, the answer and the ref listing agree with git, across every cell'), t('test/lsrefs-unborn.test.js', 'lsRefs unborn: an empty repository clones to the branch ply reports (git clone is the oracle)')], status: verified(git('test/lsrefs-unborn.test.js', 'lsRefs unborn: the argument, the answer and the ref listing agree with git, across every cell'), validatePly('refs (empty)'), plyWorker('refs/empty')), notes: [], }), b({ id: 'refs.advertisement-shapes', area: 'refs', description: 'Unusual but legal listings (duplicate names, ordering, raw bytes in names) are read as git reads them.', ops: [LS_REFS], tests: [t('test/space/advertisement.test.js', 'refs: every cell, judged by git ls-remote; a duplicate ref resolves to its first listing in git fetch'), t('test/git-bytes.test.js', 'byte content × object field × operation')], status: verified(git('test/space/advertisement.test.js', 'refs: every cell, judged by git ls-remote; a duplicate ref resolves to its first listing in git fetch')), notes: ['No Artifacts evidence: ply has never asked Artifacts to list a ref with non-UTF-8 or unusual bytes.'], }), b({ id: 'refs.v0-upload-pack-advertisement', area: 'refs', description: 'The v0/v1 upload-pack advertisement (refs and capabilities on the info/refs GET, no Git-Protocol header).', ops: [], tests: [], status: unsupported('ply asks for protocol v2 on upload-pack and refuses a server that answers otherwise (src/caps.ts).', compat('ls_remote/small/v0'), compat('clone_full/small/v0'), compat('depth_1/small/v0'), wireArt('refs.v0-upload-pack-advertisement#no-protocol-header/art-raw'), wireArt('refs.v0-upload-pack-advertisement#no-protocol-header/art-curl'), wireGit('refs.v0-upload-pack-advertisement#no-protocol-header/art-git'), w4Art('refs.v0-upload-pack-advertisement#two-thousand-refs/art-raw'), w4Art('refs.v0-upload-pack-advertisement#two-thousand-refs/art-curl'), w4Git('refs.v0-upload-pack-advertisement#two-thousand-refs/art-git')), notes: ['Stock git, raw requests and curl have probed v0 on Artifacts; ply has not.'], }), b({ id: 'refs.receive-pack-advertisement', area: 'refs', description: 'The receive-pack advertisement (v0 form: capabilities on the first ref, `capabilities^{}` for an empty repository).', ops: [RECEIVE_CAPS, PUSH], tests: [t('test/space/advertisement.test.js', ADV_PUSH), t('test/push.test.js', 'push matrix: configs × hooks × commands × caps, parity with git push')], status: verified(git('test/space/advertisement.test.js', ADV_PUSH), validatePly('write: root commit (edit changes)'), phase2Wire('receive_caps/artifacts')), notes: [], }), ]; const CAPS: readonly BehaviourIn<'caps'>[] = [ b({ id: 'caps.v2-capability-advertisement', area: 'caps', description: 'The v2 capability advertisement: version 2, agent, ls-refs and fetch features, object-format, server-option, session-id.', ops: [DISCOVER, PARSE_CAPS], tests: [t('test/space/advertisement.test.js', 'caps: every cell through discover() (derived from the table)'), t('test/space/advertisement.test.js', ADV_REAL)], status: verified(git('test/space/advertisement.test.js', ADV_REAL), validatePly('discover'), plyWorker('discover/v2_caps'), phase2Wire('capability_table/v2'), deltaWire('caps/v2_fetch_features'), w4Art('caps.v2-capability-advertisement#unknown-capability-line/art-raw'), w4Art('caps.v2-capability-advertisement#unknown-capability-line/art-curl')), notes: [], }), b({ id: 'caps.required-capabilities', area: 'caps', description: 'A server missing a capability ply needs (ls-refs, fetch) is refused as unsupported before any operation.', ops: [REQUIRED_V2, DISCOVER], tests: [t('test/space/advertisement.test.js', 'caps: every cell through discover() (derived from the table)')], status: verified(git('test/space/advertisement.test.js', ADV_REAL)), notes: ['Artifacts advertises every required capability, so the refusal has never been reached against it.'], }), b({ id: 'caps.object-format', area: 'caps', description: 'object-format=sha1 is accepted; any other object format is refused as unsupported.', ops: [OBJECT_FORMAT, DISCOVER], tests: [t('test/space/advertisement.test.js', ADV_PUSH)], status: verified(git('test/space/advertisement.test.js', ADV_PUSH)), notes: ['ply has not probed a sha256 repository on any server.'], }), b({ id: 'caps.fetch-argument-gating', area: 'caps', description: 'ply sends a fetch argument (filter, shallow, include-tag, thin-pack, ofs-delta) only when the advertisement allows it, as git fetch does.', ops: [FETCH_PACK, FETCH_REQUEST], tests: [t('test/space/advertisement.test.js', 'request: fetch arguments ply sends, judged by git fetch')], status: verified(git('test/space/advertisement.test.js', 'request: fetch arguments ply sends, judged by git fetch'), w4Art('caps.fetch-argument-gating#unknown-fetch-argument/art-raw'), w4Art('caps.fetch-argument-gating#unknown-fetch-argument/art-curl')), notes: [], }), b({ id: 'caps.filter-not-advertised', area: 'caps', description: 'A server whose fetch= line lists no `filter` (stock http-backend) gets no filter argument after one probe.', ops: [FETCH_PACK, READ_FILE, LIST_TREE], tests: [t('test/no-filter.test.js', 'reads: readFile, listTree, readCommit, readLog, checkoutTree answer the same on both; one probe, then no filter')], status: verified(git('test/no-filter.test.js', 'reads: readFile, listTree, readCommit, readLog, checkoutTree answer the same on both; one probe, then no filter')), notes: [], }), b({ id: 'caps.receive-pack-capabilities', area: 'caps', description: 'receive-pack capabilities (report-status, report-status-v2, side-band-64k, atomic, push-options, delete-refs, ofs-delta, object-format) are read and checked before the POST.', ops: [RECEIVE_CAPS, CHECK_PUSH_CAPS], tests: [t('test/space/advertisement.test.js', ADV_PUSH), t('test/push-pack.test.js', 'atomic the server does not advertise: unsupported, no POST, the pack unread')], status: verified(git('test/space/advertisement.test.js', ADV_PUSH), phase2Wire('receive_caps/artifacts'), deltaWire('caps/receive_pack_ofs_delta'), w4Art('caps.receive-pack-capabilities#unknown-capability-on-push/art-raw'), w4Art('caps.receive-pack-capabilities#unknown-capability-on-push/art-curl')), notes: [], }), b({ id: 'caps.server-option', area: 'caps', description: 'v2 `server-option` arguments on ls-refs and fetch.', ops: [], tests: [], status: unsupported('discover() reads the capability; no ply operation sends a server-option.', phase2Wire('capability_table/v2')), notes: [], }), b({ id: 'caps.wait-for-done-packfile-uris-sideband-all', area: 'caps', description: 'v2 fetch features wait-for-done, packfile-uris and sideband-all.', ops: [], tests: [], status: unsupported('src/closed.ts names them only to classify an advertisement; ply never requests them.', deltaWire('caps/v2_fetch_features')), notes: [], }), b({ id: 'caps.object-info', area: 'caps', description: 'The v2 `object-info` command (object sizes without a pack).', ops: [], tests: [], status: unsupported('No ply operation sends command=object-info.', phase2Wire('object_info/artifacts'), wireArt('caps.object-info#size/art-raw'), wireArt('caps.object-info#size/art-curl')), notes: [], }), ]; const FETCH: readonly BehaviourIn<'fetch'>[] = [ b({ id: 'fetch.want-tip-full-pack', area: 'fetch', description: 'want of a tip with done and no filter: the pack holds exactly what pack-objects sends.', ops: [FETCH_PACK], tests: [t('test/protocol.test.js', MATRIX)], status: verified(git('test/protocol.test.js', MATRIX), compat('clone_full/small/v2'), compat('clone_full/big/v2'), validateGit('git judge: fsck --strict, refs, history')), notes: ['On Artifacts only stock git has fetched full packs; ply always fetches there with a filter or a depth.'], }), b({ id: 'fetch.want-non-tip-object', area: 'fetch', description: 'want of an object that is not an advertised tip (an older commit, a tree, a blob, a tag) by id.', ops: [FETCH_PACK, FETCH_OBJECT, READ_FILE], tests: [t('test/protocol.test.js', MATRIX), t('test/read.test.js', 'readFile bytes == git show : for every blob path and every ref form')], status: verified(git('test/protocol.test.js', MATRIX), git('test/read.test.js', 'readFile bytes == git show : for every blob path and every ref form'), validatePly('read/blob README.md'), validatePly('tree (root, src)'), phase3Git('reachable_nontip/v2/artifacts'), phase2Git('fetch_reachable_sha')), notes: ['The reference fixtures set uploadpack.allowAnySHA1InWant; a differential run must give the reference server the want policy Artifacts has.'], }), b({ id: 'fetch.want-unreachable-or-unknown', area: 'fetch', description: 'want of an unreachable or nonexistent id: the server refuses (ERR not our ref), and ply reports a typed remote_error.', ops: [FETCH_PACK], tests: [t('test/mutant-kill-tree.test.js', 'ERR upload-pack: not our ref x'), t('test/probes/probes.test.js', PROBES)], status: verified(phase3Git('unreachable_local/v2/artifacts'), phase3Git('fake_sha/v2/artifacts'), hostile('proto/want_short_oid'), hostile('proto/want_nonhex_oid'), git('test/probes/probes.test.js', PROBES), malPly('fetch.want-unreachable-or-unknown#phantom/art-ply')), notes: ['ply sends an unknown want against git http-backend in the probes (#phantom, an id no one holds); an unreachable but present id is not probed.'], }), b({ id: 'fetch.want-have-line-syntax', area: 'fetch', description: 'want/have/shallow lines: upload-pack\'s verdict on each class of id, and ply refusing non-ids before the wire.', ops: [FETCH_REQUEST, NEGOTIATE], tests: [t('test/want-oracle.test.js', 'want: git upload-pack and fetchRequest agree on every class')], status: verified(git('test/want-oracle.test.js', 'want: git upload-pack and fetchRequest agree on every class'), hostile('proto/have_bad_oid'), hostile('proto/shallow_bad_oid')), notes: [], }), b({ id: 'fetch.have-negotiation', area: 'fetch', description: 'Multi-round have/ACK negotiation, then done: the server stops at common commits and sends only what is missing.', ops: [NEGOTIATE, FETCH_PACK], tests: [t('test/protocol.test.js', MATRIX), t('test/want-oracle.test.js', 'negotiate: an acknowledgment that is not an object id')], status: verified(git('test/protocol.test.js', MATRIX), compat('incremental_fetch/scratch/v2')), notes: ['On Artifacts only stock git has negotiated; no ply probe has sent haves there.'], }), b({ id: 'fetch.acknowledgments-ready-packfile', area: 'fetch', description: 'v2 response sections in order (acknowledgments, ready, shallow-info, packfile); a server that breaks the order is a protocol error, as it is for git.', ops: [FETCH_PACK], tests: [t('test/fetch-lying-server.test.js', 'a fetch sent with done and answered with acknowledgments only is a protocol error, as it is for git'), t('test/fetch-lying-server.test.js', 'a fetch sent with done and answered with acknowledgments before its packfile is a protocol error, as it is for git')], status: verified(git('test/fetch-lying-server.test.js', 'a fetch sent with done and answered with acknowledgments only is a protocol error, as it is for git')), notes: [], }), b({ id: 'fetch.filter-blob-none', area: 'fetch', description: 'filter blob:none: commits and trees, and blobs only when wanted by id.', ops: [FETCH_PACK, FETCH_FILTERED, READ_FILE], tests: [t('test/protocol.test.js', MATRIX), t('test/log.test.js', 'readLog on blob:none: the trees are harvested')], status: verified(git('test/protocol.test.js', MATRIX), validatePly('read/blob README.md'), validatePly('tree (root, src)'), plyWorker('read/small'), compat('filter_blob_none+lazy_checkout/deep/v2')), notes: [], }), b({ id: 'fetch.filter-tree-depth', area: 'fetch', description: 'filter tree: (tree:0 commit only, tree:1, tree:2).', ops: [FETCH_PACK, READ_COMMIT], tests: [t('test/protocol.test.js', MATRIX), t('test/read.test.js', 'readCommit fetches the commit object only: one tree:0 deepen-1 fetch, no tree fetches')], status: verified(git('test/protocol.test.js', MATRIX), compat('filter_tree_0/deep/v2')), notes: [], }), b({ id: 'fetch.filter-blob-limit', area: 'fetch', description: 'filter blob:limit=.', ops: [FETCH_PACK], tests: [t('test/protocol.test.js', MATRIX)], status: verified(git('test/protocol.test.js', MATRIX), compat('filter_blob_limit_2m/big/v2')), notes: [], }), b({ id: 'fetch.filter-combine', area: 'fetch', description: 'filter combine:blob:none+tree: (a commit and the first levels of its path in one request).', ops: [FETCH_PACK, READ_FILE], tests: [t('test/protocol.test.js', MATRIX), t('test/path-trees.test.js', 'a server that takes it: first contact is tree:0')], status: verified(git('test/protocol.test.js', MATRIX), git('test/path-trees.test.js', 'a server that takes it: first contact is tree:0')), notes: ['No Artifacts evidence of any kind for combine filters.'], }), b({ id: 'fetch.filter-sparse-oid', area: 'fetch', description: 'filter sparse:oid=.', ops: [], tests: [], status: unsupported('No ply operation builds a sparse:oid filter; the wire probe hands one to fetchPackFiltered only to watch it refused, which is not support.', compat('filter_sparse_oid/wide/v2'), wireArt('fetch.filter-sparse-oid#refused/art-raw'), wireArt('fetch.filter-sparse-oid#refused/art-curl'), wireGit('fetch.filter-sparse-oid#refused/art-git')), notes: [], }), b({ id: 'fetch.filter-refusal-fallback', area: 'fetch', description: 'A server that advertises filter but refuses a filter spec with HTTP 400: ply records the refusal for that remote and falls back to blob:none.', ops: [LEARN_FILTER, FETCH_PACK, READ_FILE], tests: [t('test/artifacts-compat.test.js', 'Unsupported Git fetch filter; only blob:none is supported.'), t('test/path-trees.test.js', 'an Artifacts-like server (only blob:none): never asked for the deep fetch')], status: verified(git('test/artifacts-compat.test.js', 'Unsupported Git fetch filter; only blob:none is supported.'), validatePly('read/blob README.md'), plyWorker('read/small')), notes: ['The reference tests emulate the 400 with a proxy in front of git; git judges the results, not the refusal.'], }), b({ id: 'fetch.deepen-depth', area: 'fetch', description: 'deepen : a shallow pack cut n commits below each want, with shallow-info naming the boundary.', ops: [FETCH_PACK, FETCH_OBJECT], tests: [t('test/protocol.test.js', MATRIX), t('test/parity.test.js', CLONE_SHAPES), t('test/fetchobject-deepen.test.js', 'fetchObject costs one object')], status: verified(git('test/parity.test.js', CLONE_SHAPES), compat('depth_1/small/v2'), compat('depth_n/small/v2')), notes: [], }), b({ id: 'fetch.deepen-since', area: 'fetch', description: 'deepen-since