Skip to content

fix(soak): the UNPINNED gate grades each reason for what it is, and fails a no-TLS state only when it stood (#1491) - #1494

Merged
bpalermo merged 8 commits into
mainfrom
fix/1491-unpinned-gate-per-reason
Oct 9, 2026
Merged

bpalermo merged 8 commits into
mainfrom
fix/1491-unpinned-gate-per-reason

Conversation

@bpalermo

@bpalermo bpalermo commented Oct 9, 2026 •

Copy link
Copy Markdown
Owner

Closes #1491

Builds on #1490 (merged), which added the fourth reason, tls_not_published. The change is e2e/soak/** and one paragraph of docs/runbook.md.

What was wrong

e2e/soak/prober-grade.sh failed its UNPINNED gate when aether_agent_identity_cluster_unpinned_total moved for any reason, and its text said a TLS cluster was published without its server-identity pin. Since #1479 and #1490 the counter is split by reason, and under two of the four (trust_domain_unknown, tls_not_published) the agent publishes no TLS at all. Every agent start is in that state for a moment, and the soak rolls the agents on purpose (T0+72 and the TRIPLE at T0+300). So a soak with no validation gap could fail this gate, with a text that was untrue.

The verdict, per reason

reason (the line's class=) What the agent did The gate
no_namespace_metadata, pin_not_rendered (gap) published TLS that checks no server identity FAIL, exit 1, on any movement of the counter and on any non-zero sample of the published gauge. The text names reason, count and nodes.
trust_domain_unknown, tls_not_published (no_tls) published no TLS for those entries reported with reason, count and nodes; not a failure by itself. FAIL only when the state stood for 300 s or more (below). A standing tls_not_published that the operator declared expected (--expect-tls-not-published) is reported and does not fail.
any other value (unknown) an agent newer than the script FAIL on any movement of the counter and on any non-zero sample of the gauge; the text says the script does not know the reason and names the two lists to add it to.
no reason label (unlabelled) an agent from before #1424 FAIL on any movement, with the text the gate always had, plus the count and the nodes. Its one series holds every reason, so the old rule is the only safe one.

UNPROVEN (exit 2) still comes before FAIL (exit 1), in the verdict and in the exit status.

"Persisted too long": decided from what Prometheus can show

The counter cannot make this call. It adds the number of unpinned entries on every snapshot, so its size is entries times snapshots: ninety entries on two snapshots is 180, and so are two entries on ninety. Nothing in it is a duration, so a threshold on the count would be a guess about the size of the mesh.

The agent's gauge aether_agent_snapshot_tls_clusters{pin="unpinned",reason} (#1425) is the state itself, exported every minute with zeros included. Consecutive non-zero samples are a state that stood, from the first sample to the last. The gate reads the gauge's raw samples (one more instant query, seven in all) and fails a no_tls reason when a run spans 300 s or more, anywhere in the window. That covers the case the issue asks about (it never recovered: the run reaches the window's end) and also a state that stood for an hour in the middle and then cleared.

  • 300 s is the for: 5m of AetherMeshClusterPinPending in docs/observability/agent-pin-alerts.yml, for the reasons given there: an agent without its SVID after 2 minutes reports NotReady, plus two export intervals, plus one for jitter.
  • A run is a lower bound. A state shorter than one export interval may be in no sample, which is why the counter stays the measure of whether it happened and the gauge only of how long.
  • A run is not carried across more than 300 s without a sample (Prometheus's own lookback).
  • A state still non-zero at the window's end for less than 300 s is an agent start the window cut. It is said on its line and not graded.
  • The gap reasons use the gauge too: a gap that stands through a window in which no snapshot is set does not move the counter, and the gauge shows it.
  • A run is the node's, not the pod's. Runs are computed per node, job and reason over every series of them, as the alert rule's sum by (job, node, reason) is. Where the collector keeps a per-pod label, a state that passes from an agent to its replacement is one run (series=2 on the line). A zero ends a run unless another series of the group has non-zero samples on both sides of it (two agents side by side in a surge roll).
  • The state at the window's start is asked for. Since Prometheus 3.0 a range selector is left-open, so gauge[28800s] at the window's end does not return a sample exactly at T0 (before 3.0 it did), and no version returns one from before it. A state already standing at T0 was read one sample short, and 300 s passed as 240. The query now reaches 120 s (two export intervals) and one second before the window ([28921s]; the second so that a sample exactly 120 s old is returned by a left-open range too); the last sample at or before T0 that is at most 120 s old is counted as the sample at T0 and anything older is dropped. A run starts at T0 at the earliest, on either version.

tls_not_published can be the cluster's design: --expect-tls-not-published

A mesh run without SPIRE never leaves that state, and a healthy agent keeps a TCP floor entry in it for as long as the floor is not published. The default stays strict: a standing tls_not_published fails. With --expect-tls-not-published the operator declares it expected on this cluster. The output then starts with an EXPECT line, and a tls_not_published state that stood is UNPINNED expected: node=… job=… reason=tls_not_published seconds=N published=N count=N, named in the verdict's text as expected by declaration, and not a failure. trust_domain_unknown is timed whatever the switch, and the gap reasons fail as before.

What the switch gives up: the metric does not tell an unpublished floor from an agent that cannot get its SVID (both are tls_not_published). With the switch, an agent stuck without its identity is not failed by this gate; it reports NotReady after two minutes. Splitting the reason would remove that, and is an agent change that is not made here.

An absent gauge is not a zero. The gauge arrived in the same agent as the reason label. An exporter whose counter has the label and whose gauge has no sample in the window is UNPINNED published: absent: node=… job=… [pod=…] and the gate is UNPROVEN, as #1484 treats a node whose counter was not seen. An exporter is every label of its counter series but reason, and a gauge series is its own when the two agree on every label both carry (each exporter on its own labels: a job without a per-pod label does not change the key of one that has it). With a per-pod label, then, a replaced agent that exports its seeded counter and never sets a snapshot is not covered by the gauge of the pod before it. Where restarts fall into one series, the gauge must have a sample since the counter was born or last reset (… no sample from it since its counter started again at <time>). A counter that rests at zero across a restart shows no reset, so that one case is not caught. Agents with no reason label have no gauge to miss: UNPINNED published: not graded: nodes=…, a statement and not a verdict.

Output: added, nothing renamed

  • UNPINNED reason=… count=N nodes=… gains a trailing class=gap|no_tls|unknown|unlabelled.
  • New UNPINNED steps: node=… job=… reason=… at=<time>(+N),…: the first six samples that showed an increase, to hold against the agent rolls in churn.log.
  • New UNPINNED published: node=… job=… reason=… class=… nonzero_samples=N longest=Ns max=N at_end=N series=N, and its two coverage forms absent: and not graded:.
  • New QUERY unpinned/published … line.
  • Only with --expect-tls-not-published: an EXPECT line, and UNPINNED expected: … for a state that stood.
  • The UNPINNED verdict=… increase=… series=… nodes=… resets=… fields are unchanged; only the text in parentheses differs by case.

e2e/soak/README.md ("Grading") has the table and the reasoning, the runbook's unpinned-signal section has a paragraph on the soak gate, and the script header describes the lines and the verdict.

Evidence

Fixtures are canned Prometheus responses. The eight existing scenarios each gained the gauge's response; the new cases are clean with one thing changed, built in the test. A fixture holds the samples the store has, and the harness's fake answers a range query from them as a server does (left-open; closed at both ends with FAKE_PROM_CLOSED_LEFT=1), so a fixture cannot hand over a sample that no server returns. grade-never used to: it has a sample exactly at T0.

Red, then green: the harness's grade section run against the script as it was on this branch's base, then against the new one.

Case Unchanged script This change
gap on the counter (two reasons), beside an agent start FAIL with the old text: no reason, count or node; 180 of the 187 were not a gap FAIL, exit 1, names both reasons with counts and nodes
gap in the gauge only, counter flat PASS, exit 0 FAIL, exit 1
two agent starts, nothing else FAIL, exit 1 PASS, exit 0, both reasons reported
the same, non-zero in the last gauge sample FAIL, exit 1 PASS, and the line says the window ends on it
no TLS for 300 s (six samples) FAIL as "published without its pin" FAIL with the no-TLS text
240 s (five samples) FAIL PASS, longest=240s
two 240 s runs around a 10-minute gap FAIL PASS, two runs
never recovered, counter flat PASS, exit 0 FAIL, longest=28800s at_end=2
unknown reason, moved / at rest FAIL with the old text / PASS FAIL saying the script does not know it / PASS
unknown reason in the gauge only PASS, exit 0 FAIL, exit 1
no reason label, moved FAIL with the old text (this rule is kept) the same text, then the count and the node
reason label, no gauge PASS, exit 0 UNPROVEN, exit 2
the same and a gap moved FAIL, exit 1 UNPROVEN, exit 2
reset (existing): an agent rolled in the window, 2 under trust_domain_unknown FAIL PASS, reported

46 of the section's assertions fail against the unchanged script; all 148 pass against the new one.

The review round (four findings; the grade section run against the script as it was before that commit, then after):

Case Before the review commit Now
no TLS at T0-60, T0, … T0+300 (300 s in the window), served left-open PASS, exit 0, nonzero_samples=5 longest=240s FAIL, exit 1, nonzero_samples=6 longest=300s
the same, served closed at both ends (before 3.0) not run against the old script FAIL, exit 1, the same line
samples at T0-30, T0+30 … T0+270 longest=240s PASS, longest=270s (from T0, not from the sample before it)
a state that was over before T0 (guard) PASS, no published: line
grade-never, served left-open FAIL with nonzero_samples=480 longest=28740s FAIL with 481 and 28800 s
the old pod holds no TLS for 120 s, its replacement for 120 s more, one minute apart PASS, exit 0, longest=120s FAIL, exit 1, longest=300s series=2
the same with a zero first sample from the new pod (guard) PASS PASS, two runs of 120 s
a pod at zero beside one that holds the state for 300 s (guard) FAIL FAIL, 300 s
a replaced agent with a counter and no gauge; the old pod's gauge is in the range PASS, exit 0 UNPROVEN, exit 2, names the new pod
no per-pod label, the counter reset, no gauge sample since PASS, exit 0 UNPROVEN, exit 2, since its counter started again at …
the same with gauge samples after the reset (guard) PASS PASS
--expect-tls-not-published, tls_not_published standing for the whole window exit 2, unknown argument PASS, exit 0, EXPECT and UNPINNED expected: … seconds=28800 published=2 count=12
the same samples without the switch FAIL FAIL, and no line speaks of a declaration
the switch, and trust_domain_unknown standing 300 s exit 2 FAIL, exit 1
the switch, and a gap beside the declared state exit 2 FAIL, exit 1, about the gap

37 of the section's assertions fail against the script as it was before the review commit (eight of them only for the new series= field, the wider range in the QUERY line and the pod in the absent: line); all 186 pass now. A second round found that one exporter without a per-pod label took pod out of every exporter's key; its fixture (a node with no pod label beside a replaced pod whose predecessor ran on for two minutes) was PASS, exit 0 before that fix and is UNPROVEN, exit 2 now. A third round found that a sample exactly 120 s before T0 was not returned by the left-open range of the window plus 120 s; its fixture (samples at T0-120 and T0+60 … T0+300) was PASS with longest=240s before that fix and is FAIL with 300 s now. 193 assertions pass.

Against a real server. The pinned Prometheus (3.15.0, the archive //bazel/promtool comes from) was started on a developer machine with the fixture's samples loaded by promtool tsdb create-blocks-from openmetrics, and both scripts were run against its HTTP API with the real curl. For samples at T0-60, T0, T0+60 … T0+300, [28800s] at the window's end returned the five from T0+60 and [28920s] all seven; the unchanged script read longest=240s, PASS, and the new one longest=300s, FAIL. For grade-never the unchanged script read 480 samples and 28740 s, the new one 481 and 28800 s, and exit 0 with the switch. That is what the fake returns for the same samples.

Mutation checks, each applied to a copy of the script outside the tree and each caught by at least two assertions: a gap reason on the counter does not fail; an unknown reason does not fail; an unlabelled series does not fail; a gap in the gauge alone does not fail; a standing no-TLS state does not fail; the no-TLS reasons are not known as such; the bound is 240 s; the bound is 360 s; a run spans any gap in the samples; an absent gauge is not UNPROVEN; an unknown reason is classed no_tls; a gauge is demanded of unlabelled agents; a gap reason is classed no_tls; a gauge-only failure is for gap reasons only. For the review round, each caught by at least one assertion: the range is the window only; the state at T0 is not used; a run starts at the sample before T0; runs are per series; a zero from a pod beside ends a run; coverage is by node and job; the gauge is not required since the counter's restart; the switch is ignored; the switch is always on; the switch covers trust_domain_unknown too; a declared state fails anyway. The first one of the earlier list survived my first fixture (its gauge was non-zero too, so the gauge rule covered for the counter rule); the gap fixture is now counter-only, with the gauge variant as its own step.

  • bazel test //e2e/soak:all: passes (harness_test, 59 s).
  • bazel build --config=lint --@aspect_rules_lint//lint:fail_on_violation //e2e/...: clean.
  • make format-check, scripts/check-shell-lint.sh: clean.

Not verified

  • Not graded against a real soak. No soak was run, and I have not seen a Prometheus that holds an agent's reason label or its gauge: the real server above held the fixtures' samples. The gauge's stored name and its pin and reason labels are taken from the agent's code and from the alert rules of fix(agent,observability): the NACK counters are seeded, a cluster with no TLS published is not reported as the validation gap, and alert rules ship for the SAN-pin state (#1480, #1482, #1481) #1490, not read back.
  • A Prometheus before 3.0 was not run. That its range was closed at both ends is from its documentation; the fake's closed mode gives the same grade.
  • Which labels a real collector puts on the two metrics. A gauge series is matched to a counter on the labels both carry, so a label that only one of them has does not split them, but I have not seen the two side by side on a real store.
  • What the next soak should print, if the agents carry the label and the gauge: UNPINNED reason=trust_domain_unknown|tls_not_published … class=no_tls for each node whose agent was rolled, UNPINNED steps: times within a minute or two after the two agent rolls, no UNPINNED published: line or ones with longest under 300 s, and UNPINNED verdict=PASS. Against agents with no reason label it prints what it printed before: reason=- … class=unlabelled and verdict=FAIL on any movement.
  • Whether an edge control plane always sets a snapshot when it starts. The counter is seeded at process start and the gauge is first written with the first snapshot; a process that never set one would read published: absent and make the gate UNPROVEN. The README says so.
  • The comparison of UNPINNED steps: with the agent rolls in churn.log is left to the reader; the script prints the times and does not make it.
  • --expect-tls-not-published was not used on a cluster that needs it.

An agent wrote this pull request.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr

Copilot AI balanced review requested due to automatic review settings October 9, 2026 02:14

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.

🟡 Changes recommended

Unknown-reason gauge behavior contradicts the documented verdict contract and lacks matching coverage.

1 open finding
What changed in this PR

Updates the soak grader to distinguish TLS validation gaps from expected no-TLS startup states, while incorporating the stacked SAN-pin telemetry changes.

Changes:

  • Grades unpinned metrics by reason and duration.
  • Adds tls_not_published, seeded xDS counters, and alert rules.
  • Expands fixtures, tests, and operational documentation.
File Description
e2e/​soak/​prober-grade.sh Implements reason-aware grading and gauge-duration checks.
e2e/​soak/​README.md Documents the revised grading contract.
docs/​runbook.md Expands SAN-pin operational guidance.
docs/​observability/​README.md Documents SAN-pin metrics and alerts.
docs/​observability/​agent-pin-alerts.yml Adds SAN-pin alert rules.
docs/​observability/​agent-pin-alerts_test.yml Adds promtool rule tests.
agent/​internal/​xds/​cache/​cache.go Documents the new unpinned cause.
agent/​internal/​xds/​cache/​mtls.go Classifies entries where TLS is not publishable.
agent/​internal/​xds/​cache/​pinreport.go Reconciles reported causes with published clusters.
agent/​internal/​xds/​cache/​snapshot.go Applies cause reconciliation during snapshot generation.
agent/​internal/​xds/​cache/​cachemetrics/​cachemetrics.go Adds the cause and count-moving helpers.
agent/​internal/​xds/​cache/​cachemetrics/​cachemetrics_test.go Tests cause counts and metrics.
agent/​internal/​xds/​cache/​pinreport_test.go Updates per-cause expectations.
agent/​internal/​xds/​cache/​tlsnotpublished_test.go Tests no-TLS classification and NACK seeding coverage.
agent/​internal/​xds/​cache/​BUILD.bazel Registers the new cache tests.
agent/​internal/​xds/​ack/​metrics.go Seeds bounded NACK and ACK-wait counter series.
agent/​internal/​xds/​ack/​tracker.go Uses closed failure-reason constants.
agent/​internal/​xds/​ack/​seed_test.go Tests seeded counter series.
agent/​internal/​xds/​ack/​BUILD.bazel Registers ACK seeding tests.
e2e/​soak/​testdata/​prober-grade/​silent/​unpinned.window.json Adds the fourth counter reason.
e2e/​soak/​testdata/​prober-grade/​silent/​unpinned.start.json Adds startup counter series.
e2e/​soak/​testdata/​prober-grade/​silent/​unpinned.start-time.json Adds startup timestamps.
e2e/​soak/​testdata/​prober-grade/​silent/​published.window.json Adds published-gauge samples.
e2e/​soak/​testdata/​prober-grade/​reset/​unpinned.window.json Adds reset coverage for the new reason.
e2e/​soak/​testdata/​prober-grade/​reset/​published.window.json Adds reset gauge samples.
e2e/​soak/​testdata/​prober-grade/​replaced/​unpinned.window.json Adds replacement counter series.
e2e/​soak/​testdata/​prober-grade/​replaced/​unpinned.start.json Updates replacement startup data.
e2e/​soak/​testdata/​prober-grade/​replaced/​unpinned.start-time.json Updates replacement timestamps.
e2e/​soak/​testdata/​prober-grade/​replaced/​published.window.json Adds replacement gauge samples.
e2e/​soak/​testdata/​prober-grade/​missing/​unpinned.window.json Adds missing-node counter series.
e2e/​soak/​testdata/​prober-grade/​missing/​unpinned.start.json Updates missing-node startup data.
e2e/​soak/​testdata/​prober-grade/​missing/​unpinned.start-time.json Updates missing-node timestamps.
e2e/​soak/​testdata/​prober-grade/​missing/​published.window.json Adds missing-node gauge samples.
e2e/​soak/​testdata/​prober-grade/​gone/​unpinned.window.json Adds gone-node counter series.
e2e/​soak/​testdata/​prober-grade/​gone/​unpinned.start.json Updates gone-node startup data.
e2e/​soak/​testdata/​prober-grade/​gone/​unpinned.start-time.json Updates gone-node timestamps.
e2e/​soak/​testdata/​prober-grade/​gone/​published.window.json Adds gone-node gauge samples.
e2e/​soak/​testdata/​prober-grade/​empty/​published.window.json Adds an empty gauge response.
e2e/​soak/​testdata/​prober-grade/​clean/​unpinned.window.json Adds clean counter series.
e2e/​soak/​testdata/​prober-grade/​clean/​unpinned.start.json Updates clean startup data.
e2e/​soak/​testdata/​prober-grade/​clean/​unpinned.start-time.json Updates clean timestamps.
e2e/​soak/​testdata/​prober-grade/​clean/​published.window.json Adds clean gauge samples.
e2e/​soak/​testdata/​prober-grade/​born/​published.window.json Adds an empty legacy-agent gauge response.

🧠 Review effort: Balanced


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

Comment thread e2e/soak/prober-grade.sh Resolved
Copilot AI balanced review requested due to automatic review settings October 9, 2026 02:23

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 stacked change alters security-state classification, xDS metrics, alerts, and soak verdicts without validation against a real soak.

0 open findings

1 resolved since last review

🧠 Review effort: Balanced

bpalermo and others added 2 commits October 9, 2026 07:39
prober-grade.sh failed its UNPINNED gate on any movement of
aether_agent_identity_cluster_unpinned_total, with a text saying a TLS
cluster was published without its server-identity pin. Two of the four
reasons (trust_domain_unknown, tls_not_published) are states in which the
agent publishes no TLS at all: every agent start, and a soak rolls the
agents twice.

The verdict is now per reason:
- no_namespace_metadata, pin_not_rendered: FAIL on any movement of the
  counter or any non-zero sample of the published gauge; the text names
  reason, count and nodes.
- trust_domain_unknown, tls_not_published: reported, not a failure by
  itself. FAIL only when the gauge aether_agent_snapshot_tls_clusters
  shows the state for 300 s or more of consecutive samples.
- a reason the script does not know: FAIL, and the text says so.
- a series with no reason label (an agent before #1424): any movement
  fails, with the old text.
An agent that has the reason label and no gauge sample in the window is
UNPROVEN: an absent gauge is not a zero.

One more query (the gauge over the window). New lines: UNPINNED steps:,
UNPINNED published:; the UNPINNED reason= line gains class=.

Closes #1491

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
…hat is said and tested

Review: the gate already failed on a non-zero gauge sample of a reason it
does not know, while the header and the README said "on any movement".
The rule is kept (fail closed) and is now written down and has a fixture.

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 10:39
@bpalermo
bpalermo force-pushed the fix/1491-unpinned-gate-per-reason branch from e588549 to 17f1261 Compare October 9, 2026 10:39

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.

🟡 Changes recommended

Gauge duration calculation misses window-boundary samples and continuous state spanning replacement series.

2 open findings

🧠 Review effort: Balanced

Comment thread e2e/soak/prober-grade.sh Resolved
Comment thread e2e/soak/prober-grade.sh Resolved
Copilot AI balanced review requested due to automatic review settings October 9, 2026 11:12

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.

🟡 Changes recommended

Gauge coverage can be incorrectly satisfied by a replaced agent’s predecessor, producing a false PASS.

3 open findings

🧠 Review effort: Balanced

Comment thread e2e/soak/prober-grade.sh Resolved
Copilot AI balanced review requested due to automatic review settings October 9, 2026 11:30

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.

🟡 Changes recommended

Persistent tls_not_published states can be intentional, causing supported soak configurations to fail unconditionally.

4 open findings

🧠 Review effort: Balanced

Comment thread e2e/soak/prober-grade.sh Resolved
… per node over every pod, covers each exporter by its own gauge, and takes a declared tls_not_published (#1491)

Review of #1494, four findings on e2e/soak/prober-grade.sh.

The state at the window's start. A range selector is left-open since
Prometheus 3.0, so `gauge[<window>s]` at the window's end does not return a
sample exactly at T0, and no version returns one from before it: a no-TLS
state already standing at T0 was read one sample short, and 300 s passed as
240. The range now reaches FRESH_S (120 s) before the window, and the last
sample at or before T0 is the sample at T0. Checked against the pinned
Prometheus 3.15.0 with samples loaded by promtool.

Runs per node, job and reason, over every series of them, as the alert rule's
`sum by` is: a state that outlives the pod that first showed it is one run.

Gauge coverage per exporter (the labels the counter and the gauge share, less
reason and pin): a replaced agent that exports its seeded counter and never
sets a snapshot is not covered by the gauge of the pod before it. Without a
per-pod label, the gauge must have a sample since the counter's last restart.

--expect-tls-not-published: off by default, a standing tls_not_published
fails as before. With it the operator declares the state expected on this
cluster (no SPIRE, or unpublished TCP floors); it is reported with its
seconds, entries and count, and does not fail. trust_domain_unknown is timed
whatever the switch.

The fake Prometheus of the harness now answers a range query as a server
does (left-open; closed with FAKE_PROM_CLOSED_LEFT=1) from the samples a
fixture holds, so a fixture cannot hand over a sample no server returns.

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 12:07

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.

🟡 Changes recommended

Global label-key intersection can let a predecessor’s gauge incorrectly cover a replacement exporter.

1 open finding
4 resolved since last review

🧠 Review effort: Balanced

Comment thread e2e/soak/prober-grade.sh Resolved
…porter's own labels (#1491)

Review of #1494, second round. The exporter key was the labels common to
every counter and gauge series of the answer, so one job without a per-pod
label took `pod` out of the key of every other, and an old pod's gauge
sample after its replacement's counter was born covered a replacement that
never published a gauge: PASS where the gate documents UNPROVEN.

An exporter is now every label of its counter series but `reason`, and a
gauge series is its own when the two agree on every label both carry.

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 12:15

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 left-open gauge query mishandles a sample exactly 120 seconds before T0, potentially allowing a 300-second state to pass.

0 open findings

1 resolved since last review
Previously missed (1)

In code that hasn't changed since last review

Medium severity Include exact-boundary pre-window sample at FRESH_S

e2e/​soak/​prober-grade.sh:520

The widened range still drops a sample exactly FRESH_S (120 s) before T0 on Prometheus 3+, because the selector is left-open. Elsewhere FRESH_S treats only samples older than 120 s as ended, so an active state whose last pre-window sample is exactly T0−120 can be reconstructed starting at T0+60; six in-window samples through T0+300 are then measured as 240 s and incorrectly pass the 300 s gate. Query slightly farther back and explicitly clamp the chosen pre-window sample to >= T0-FRESH_S, or use an instant gauge query at T0; add the exact-boundary fixture.

🧠 Review effort: Balanced

…s still the state at the start (#1491)

Review of #1494, third round. The gauge's range reached exactly FRESH_S
(120 s) before the window, and a left-open range (Prometheus 3.0 and later)
does not return a sample exactly at its start: a state whose last sample
before T0 was exactly 120 s old was read from its first sample inside the
window. The range reaches one second further, and the sample taken for the
state at T0 is the last one at or before T0 that is at most FRESH_S old.

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 12:23
@bpalermo

bpalermo commented Oct 9, 2026

Copy link
Copy Markdown
Owner Author

On the finding in the last review summary (a sample exactly FRESH_S before T0): right, and fixed in 6518400. The range reaches one second further ([28921s]) and the sample taken for the state at T0 is the last one at or before T0 that is at most 120 s old. The exact-boundary fixture (samples at T0-120 and T0+60 … T0+300) was PASS with longest=240s on the previous commit and is FAIL with 300 s now; a sample 121 s old is not taken, even from a server that returns it.

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 intricate time-series and exporter-handover logic has not yet been validated against a real soak and collector label set.

0 open findings

🧠 Review effort: Balanced

@bpalermo
bpalermo merged commit 085f280 into main Oct 9, 2026
30 checks passed
@bpalermo
bpalermo deleted the fix/1491-unpinned-gate-per-reason branch October 9, 2026 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

soak: the UNPINNED gate fails on reasons under which no TLS is published

2 participants