fix(ci): unblock main — align reporting 500 test with sanitized detail - #826
Conversation
reporting_routes.generate_dashboard_url already returns a static
detail="Internal server error" (CWE-209 hardening), but
test_generate_dashboard_url_service_error still asserted the old
"Failed to generate" substring, leaving main CI red on the `test`
job (1 failed, 7163 passed).
Update the assertion to expect the sanitized body and to prove the
caught exception text ("Looker unavailable") does not leak. This is
the same test change already staged in PR #818; landing it directly
unblocks main.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014BmkwKENnbsy3v94m1sBid
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one) (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository YAML (base), Repository UI (inherited), Organization UI (inherited) Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Comment |
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Snapshot WarningsEnsure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice. Scanned FilesNone |
|
Note Unit test generation is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it. Generating unit tests... This may take up to 20 minutes. |
|
✅ Created PR with unit tests: #830 |
Summary
mainCI has been red on thetestjob since the #805 merge (~2h) —1 failed, 7163 passed. The single failure is a stale test, not a code regression:reporting_routes.generate_dashboard_urlalready returns a sanitizedHTTPException(status_code=500, detail="Internal server error")(CWE-209 hardening — merged tomain).tests/unit/test_cloud_routes.py::TestReportingRoutes::test_generate_dashboard_url_service_errorstill asserted"Failed to generate" in detail, which no longer holds →AssertionError: assert 'Failed to generate' in 'Internal server error'.This is a symptom of the 500-hardening work being split across the duplicate-PR cluster: the source-sanitization half landed on
mainwhile the matching test update lived only in the still-open #818.Change
Update the assertion to expect the sanitized body and to prove the caught exception text does not leak to the client:
This is the same test edit already staged inside #818; landing it directly unblocks
mainwithout waiting on that PR's consolidation.Verification
Source-only test change; no production code touched.
Opened as draft for human review — not auto-merged.
🤖 Generated with Claude Code
https://claude.ai/code/session_014BmkwKENnbsy3v94m1sBid
Generated by Claude Code