← Back to Pull requests

Skip unchanged subtrees in typed compare #351

Closed
unknown closed this pull request without merging on Sep 25, 2026 21:10 UTC
View on GitHub
unknown unknown commented on Sep 24, 2026 22:44 UTC
Author

What type of PR is this?

/kind cleanup

What this PR does / why we need it:


Skips traversing identical subtrees during structured-merge-diff comparison.

BenchmarkOperations (merge/real_test.go):

name                              old time/op    new time/op    delta
Operations/Pod/Update-64             187µs ± 0%     126µs ± 0%  -32.79%
Operations/Node/Update-64            293µs ± 0%     226µs ± 0%  -22.92%
Operations/PrometheusCRD/Update-64  1.82ms ± 0%    1.34ms ± 0%  -26.33%

name                              old alloc/op   new alloc/op   delta
Operations/Pod/Update-64            38.0kB ± 0%    28.8kB ± 0%  -24.14%
Operations/Node/Update-64           56.0kB ± 0%    43.4kB ± 0%  -22.36%
Operations/PrometheusCRD/Update-64   319kB ± 0%     258kB ± 0%  -19.10%

name                              old allocs/op  new allocs/op  delta
Operations/Pod/Update-64               919 ± 0%       594 ± 0%  -35.36%
Operations/Node/Update-64            1.25k ± 0%     0.81k ± 0%  -35.33%
Operations/PrometheusCRD/Update-64   6.91k ± 0%     4.83k ± 0%  -30.12%

BenchmarkPatchPod / BenchmarkPatchPodStatus (test/integration/apiserver/storage/pod_write_benchmark_test.go):

name                old time/op    new time/op    delta
PatchPod-64           5.71ms ± 0%    5.00ms ± 0%  -12.41%
PatchPodStatus-64     5.61ms ± 0%    4.87ms ± 0%  -13.20%

name                old alloc/op   new alloc/op   delta
PatchPod-64           1.18MB ± 0%    1.14MB ± 0%   -2.96%
PatchPodStatus-64     1.08MB ± 0%    1.06MB ± 0%   -2.42%

name                old allocs/op  new allocs/op  delta
PatchPod-64            16.8k ± 0%     15.7k ± 0%   -6.57%
PatchPodStatus-64      15.5k ± 0%     14.5k ± 0%   -6.12%

Which issue(s) this PR is related to:


Part of https://github.com/kubernetes/kubernetes/issues/142228

Special notes for your reviewer:

Does this PR introduce a user-facing change?


``release-note
NONE
``

Diff: 267 lines (+200 / -67) across 3 files Reviewer: Jefftree Review duration: 1345m
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.39) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.39 · 267 lines diff across 3 files
0.39
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
60%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.334
Shallow Review Depth shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #351"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 60.5% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 39.4% (MEDIUM) · Higher = larger blast radius
39.4%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 60.5% · Lower = rushed or shallow review
60.5%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 15.6% · Safe to merge
15.6%