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 headwater must always do and never do, written to admit any model that satisfies it.

The statement is in three parts. Part A is what must hold of headwater on its own: what a repository depends on, which releases of those dependencies are new to it, when each is looked for, what headwater keeps, and what it gives the people and programs that ask. Part B is its contracts: the operations it needs across its six seams, and the guarantee each must give. The seams are a dependency description, a tiers declaration, a release lookup, a notes lookup, an advisory lookup and a store. 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 do 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 dependency updater should be able to design from Parts A and B and git alone.

1. Purpose

headwater tells a repository which releases of what it depends on are newer than what it runs. It reads what the repository declares, asks where each dependency is published, and reports every newer release with the words upstream wrote for it. It looks often for the dependencies a repository’s authors care most about, and less often for the rest. It answers the same way to a person, a coding agent, a pane beside the agents, and a program that records what it hears, and none of them needs another to use it. headwater never changes a repository, never judges what a release means, and never acts on one: a person or an agent decides, and the change is theirs.

2. Actors

actormay decidemay not
the repository’s authorswhat the repository depends on, which dependencies belong to which tier, each tier’s cadence, which lookups to ask, and how a dependency’s tags spell its versionsthey never decide what upstream publishes, which of two versions is newer, or that a release is older than it is
an asker (a person, a coding agent, a surface, a recorder, a scheduler)which repository and which tiers to ask about, and whenit never changes an answer by who it is, and never supplies a release or a version order
upstream (whoever publishes a dependency)what is released, when, under which version, what its notes say, and the facts it states of a releaseit never learns anything of the repository beyond the identities and versions headwater asks about
headwaterwhich releases are newer than each pin and at which level, as this statement fixes them, and what it keeps to answer againit never changes a repository, never rewords or judges what upstream wrote, never acts on a release, and never keeps a credential
a fixer (a coding agent or a person who makes changes)whether and how to move a pin, given a briefit never changes what headwater reports about upstream
a recorder (a program that keeps what it hears as its own records)how it records each release, and what its own judgment of one isit never writes headwater’s state, and never acknowledges a release
the operatorwhich releases are dismissed or skipped, in their own word or through a person or session they let act for them; everything the repository’s authors and an asker do not settle

3. Vocabulary

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

  • repository: the checkouts that share one held state.
  • repository state: the content of one checkout as it stands, committed or not.
  • dependency: something published apart from the repository that the repository’s authors chose to use: a package, a tool, an image, or another repository’s releases.
  • declaration: one place in a repository state that names a dependency, and what it says of the version.
  • range: of a declaration, the versions it accepts as it stands, where it accepts more than one.
  • claims: of a declaration, the other places in the repository state that a move of its dependency changes, where the declaration names them.
  • label: a name a declaration gives its dependency for people and recorders, apart from its identity.
  • identity: the name a dependency has where it is published, which every declaration, lookup and asker uses for it.
  • pin: of a declaration, the version it makes the repository run, or unknown when it names no single version. A dependency’s pin is the oldest of its declarations’ pins, and unknown when any of them is unknown or two of them cannot be ordered.
  • lookup: anything headwater asks for an identity’s releases, notes or advisories: where upstream publishes them, an index of those places, or a program on the asker’s host that asks them. A release lookup, a notes lookup and an advisory lookup each answer for one of the three. To a recorder, headwater as a whole is one source among many, and a lookup is never called a source.
  • tag scheme: of a dependency, how its tags spell its versions, as a declaration states it.
  • release: one version of a dependency that a lookup lists, with its date and a link to it.
  • prerelease: a release its lookup marks as one or, where the lookup gives no mark, one whose version’s own rules mark it.
  • version order: the order of a dependency’s versions under the rules of where upstream publishes it.
  • newer: of a release against a pin, later in the dependency’s version order.
  • level: of a release against a pin, which part of the version it changes under the dependency’s own version rules: major, minor or patch, or prerelease for a prerelease. It is undecided where those rules cannot say (70). A level names the part that changed and nothing of what the release changes.
  • notes: what upstream wrote of a release, as upstream wrote it.
  • advisory: a published warning that names versions of a dependency as unsafe.
  • facts: of a release, what an answer states of it for a program to match without reading its words. headwater’s own are the dependency’s identity, label and tier, the pin and the version, the level, the date, the advisories naming the dependency’s pins, and the lookups that list it (71). Upstream’s are the facts it states of the release, given apart (72).
  • tier: a named set of a repository’s dependencies, with a cadence. The default tier holds every dependency no other tier names.
  • tiers declaration: the one place in a repository state that names its tiers and their cadences, and binds its profiles.
  • cadence: the longest time a tier may go without a complete scan while scans are asked for.
  • due: of a tier, that it was never scanned, that its newest scan was incomplete, or that its cadence has passed since the start of its last complete scan.
  • scan: one reading of a repository state’s dependencies, and of what the lookups answer for those in the tiers it covers.
  • complete: of a tier’s scan, that every dependency of the tier that a bound release lookup knows was read, and that every release lookup and advisory lookup asked answered.
  • unread: of a dependency in a scan, that headwater could not read its declarations, or that a release lookup or advisory lookup that knows it did not answer, with the reason.
  • report: what headwater answers of a repository state from what the lookups last answered. For each dependency of the tiers it covers: the pin, the newer releases and the advisories naming its pins, or that it is unread, known to no lookup, or not yet looked for.
  • acknowledgement: a word given on one release of one dependency, by whoever the request names: dismissed, or skipped until a newer release.
  • brief: everything a fixer needs to move one dependency to one release. It holds the release, its notes and those of every release between the pin and it, the advisories that name it, and every declaration of the dependency. Where they can be given, a brief also holds the move as the dependency’s own ecosystem spells it, and what the published dependency changed between the pin and the release.
  • held state: everything headwater keeps of its own for one repository.
  • binding: the profiles that answer for each seam (51).
  • surface: one way an asker reaches headwater.
  • profile: one way a contract of Part B is satisfied, as Part C describes.