Skip to main content

Module update_copy

Module update_copy 

Source
Expand description

The one place an available update is worded for a person.

Every surface that tells someone “an update is ready” — the CLI status line, the local dashboard banner, and the chat-edge approval ask — renders the text this module returns, so the same update never reads two different ways on two surfaces. update_copy is pure: it maps an update Compatibility class plus the target version to a small UpdateCopy value, and nothing about an available update is worded anywhere else.

The copy is honest per class, in plain terms:

  • Compatibility::Hot — a config-as-data change reaches new conversations right away, with no restart. Carries the APPLY_NOW verb.
  • Compatibility::Warm — a binary swap restarts the service; conversations already underway finish first. Carries the APPLY_NOW verb.
  • Compatibility::Cold — a format change needs a coordinated deploy across the whole deployment, so it points at that path and carries no apply verb (there is no one-click apply for a cold change).
  • Compatibility::Incompatible — the release was built for a different runtime and cannot be applied here; it names the mismatch and carries no apply verb.

Structs§

UpdateCopy
The wording for one available update: a headline, a plain-language detail sentence, and — only when the update can be applied in place — the apply verb a surface puts on its button.

Constants§

APPLY_NOW
The exact verb a surface renders on the apply affordance for an update that can be applied in place — never “Yes” or “OK”. Shared so no surface hand-writes it.

Functions§

update_copy
Word an available version for a person, given how it relates to the running build (Compatibility). Pure — the same inputs always yield the same UpdateCopy, with no I/O.