Skip to content

fix(soak,prober): the grade no longer passes on a node silent for the whole window; the prober's shutdown summary carries the time it was written (#1469, #1463) - #1484

Merged
bpalermo merged 1 commit into
mainfrom
fix/1469-1463-prober-grade-silent-series-and-flush-time
Oct 9, 2026

Conversation

@bpalermo

@bpalermo bpalermo commented Oct 9, 2026

Copy link
Copy Markdown
Owner

Closes #1469
Closes #1463

Written by an agent (Claude Code).

What

#1469, e2e/soak/prober-grade.sh. The grade built its audit from the window query alone, and that query returns only the series that have a sample in the window. A series the query at T0 returned and the window query did not was in no line and no verdict:

  • a prober pod deleted right after T0 was missing from PODS at_start instead of being GONE;
  • an agent that exported nothing for the whole window left the unpinned gate at PASS on the remaining nodes, exit 0.

It could not be fixed by adding every such series: the query at T0 answers with a series' last sample, up to five minutes old, so a pod replaced a few minutes before the run looks the same.

The rule. The grade asks two more instant queries at T0, timestamp(<metric>), and goes by the age of the sample of each series that has none in the window:

Sample at T0 Meaning Prober pod Agent (unpinned gate)
at most 120 s old (two export intervals) alive at T0, silent for the window in PODS at_start, a GONE line UNPINNED silent: node=… job=…, gate UNPROVEN, exit 2, unless another series of the same node and job (a replacement pod) has samples in the window
older, or of unknown age it had stopped before T0 an ENDED line; no verdict UNPINNED ended: …; no verdict

One more check needs no sample at T0: a node whose prober has samples in the window while the unpinned counter has none from that node is UNPINNED missing: node=…, UNPROVEN. That is the agent that was already silent more than five minutes before the run, which the age rule alone cannot see.

Why this candidate and not "one series per node at the window's end, checked against the node list": the node list would have to come from the cluster, and the grade is run after the fact, sometimes against a cluster that has changed. This one is decided from Prometheus alone.

Its blind spots (also in the script header and the README):

  • an agent silent since more than 120 s before T0 is seen only through the prober on its node: not on a node with no prober, and not on a node where another job exports the same counter (the edge does);
  • an exporter alive at T0 whose last export was more than 120 s old (stalled) reads as ended before the window;
  • a pod that died in the 120 s before T0 reads as alive at T0: a GONE line for a prober (no verdict); for an agent it is silent only when nothing replaced it;
  • a node that reports for part of the window only is covered for that part; nothing here measures for how long.

Unchanged: the counts (TOTAL, PROBER … series=, UNPINNED … series=) are still of the series that have samples in the window; the exit contract (2 before 1); the LOGS verdict= line. UNPINNED verdict= gains a trailing parenthesis only when it is UNPROVEN. New option --job-label (default job).

#1463, prober/internal/prober. The shutdown path called flush(time.Now().Add(failLogWindow)) to force every open window closed, and the summary printed that future time. Now flushAll(now) closes every window whatever its age and flush(now) only those that have run their length: which windows to close and what time it is are separate arguments. A summary also carries window_start (when its window opened, the first failure in it), so the failures it counts lie in [window_start, t].

The grade uses window_start as the summary's span when the line has it, instead of the two-window guess. The two-minute allowance stays: the README says which part older probers need (the guess, and the future-dated shutdown summary) and which part every prober needs (asking the log store for two minutes past the window's end). Go only: no chart change, no chart bump.

Evidence

