Fix GET /api/projects/:identifier/remix/identifier returns 404 during a valid student remix flow#792
Merged
abcampo-iry merged 2 commits intomainfrom Apr 28, 2026
Conversation
Test coverage89.78% line coverage reported by SimpleCov. |
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes GET /api/projects/:projectIdentifier/remix/identifier returning 404 when the client supplies the current user’s remix identifier (instead of the base/original project identifier) during a valid remix flow.
Changes:
- Split
show_identifierloading/authorization into a dedicated before_action that supports either (a) base project identifier lookup or (b) current user’s remix identifier passthrough. - Preserved
404behavior for invalid identifiers, users without a remix, and identifiers that belong to another user’s remix. - Added request specs covering remix-identifier lookup success and “another user’s remix identifier” returning
404.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| spec/requests/projects/remix_spec.rb | Adds request specs for the new identifier resolution behavior and the cross-user 404 case. |
| app/controllers/api/projects/remixes_controller.rb | Introduces load_and_authorize_remix_identifier and wires it to show_identifier to accept either base or current-user remix identifiers. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
zetter-rpf
approved these changes
Apr 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Status
Points for consideration:
The endpoint now accepts remix identifiers as input for
GET /api/projects/:projectIdentifier/remix/identifier, but only returns200when the supplied remix belongs to the currentuser. Another user's remix identifier still returns404.What's changed?
Steps to perform after deploying to production
Tested in local alongside: 823