Skip to content

feat(checker): Add codeforces-batch-v1 judge#677

Draft
5K1PY wants to merge 1 commit into
masterfrom
codeforces-judge
Draft

feat(checker): Add codeforces-batch-v1 judge#677
5K1PY wants to merge 1 commit into
masterfrom
codeforces-judge

Conversation

@5K1PY

@5K1PY 5K1PY commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

@5K1PY 5K1PY self-assigned this Jun 29, 2026
if self.checker_rr.returncode == 0:
return RelativeSolutionResult(
verdict=Verdict.ok,
message="OK",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Shouldn't the message be the content of the report file?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I always treated the message as the thing shown to participants. Also report file can be multiline.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The checker comment is shown to participants, just only on samples during the contest proper.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

And message is always shown to the participants in the opendata module.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It's not a perfect match, but I feel it's kind of like when CMS only shows you the verdict for some test cases.

Regardless of if the comment is the same thing as a message, we should record it and show it in verbose mode. (And, in the future, make it available in the opendata module.)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Regardless of if the comment is the same thing as a message, we should record it and show it in verbose mode. (And, in the future, make it available in the opendata module.)

Yes, that is why this is a draft PR.


@staticmethod
def _invalid_path(name: str) -> str:
return os.path.join(gettempdir(), f"the-{name}-is-not-available-{uuid4()}")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit: testlib.h will always open all files. While it does not seem to be a problem if a file does not exists, if it does exist, at least its size will be checked. An attacker could create a large file or directory with the right name in /tmp/ to cause the judge to crash.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

So you would pass all the files always?

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