test(server): cover PR project-shell edge cases on getProjectShells - #11421
Adamulek123 wants to merge 1 commit into
Conversation
fde6b93 to
8c27e72
Compare
Perf proof (pr-load-perf harness, baseline b1e223e)
|
8c27e72 to
d50a009
Compare
Upstream pingdotgg#11299 landed the same workspace-scan fix with the getProjectShells(projectIds?) shape, subsuming this branch's listActiveProjectShells approach. Rebase onto origin/main, drop the duplicate prod code, and keep only the net-new tests: narrow-query fanout (never getShellSnapshot), deleted singleton mapping to provider-unsupported, projectId+projectIds intersection, and created_at ordering regardless of insertion order.
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — The PR adds regression tests only, using isolated in-memory persistence and mocked providers to cover project-shell ordering and pull-request lookup edge cases. It does not modify production code, defaults, schemas, deployment behavior, or static-analysis configuration. Notes:
You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 4 remain after this review. 📝 WalkthroughWalkthroughThe pull request adds regression tests for project shell ordering and PullRequestService project resolution, deleted-project handling, and combined project filters. ChangesPull request query regressions
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~15 minutes Change: Other Suggested reviewers: Merge Risk: ⚪ Minimal · up to The added tests protect ordering, deleted-project handling, narrow queries, and combined filters without changing production behavior. No actionable merge risk remains. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Summary
Upstream #11299 landed the same workspace-scan fix this branch originally implemented, with the getProjectShells(projectIds) shape. The duplicate listActiveProjectShells implementation is dropped in favor of #11299. Merged state of this PR is tests-only.
What changed
Keeps only the incremental tests #11299 lacks: narrow-query fanout (the service never reads getShellSnapshot), deleted-singleton failing as provider-unsupported, projectId plus projectIds intersection, and created_at ordering on reverse insertion. No production code changes.
Validation
Measured impact
Compared with main-latest.json from main commit b1e223e (which includes #11299), using the focused snapshot suite:
The production saving (5-statement snapshot down to 1 narrow read per PR RPC) ships via #11299; this PR locks the edge cases it lacks. Coverage: SPAWN-ASSERTED.
Built with Muse Spark (opencode/muse-spark-1.3) via implement and audit subagent loops with strict branch-audit reviews.
Summary by CodeRabbit