Skip to content

fix(converge): report the tick's push outcome instead of swallowing it (#2337) - #2464

Merged
lex00 merged 1 commit into
mainfrom
fix/2337-converge-push-outcome
Sep 13, 2026
Merged

lex00 merged 1 commit into
mainfrom
fix/2337-converge-push-outcome

Conversation

@lex00

@lex00 lex00 commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Closes #2337.

The swallow

convergeTick ended with:

await pushLifecycle().catch(() => undefined);

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

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, because they are not the same thing: pushLifecycle returns 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 convergeTick with 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.

× a push that lands reports pushed, with no warning
× a REJECTED push is reported, not swallowed
× no remote configured is reported too, and says which it is

Gates

  • repo-wide scripts/typecheck.ts: 31 known failures, no regressions
  • eslint clean
  • packages/core/src/op: 783 tests pass

#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.
@lex00
lex00 merged commit d543df5 into main Sep 13, 2026
5 checks passed
@lex00
lex00 deleted the fix/2337-converge-push-outcome branch September 13, 2026 05:57
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.

converge tick ledger append swallows a rejected push, the last instance of the #2310 idiom

1 participant