Improve backend CI test efficiency#429
Conversation
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughRefactors ChangesBackend CI Efficiency Refactor
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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 `@server/app/main.py`:
- Around line 111-113: The code currently includes exception details in the
JSONResponse when not in production (the condition `if not
settings.is_production: content["debug"] = str(exc)`), which exposes internal
error information to API clients. Remove the entire conditional block that adds
the debug information to the response content. Instead, ensure that error
details are only logged server-side and a generic error message is always
returned to clients, regardless of environment. This prevents sensitive internal
error information from being exposed through public API endpoints.
- Around line 185-187: The `resolved_uploads_dir` is a method but is being
passed to `Path()` without being called. Change `settings.resolved_uploads_dir`
to `settings.resolved_uploads_dir()` (add parentheses to invoke the method and
get the actual path string) in the line where `uploads_dir` is assigned using
`Path()`. This will ensure that the string path is passed to `Path` instead of
the bound method object.
🪄 Autofix (Beta)
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: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 5f4c429c-4bd4-4ad3-bd68-2ea6a563f677
⛔ Files ignored due to path filters (1)
server/uv.lockis excluded by!**/*.lock
📒 Files selected for processing (9)
.github/workflows/ci.ymldocs/superpowers/plans/2026-06-14-backend-ci-efficiency.mddocs/superpowers/specs/2026-06-14-backend-ci-efficiency-design.mdserver/app/main.pyserver/pyproject.tomlserver/tests/conftest.pyserver/tests/test_api.pyserver/tests/test_llm_call_log_retention.pyserver/tests/test_test_harness.py
Co-Authored-By: Codex <noreply@openai.com>
Summary
Impact
app = create_app()still uses the real lifespan.pytest -n 4 --dist=loadfile.Testing
ruff check .ruff format --check .bandit -r app -c pyproject.toml -quv lock --checkpytest -n 4 --dist=loadfile --cov=app --cov-report=term-missing --cov-branch --cov-fail-under=85 --durations=25 --durations-min=1.0 --tb=short -q(2827 passed, coverage87.90%,63.21s)alembic upgrade head && alembic checkagainst temporary Postgres 16 (No new upgrade operations detected)Note: local default
localhost:5432was occupied by another project database, so Alembic was verified with an explicit temporary Postgres URL on port55432.Summary by CodeRabbit
Release Notes
Chores
Tests
Bug Fixes