Skip to content

fix: surface BusinessReport appendix render failures#585

Closed
igerber wants to merge 1 commit into
mainfrom
ci-probe/br-appendix-visibility
Closed

fix: surface BusinessReport appendix render failures#585
igerber wants to merge 1 commit into
mainfrom
ci-probe/br-appendix-visibility

Conversation

@igerber

@igerber igerber commented Jun 29, 2026

Copy link
Copy Markdown
Owner

Summary

  • Make BusinessReport.full_report(include_appendix=True) render a visible ## Technical Appendix note ("Technical appendix unavailable: estimator summary rendering failed ()") when the estimator's summary() raises, instead of silently omitting the appendix so the report no longer looks complete when a section could not be rendered.
  • Render only the exception class name — no message or traceback — to avoid leaking local paths, formulas, data values, or other internals.
  • Preserve the existing code-fenced Technical Appendix output on the success path; the success and failure paths are mutually exclusive (no duplicate appendix).

Methodology references (required if estimator / math changes)

  • Method name(s): N/A — reporting layer only; no estimator math, weighting, variance/SE, or inference changes
  • Paper / source link(s): N/A
  • Any intentional deviations from the source (and why): None

Validation

  • Tests added/updated: tests/test_business_report.py — visible appendix-failure note, stringification failure, and non-leakage of raw exception details
  • Backtest / simulation / notebook evidence (if applicable): N/A

Security / privacy

  • Confirm no secrets/PII in this PR: Yes

🤖 Generated with Claude Code

Make full_report(include_appendix=True) render a visible
"Technical Appendix unavailable (<ExceptionClass>)" note when the
estimator summary() raises, instead of silently omitting the appendix.
Only the exception class name is shown (no message or traceback) to
avoid leaking paths, data values, or other internals.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Overall Assessment

✅ Looks good

Executive Summary

  • Scope is reporting-only: affected method is BusinessReport.full_report(); no estimator, weighting, variance/SE, inference, or identification logic changed.
  • Methodology registry review found no affected causal method requiring paper cross-check.
  • The new failure path makes appendix rendering failures visible without including exception messages or tracebacks.
  • Added tests cover summary failure, stringification failure, and exception-detail non-leakage.
  • I could not run pytest here because pytest is not installed; AST parsing passed for both changed files.

Methodology

No findings.

Severity: N/A
Impact: No causal estimator or statistical methodology surface is changed.
Concrete fix: None.

Code Quality

No findings.

Severity: N/A
Impact: The implementation keeps success and failure appendix paths mutually exclusive and catches both summary() and str(appendix) failures in diff_diff/business_report.py:L355-L370.
Concrete fix: None.

Performance

No findings.

Severity: N/A
Impact: The change adds only constant-time exception handling around existing appendix rendering.
Concrete fix: None.

Maintainability

No findings.

Severity: N/A
Impact: The behavior is localized to BusinessReport.full_report() with focused tests in tests/test_business_report.py:L483-L515.
Concrete fix: None.

Tech Debt

No findings.

Severity: N/A
Impact: No new TODO, deferred behavior, or tracked limitation is introduced.
Concrete fix: None.

Security

No findings.

Severity: N/A
Impact: The failure message uses only type(exc).__name__, avoiding exception messages and tracebacks that could expose local paths or sensitive values.
Concrete fix: None.

Documentation/Tests

P3 informational: Tests were not executable in this environment.

Impact: pytest is unavailable here, so I could not run tests/test_business_report.py::TestAppendix. Static AST parsing passed for both changed files.
Concrete fix: No PR change required; rely on CI to run the added appendix tests.

@igerber

igerber commented Jun 29, 2026

Copy link
Copy Markdown
Owner Author

Closing unmerged — this was an internal CI-review validation run, not intended for merge.

@igerber igerber closed this Jun 29, 2026
@igerber igerber deleted the ci-probe/br-appendix-visibility branch June 29, 2026 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant