fix(deepsource): reconcile repository-wide findings - #197
Conversation
|
Important Review skippedToo many files! This PR contains 111 files, which is 11 over the limit of 100. To get a review, narrow the scope: Upgrade to a paid plan to raise the limit. This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (111)
You can disable this status message by setting the 📝 WalkthroughWalkthroughThe PR refactors GREMLIN upload, dashboard, deletion, and admin routes; adds public task-runtime compatibility aliases; adds temporary-path and input validation; simplifies repository control flow; and expands DeepSource workflow documentation, changelog entries, and related tests. ChangesGREMLIN server cleanup
Estimated code review effort: 4 (Complex) | ~45 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 2📝 Generate docstrings 💡
🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Not up to standards ⛔🔴 Issues
|
| Category | Results |
|---|---|
| Documentation | 1 minor |
| ErrorProne | 5 high |
| Complexity | 31 medium |
🟢 Metrics 54 complexity · -4 duplication
Metric Results Complexity 54 Duplication -4
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
|
|
Overall Grade |
Security Reliability Complexity Hygiene |
Code Review Summary
| Analyzer | Status | Updated (UTC) | Details |
|---|---|---|---|
| Python | Jul 30, 2026 2:28a.m. | Review ↗ |
Important
AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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/pssm_gremlin_server/routes.py`:
- Around line 1323-1334: Update _notify_admin_user_update so
notification-failure warnings log the user_id instead of approved_user["email"]
or user["email"], for both approval and rejection paths. Preserve the existing
warning messages and failure conditions while removing raw email addresses from
application logs.
🪄 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: d710ba47-bb66-4693-97b3-648f5d7b987d
📒 Files selected for processing (7)
CHANGELOG.mddocs/dev-guide/codex-deepsource.mdserver/pssm_gremlin_server/auth.pyserver/pssm_gremlin_server/pssm_gremlin.pyserver/pssm_gremlin_server/routes.pyserver/pssm_gremlin_server/task_runtime.pyserver/run/restart_pssm_flask.sh
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #197 +/- ##
==========================================
- Coverage 74.17% 74.03% -0.14%
==========================================
Files 122 122
Lines 15592 15675 +83
==========================================
+ Hits 11565 11605 +40
- Misses 4027 4070 +43
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 232111a7e4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Actionable comments posted: 4
🧹 Nitpick comments (1)
server/scripts/fasta_lower_char_rm.py (1)
20-22: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAvoid shadowing the builtin
input.Rename the parameter and local references to
text(or another descriptive name). This removes Ruff A001 and avoids mutating a parameter named after a builtin.🤖 Prompt for 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. In `@server/scripts/fasta_lower_char_rm.py` around lines 20 - 22, Rename the parameter and all local references in the affected function from input to text (or another descriptive name), while preserving the existing character-removal behavior and return value.Source: Linters/SAST tools
🤖 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/dev-guide/codex-deepsource.md`:
- Around line 69-92: Update the audit artifact setup around
deepsource_cookie_jar so every temporary file, including the issues HTML,
inventory payload, and inventory JSON, is created inside one private temporary
directory. Replace the fixed /tmp paths with variables derived from that
directory and ensure the directory is cleaned up after the audit completes.
In `@src/REvoDesign/tools/package_manager.py`:
- Around line 518-523: Make temporary bootstrap-file validation and access
atomic: update _resolve_temporary_path and the dependent read/write sites at
src/REvoDesign/tools/package_manager.py lines 518-523, 541-546, and 647-648 to
use directory-relative, file-descriptor-based operations that prevent symlink
replacement between validation and access, or ensure bootstrap files are created
in a private temporary directory unavailable to attackers.
In `@tests/tools/test_package_manager.py`:
- Around line 1081-1087: Move the HMAC-related tests, including
test_pm_compute_hmac_rejects_non_temporary_path and its companion tests, from
test_package_manager.py into a separate concern-specific test module; retain
their existing assertions and setup, and leave test_package_manager.py below the
1000-line limit.
- Around line 97-104: Make both rejected-path tests independent of the checkout
location by monkeypatching the configured temporary root to a deterministic
temporary directory and constructing a sibling destination outside that root.
Update tests/tools/test_package_manager.py lines 97-104 in
test_pm_fetch_gist_file_rejects_non_temporary_destination and lines 1081-1085 in
the HMAC rejection test with the same controlled-root setup; preserve their
existing rejection assertions.
---
Nitpick comments:
In `@server/scripts/fasta_lower_char_rm.py`:
- Around line 20-22: Rename the parameter and all local references in the
affected function from input to text (or another descriptive name), while
preserving the existing character-removal behavior and return value.
🪄 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: 32b392fd-3f19-4e96-8fae-3e67496c24dc
📒 Files selected for processing (18)
CHANGELOG.mddocs/dev-guide/codex-deepsource.mdserver/pssm_gremlin_server/pssm_gremlin.pyserver/pssm_gremlin_server/routes.pyserver/scripts/GREMLIN_TFv1.pyserver/scripts/fasta_lower_char_rm.pyserver/tests/test_admin.pysrc/REvoDesign/clusters/cluster_sequence.pysrc/REvoDesign/clusters/combine_positions.pysrc/REvoDesign/logger/logger.pysrc/REvoDesign/phylogenetics/gremlin_pytorch.pysrc/REvoDesign/shortcuts/tools/evolution.pysrc/REvoDesign/shortcuts/tools/ligand_converters.pysrc/REvoDesign/shortcuts/utils.pysrc/REvoDesign/tools/customized_widgets.pysrc/REvoDesign/tools/mutant_tools.pysrc/REvoDesign/tools/package_manager.pytests/tools/test_package_manager.py
🚧 Files skipped from review as they are similar to previous changes (2)
- server/pssm_gremlin_server/pssm_gremlin.py
- server/pssm_gremlin_server/routes.py
Scope
Repository-wide DeepSource reconciliation for:
The cleanup covers server, desktop, tools, and development scripts. Every
finding is checked against current code; still-valid findings are fixed,
intentional patterns receive narrow documented suppressions, and stale findings
are not changed.
Inventory model
Captured default-branch inventory at
fac8eec56efd2604b72e394182f8e67675e5650b:595 unique occurrence IDs
The export uses the public frontend GraphQL endpoint with a fresh anonymous
CSRF cookie and paginates both issue and occurrence connections. A PR analysis
run remains a changeset regression gate; the default-branch backlog can only be
proved cleared by re-exporting after merge.
Notable fixes
PYL-R1705andPYL-R1724context manager
formatting, and other validated DeepSource patterns
Local validation
R1705,R1724: 10.00/10git diff --check: passedThe serial test phase reaches a pre-existing Qt
NSApplicationevent-loopstall during duplicate bootstrap; the same scenarios pass in the complete fast
phase.
Remote acceptance
The terminal DeepSource run for
4d438372reports 16 occurrences, all outsidethis PR's requested scope (
Style: onePYL-C0202and fifteenPYL-R1710):All CodeRabbit review threads are resolved. After merge, rerun the complete
595-ID default-branch export to close the repository-level invariant on the
default branch.