fix(core): do not kill the process on a membership-watch delete timeout - #1066
Conversation
CONSUMER.DELETE during disarm is cleanup. A timeout on a live observer means the broker did not answer in time, not that the endpoint is unusable. Catch it, emit an error, and continue.
davidfarah2003
left a comment
There was a problem hiding this comment.
LANDING-QUEUE REVIEW: APPROVE-quality
- Diff matches body: adds a trailing
.catch()on the membership-watch reset loop and changesdisarmMembershipWatch(endpoint.ts ~2307-2320) to emit rather than throw on a timeout/closed-epoch during teardown, while still throwing for genuine non-timeout failures. - Evidence is real:
disarm-delete-timeout.smoke.tsbinds the actualdisarmMembershipWatchoff a liveCotalEndpoint(5/5 cells matches the body's claim); mutation-proof A1/A2 target the exact new branch with namedexpectRedcells that line up with the smoke assertions. bin/smoke/ci-suites.txtcorrectly left untouched per the body's stated reason; confirmed byte-identical to main's tail on this branch.- Interaction: test-merged this branch against current
origin/main(which now carries the just-merged d2c0fd3/#1030 touching the same stop()-teardown block for presence/channel watch iterators) — auto-merges clean, no conflict, but the branch is 2 commits behind so a rebase before landing is still worth doing. - Body's disclosed evidence gaps (no real TCP/VPN CONSUMER.DELETE stall,
smoke:delivery-reconnect:authnot re-run after retarget, mutation-proof run with--allow-dirty) are honestly named, not hidden.
|
BLOCK at exact head The behavior repair itself is supported:
Blocking finding: Re-anchor that mutation on a unique code-only window and rerun both I rechecked |
|
Delta review at exact head Verdict: APPROVE (delta only)The claimed delta is true:
That one find-string dropped the comment-spanning window. The replacement is: No Mutation still KILLS
Fixture sweep
Behavioural half of the original BLOCK, re-checked at the new head
Not proven / not in scope
No other delta-review comment named |
Closes #1047.
A live observer over a slow VPN died in
disarmMembershipWatchwhen JS-APICONSUMER.DELETEtimed out. That delete is cleanup. The broker reaps the consumer anyway. The timeout is not evidence the endpoint is unusable.What changed
error, and the disarm continues.Proof
TimeoutErrorfromconsumer.deleteon a simulated live open connection (the old policy swallowed timeout only when!ncor reconnecting; the crash had a livenc).SHA:
d4779dbe579b2849a276d36b645155a22b589e78What this does NOT prove
CONSUMER.DELETEover a TCP proxy or VPN. The fault is injected atconsumer.delete(), which is the same rejection the NATS client raises. A livecotal webcrash on the production mesh was not reproduced here.smoke:delivery-reconnect:authafter retargeting its closed-epoch mutation find-string. That suite needs a broker and a core build.ci-suites.txtis frozen until feat(cli)!: detach and persist meshes on up #880. This smoke is not appended.--allow-dirtybecause this worktree has local node_modules copies.