fix(remote): say how many cycles have failed since the last success (#829) - #891
Draft
fujibee wants to merge 1 commit into
Draft
fix(remote): say how many cycles have failed since the last success (#829)#891fujibee wants to merge 1 commit into
fujibee wants to merge 1 commit into
Conversation
An engine that failed every cycle for six days kept the last success it ever had, and status printed it with nothing beside it -- so a machine that had not synced since the 13th reported 'last successful sync 2026-08-13' and read as working. The person who found it found it because two rosters disagreed. A success timestamp cannot say whether it is the present state, so the engine now records the failures too, counted since the last success. Refusals count: they do not advance the backoff counter, deliberately, but six days of nothing but refusals is six days of nothing synced. 'No cycle recorded' likewise splits: a young engine and one that has never completed a cycle said the same thing, and only the second is a fault.
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.
Declared reviewers: 1
Part of #829 — the first of the three it splits into, and the one that would
have shortened the other two.
Change class: user-visible output. One
statusline gains a clause. Nochange to what syncs or when.
What went wrong
A Windows machine had not synced once since connecting on 2026-08-13. Every
push was refused with HTTP 400 and retried about every 75 seconds, for six
days.
agmsg remote statussaid:The refusal line is there and shipped in v1.2.0 — I built the state and ran
statusagainst it rather than reading the source, and both lines print. Whatit does not say is that the timestamp above is not the present state. A
success from six days ago and a success from four seconds ago are the same
sentence. The person who found this found it because two rosters disagreed.
What it says now
The engine records failures the way it already records successes — same file,
same lifetime, same best-effort promise that bookkeeping never takes down
syncing. Counted since the last success, because "one failed a moment ago" and
"nothing has worked in six days" are the two states this line has to separate.
Refusals count. They deliberately do not advance
consecutiveFailures—that drives the backoff, and a refusal is not evidence the transport is
degrading — but six days of nothing but refusals is six days of nothing synced,
so a second counter answers the second question.
no successful cycle recordedsplits the same way: an engine started a secondago and one that has never completed a cycle said the same thing, and only the
second is a fault.
Measured
*
mainis one over its baseline today; that is #890, not this branch.lotsreaches the lineThe status cases assert both directions: a working engine must not grow a
clause about failures it has not had, and a count it cannot parse is absent
rather than printed.
Not here
Quarantining the row that cannot be sent, and any repair of values already
stored, are the other two thirds of #829 and are deliberately separate. This one
is first because it is the part that makes the next failure — whatever causes
it — visible to the person it is happening to.