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 place

  1. materialize: given a revision, a place holding exactly that revision, with the environment the repository declares and the ports its policy names (31).
  2. release: given a place sluice made, its removal, with everything started in it ended, what its checks handed to another process to keep included (25, 32).
  3. The guarantee: a place holds what it was given and nothing of any other place, except the caches its branch’s policy declares, each keyed by the content of the files it is built from and saved only from a run that passed. A cache changes how fast a check runs, never what it reports.

B.2 The check

  1. affected: given the branch’s revision and a candidate, the checks the candidate can change the result of (15, 70).
  2. run: given a place and checks, for each check its key, its outcome, its executor and whether the outcome was observed in this run or read from an earlier one (16).
  3. The guarantee: an outcome is what the executor observed, never inferred; a replay says it is a replay.
  4. execute: given a place, a command, and the limits a run is held to (the cores its instance gives each run; the memory, the network and the paths it may write that the branch’s policy states), the command run within them, and what the executor enforced: whether the run was confined, and each limit it held.
  5. The guarantee: an executor that cannot enforce a limit the branch’s policy states refuses the run rather than run it without the limit, and every run is recorded with what its executor enforced (16), so a run is never read as confined, or as held to a limit, unless its executor enforced it (28, 29).

B.4 The branch

  1. read: given a branch, its current revision.
  2. form: given a revision and a head, the candidate revision, or the conflict with the content it is on (12).
  3. commit: given a candidate, its parent, the entry’s head, the entry’s work and the verdict read for it, one commit (23).
  4. move: given a branch, the revision it is expected at or that it is absent, and the revision to move to or its removal, the move or a refusal because the branch was elsewhere (24, 104, 105).
  5. The guarantee: a move is all or nothing, and two moves of one branch from one expected revision never both succeed.

B.5 The driver

  1. submit: given a head, a branch, the after-entries, a priority, a submitter, an entry (1, 3). 47a. forecast: given a head, a branch and its after-entries, the conflicts the head would meet if submitted now, placed after every entry already submitted, each with the entries it meets (64, 65). 47b. amend: given a queued entry and who asks, its after-entries or priority changed (3, 6).
  2. withdraw: given an entry and who asks, its removal where 5 allows it.
  3. state: given an entry, its state and the verdicts read for it (26).
  4. notify: given an entry’s session and an outcome, the outcome delivered to that session and no other (20).
  5. The guarantee: a notification reaches the submitter at least once and names its entry and outcome, so a repeat is known as one, and a state read with sluice stopped is the state sluice last wrote.

B.6 Binding the contracts

  1. Each seam is bound by naming one profile of Part C, and Parts A and B do not change to admit a profile.
  2. An entry’s records and a candidate’s verdicts have one form whatever profile wrote them, so a reader of one profile’s records reads another’s.

B.7 The records

  1. read: given a branch, its records as last written, and the version they were read at.
  2. write: given a branch, the version its records were read at and the records to write, the write, or a refusal because they have been written since (58).
  3. The guarantee: a write is all or nothing, two writes from one version never both succeed, and every host reads what the last write left (26, 59).