feat(ingester): export a counter for submission files that fail preparation #2225
All Vouch review confidence checks passed
Residual risk 0.15 = Change Risk (0.36) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.36 · 186 lines diff across 2 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.313
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #2225"
general
weight: 0.35
nuclearcat
Files that fail JSON decoding or schema validation were only logged and moved to the failed directory, so Grafana could not show them. Add the
kcidb_ingestion_failurescounter, labelled withreason=json_decode,schema_validationorother.Increment the counter only after a successful move to
failed/. Failed moves leave the file in the spool without counting it again on each retry. Deferred files with log excerpt upload errors remain excluded.Make origin extraction tolerate malformed submission structures so inputs such as
[1]and{"checkouts":["a"]}reach failure handling instead of crashing the worker while logging the error.Validation: all 61 tests in the ingester test file pass, along with Ruff lint and formatting checks. Regression tests exercise malformed data, successful moves, repeated failed moves, and deferred files.
To reproduce from
backend/:The test command runs serially with automatic reruns disabled and does not require a running database.
Closes #1505