Skip to content

feat(status): report how long the candidate has been healthy - #62

Merged
jvmakine merged 1 commit into
mainfrom
juho/status-healthy-for
Oct 23, 2026
Merged

jvmakine merged 1 commit into
mainfrom
juho/status-healthy-for

Conversation

@jvmakine

Copy link
Copy Markdown
Collaborator

spectre status only says whether the candidate is healthy, not for how long. A mirror that restarted a minute ago looks the same as one that has run clean for a week, which makes it hard to judge how much evidence a healthy result represents.

Quarantine lasts for the life of the mirror process, so a healthy candidate has been healthy since the mirror started. The status endpoint now reports healthy_for_seconds, measured inside the mirror so the result does not depend on the clock of the machine running the CLI. It is null while quarantined. The CLI prints it as healthy for 3h12m5s, and falls back to plain healthy for mirrors that do not report it yet.

🤖 Generated with Claude Code

Knowing a candidate is healthy says little without knowing for how long: a
mirror that restarted a minute ago looks the same as one that has run clean
for a week. The mirror measures the duration itself so the answer does not
depend on the clock of the machine running the CLI.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@jvmakine
jvmakine requested a review from alecthomas as a code owner October 23, 2026 05:21
@jvmakine
jvmakine merged commit 0361c84 into main Oct 23, 2026
6 checks passed
@jvmakine
jvmakine deleted the juho/status-healthy-for branch October 23, 2026 05:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant