test(marshal): fix flaky TestMarshalProtoJSON #169
All Vouch review confidence checks passed
Residual risk 0.29 = Change Risk (0.50) × (1 − Review Confidence (0.42)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.50 · 43 lines diff across 1 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 10%
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
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.226
No Reviewer Assigned
no_reviewer_assigned
0.120
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #169"
general
weight: 0.35
arreyder
TestMarshalProtoJSONfails intermittently onmain(3 of 40 runs locally). When the input contains NUL bytes,cleanJSONdecodes into amap[string]interface{}and re-encodes with jsoniter's default config, which doesn't sort keys. The test compared raw strings, so key order decided pass or fail.Output key order doesn't matter in production (the values land in JSONB), so this fixes only the test: it decodes the result with
protojson.Unmarshaland checks it withproto.Equalagainst the expected Struct. This also drops a duplicate pre-loop call and error messages that said the opposite of what they checked.Verification
-count=500). Before the fix, 3 of 40 runs failed.sanitizeJSONstop stripping\u0000fails theWith null bytessubtest.go test ./pgdb/v1/andgolangci-lintare clean.🤖 Generated with Claude Code