Skip to content

Add JSON APIs for submission details and use them in SolutionChecker.py - #1712

Open
veluca93 wants to merge 6 commits into
cms-dev:mainfrom
veluca93:api-submission-details
Open

Add JSON APIs for submission details and use them in SolutionChecker.py#1712
veluca93 wants to merge 6 commits into
cms-dev:mainfrom
veluca93:api-submission-details

Conversation

@veluca93

Copy link
Copy Markdown
Contributor

No description provided.

@veluca93
veluca93 requested review from gollux and prandla August 22, 2026 16:04
@codecov

codecov Bot commented Aug 22, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 86.95652% with 105 lines in your changes missing coverage. Please review.
✅ Project coverage is 56.68%. Comparing base (114df9c) to head (e82cec0).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
cmscontrib/SolutionChecker.py 74.16% 77 Missing ⚠️
cms/server/contest/handlers/api.py 73.91% 12 Missing ⚠️
cms/grading/scoretypes/abc.py 91.07% 5 Missing ⚠️
cms/server/contest/handlers/contest.py 84.37% 5 Missing ⚠️
cms/grading/scoretypes/Sum.py 85.00% 3 Missing ⚠️
cms/server/contest/handlers/tasksubmission.py 50.00% 1 Missing ⚠️
...suite/unit_tests/cmscontrib/SolutionCheckerTest.py 99.43% 1 Missing ⚠️
cmstestsuite/unit_tests/server/contest/api_test.py 99.07% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1712      +/-   ##
==========================================
+ Coverage   55.05%   56.68%   +1.63%     
==========================================
  Files         339      344       +5     
  Lines       27401    28238     +837     
==========================================
+ Hits        15085    16007     +922     
+ Misses      12316    12231      -85     
Flag Coverage Δ
functionaltests 0.00% <0.00%> (ø)
unittests 56.68% <86.95%> (+1.63%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@veluca93
veluca93 requested a review from Virv12 August 22, 2026 20:48
Comment thread cmscontrib/SolutionChecker.py Outdated
Comment thread cmscontrib/SolutionChecker.py Outdated
Comment thread cmscontrib/SolutionChecker.py Outdated
Comment thread docs/API.rst Outdated
Comment thread cms/server/contest/handlers/api.py Outdated
Comment on lines +239 to +248
is_analysis_mode = self.r_params["actual_phase"] == 3
if submission.tokened() or is_analysis_mode:
raw_details = sr.score_details
else:
raw_details = sr.public_score_details

if is_analysis_mode:
feedback_level = FEEDBACK_LEVEL_FULL
else:
feedback_level = task.feedback_level

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this logic is duplicated with tasksubmission.py, maybe it should be factored out somewhere (to ensure they stay in sync mainly)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a commit on top that refactors that logic, PTAL - I am not fully convinced, but if you like it I'll fold it into the relevant commit :-)

Includes an admin-only full_details endpoint.
- Subtask assertions
- Admin token support
- Final report table
@veluca93
veluca93 force-pushed the api-submission-details branch from bc08ea8 to e82cec0 Compare September 7, 2026 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants