feat import mode #1374
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.52) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
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.388
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #1374"
general
weight: 0.35
muralibasani
<!-- All contributors please complete these sections, including maintainers -->
Adds an IMPORT mode to the Schema Registry so schemas can be migrated from another registry keeping their original schema IDs and version numbers.
Key features
1. IMPORT mode, global or per subject.
2. Schema identity is preserved. POST /subjects/{subject}/versions accepts id and version in the body
3. New endpoints:
Subject has its own override. If there is no override, then global mode serves.
But for a non-existent subject, with ?defaultToGlobal=true returns global mode
Examples
4. Guardrails, so a bad import fails loudly rather than corrupting quietly. An ID is bound to its content permanently; a version slot can't be repointed; and the
presence of an id is what selects the mode — supplying one outside IMPORT, or omitting one inside it, is rejected rather than reinterpreted. Ten documented
rejections across 42202, 42204, 42205, 42207.
Ex.
For all unreachable versions, 422 ... The specified version '0' is not valid.
5. Two operator flags.
mode_mutability (default true) — a cluster-wide operator switch. Set false and every mode change is refused, so IMPORT can never be entered at runtime. Config-only, requires a restart.
allow_duplicate_schema_ids (default true) false refuses an import whose content already has a different ID, keeping IDs one-to-one with content
6. Modes are MODE records in _schemas topic, so they survive a restart.
subject: None means the global mode.
7. Compatibility
id/version on POST /subjects/{subject}/versions were previously parsed and ignored; they're now honoured or rejected.
8. Testing
1218 unit tests & 34 integration tests
Updated docs
https://mbasani-feat-import-mode.karapace.pages.dev/docs/import-mode
--------
Local tests
<!-- Provide a small sentence that summarizes the change. -->
<!-- Provide the issue number below if it exists. -->
References: #xxxxx
Why this way
<!-- Provide a small explanation on why this is the approach you took for solving this problem. -->