bisect.go ×11

Frontier kind: Code frontier

unlabeled · c_8b8d894fb416

2 tests · 161 LOC · 2 files · introduces 0 tests · 47 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
11 ranges47 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
32 ranges161 lines · 2 files · Browse complete extent
All tests (intent)
2 testsBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.

Introduced files, introduced tests, and structurally relevant concept specializationbisect.go ×2 · 7 introduced LOCbisect.go ×2bisect.go ×1 · 6 introduced LOCbisect.go ×1counts_are_correctly_propagated, sharp_signal:_transition_at_commit_index_3 · 0 introduced LOCcounts_are_correctly_pro…bisect.go ×3 · 31 introduced LOCbisect.go ×3bisect.go ×7 · 37 introduced LOCbisect.go ×7bisect.go ×1 · 2 introduced LOCbisect.go ×1bisect.go ×1 · 1 introduced LOCbisect.go ×1bisect.go ×3 · 12 introduced LOCbisect.go ×3bisect.go ×1 · 12 introduced LOCbisect.go ×1bisect.go ×2 · 9 introduced LOCbisect.go ×2bisect.go ×1 · 2 introduced LOCbisect.go ×1bisect.go ×1 · 2 introduced LOCbisect.go ×1parser.go ×1 · 6 introduced LOCparser.go ×1TestOperatorServiceMetadata, TestWorkflowServiceMetadata · 0 introduced LOCTestOperatorServiceMetad…go.temporal.io/server/tools/flakereport/bisect.go · 509 LOCflakereport/bisect.gogo.temporal.io/server/tools/flakereport/parser.go · 486 LOCflakereport/parser.goTestOperatorServiceMetadata · introduced test · go.temporal.io/server/common/api/TestOperatorServiceMetadataTestOperatorServiceMetad…TestWorkflowServiceMetadata · introduced test · go.temporal.io/server/common/api/TestWorkflowServiceMetadataTestWorkflowServiceMetad…extreme_k_is_more_likely_than_middle_k_under_Beta(1,1) · introduced test · go.temporal.io/server/tools/flakereport/TestLogBetaBinomial/extreme_k_is_more_likely_than_middle_k_under_Beta(1,1)extreme_k_is_more_likely…n=0_k=0_is_valid · introduced test · go.temporal.io/server/tools/flakereport/TestLogBetaBinomial/n=0_k=0_is_validn=0_k=0_is_validsingle_failure_in_1_trial · introduced test · go.temporal.io/server/tools/flakereport/TestLogBetaBinomial/single_failure_in_1_trialsingle_failure_in_1_tria…symmetry:_k=0_equals_k=n · introduced test · go.temporal.io/server/tools/flakereport/TestLogBetaBinomial/symmetry:_k=0_equals_k=nsymmetry:_k=0_equals_k=nhandles_very_large_negative_values_without_underflow · introduced test · go.temporal.io/server/tools/flakereport/TestLogSumExpNormalize/handles_very_large_negative_values_without_underflowhandles_very_large_negat…highest_log-weight_gets_highest_probability · introduced test · go.temporal.io/server/tools/flakereport/TestLogSumExpNormalize/highest_log-weight_gets_highest_probabilityhighest_log-weight_gets_…probabilities_sum_to_1.0 · introduced test · go.temporal.io/server/tools/flakereport/TestLogSumExpNormalize/probabilities_sum_to_1.0probabilities_sum_to_1.0single_element_returns_1.0 · introduced test · go.temporal.io/server/tools/flakereport/TestLogSumExpNormalize/single_element_returns_1.0single_element_returns_1…uniform_log-weights_produce_equal_probabilities · introduced test · go.temporal.io/server/tools/flakereport/TestLogSumExpNormalize/uniform_log-weights_produce_equal_probabilitiesuniform_log-weights_prod…test_with_retry_in_name_but_not_suffix · introduced test · go.temporal.io/server/tools/flakereport/TestNormalizeTestName/test_with_retry_in_name_but_not_suffixtest_with_retry_in_name_…test_without_retry_suffix · introduced test · go.temporal.io/server/tools/flakereport/TestNormalizeTestName/test_without_retry_suffixtest_without_retry_suffi…no_suffix · introduced test · go.temporal.io/server/tools/flakereport/TestNormalizeTestNameFinal/no_suffixno_suffixcounts_are_correctly_propagated · introduced test · go.temporal.io/server/tools/flakereport/TestRunBisect/counts_are_correctly_propagatedcounts_are_correctly_pro…sharp_signal:_transition_at_commit_index_3 · introduced test · go.temporal.io/server/tools/flakereport/TestRunBisect/sharp_signal:_transition_at_commit_index_3sharp_signal:_transition…two_commits_uniform_signal_returns_valid_probabilities · introduced test · go.temporal.io/server/tools/flakereport/TestRunBisect/two_commits_uniform_signal_returns_valid_probabilitiestwo_commits_uniform_sign…TestRunBisectForTestDirectionFilter · introduced test · go.temporal.io/server/tools/flakereport/TestRunBisectForTestDirectionFilterTestRunBisectForTestDire…TestRunBisectForTestDirectionFilterKeepsIntroduction · introduced test · go.temporal.io/server/tools/flakereport/TestRunBisectForTestDirectionFilterKeepsIntroductionTestRunBisectForTestDire…balanced_data_(equal_failures_and_successes_per_commit)_yields_symmetric_posterior · introduced test · go.temporal.io/server/tools/flakereport/TestRunBisectInformationlessData/balanced_data_(equal_failures_and_successes_per_commit)_yields_symmetric_posteriorbalanced_data_(equal_fai…Focused concept · bisect.go ×11 · 47 introduced LOCbisect.go ×11

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

No tests are introduced at this concept. Its intent tests are introduced by other concepts.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

1 file ranked by introduced lines: 47 introduced LOC across 11 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/tools/flakereport/bisect.go 47 introduced LOC · 11 ranges

Open complete file

244 //
245 //nolint:revive // Keep the bisect pipeline linear so the filtering steps remain reviewable.
246 > func runBisectForTest(cfg BisectConfig, testName string, allRuns []TestRun, commitOrderSlice []string, runToSHA map[int64]string, commitMetas map[string]github.Commit) TestBisectReport { bisect.go
247 > obs := buildObservations(testName, allRuns, commitOrderSlice, runToSHA)
248 >
249 > totalPasses, totalFails := 0, 0
250 > for _, o := range obs {
251 > totalPasses += o.Passes
252 > totalFails += o.Fails
253 > }
254 > totalObs := totalPasses + totalFails
255 >
256 > // Check signal thresholds
257 > if totalFails < cfg.MinFailures {
258 return TestBisectReport{
259 TestName: testName,
261 }
262 }
263 > if totalObs < cfg.MinRuns { bisect.go
264 return TestBisectReport{
265 TestName: testName,
269
270 // Apply heuristics from the pre-fetched commit metadata cache.
271 > for i := range obs { bisect.go
272 > if meta, ok := commitMetas[obs[i].CommitSHA]; ok {
273 obs[i].Prior, obs[i].HeuristicNote = commitPriorWeight(meta, testName)
274 }
275 }
276
277 > results := runBisect(obs) bisect.go
278 > if results == nil {
279 return TestBisectReport{
280 TestName: testName,
284
285 // Build a SHA → note lookup from the obs slice (already computed above).
286 > obsNotes := make(map[string]string, len(obs)) bisect.go
287 > for _, o := range obs {
288 > obsNotes[o.CommitSHA] = o.HeuristicNote
289 > }
290
291 // Annotate results with commit metadata
292 > for i := range results { bisect.go
293 > results[i].HeuristicNote = obsNotes[results[i].CommitSHA]
294 > if meta, ok := commitMetas[results[i].CommitSHA]; ok {
295 results[i].CommitTitle = meta.Title()
296 results[i].CommitAuthor = meta.Commit.Author.Name
302
303 // Filter suspects below the minimum probability threshold.
304 > if cfg.MinProbability > 0 { bisect.go
305 > filtered := results[:0]
306 > for _, r := range results {
307 > if r.Probability >= cfg.MinProbability {
308 > filtered = append(filtered, r)
309 > }
310 }
311 > results = filtered bisect.go
312 }
313
315 // A decreasing failure rate indicates the commit fixed a flake, not introduced one,
316 // and is not actionable as a culprit.
317 > { bisect.go
318 > filtered := results[:0]
319 > for _, r := range results {
320 > nBefore := r.PassesBefore + r.FailsBefore
321 > nAfter := r.PassesAfter + r.FailsAfter
322 > rateBefore := 0.0
323 > if nBefore > 0 {
324 > rateBefore = float64(r.FailsBefore) / float64(nBefore)
325 > }
326 > rateAfter := 0.0
327 > if nAfter > 0 {
328 > rateAfter = float64(r.FailsAfter) / float64(nAfter)
329 > }
330 > if rateAfter > rateBefore {
331 filtered = append(filtered, r)
332 }
333 }
334 > results = filtered bisect.go
335 }
336
337 > if len(results) == 0 { bisect.go
338 return TestBisectReport{
339 TestName: testName,