fix(release): package and update archie-messaging on a host install

The v1.30.0 extraction moved Telegram, email and webhook out of archied and into
cmd/archie-messaging, and nothing packaged it. dist-zip built and copied only the
five older binaries, and scripts/archie-update-install omitted it from both its
service and binary lists. A host upgraded across v1.30.0 therefore ran on with no
messaging process at all: archied logged that it stopped serving the telegram
gateway at the extraction, nothing replaced it, and the bot was dead for two days
with no error anywhere -- the daemon looked healthy throughout (archie-core-1c01).

Fixed in all four places the host component set was enumerated: the zip's build
loop, the zip's copy list, the installer's GATEWAY_SERVICES (messaging is a
service, so it is installed AND restarted) and its GATEWAY_BINARIES. The comment
claiming every process in the documented deployment ships in the zip is now true,
and says what makes it true.

The duplication was the actual defect, so the sets are pinned to cmd/ instead:
TestHostCommandListsCannotDrift derives the host-run commands from cmd/ and
asserts all four lists, plus the reference runbook's units, agree with it. Adding
a command or extracting one fails the test until it is packaged -- the check that
would have caught this on the day. The installer's own test grew the same
coverage, and the reason it passed while the bug was live is worth recording: its
fixture created only the stale cmd/ set, so the script's `[ -d ./cmd/$cmd ]` guard
silently skipped messaging.

Documentation, because the installer now refuses an update when a service unit is
missing and sends the operator to the runbook -- so a service the runbook omits is
a dead end: a messaging unit in deployments/systemd-user-service.md, the component
list and start sequence in deployments/INSTRUCTIONS.md (which ships inside the
zip), and the packaged-binary list in RELEASING.md.

Verified: task check exit 0, including test:tools and test:ui. Both new guards
were made to fail on purpose: reintroducing each omission produces "missing
archie-messaging" and "no call with fragments [./cmd/archie-messaging]".
This commit is contained in:
sam committed 2026-09-22 05:42:17 +10:00
1 parent a02f7730f9
commit 50693cf030
8 files changed
+264 -27

No files matched your search

+13 -7
View File
@@ -81,14 +81,20 @@ TASK_DB_PATH="${ARCHIE_TASK_DB_PATH:-$(configured_task_db_path)}"
TASK_DB_BACKUP="${ARCHIE_TASK_DB_BACKUP:-$BIN_DIR/archie-task-db.prev.sqlite}"
# The archied release is a set of processes, not one binary. Listed in start
# order: the State Store owns archie.db and every other process dials it, and
# the Gateway serves the chat contract archied and the UI dial, so each comes
# up before its consumers. archie-playbooks is a CLI, so it is installed but
# never restarted. deployments/systemd-user-service.md is the reference
# deployment; installing archied alone leaves the rest on the previous
# release, which is why a 1.23.0 update failed its health check
# order: the State Store owns archie.db and every other process dials it, the
# Gateway serves the chat contract archied, the UI and the Messaging Service
# dial, and each comes up before its consumers. archie-playbooks is a CLI, so
# it is installed but never restarted. deployments/systemd-user-service.md is
# the reference deployment; installing archied alone leaves the rest on the
# previous release, which is why a 1.23.0 update failed its health check
# (archie-core-hbqk).
GATEWAY_SERVICES="archie-state-store archie-gateway archied archie-ui"
#
# archie-messaging is a service, not a CLI: it owns the Telegram, email and
# webhook channels since the v1.30.0 extraction, so a host that updates without
# it keeps running with dead channels and no error anywhere
# (archie-core-1c01). TestUpdateInstallCoversEveryHostRunCommand fails if this
# list and GATEWAY_BINARIES stop covering the commands the release zip ships.
GATEWAY_SERVICES="archie-state-store archie-gateway archied archie-ui archie-messaging"
GATEWAY_BINARIES="$GATEWAY_SERVICES archie-playbooks"
PREV_GW="${ARCHIE_UPDATE_DAEMON_PREVIOUS:-}"