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

Preamble, purpose, actors and vocabulary

A statement of what timber must always do and never do, written to admit any model that satisfies it. How its steps fit together in each deployment is drawn in architecture.html beside it.

The statement is in three parts. Part A is what must hold of timber on its own: what an artifact is and how it is named, what a claim about one is and who may make it, how a landing becomes a publish and a publish a version, how an offered artifact is accepted and released, how a channel moves and an environment follows it, how a consumer reads, and what timber keeps. Part B is its contracts: the operations it needs across its eight seams, and the guarantee each must give. The seams are the store, the build, the landing, the signer, the policy, the ledger, a projection and a target. Part C is the profiles: the ways each contract is satisfied.

Parts A and B name no mechanism: no command, file, format, field, registry, service or tool. One thing of the world they name freely, because section 9 fixes it: git. Every other real tool is named only in section 9 and in Part C. A reader who has never seen a package registry or a deployment tool should be able to design from Parts A and B and git alone.

1. Purpose

timber carries what a build left into a store the owner controls, and from there to everyone and everything that runs it. After a landing, it packages what the build left, names each piece by its content, attaches to each piece the claims made about it, and offers the set as one version. A gate accepts what the claims and the policy admit; a promotion moves a channel to an accepted version and records the move; an environment that follows the channel converges on it. A consumer reads an artifact in its ecosystem’s own form, and only one the policy admits. The same content-addressed store holds a build’s cache, the artifacts, and the record of what was released, so the bytes that passed the checks are the bytes that run, and timber never builds twice to make them so.

2. Actors

actormay decidemay not
the repository’s authorswhich components the repository publishes, what each holds and in which ecosystem’s form, how a version is derived from history, which claims a version must carry and from which signers, which channels exist and which environments follow each, and whether an environment moves on its own or waits for a personthey never decide what a build left, what a digest is, or that a claim was made by a signer that did not make it
a publisher (a person, an agent or a host that runs a publish)when to publish a landed revisionit never publishes a revision that has not landed, never moves a channel, and never makes a claim in another signer’s name
a signer (an identity that makes claims: a build host, a gate, a reviewer, a verifier, a person’s agent)what it claims of a digestit never claims beyond what the policy lets that signer claim, and never alters a claim it made
the gate (the one party that accepts and promotes, not the landing gate)whether an offered artifact is accepted, as the policy fixes it; when a channel moves, within what the policy and a person allowit never builds, never changes bytes, never accepts what the policy refuses, and never deploys
an approver (a person the policy names)whether a promotion the policy holds for a person proceeds, which is also how an environment that waits is let move (97)it never approves a version that is not accepted
a consumer (a person, an agent, a build, a surface or a target that reads)which artifact and version to ask forit never reads a version the policy it reads under refuses, and never changes what the store holds
a target (where an environment runs)how it is converged, by its own reconcilerit never decides which version it should run
the operatoreverything the repository’s authors and the policy do not settle; which signers a host trustsit never makes a landing that skipped the gate count as accepted
timberthe digest of every artifact, which version a landing becomes as the authors’ rule fixes it, which projections to render, and what it keeps to answer againit never builds, never rewrites bytes, never moves a channel on its own, never counts a claim whose signer the policy does not name, and never keeps a credential

3. Vocabulary

Terms are defined by meaning. A model may add terms; it may not redefine these.

  • repository: the checkouts that share one git history.
  • revision: one commit of a repository.
  • landing: the event by which a revision reaches a branch through the repository’s own landing gate, sluice or its like, which is not timber’s gate. A revision is landed on a branch once that branch holds it.
  • build: a run of the repository’s own commands over one revision that leaves outputs. Its build identity is the name the build gives the inputs it ran over, by which two parties name the same build without seeing each other.
  • outputs: the files a build leaves that the repository’s authors declare for publishing.
  • component: the outputs the authors declare to take one version together, with the paths of the repository whose changes version it and the prefix its tags carry; a repository that declares no component is one component.
  • bytes: the content of one artifact, as a sequence of octets.
  • digest: the name bytes have by their content alone, the same on every host and in every store.
  • artifact: bytes, their digest, and the metadata that says what the bytes are: which ecosystem’s form, which name in that ecosystem, which version.
  • ecosystem: a package manager’s or a runtime’s own world: its package form, its names, its version rules and the way its clients read.
  • projection: an artifact in one ecosystem’s own form, as that ecosystem’s clients read it.
  • version: the name a publish gives a component’s artifacts, in the ecosystem’s own version rules, derived from the repository’s history.
  • index: the artifact that names every artifact of one component at one version, by digest, and is itself an artifact.
  • publish: the act that turns one landed revision into an index for each component it publishes and the artifacts each names, offered to the store.
  • claim: a statement about one digest by one signer: that a build produced it from a revision, that checks passed on a build, that a test ran, that a reviewer approved, that a verifier rebuilt it and the digests matched, that a gate accepted it.
  • attestation: a claim signed by its signer and attached to the digest it is about.
  • signer: an identity that signs claims, and the means to tell that a claim is its.
  • link: a claim that records one step from a signal to a published version: what the step made, and the step before it, each by digest. Its form is the one the family’s tools share (weir 114). A signal is one assertion read from an event outside the repository.
  • trusted root: the identities a verifier is given to trust, of the parties that issue certificates and of the logs that hold what was signed, against which it checks every certificate and inclusion proof it verifies.
  • policy: the repository’s authors’ rule for one audience: which claims a version must carry, from which signers, before the gate accepts it, a channel takes it, or a consumer reads it.
  • verdict: timber’s answer whether a digest satisfies a policy: satisfied, refused naming the first claim found wanting, or unreadable naming what could not be read.
  • offered: the state of an artifact a publisher has put in the store and no gate has judged.
  • accepted: the state of an artifact the gate has judged to satisfy the policy for acceptance.
  • released: the state of a version a channel names.
  • channel: a named pointer to one accepted version, which only a promotion moves.
  • promotion: the act that moves a channel to a version, and the record of that move.
  • ledger: the chain of a channel’s promotions, each a claim the gate signs that names the promotion it follows, which nothing removes; and the seam that holds it, appending a promotion only after the one that promotion names and answering the chain.
  • environment: one target, the channel it follows, and whether it moves on its own or waits for an approver.
  • roster: the environments of one declared kind a target holds, each with the channel it follows and whether it waits, answered by the target and declared nowhere in the repository (126).
  • reconciler: what converges an environment on the version its channel names: by pushing to the target, or by the target pulling.
  • cache entry: bytes a build left on any host, named by their digest and the build identity, which no claim but the host’s own covers.
  • consumer layout: an ecosystem’s own form of a local registry: the files its clients read from disk, or the protocol they read over the network.
  • asker: whoever asks timber a question: a person, an agent, a surface, a program.
  • surface: a way an asker meets timber: a command line, an agent’s session, a pane, a program.