fix(cost-map): distinguish booleans from numbers in catalog pins #55068
All Vouch review confidence checks passed
Residual risk 0.28 = Change Risk (0.52) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 649 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 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.344
Real PR Conversation Timeline
1 comments
"Review active on #55068"
general
weight: 0.35
surlymochan
Handwritten 1-3 sentence description
[insert handwritten description here]
<details>
<summary>Details</summary>
TLDR
Problem this solves
How it solves it
User Flow
Before — A catalog update can ship a pinned capability with the wrong JSON type.
1. Set a field pinned to
trueto the number1in both catalog copies.2. Run the cost map guard on the proposed merge.
3. The guard exits 0 because Python considers
1andTrueequal.After — The guard catches the type change.
1. Make the same catalog update and run the same check.
2. The guard exits 1 and reports the model, field, and expected value.
3. Keep the JSON boolean
trueand the check passes.Pre-Submission checklist
Screenshots / Proof of Fix
Ran the actual CI command with real Git commits in a temporary repository. It used the checked-in Fireworks MiniMax catalog entry and its vision pin. No provider request is needed because this changes how the CI guard compares decoded JSON values.
<details>
<summary>Reproduce both runs</summary>
From the merge base with the PR applied to the working tree, save the script as
/tmp/lite-catalog-pin-proof.pyand runpython3 /tmp/lite-catalog-pin-proof.py. It loads the guard fromHEADfor the before run and from the working tree for the after run.</details>
Before (6d8c2e009e512c0932b6577f0fa4dcbaff4528be)
After (fd4cc0348aa499b1307464dbfa9f01ae6158ace9)
The reproducer also checks that the rejection names the expected boolean. Four new regression cases failed against the old guard. All 91 cases in the guard's test file passed after the fix.
Type
🐛 Bug Fix
Final Attestation
</details>