ref(repositories): Remove feature flag branching for RepositoryProjectPathConfig reads#115607
ref(repositories): Remove feature flag branching for RepositoryProjectPathConfig reads#115607wedamija wants to merge 4 commits into
Conversation
2ade591 to
734fb98
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
ea63f2c to
e2f0cc9
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit e2f0cc9. Configure here.
| 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.
Backend Test FailuresFailures on
|


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