runtime: ride out venue outages against a grace watch deadline#514
Merged
Conversation
A status watch refreshes its give-up deadline only when the venue is reachable: a status poll returned Ok, even if the body then failed to encode. A resolve failure or an errored poll now rides out against a grace window rather than burning the deadline, so a venue outage no longer silently evicts a pending intent's watch mid-recovery. grace = min(2 * expiry, 24h), overridable via [limits.watch] grace_secs. Closes #511 Closes #438
mfw78
force-pushed
the
fix/venue-watch-grace-eviction
branch
from
July 21, 2026 00:16
e0eac66 to
8056118
Compare
This was referenced Jul 21, 2026
videre-host: a venue outage past the watch-expiry window silently evicts pending intent watches
#511
Closed
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.
What
Refactor the venue status-watch eviction so a watch's give-up deadline refreshes only when the venue is reachable (a
status()poll returnedOk, even if the body then failed to encode). Aresolve()failure or an errored poll rides out against agracewindow instead of burning the deadline.grace = min(2 * expiry, 24h), overridable via[limits.watch] grace_secs.Closes #511. Also folds in the encode-failure refresh path flagged in review of #438 (the PR that added this watch machinery); no standalone issue was filed for that finding.
Stacked on #445 — its
Liveness/ resolve-failure machinery is what makes the resolve-fail path reachable, and the new test drives it viaLiveness::mark_dead().Why
Two paths bypassed the sole
expires_atrefresh, so a venue that stayed unreachable longer than the window silently lost a pending intent's watch:resolve()failure (adapter poisoned or mid-restart) skipsrecord_polled_status, and an errored poll (a CoW-API outage) never refreshed either. A pending order could fill while the host had stopped watching it, so the module never received theIntentStatusUpdate.return Noned before the refresh, penalising an alive venue for a host-side encoder bug. Defensive today, sincestatus_bodycannot produce an unencodable body, but load-bearing ifproof/reasonever carry venue data.The fix treats "the venue answered" as the single refresh condition, and makes eviction during an outage an explicit, bounded, configurable grace rather than a silent surprise.
resolve()-fail and errored-poll behave identically (both ride out), so no per-outcome pause or absolute-age machinery is needed.Testing
cargo test -p nexum-runtime— 71 host/config tests green.grace_derives_from_expiry_and_caps_at_a_day,a_dead_venue_rides_out_without_refreshing_the_deadline,an_errored_poll_rides_out_without_refreshing_the_deadline, plusgrace_secscoverage inwatch_limits_parse_with_overrides.cargo fmt --checkandcargo clippy --all-targets --all-features -- -D warningsclean on 1.94.AI Assistance
Design and implementation assisted by Claude.