Skip to content

I1189 Add multi-pass problem support as per Problem Package Spec 2023-07draft#1190

Open
johnbrvc wants to merge 12 commits intopc2ccs:developfrom
johnbrvc:i1189_MultiPass
Open

I1189 Add multi-pass problem support as per Problem Package Spec 2023-07draft#1190
johnbrvc wants to merge 12 commits intopc2ccs:developfrom
johnbrvc:i1189_MultiPass

Conversation

@johnbrvc
Copy link
Collaborator

@johnbrvc johnbrvc commented Dec 1, 2025

Description of what the PR does

Adds support for multi-pass problems.

From the Problem Package Format specification 2023-07draft:

Multi-pass validation
A multi-pass validator can be used for problems that should run the submission multiple times sequentially, using a new input generated by output validator during the previous invocation of the submission.

The time and memory limit apply for each invocation separately.

To signal that the submission should be run again, the output validator must exit with code 42 and output the new input in the file nextpass.in in the feedback directory. Judging stops if no nextpass.in was created or the output validator exited with any other code. Note that the nextpass.in will be removed before the next pass.

It is a judge error to create the nextpass.in file and exit with any other code than 42. It is a judge error to run more passes than specified by the limits.validation_passes value in problem.yaml.

All other files inside the feedback directory are guaranteed to persist between passes. In particular, the validator should only append text to the judgemessage.txt to provide combined feedback for all passes.

Issue which the PR addresses

Fixes #1189

Environment in which the PR was developed (OS,IDE, Java version, etc.)

Windows 11/Ubuntu 24.04.3
java version "1.8.0_321"
Java(TM) SE Runtime Environment (build 1.8.0_321-b07)
Java HotSpot(TM) 64-Bit Server VM (build 25.321-b07, mixed mode)

Precise steps for testing the PR (i.e., how to demonstrate that it works correctly)

PR has been tested in 2 live contests: NWERC2025 Practice and NWERC2025 Regional.

@johnbrvc will put together a sample contest based upon one of the problems from the NWERC contests. This will allow easy testing.

johnbrvc and others added 10 commits September 30, 2025 14:32
Move getIFiles() to EventFeedUtilities from RemoteContestAPIAdapter.  This class converts a byte stream to a zip file and extracts the contents to a List of IFile objects.
Add additional getIFiles(String) method to EventFeedUtilities to accept a BASE64 encoded string consisting of a ZIP file, then decode that and call the getIFiles(bte []) method.
Change the CLICS 2023-04 submission service to accept the previous format (a list of BASE64 encoded files) for backward compatibility, and, also accept the correct format (BAS64 encoded ZIP file).  The distinction is made by looking at the mime type of the FILE objects passed.
Update pc2submit command line utility to put the source files into a zip file, then encode that as base64 and send it off.  [This fix for pc2submit was provided by Nicky Gerritsen from the DOMjudge team.]
Setting the contest thaw time using the Contest Service PATCH facility was a bit of a black box and it was hard to determine what happened.  Now, we provide better logging.  In addition, we call the proper method to set the thaw time.
CLICSContestInfo:  be sure to include the configured thaw time value in the contest information notification message and the contests endpoint.
we haven't yet figured out how to make the hyperlinks point to different
problem writeups when there are two Divisions.
Preliminary code to support clics draft multi-pass for nwerc25
@johnbrvc johnbrvc self-assigned this Dec 1, 2025
@johnbrvc johnbrvc added this to the 9.12.0 milestone Dec 1, 2025
Fix TabSeparatedValueParser to allow backslash escaping of characters in fields.
CI: Allow the timelimit in the CLICS section to be a Double (SEERC contest did this)
CI: Add better exception handling if invalid institution information is returned
Fixed NPE added by adding Double processing.
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.

Add support for multi-pass problems as per Problem Package Format Spec 2023-07

2 participants