Repository navigation
test: the e2e suite asserts the goroutine series, not just the count (ADR 0080) - #118
Merged
Merged
Conversation
…(ADR 0080)
The inventory e2e confirmed a `pprof_profile` for its Go sample but asserted
nothing about `goroutine_counts`, though the sample serves the very index page
the reading comes from.
Two samples is the assertion that matters. One reading proves the parser; only a
second proves the thing the kind exists for, since no single count is a finding.
It also proves the reading repeats, which is the part of the promise in
security.md §10.3 that a single fetch cannot show. Beside it: the window's
kind/source/length, the pod name — the one place this funnel names a process —
the image digest, and the coverage block reporting the readings that produced the
series with no unreadable answers.
Verified in kind: two windows, 5 then 8 goroutines, `{Sampled:6 Unreachable:0
Unreadable:0}`.
Also fixes a pre-existing failure of the counters assertion, found by running
it. It required `observed_nanos >= 20s` while the test installs
`scanInterval: 15s`, so it could pass only when a scan pass drifted a third past
its own interval. `observed_nanos` is the wall-clock gap between two readings of
one process, and the readings sit at different points inside their passes, so the
gap jitters either side of the interval — 14.981s and 15.002s, both measured
here. The floor is now the installed interval less a second of slack, from one
constant, because two numbers that merely agree drift (ADR 0073 §5). The target's
timeout goes to 20m to match the test's own context.
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.
The inventory e2e confirmed a
pprof_profilefor its Go sample but assertednothing about
goroutine_counts, though the sample serves the very index pagethe reading comes from. Noted as owed in
docs/plans/goroutine-leak-sensor.md; thispays it.
What it asserts
Two samples is the assertion that matters. One reading proves the parser;
only a second proves what the kind exists for, since no single count is a
finding. It also shows the reading repeats — the part of the promise in
security.md§10.3 that a single fetch cannot demonstrate.Beside it: the window's kind, source and length, a non-zero
captured_at, thepod name (the one place this funnel names a process rather than a build), the
image digest, and the coverage block reporting the readings that produced the
series with no unreadable answers.
Verified in kind against the merged agent:
A pre-existing failure this found
The counters assertion required
observed_nanos >= 20swhile the test installsscanInterval: 15s, so it could only pass when a scan pass drifted a third pastits own interval. It fails on
mainwith the same agent image:observed_nanos = 15004472048.observed_nanosis the wall-clock gap between two readings of one process(
now.Sub(prev.at)), and the two readings sit at different points inside theirscan passes, so the gap jitters either side of the interval — 14.981s and
15.002s, both measured here. The floor is now the installed interval less a
second of slack, from one constant, because two numbers that merely agree drift
(ADR 0073 §5). The target's
-timeoutgoes to 20m to match the test's own 20mcontext, which it was silently cutting short.
What is still red, and is not from here
TestGoInventoryEndToEndalso fails atcheckOptOutRemovesTheRecord: theopted-out workload stays in the
go_inventorypayload past the check's deadline.This reproduces on
mainwith the same agent image, so it is neither causednor unmasked by this PR:
origin/mainIt wants its own investigation rather than a wider deadline. The two halves are
unit-tested —
Retainininternal/inventory/store_test.go, pod-level exclusionin
internal/collector— andUpdateFuncdoes calldropPodwhen admission iswithdrawn, so what is uncovered is the composition: pod update → drop from the
index →
Retain→ the cadence gate → the spool file. Whether the record neverleaves or merely leaves late decides whether this touches the promise in
security.md§11, and that needs controller logs from a run, which I have nottaken. The check's own message still says "after 4 minutes" while its deadline is
nine, so it has been widened once before (#111).
Evidence
make test(race),make lint,make proto-lint,make chart-lintclean; thethree gosec findings pre-exist on
main. e2e run in kind on a freshly recreatedcluster, log in
test/e2e/logs/.🤖 Generated with Claude Code
https://claude.ai/code/session_01KeZECJXTDHL6Nts95eKMJA