feat(archiver): explain empty archiver reads with coverage verdicts - #568
Merged
Conversation
An archiver_read that finds nothing now says why. The response carries a coverage block naming what the emptiness means -- the window precedes or follows the archive's real bounds, the channel was never recorded, or the window holds a genuine gap -- so the agent can tell an unarchived past from recorded silence instead of guessing at a bare zero. Verdicts are derived only from what the connector reports: bounds come from the store's actual oldest and newest samples, a backend that reports no bounds yields "unknown" rather than a guess, and a failed probe becomes a note on the verdict rather than the loss of whatever data did come back. Probes run only for channels that returned empty, so a fully answered query costs nothing and changes shape not at all. The archiver-world e2e now asserts the same claim at the tool surface: the bound shown for a pre-coverage window is the deployed store's true oldest sample, not a declared window.
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.
An
archiver_readthat finds nothing now says why.Previously an empty window produced a success response with
points: 0and noexplanation, leaving four different situations indistinguishable to the agent:
a window that predates the archive, a window after the newest sample (e.g. a
stopped recorder), a channel that was never recorded, and a genuine gap inside
coverage. The agent could only guess, or report a bare "no data found" that
leaves the operator stuck.
The response now carries a
summary.coverageblock whenever a requestedchannel has zero points, naming one of five verdicts per channel —
window_precedes_archive,window_follows_archive,never_recorded,gap_within_coverage,coverage_unknown— with the archive's real bounds anda plain-language message.
Design properties:
get_metadata; a backend that reports no bounds (EPICS, DOOCS) yieldscoverage_unknownrather than a guess. The explanation may be missing; it isnever invented.
recorded silence, not an error — nothing raises, and the data that did come
back is never lost to its own explanation (probe failures degrade to a note).
answered query changes shape not at all.
The archiver-world e2e's pre-coverage claim now extends to the tool surface:
the bound the agent is shown is the deployed store's true oldest sample, ±1 s.