feat(essay): add accessible standalone score report HTML - #521
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughAdds ChangesEssay report HTML artifact
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant Caller
participant render_essay_score_report_html
participant EssayScoreReport
participant HTMLFile
Caller->>render_essay_score_report_html: Provide report and .html output path
render_essay_score_report_html->>EssayScoreReport: Replay-validate report
render_essay_score_report_html->>HTMLFile: Write standalone HTML
HTMLFile-->>Caller: Return output Path
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/changelog.d/essay-score-report-html.md`:
- Around line 1-3: Replace the leading “### Added” heading in the changelog
fragment with a repository-compliant level-one title, while preserving the essay
score report entry beneath it; then verify the change with
render_changelog_fragments.py --check.
In `@python/fast_mlsirm/scoring/essay/report_html.py`:
- Around line 293-311: Update render_essay_score_report_html to validate
non-None custom titles before rendering: reject empty or whitespace-only values
with ValueError, while continuing to use _DEFAULT_TITLE when title is None and
preserving nonblank titles unchanged.
In `@tests/test_scoring_essay_report_html.py`:
- Around line 154-155: Update the pytest.raises match pattern in the
render_essay_score_report_html test to use a raw string and escape the literal
period before “html” with \., ensuring the assertion matches the exact “.html”
suffix.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 8a07495e-7f55-4d02-91d1-508e7c02f1b3
📒 Files selected for processing (7)
.github/workflows/one-time-essay-report-html-sync.ymldocs/automated_essay_score_reports.mddocs/changelog.d/essay-score-report-html.mdpython/fast_mlsirm/scoring/essay/__init__.pypython/fast_mlsirm/scoring/essay/report_html.pytests/test_scoring_essay_report_html.pytests/test_scoring_essay_reporting_exports.py
Buyer-visible gap
Governed essay score reports are currently JSON-only. Buyers need a portable, exact-value, source-text-free audit artifact that can be reviewed without a Python environment while preserving the report's conservative validity boundary.
Reviewed target
render_essay_score_report_htmlover the existingEssayScoreReportcontract;Architecture constraints
No new scoring schema, scoring arithmetic, provider SDK, raw prompt/response/source text, workflow dependency, or release bump.
Advances #397
Summary by CodeRabbit
New Features
Documentation
Bug Fixes