Skip to content

videre-host: refresh the watch eviction deadline on a status-body encode failure #503

Description

@mfw78

Follow-up from review of #438. Confirmed still valid at the end of the M1 to M5 train. Code has since moved from nexum-runtime to videre-host (L2 nullislabs/videre-nexum-module), unchanged.

Problem

record_polled_status returns early on a status-body encode failure before it refreshes the watch entry's eviction deadline. At HEAD (videre-host/src/registry.rs): the encode-failure branch hits return None (around line 628) before the watched[pos].expires_at = ... refresh (around line 638). So a venue that is actively responding but whose status body chronically fails to encode never has its expires_at pushed out, and prune_expired eventually evicts it as if it went silent, even though it is live. The doc comment notes the entry is left untouched but does not spell out that the expiry clock keeps ticking down toward eviction.

Resolve one of

  • refresh expires_at regardless of encode outcome (a live-but-encode-failing venue should not be evicted for a host-side codec fault), or
  • document the eviction consequence explicitly in the doc comment, so "left untouched" is not read as benign.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions