Problem
st agents reports an identity's status value verbatim, with no freshness window. A status file written days ago reads exactly like one written a second ago.
Consumers that apply a staleness rule and consumers that do not therefore disagree about the same identity at the same moment.
Evidence
Same host, same instant, one identity whose provider had been dead for roughly three minutes:
st agents → available
convoy ls --tree → DEAD (status stale 3m ago)
convoy ls --tree is right. st agents is reporting a value it has no reason to believe is current.
This surfaced while diagnosing a separate sidecar defect, but it is independent of that: even with a correctly-behaving writer, a crashed host or a killed session leaves a final status that st agents will keep echoing indefinitely.
Why this matters
st agents is the natural thing to reach for when asking "who is up right now" — it is the bus's own roster command. If the answer can be arbitrarily stale with no indication, then either:
- every consumer has to reimplement a staleness rule (and they will pick different windows), or
- consumers quietly trust it and get the wrong answer
Right now convoy has implemented its own window and smalltalk has not, which is why the two disagree. That divergence will keep widening as more consumers appear.
Proposed direction
Options, roughly in increasing order of change:
- (a) Display-only staleness.
st agents keeps printing the raw value but annotates age, e.g. available (3m ago) or a stale marker past a threshold. No semantic change; makes the ambiguity visible.
- (b) Derived status with a window.
st agents resolves to offline/stale when the status mtime exceeds a threshold, so the roster means "currently live". Matches what convoy already does.
- (c) Shared freshness contract. The window lives in the library alongside the status reader, so every consumer inherits one definition rather than each choosing.
(c) is what actually stops the divergence; (a) is a cheap immediate improvement that does not commit to a semantic.
What I would like consensus on
- Should
st agents mean "identities with a live session" or "last known status, whenever that was"? Both are defensible; the roster framing implies the first.
- If a window is adopted, what is the threshold, and does it belong in smalltalk so consumers share it — or is each consumer expected to decide?
- Should staleness be a distinct rendered state rather than collapsing into
offline? An identity that was busy and went stale is not the same as one that cleanly went offline, and losing that distinction may matter for debugging.
I am happy to implement whichever shape is preferred. The reason I am raising it as a question rather than opening a PR is that (b) changes what an existing command means, and that seems worth agreeing on first.
Problem
st agentsreports an identity'sstatusvalue verbatim, with no freshness window. Astatusfile written days ago reads exactly like one written a second ago.Consumers that apply a staleness rule and consumers that do not therefore disagree about the same identity at the same moment.
Evidence
Same host, same instant, one identity whose provider had been dead for roughly three minutes:
convoy ls --treeis right.st agentsis reporting a value it has no reason to believe is current.This surfaced while diagnosing a separate sidecar defect, but it is independent of that: even with a correctly-behaving writer, a crashed host or a killed session leaves a final
statusthatst agentswill keep echoing indefinitely.Why this matters
st agentsis the natural thing to reach for when asking "who is up right now" — it is the bus's own roster command. If the answer can be arbitrarily stale with no indication, then either:Right now convoy has implemented its own window and smalltalk has not, which is why the two disagree. That divergence will keep widening as more consumers appear.
Proposed direction
Options, roughly in increasing order of change:
st agentskeeps printing the raw value but annotates age, e.g.available (3m ago)or astalemarker past a threshold. No semantic change; makes the ambiguity visible.st agentsresolves tooffline/stalewhen the status mtime exceeds a threshold, so the roster means "currently live". Matches what convoy already does.(c) is what actually stops the divergence; (a) is a cheap immediate improvement that does not commit to a semantic.
What I would like consensus on
st agentsmean "identities with a live session" or "last known status, whenever that was"? Both are defensible; the roster framing implies the first.offline? An identity that wasbusyand went stale is not the same as one that cleanly wentoffline, and losing that distinction may matter for debugging.I am happy to implement whichever shape is preferred. The reason I am raising it as a question rather than opening a PR is that (b) changes what an existing command means, and that seems worth agreeing on first.