Uh oh!
There was an error while loading. Please reload this page.
Refactor Chapter 7 exhibit construction - #1226
Conversation
| " )\n", | ||
| " )\n", | ||
| "\n", | ||
| " return (results_upper, results_lower)" |
There was a problem hiding this comment.
Backup function left in notebook
Medium Severity
ex3sht1_BAK looks like a leftover backup of the pre-refactor Sheet 1 builder. It is never called; only ex3sht1 is used. Keeping both versions clutters the notebook and makes it unclear which implementation is canonical after the model_diagnostics rewrite.
Reviewed by Cursor Bugbot for commit fc5f4f6. Configure here.
There was a problem hiding this comment.
I am leaving this in for now as the reviewers have not determined what version of the function should be kept at this point.
| " tri: cl.Triangle,\n", | ||
| " dev_input: dict,\n", | ||
| " tail_input: dict\n", | ||
| ") -> tuple:\n", |
There was a problem hiding this comment.
Unused tail input parameter
Low Severity
ex3sht1 still accepts tail_input, and the caller still builds and passes it, but the new body never uses that argument. The old path applied TailConstant; the refactor dropped that without cleaning the parameter or call site, leaving dead API surface.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit fc5f4f6. Configure here.
There was a problem hiding this comment.
I will remove this once bigger issues have been resolved.
salexanian
commented
Aug 21, 2026
@henrydingliu, I used The issue with using I just found the original approach of merging individual pandas series in a dictionary to be cleaner, but I guess it is a subjective thing. @priyam0k , I bring this to your attention as well for input. |
henrydingliu
commented
Aug 21, 2026
@salexanian can you please rename this alternative solution as part_2a to circumvent the conflict? then we can run the test and look at the RTD render. |
salexanian
commented
Aug 21, 2026
No problem, @henrydingliu . I will do so. I'll be back home in a couple of hours |
salexanian
commented
Aug 22, 2026
@henrydingliu - done. |
Pyright Type CompletenessView the full Project (full
Other symbols referenced but not exported by
Symbols without documentation:
Patch (exported symbols added or changed by this PR): no exported symbol type-completeness changes detected. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@## main #1226 +/- ##
=======================================
Coverage 91.32% 91.32% =======================================
Files 92 92 Lines 5438 5438 Branches 700 700 =======================================
Hits 4966 4966 Misses 336 336 Partials 136 136
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
henrydingliu
commented
Aug 22, 2026
I'm not sure why you are implementing an entirely new pattern of pandas manipulation. take summing, the new add_totals private method is less elegant than the previous approach. but why do add_totals in the first place? things like ultimate and ibnr are also directly available in model_diagnostic. i recommended model_diagnostic because it directly provides an output in pandas for further manipulation, shortcuttinf all the col1, col2, etc construction in the previous ex3sht1. apologies if it sounded like I wanted you to rewrite the whole method. |
salexanian
commented
Aug 22, 2026
No problem, @henrydingliu - I will adapt my existing function to obtain the values from that It was actually good to create the function above as it gave me valuable practice with Chainladder so it was time well-spent anyway from my perspective. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
There are 4 total unresolved issues (including 2 from previous reviews).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 741f4cc. Configure here.
Uh oh!
There was an error while loading. Please reload this page.
salexanian
commented
Aug 26, 2026
I have refactored the functions to use model_diagnostic, @henrydingliu . |
henrydingliu
commented
Aug 26, 2026
@salexanian I'm not seeing any usage of model_diagnostics in this latest version |
salexanian
commented
Aug 26, 2026
@henrydingliu it is used in |
henrydingliu
commented
Aug 26, 2026
salexanian
commented
Aug 26, 2026
henrydingliu
commented
Aug 26, 2026
ah, you are right. i completely forgot. my bad. |
henrydingliu
commented
Aug 26, 2026
a few comments:
|




Summary of Changes
Follow-up to the merged Chapter 7 reconciliation work.
Refactors the Chapter 7 exhibit construction, including use of
cl.model_diagnostics()to reduce pandas wrangling and simplify the exhibit-building logic.The reconciliation assertions remain in place to verify the reproduced Friedland values.
Related GitHub Issue(s)
#1189
Additional Context for Reviewers
Have rewritten Ex3Sht1 to use cl.model_diagnostics.
Checklist
uv run pytest) and documentation changes (uv run --directory docs jb build . --builder=custom --custom-builder=doctest)Note
Low Risk
Documentation and doctest refactors in the Friedland chapter only; no production reserving or API behavior changes.
Overview
Refactors Chapter 7 Friedland exhibit construction (follow-up to reconciliation work for #1189), centering on Exhibit I, Sheet 3 (Ex3Sht1).
development_summary-style exhibit tables are rebuilt to pull Latest, CDF, and Ultimate (and related columns) viacl.model_diagnostics()instead of hand-rolled pandas indexing, transposes, and separateChainladder().fitcalls. Rounded exhibit paths that match the textbook’s three-decimal CDF workflow should stay aligned with the prior narrative.Reconciliation assertions against the printed Friedland figures are kept so doctests still verify reproduced values after the simplification.
Reviewed by Cursor Bugbot for commit f84014d. Bugbot is set up for automated code reviews on this repo. Configure here.