Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Part B

Part B. Contracts across the seams

B.1 The dependency description

  1. read-dependencies: given a repository state, every dependency it declares, each with its identity and every declaration of it; and every declaration that could not be read, with the reason. Each declaration comes with the pin it gives. Wherever it states them, it also comes with its range, its label, its tag scheme, its claims, and where upstream keeps the dependency’s releases and notes.
  2. describe-move: given a declaration and a version, how the declaration’s own ecosystem moves it to that version, as that ecosystem spells it, or that it spells none.

B.2 The tiers declaration

  1. read-tiers: given a repository state, its tiers, each with its cadence, the identities it names outright or by a prefix, and whether it asks for prereleases; and the default tier’s cadence.
  2. read-binding: given a repository state, the profiles it binds for each seam it names, or that it names none.
  3. Every answer of a dependency description and of the tiers declaration is the same for the same repository state, and reading one changes nothing (5).

B.3 The release lookup

  1. list-releases: given an identity, and its tag scheme where a declaration states one, every release the lookup lists for it. Each comes with its version, date and link, whether the lookup marks it a prerelease, whether it has been withdrawn, and the facts its upstream states of it where the lookup gives any (72). Or the answer is that the lookup could not be reached.
  2. order: given an identity, its tag scheme where a declaration states one, and two versions, which is newer, that they are the same, or that their order cannot be decided.
  3. locate: given an identity, where upstream keeps its releases and notes, or that this is unknown. A declaration may state it too (40).
  4. level: given an identity, its tag scheme where a declaration states one, a pin and a version, the version’s level against the pin, undecided where the version rules cannot say (70).
  5. The order is the version order (6), and the same rules give a level (70). The same two versions of one identity under one tag scheme always order the same way and give the same level.

B.4 The notes lookup

  1. read-notes: given an identity, a version and where upstream keeps its notes (68), what upstream wrote of that release, whole and unchanged; that it wrote nothing; or that the lookup could not be reached.
  2. read-changes: given an identity and two versions, what the published dependency changed between them, whole and unchanged; that the lookup cannot say; or that it could not be reached.

B.5 The advisory lookup

  1. read-advisories: given an identity and a version, every advisory that names that version, each with its identity, its severity as the advisory gives it, and a link. Or the answer is that the lookup could not be reached.

B.6 The store

  1. read: given a repository, its held state and the version it was read at.
  2. write: given a repository, the version read and the next held state. The write is all or nothing, and succeeds only if the held state is still at the version read (30).
  3. The store holds nothing in the repository’s content (28), and every checkout of one repository reaches the same store.

B.7 Binding the contracts

  1. Each seam is bound by naming one or more profiles of Part C. The repository’s authors bind the dependency descriptions and the lookups in the repository state (67). For a seam the repository state binds nothing, every profile that recognises one of its declarations is bound. Any number of dependency descriptions, release lookups, notes lookups and advisory lookups are bound at once, each answering for the identities it knows. Exactly one tiers declaration is read, and exactly one store is written.
  2. One conformance suite holds every profile to Parts A and B; a profile that fails it is not one.