All offline, on canned Prometheus responses (//e2e/soak:harness_test) and Go tests.

Red then green, per fixture (testdata/prober-grade/<name>), red measured against the script as on main:

Fixture Before After
silent: an agent 30 s old at T0, nothing in the window UNPINNED verdict=PASS … nodes=4, exit 0 UNPINNED silent: node=worker-04 …, verdict=UNPROVEN, exit 2
silent + the counter moved elsewhere verdict=FAIL, exit 1 verdict=UNPROVEN … and the counter moved on those, exit 2
missing: no agent series at all for a node whose prober reports verdict=PASS … nodes=4, exit 0 UNPINNED missing: node=worker-04, UNPROVEN, exit 2
gone: a prober pod 20 s old at T0, deleted before its next export no GONE, PODS at_start=4 … gone=0 GONE pod=prober-e … last_sample=<before T0>, PODS at_start=5 … gone=1 new=1, exit 0
replaced: a prober pod and an agent 200 s old at T0, an agent 30 s old at T0 with a replacement, a node that left exit 0, and no line about any of them exit 0, ENDED pod=prober-old, UNPINNED ended: node=worker-06, no GONE, no silent

replaced passes before and after by exit status; what holds it is a mutation: with the age test off (FRESH_S=300) it is exit 2 (GONE pod=prober-old, UNPINNED silent: node=worker-06), 9 assertions fail. Other mutations of the fixed script, each failing the assertions named and each reverted: silent out of the verdict (5), missing out of the verdict (3), silent pods out of the pod set (2), the same-node-and-job check dropped (5), start-only series not read at all (7).

window_start in the grade: a summary closed 90 s after T0 whose window opened 10 s after T0 read boundary=1 … UNPROVEN, exit 2; now lines=39 suppressed=1 counters=40 match, exit 1 (the fixture's prober FAIL).

Prober: TestRun_ShutdownSummaryIsStampedWithTheFlushTime against the old call: summary t = …00:47:26.96Z, want … between …00:46:26.84Z and …00:46:26.96Z, 60 s late. Green after. TestFailLogFlushAll pins the two flushes apart. Mutations: flushAll ignoring its argument, the future time put back, window_start carrying the close time: each fails one or both.

Run: bazel test //e2e/soak:all //prober/... //charts/prober/... (36 pass); --config=race on //prober/internal/prober:prober_test (20 runs) and //prober/internal/cmd:cmd_test; bazel build --config=lint --@aspect_rules_lint//lint:fail_on_violation //e2e/soak:all //prober/...; make format-check; scripts/check-shell-lint.sh.

One measurement from a test cluster, read-only: time() - timestamp(…) for both metrics gave sample ages of 0 to 55 s over five nodes, which is where 120 s (two export intervals) comes from. On that cluster the agent's counter has no pod label (an agent restart is a counter reset on the same series) and a second job on two nodes exports the same counter; the fixtures have a pod label. The rule is per node and job so that it holds for both shapes.

Not verified

  • Nothing here was graded against a real soak. The next soak's grade should show: six QUERY lines (two of them …/start-time timestamp(…)); on a healthy run no GONE, ENDED, UNPINNED silent:, UNPINNED missing: or UNPINNED ended: line, and UNPINNED verdict=PASS … nodes=<every node>; an ENDED line only if a prober pod was replaced in the five minutes before T0.
  • timestamp() was run against one Prometheus only. A store that does not implement it fails the query, which is VERDICT UNPROVEN, exit 2, not a wrong grade.
  • No prober with this change has run on a cluster: the window_start field and the shutdown stamp are covered by the Go tests only. With --logs-file or --logs-url, summaries from a new prober should carry window_start.
  • For a prober from before this change, the shutdown summary can count failures up to three windows before its t, not two (it is dated a window late). The grade keeps the two-window span for it; it matters only for a prober stopped within three minutes after T0, or in the two minutes after the window's end. Left as it is, and written down in the script header.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr

…t for the whole window, and the prober's shutdown summary carries the time it was written (#1469, #1463)

prober-grade.sh built its audit from the window query alone, which returns
only series that have a sample in the window. A series the query at T0
returned and the window query did not was in no line and no verdict: a
prober pod deleted right after T0 was missing from PODS, and an agent that
exported nothing for the whole window left the unpinned gate at PASS on the
remaining nodes.

The grade now also asks timestamp(metric) at T0 and goes by the age of each
start-only series' sample: at most 120 s old, the exporter was alive at T0
(a prober pod is GONE; an agent whose node and job have no sample in the
window makes the gate UNPROVEN, exit 2); older, it had stopped before the
window (a pod replaced shortly before T0) and is an ENDED line, never a
verdict. A node whose prober reports in the window while the counter has no
series from it is UNPROVEN too.

The prober's shutdown path closed every open fail-log window by passing a
`now` one window in the future, and the summary printed that time. flushAll
closes every window at the real time; a summary also carries window_start,
and the grade uses that span instead of the two-window guess when the line
has it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
Copilot AI balanced review requested due to automatic review settings October 9, 2026 00:52

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The substantial Prometheus and jq grading changes are covered by fixtures but were not validated against a real soak.

0 open findings

What changed in this PR

Fixes soak grading blind spots and ensures shutdown summaries use their actual write time.

Changes:

  • Detects silent, missing, ended, and replaced metric series using sample timestamps.
  • Adds window_start to prober failure summaries.
  • Expands canned fixtures, harness coverage, and operational documentation.
File Description
prober/​internal/​prober/​faillog.go Adds accurate summary bounds and flush-all behavior.
prober/​internal/​prober/​prober.go Flushes shutdown summaries at the current time.
prober/​internal/​prober/​shutdown_test.go Tests shutdown timestamps and forced flushing.
e2e/​soak/​prober-grade.sh Grades silent and missing series and bounded summaries.
e2e/​soak/​harness_test.sh Covers new grading scenarios.
e2e/​soak/​README.md Documents grading rules and blind spots.
docs/​runbook.md Documents failure-summary timestamps.
e2e/​soak/​testdata/​prober-grade/​silent/​unpinned.window.json Models a silent agent.
e2e/​soak/​testdata/​prober-grade/​silent/​unpinned.start.json Supplies initial agent series.
e2e/​soak/​testdata/​prober-grade/​silent/​unpinned.start-time.json Supplies initial agent timestamps.
e2e/​soak/​testdata/​prober-grade/​silent/​probe.window.json Supplies active prober samples.
e2e/​soak/​testdata/​prober-grade/​silent/​probe.start.json Supplies initial prober series.
e2e/​soak/​testdata/​prober-grade/​silent/​probe.start-time.json Supplies initial prober timestamps.
e2e/​soak/​testdata/​prober-grade/​reset/​unpinned.start-time.json Adds reset-scenario timestamps.
e2e/​soak/​testdata/​prober-grade/​reset/​probe.start-time.json Adds prober reset timestamps.
e2e/​soak/​testdata/​prober-grade/​replaced/​unpinned.window.json Models replacement agent samples.
e2e/​soak/​testdata/​prober-grade/​replaced/​unpinned.start.json Models replaced agents at T0.
e2e/​soak/​testdata/​prober-grade/​replaced/​unpinned.start-time.json Distinguishes stale replaced agents.
e2e/​soak/​testdata/​prober-grade/​replaced/​probe.window.json Models replacement prober samples.
e2e/​soak/​testdata/​prober-grade/​replaced/​probe.start.json Models an old prober at T0.
e2e/​soak/​testdata/​prober-grade/​replaced/​probe.start-time.json Supplies old-prober timestamps.
e2e/​soak/​testdata/​prober-grade/​missing/​unpinned.window.json Models a missing agent node.
e2e/​soak/​testdata/​prober-grade/​missing/​unpinned.start.json Supplies remaining agent series.
e2e/​soak/​testdata/​prober-grade/​missing/​unpinned.start-time.json Supplies remaining agent timestamps.
e2e/​soak/​testdata/​prober-grade/​missing/​probe.window.json Proves the missing node had a prober.
e2e/​soak/​testdata/​prober-grade/​missing/​probe.start.json Supplies initial prober series.
e2e/​soak/​testdata/​prober-grade/​missing/​probe.start-time.json Supplies initial prober timestamps.
e2e/​soak/​testdata/​prober-grade/​gone/​unpinned.window.json Supplies healthy agent samples.
e2e/​soak/​testdata/​prober-grade/​gone/​unpinned.start.json Supplies initial agent series.
e2e/​soak/​testdata/​prober-grade/​gone/​unpinned.start-time.json Supplies initial agent timestamps.
e2e/​soak/​testdata/​prober-grade/​gone/​probe.window.json Models a replacement prober.
e2e/​soak/​testdata/​prober-grade/​gone/​probe.start.json Models the deleted prober at T0.
e2e/​soak/​testdata/​prober-grade/​gone/​probe.start-time.json Marks the deleted prober as fresh.
e2e/​soak/​testdata/​prober-grade/​empty/​unpinned.start-time.json Covers absent agent timestamps.
e2e/​soak/​testdata/​prober-grade/​empty/​probe.start-time.json Covers absent prober timestamps.
e2e/​soak/​testdata/​prober-grade/​clean/​unpinned.start-time.json Adds clean agent timestamps.
e2e/​soak/​testdata/​prober-grade/​clean/​probe.start-time.json Adds clean prober timestamps.
e2e/​soak/​testdata/​prober-grade/​born/​unpinned.start-time.json Adds born-scenario agent timestamps.
e2e/​soak/​testdata/​prober-grade/​born/​probe.start-time.json Adds born-scenario prober timestamps.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants