Board Candidate Transparency Improvements - #5384
Conversation
Signed-off-by: Rudransh Shrivastava <rudransh.shrivastava@owasp.org>
claim.set_status_approved() and bulk_set_status_approved() Signed-off-by: Rudransh Shrivastava <rudransh.shrivastava@owasp.org>
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
Summary by CodeRabbit
WalkthroughChangesClaim lifecycle and reviewer handling
Mutation validation and field errors
File metadata helper updates
Candidate card styling
Estimated code review effort: 4 (Complex) | ~60 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches 💡 1🛠️ 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 |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## feature/bod-candidate-transparency #5384 +/- ##
======================================================================
+ Coverage 98.46% 98.48% +0.01%
======================================================================
Files 564 565 +1
Lines 18521 18581 +60
Branches 2645 2637 -8
======================================================================
+ Hits 18237 18299 +62
+ Misses 163 161 -2
Partials 121 121
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
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 `@backend/src/apps/owasp/models/board_candidate_claim.py`:
- Around line 174-185: Update BoardCandidateClaim.bulk_set_status_approved to
approve only claims currently in SUBMITTED status, either by rejecting invalid
claims before the bulk operation or using conditional database updates. Ensure
skipped non-SUBMITTED rows are not marked APPROVED in memory and preserve
accurate handling of claims not updated.
🪄 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: ASSERTIVE
Plan: Pro Plus
Run ID: 9b854f58-509d-4271-92ee-c231cb81a0e0
📒 Files selected for processing (7)
backend/src/apps/owasp/models/board_candidate_claim.pybackend/src/apps/owasp/signals/board_candidate_claim_review.pybackend/src/apps/owasp/signals/board_of_directors.pybackend/tests/unit/apps/owasp/models/board_candidate_claim_test.pybackend/tests/unit/apps/owasp/signals/board_candidate_claim_review_test.pybackend/tests/unit/apps/owasp/signals/board_of_directors_test.pyfrontend/src/app/board/[year]/candidates/page.tsx
There was a problem hiding this comment.
All reported issues were addressed across 7 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Signed-off-by: Rudransh Shrivastava <rudransh.shrivastava@owasp.org>
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
`@backend/src/apps/owasp/migrations/0081_alter_boardcandidateclaim_board_and_more.py`:
- Around line 17-25: Before the AlterField operation for
BoardCandidateClaim.board, add a data migration that checks every target
database for claims with board_id IS NULL and assigns each orphan to a valid
board or deletes it according to the application’s intended policy. Ensure the
cleanup completes before applying the non-nullable CASCADE ForeignKey
constraint.
🪄 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: ASSERTIVE
Plan: Pro Plus
Run ID: 3260addc-f65b-49d4-bae9-9eaede1ad7f1
📒 Files selected for processing (7)
backend/src/apps/owasp/api/internal/mutations/board_candidate_claim_review.pybackend/src/apps/owasp/api/internal/nodes/board_candidate_claim.pybackend/src/apps/owasp/migrations/0081_alter_boardcandidateclaim_board_and_more.pybackend/src/apps/owasp/models/board_candidate_claim.pybackend/src/apps/owasp/models/board_candidate_claim_review.pybackend/tests/unit/apps/owasp/models/board_candidate_claim_review_test.pybackend/tests/unit/apps/owasp/models/board_candidate_claim_test.py
There was a problem hiding this comment.
All reported issues were addressed across 7 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Signed-off-by: Rudransh Shrivastava <rudransh.shrivastava@owasp.org>
Signed-off-by: Rudransh Shrivastava <rudransh.shrivastava@owasp.org>
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
`@backend/src/apps/owasp/migrations/0082_remove_boardofdirectors_reviewers_and_more.py`:
- Around line 14-28: Replace the RemoveField/AddField operations in migration
0082 with a data-preserving rename of the BoardOfDirectors reviewers relation to
claim_reviewers. Use RenameState/SeparateState and an explicit RunSQL as needed
so the existing many-to-many through-table and reviewer assignments are
retained, while the final migration state exposes the new field definition.
In `@backend/src/apps/owasp/models/board_of_directors.py`:
- Around line 33-35: Update the migration affecting BoardOfDirectors to replace
the reviewers removal and claim_reviewers addition with a data-preserving
RenameField operation, then use a separate AlterField for the verbose name or
help text. Keep the model’s claim_reviewers field and existing runtime
references unchanged.
🪄 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: ASSERTIVE
Plan: Pro Plus
Run ID: 3617b298-5e5f-4bf0-85ee-d5c108315848
📒 Files selected for processing (16)
backend/data/bod.dumpbackend/src/apps/owasp/admin/board_of_directors.pybackend/src/apps/owasp/api/internal/mutations/board_candidate_claim_review.pybackend/src/apps/owasp/api/internal/nodes/board_candidate_claim.pybackend/src/apps/owasp/api/internal/nodes/board_of_directors.pybackend/src/apps/owasp/api/internal/queries/board_candidate_claim.pybackend/src/apps/owasp/api/internal/queries/board_candidate_claim_evidence.pybackend/src/apps/owasp/migrations/0082_remove_boardofdirectors_reviewers_and_more.pybackend/src/apps/owasp/models/board_candidate_claim_review.pybackend/src/apps/owasp/models/board_of_directors.pybackend/tests/unit/apps/owasp/admin/board_of_directors_test.pybackend/tests/unit/apps/owasp/api/internal/nodes/board_candidate_claim_test.pybackend/tests/unit/apps/owasp/api/internal/nodes/board_of_directors_test.pybackend/tests/unit/apps/owasp/api/internal/queries/board_candidate_claim_evidence_test.pybackend/tests/unit/apps/owasp/api/internal/queries/board_candidate_claim_test.pybackend/tests/unit/apps/owasp/models/board_candidate_claim_review_test.py
update local media path to match .gitignore Signed-off-by: Rudransh Shrivastava <rudransh.shrivastava@owasp.org>
There was a problem hiding this comment.
All reported issues were addressed across 15 files (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
Signed-off-by: Rudransh Shrivastava <rudransh.shrivastava@owasp.org>
There was a problem hiding this comment.
All reported issues were addressed across 2 files (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
There was a problem hiding this comment.
All reported issues were addressed across 74 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Signed-off-by: Rudransh Shrivastava <rudransh.shrivastava@owasp.org>
There was a problem hiding this comment.
All reported issues were addressed across 7 files (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
Signed-off-by: Rudransh Shrivastava <rudransh.shrivastava@owasp.org>
Signed-off-by: Rudransh Shrivastava <rudransh.shrivastava@owasp.org>
Signed-off-by: Rudransh Shrivastava <rudransh.shrivastava@owasp.org>
|
| "BACKEND": "storages.backends.s3.S3Storage", | ||
| "OPTIONS": { | ||
| "bucket_name": AWS_MEDIA_BUCKET_NAME, | ||
| "custom_domain": None, |
There was a problem hiding this comment.
I'm not sure about custom_domain here. The idea is to generate pre-signed URLs from S3 for each evidence on demand. This is the reason why I have a separate resolver for getting evidence's file URL.



Proposed change
Part 2: Partially Resolves #4628
claim.set_status_approved()and bulk_set_status_approved() -- Add Django Model for Claim Reviews #5066 (comment)boardfield in claim model required and add on delete cascade.reviewerstoclaim_reviewers-- Add Django Model for Claim Reviews #5066 (comment)Won't address:
These might require a wider refactor, maybe worth keeping as is for now and refactoring later.
Checklist