fix: surface BusinessReport appendix render failures#574
Merged
igerber merged 1 commit intoJun 29, 2026
Conversation
d2cd9a3 to
f64b652
Compare
Owner
|
@shawcharles this looks like a worthwhile contribution and solves a real issue you surfaced. Is it ready for review from your POV? |
f64b652 to
8fe2470
Compare
Contributor
Author
|
Yes, ready for review from my side. I rebased the branch onto current
I also moved the PR out of draft. |
Contributor
Author
|
Follow-up: the current CI Gate failure is only the repository label gate:
I do not have permission to apply that label, so from my side this is ready for maintainer review/CI whenever you want to label it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #573.
Summary
This PR makes
BusinessReport.full_report(include_appendix=True)visibly report when the estimator-native appendix cannot be rendered.Previously, if the underlying estimator's
summary()raised,full_report()caught the exception and silently omitted the Technical Appendix. The report could therefore look complete while missing the expected technical section.The new behaviour keeps
full_report()resilient while adding a bounded appendix-unavailable note. It covers failures while obtaining the estimator summary and while converting that appendix content to markdown text. It includes the exception class name, but intentionally does not include raw exception messages or tracebacks, since those may expose local paths, formulas, data values, or other internals.Changes
summary()succeeds.## Technical Appendixfallback when appendix rendering fails.Validation
PYTHONPATH=. DIFF_DIFF_BACKEND=python pytest tests/test_business_report.py::TestAppendix -qPYTHONPATH=. DIFF_DIFF_BACKEND=python pytest tests/test_business_report.py -qPYTHONPATH=. DIFF_DIFF_BACKEND=python .venv-py39/bin/python -m pytest tests/test_business_report.py::TestAppendix -qpython -m ruff check diff_diff/business_report.py tests/test_business_report.pygit diff --check