fix(rollups): traverse missing numeric aliases and reject booleans - #1053
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Essentials Run ID: 📒 Files selected for processing (2)
Included review availability: 0 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour. 📝 WalkthroughWalkthroughThe change updates numeric alias extraction to skip blank or ChangesNumeric alias handling
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to The numeric alias fallback and boolean-rejection changes are covered without an identified merge-blocking risk. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
|
Workflow state fingerprint for Keepalive Loop Reporter. Do not edit. |
🤖 Keepalive Loop StatusPR #1053 | Agent: Claude | Iteration 2/12 Current State
Last Claude Run
Claude output:
🧠 Task Analysis| Provider | 🔶 Regex (fallback) |
|
Keepalive Work Log (click to expand)
|
|
Workflow state fingerprint for Agents Gate Followups. Do not edit. |
|
Runner dispatch state for codex on PR #1053. Do not edit. |
|
Autofix attempts exhausted for this head. Latest Gate summary: Please investigate manually. |
There was a problem hiding this comment.
🟢 Approval recommended
No unresolved blocking issues were identified.
Pull request overview
Fixes rollup numeric alias fallback and rejects booleans as numeric values.
Changes:
- Continues past missing or blank aliases.
- Rejects boolean numeric inputs.
- Adds helper and aggregation regression tests.
File summaries
| File | Description |
|---|---|
tests/compute/test_rollups.py |
Adds fallback, boolean rejection, and aggregation regressions. |
src/counter_risk/compute/rollups.py |
Updates numeric alias traversal and boolean validation. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Autofix attempts exhausted for this head. Latest Gate summary: Please investigate manually. |
|
Closer premerge audit on The automated summary was overwritten with unchecked source tasks despite the delivered implementation; those six checkboxes are reconciled to the evidence. Fully paginated check inventory: 142 records, 60 names; latest record of every name is success/skipped. Compared with verified #1051, absent flat |
Provider Comparison ReportProvider Summary
📋 Full Provider Details (click to expand)openai
anthropic
Agreement
Disagreement
Unique Insights
🔍 LangSmith Traces |
|
Workflow state fingerprint for Agents Verifier. Do not edit. |
|
Runner dispatch state for claude on PR #1053. Do not edit. |
Closes #1046
Automated Status Summary
Scope
src/counter_risk/compute/rollups.py:106implements_find_numeric(row, candidates, ...). At line 119, when a row contains a candidate key whose value isNoneor whitespace, the loop executesbreakinstead ofcontinue. As a result, candidate traversal halts prematurely and raises aValueErroreven when valid fallback candidate keys exist incandidates(e.g.,{"notional": None, "exposure": 100.0}with candidates("notional", "exposure")raisesValueError: Missing required numeric fieldinstead of returning100.0). Additionally,_find_numericdoes not checkisinstance(val, bool), allowingTrueto coerce to1.0.Tasks
src/counter_risk/compute/rollups.py, changebreaktocontinuein_find_numericwhen candidate value isNoneor empty.src/counter_risk/compute/rollups.py, reject boolean values in_find_numeric.tests/compute/test_rollups.py, add tests verifying alias fallthrough when earlier candidate keys haveNoneor empty string values, and verifying boolean inputs raiseValueError.Acceptance criteria
uv run pytest tests/compute/test_rollups.py -qpasses; candidate keys fall through properly onNonevalues._find_numeric({"notional": None, "exposure": 100.0}, ("notional", "exposure")) == 100.0._find_numericby puttingbreakback insrc/counter_risk/compute/rollups.py; the alias fallback test must fail; restore and rerun.Summary by CodeRabbit
Bug Fixes
Tests