TAM-6867: Seedling x Canopy status channel — STA spec#354
Closed
dannash100 wants to merge 8 commits into
Closed
Conversation
dannash100
force-pushed
the
feature/tam-6867-seedling-x-canopy-establish-implement-the-connection-channel
branch
2 times, most recently
from
July 7, 2026 00:51
0512a5b to
f8bfb59
Compare
passcod
reviewed
Jul 7, 2026
dannash100
force-pushed
the
feature/tam-6867-seedling-x-canopy-establish-implement-the-connection-channel
branch
from
July 7, 2026 01:33
f8bfb59 to
00eda70
Compare
Establish the contract for more than one agent (bestool, seedling) reporting status under one server identity. A heartbeat is attributed to a named client (default `bestool` for back-compat); status is kept per (server, client) so streams and reachability don't collide; the response is client-scoped so Canopy can direct each agent over the same return channel. Foundation for the Seedling x Canopy channel (TAM-6867).
dannash100
force-pushed
the
feature/tam-6867-seedling-x-canopy-establish-implement-the-connection-channel
branch
from
July 7, 2026 01:54
00eda70 to
411a7d2
Compare
Member
|
fyi #362 |
Contributor
Author
|
Superseded by #362. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Foundation for Seedling talking to Canopy (TAM-6867): the
STAspec plus its device-facing implementation.The problem: on a Tamanu host, Seedling and the bestool alert daemon share one device identity, so both would report to Canopy as the same server — colliding status streams, with no way to direct a response at just one of them.
Spec
STA(.workhorse/specs/public-server/status.md): each heartbeat is attributed to a named client (defaulting tobestool, so existing agents keep working unchanged), status is kept per(server, client), and the response is scoped to the reporting client.Implementation
bestoolstream only: another client's checks are stored and answered (severities included) but never open or close issues.add_client_to_statusesmigration (clientcolumn, defaultbestool, +(server_id, client, created_at desc)index);clienton the status types and threaded through both insert paths; the heartbeat body takes an optionalclientfield.backup_nowis sent only tobestool(the client that runs backups) and omitted entirely for others;check_severitiesgoes to every health-reporting client; each client gets its own stored record echoed back.last_report_for_servers, used by the reachability sweep and the group archive check). Canopy's own views (status board, versions, MCP) keep reading thebestoolstream, so another client's sparse heartbeat never masks the authoritative health/version.bestoolstream (the health authority) has gone quiet past the down threshold, canopy files a distinctclient-stale/bestoolissue and resolves it when the client returns — so a dead health reporter isn't masked by another agent keeping the server "up".Endpoint + DB tests cover attribution/defaulting, response scoping, stream separation, and the any-client-up rule.