OMR Projection Now Order-Proof: Map by question_set_id, Not Position (Closes #148) - #150
Open
Kanika0306 wants to merge 2 commits into
Open
OMR Projection Now Order-Proof: Map by question_set_id, Not Position (Closes #148)#150Kanika0306 wants to merge 2 commits into
Kanika0306 wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes incorrect OMR option placeholder projection when question_sets order differs from aggregation output by switching from index-based alignment to deterministic mapping via question_set_id (closes #148).
Changes:
- Added
project_omr_option_counts()helper to project OMR option placeholders byquestion_set_id(order-independent). - Updated the aggregation pipeline output to include
question_set_idand wired the helper intoGET /quiz/{quiz_id}OMR flow. - Added tests for order independence and duplicate
question_set_iddetection.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| app/routers/quizzes.py | Introduces deterministic question_set_id mapping for OMR option projection and updates aggregation projection accordingly. |
| app/tests/test_quizzes.py | Adds targeted regression tests for reordered aggregation output and duplicate-ID protection. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Author
|
@copilot apply changes based on the comments in this thread |
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.
PR Description
Problem
OMR option projection relied on positional alignment between quiz question sets and aggregated results.
When ordering differed, mapping became incorrect and could produce wrong option placeholders.
What this PR changes
question_set_id.Files Changed
Validation
test_quizzes).61 passed.Issue
Fixes #148.