Skip to content

fix(score-sets): only reuse meta-analysis experiments the caller can add to - #894

Merged
bencap merged 1 commit into
release-2026.2.7.4from
bugfix/bencap/sa-7/meta-analysis-experiment-reuse
Sep 28, 2026
Merged

bencap merged 1 commit into
release-2026.2.7.4from
bugfix/bencap/sa-7/meta-analysis-experiment-reuse

Conversation

@bencap

@bencap bencap commented Sep 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

When a user creates a meta-analysis, the new score set was placed in whichever existing meta-analysis experiment covered the same experiment sets, whether or not the user was allowed to add score sets to it. Now an existing experiment is reused only if the caller has ADD_SCORE_SET permission on it. If the only matching experiment belongs to another user and is private, the request fails with 409, because an experiment set can hold only one meta-analysis experiment.

find_meta_analyses_for_experiment_sets now returns its results in ID order, so the reused experiment is always the same one.

Tests

tests/routers/test_score_set.py covers joining another user's published meta-analysis experiment, not reusing another user's private one across multiple experiment sets, and the 409 for a single experiment set.

@bencap
bencap merged commit f1658da into release-2026.2.7.4 Sep 28, 2026
5 checks passed
@bencap bencap mentioned this pull request Sep 28, 2026
@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 36474966982

Warning

Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes.
Quick fix: rebase this PR. Learn more →

Warning

No base build found for commit 70e784a on release-2026.2.7.4.
Coverage changes can't be calculated without a base build.
If a base build is processing, this comment will update automatically when it completes.

Coverage: 88.804%

Details

  • Patch coverage: 6 of 6 lines across 1 file are fully covered (100%).

Uncovered Changes

No uncovered changes found.

Coverage Regressions

Requires a base build to compare against. How to fix this →


Coverage Stats

Coverage Status
Relevant Lines: 15559
Covered Lines: 13817
Line Coverage: 88.8%
Coverage Strength: 0.89 hits per line

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants