codingame_tools.client.common.protocol.report¶
report
¶
JSON-serializable dataclasses for the Report service's findReportBySubmission Codingame API method.
CgPuzzleFeedback
dataclass
¶
CgPuzzleFeedback(feedback_id, feedbacks, extra_data=dict(), codingamer_feedback=None)
Bases: JSONWizardX
Community feedback/rating summary for a puzzle, as embedded in
CgLastActivityPuzzle.feedback and CgPuzzleMinimalProgress.feedback
(puzzle.py).
feedbacks
instance-attribute
¶
feedbacks
A histogram of community feedback ratings (bucket counts), lowest rating first.
codingamer_feedback
class-attribute
instance-attribute
¶
codingamer_feedback = None
The requesting codingamer's own feedback rating for this puzzle, if given (scale unconfirmed--observed values are 1-5-ish star ratings). Not always present--absent from every example seen via Puzzle/findAllMinimalProgress.
CgReportPuzzleProgress
dataclass
¶
CgReportPuzzleProgress(id, achievement_count, done_achievement_count, validator_score, extra_data=dict())
Bases: JSONWizardX
Lightweight puzzle progress summary, as embedded in
CgSubmissionReport.puzzle_progress. A much smaller summary than CgLastActivityPuzzle
(last_activities.py) or CgPuzzleMinimalProgress (puzzle.py).
achievement_count
instance-attribute
¶
achievement_count
Total number of achievements associated with this puzzle.
done_achievement_count
instance-attribute
¶
done_achievement_count
Number of this puzzle's achievements the codingamer has unlocked.
validator_score
instance-attribute
¶
validator_score
Unclear why this differs from the enclosing CgSubmissionReport.score--observed as 0
here despite a 100.0 score/best_score on the same report. Possibly stale/unrelated to
this specific submission.
CgValidatorResult
dataclass
¶
CgValidatorResult(method_name, name, difficulty, success, extra_data=dict())
Bases: JSONWizardX
A single server-side validator's result for a submission, as embedded in
CgSubmissionReport.validators.
CgSubmissionReport
dataclass
¶
CgSubmissionReport(validator_shareable, extra_data=dict(), best_score=None, codingamer_id=None, submission_id=None, score=None, achievements_completed=None, shared=None, puzzle_progress=None, validators=None, achievements=None, feedback=None, _completed_time=Alias('completedTime', default=None))
Bases: JSONWizardX
The complete response to Report/findReportBySubmission: a report on a single puzzle submission's results.
CAUTION, confirmed live (2026-07-31, and again 2026-08-01 for a puzzle with no prior
submission at all--see best_score): calling findReportBySubmission right after
TestSession/submit can race server-side grading--every field below except
validator_shareable has been observed entirely absent (not merely null) in some
partial-report snapshot. All of them are therefore Optional here except
validator_shareable, the only field confirmed present in every observed case so far; a
report is only "done" once they're all populated. See
CgReportServiceHelper.find_report_by_submission_when_ready, which polls until that's
true (or a timeout elapses) instead of returning a partial report.
validator_shareable
instance-attribute
¶
validator_shareable
Whether this submission's validator results are eligible to be shared.
best_score
class-attribute
instance-attribute
¶
best_score = None
The codingamer's best-ever validator score for this puzzle, 0.0 to 100.0 (may be higher
than score if this submission wasn't their best attempt). Confirmed live (2026-08-01)
absent--not just this submission's own score, but this field specifically--for a puzzle
the codingamer had never before submitted, i.e. there's no historical "best" yet at the
moment this was polled. Absent while grading is still in progress--see the class
docstring.
codingamer_id
class-attribute
instance-attribute
¶
codingamer_id = None
The submitting codingamer's numeric ID. Absent while grading is still in progress--see the class docstring.
submission_id
class-attribute
instance-attribute
¶
submission_id = None
Numeric ID of the submission this report is for (matches the submission_id argument).
Absent while grading is still in progress--see the class docstring.
score
class-attribute
instance-attribute
¶
score = None
The submission's validator score, 0.0 to 100.0. Absent while grading is still in progress--see the class docstring.
achievements_completed
class-attribute
instance-attribute
¶
achievements_completed = None
Whether all achievements for this puzzle have been completed by the codingamer. Absent while grading is still in progress--see the class docstring.
shared
class-attribute
instance-attribute
¶
shared = None
Whether the codingamer has publicly shared their solution. Absent while grading is still in progress--see the class docstring.
puzzle_progress
class-attribute
instance-attribute
¶
puzzle_progress = None
Lightweight puzzle progress summary. Absent while grading is still in progress--see the class docstring.
validators
class-attribute
instance-attribute
¶
validators = None
Per-validator results for this submission. Absent while grading is still in progress--see the class docstring.
achievements
class-attribute
instance-attribute
¶
achievements = None
Achievements unlocked by this submission. Only observed as an empty list so far, so element shape is unknown otherwise. Absent while grading is still in progress--see the class docstring.
feedback
class-attribute
instance-attribute
¶
feedback = None
Community feedback/rating summary for the puzzle. Not confirmed to always be present (only a single example observed so far).
completed_time
property
writable
¶
completed_time
See the field docstring for _completed_time. Always UTC. None if not yet done.
is_ready
¶
is_ready()
Whether grading has finished--i.e. every field described as "absent while grading is
still in progress" above is now populated. See the class docstring and
CgReportServiceHelper.find_report_by_submission_when_ready.
Source code in codingame_tools/client/common/protocol/report.py
140 141 142 143 144 145 146 147 148 149 150 151 | |