ref(repositories): Remove feature flag branching for RepositoryProjectPathConfig reads#115607
Conversation
2ade591 to
734fb98
Compare
ea63f2c to
e2f0cc9
Compare
| assert ( | ||
| SeerProjectRepository.objects.filter( | ||
| project=self.proj, project_repository_id__isnull=True | ||
| project_repository__project=self.proj, project_repository_id__isnull=True |
There was a problem hiding this comment.
Migration test assertions become vacuous no-ops
Medium Severity
The setup_before_migration now pre-creates all ProjectRepository rows and sets project_repository=pr_a (etc.) on every record before the migration runs, so the migration has nothing to backfill. Additionally, the null-check assertions at lines 174–187 filter with project_repository__project=self.proj, project_repository_id__isnull=True — Django's inner join semantics mean rows with a null FK are excluded by the join, so the count is always 0 regardless of data state. The test no longer validates the migration's actual backfill logic.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit e2f0cc9. Configure here.
682b946 to
6393a13
Compare
…tPathConfig reads Remove the `organizations:project-repository-fk-reads` flag checks from all RepositoryProjectPathConfig read paths. Always use `project_repository` FK for queries and attribute access. The flag registration is left in place — it will be removed in a follow-up PR that also drops the old model columns. Switched paths: - Code mappings list/validate/create API - Code mapping serializer - Code mapping details/delete endpoints - Code mapping codeowners endpoint - Stacktrace link resolution - Source context fetching - Commit context / suspect commits - Code owners auto-sync - Project code owners serializer - get_sorted_code_mapping_configs - Autopilot missing SDK integration detector - Project transfer_to cleanup
6393a13 to
90bbe5f
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 925b5ee. Configure here.
| assert pr.project_id == config.project_id | ||
| assert pr.repository_id == config.repository_id | ||
| assert pr.project_id == config.project_repository.project_id | ||
| assert pr.repository_id == config.project_repository.repository_id |
There was a problem hiding this comment.
FK consistency assertions compare object with itself
Medium Severity
The FK consistency assertions are tautological. pr is fetched via config.project_repository_id, and config.project_repository.project_id resolves through the same FK — so pr.project_id == config.project_repository.project_id compares a ProjectRepository row's fields with itself. The old code compared pr.project_id == config.project_id (the direct FK), which actually verified cross-FK consistency between project_repository and the direct project/repository fields.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 925b5ee. Configure here.


Remove the
organizations:project-repository-fk-readsflag checks from all RepositoryProjectPathConfig read paths. Always useproject_repositoryFK for queries and attribute access.For now we'll keep
organizations:project-repository-fk-readsaround, since we'll have a separate pr to remove reads/writes for code mappings.Seer removals: #115606