← Back to Pull requests

test(inkless:switch): run switch system tests with consolidation and cover faults before phase 2 [KC-747] #869

Closed
unknown closed this pull request without merging on Nov 16, 2026 11:01 UTC
View on GitHub
unknown unknown commented on Nov 12, 2026 10:36 UTC
Author

Only one of the 14 switch system tests started brokers with consolidation.
The rest never left phase 1, so forced deletion of the local prefix, the
divergent-tail check, the rebuild from remote storage, and consolidation
from the seal ran under faults only in unit tests. _wait_for_switch_complete
also returned at control-plane init, because InFlightPartitions counts only
steps 3 to 5.

The brokers now consolidate by default, and the switch alter adds
remote.storage.enable. The completion wait then requires
classicPrefixInRemoteStorage on every partition through
kafka-topic-switch.sh state, and records the seal of each partition.

Each data check now compares every consumed record with the acked ledger:
partition, offset, key, and value. It fails on a missing, duplicated,
out-of-order, changed, or never-acked record, and labels each one below or at
or above the seal. Producers fail the test on any send error.

test_fault_between_seal_commit_and_phase_2 holds every partition in
WaitingForUpload by dropping broker traffic to object storage, asserts the
hold through JMX and the switch state, then injects one fault: a leader
restart, SIGKILL, or SIGSTOP, a follower SIGKILL, a rolling restart, a leader
network partition, a reassignment, or a topic deletion. Three more faults
start as the hold ends, so they overlap the flag request and the phase 2
transition: a failover of the active controller of three, a Postgres outage,
and a rolling restart. The hold alone is the object-storage outage case.

🤖 Generated with Claude Code

Diff: 202 lines (+151 / -51) across 2 files Reviewer: giuseppelillo Review duration: 5785m
All Vouch review confidence checks passed
Residual risk 0.14 = Change Risk (0.36) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.36 · 202 lines diff across 2 files
0.36
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.318
Shallow Review Depth shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #869"
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: 36.2% (MEDIUM) · Higher = larger blast radius
36.2%
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: 14.3% · Safe to merge
14.3%
Repository