Repository navigation
fix(converge): report the tick's push outcome instead of swallowing it (#2337) - #2464
Merged
Merged
Conversation
#2337) `convergeTick` ended with `await pushLifecycle().catch(() => undefined)` — the last genuine instance of the idiom #2310 was filed about, left out of #2336 deliberately because fixing it means extending the tick's result shape rather than editing a line. The append is local-first and always lands, so the tick's own result was correct either way. What was missing is whether anyone else can see it: a converge loop reporting a clean tick whose ledger never left the machine is telling an operator something untrue. `ConvergeTickResult` gains `pushed` and an optional `pushWarning`, reported the way #2336 does for the gate. The two reasons a push does not land are told apart, since they are not the same thing: `pushLifecycle` returns false when no remote is configured and throws when the remote rejects. Softer than the gate's version of this bug, and the doc comment says so — a lost tick record is an informational log rather than an approval, so nobody is stranded waiting on a fact they cannot see. It is still not success. The test drives a real tick with the push mocked three ways, and asserts the tick's own findings survive a failed push, so this does not trade one wrong answer for another. Verified red against the old code: three of its four cases fail with the swallow in place.
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.
Closes #2337.
The swallow
convergeTickended with:the last genuine instance of the idiom #2310 was filed about. It was left out of #2336 deliberately, because fixing it means extending the tick's result shape rather than editing a line.
The append is local-first and always lands, so the tick's own result was correct either way. What was missing is whether anyone else can see it — a converge loop reporting a clean tick whose ledger never left the machine is telling an operator something untrue.
The change
ConvergeTickResultgainspushedand an optionalpushWarning, reported the way #2336 does for the gate.The two reasons a push does not land are told apart, because they are not the same thing:
pushLifecyclereturns false when no remote is configured, and throws when the remote rejects. Collapsing them would lose the only information the warning carries.Proportion, kept in the comment
This is softer than the gate's version of the same bug, and the doc says so: a lost tick record is an informational log rather than an approval, so nobody is stranded waiting on a fact they cannot see. It is still not success.
Proof
Four tests driving a real
convergeTickwith the push mocked three ways — lands, rejects, no remote. The fourth asserts the tick's own findings survive a failed push, so this does not trade one wrong answer for another.Verified red against the old code rather than assumed: reverting to the swallow fails three of the four.
Gates
scripts/typecheck.ts: 31 known failures, no regressionspackages/core/src/op: 783 tests pass