Skip to content

Conversation

mpsijm
Copy link
Contributor

@mpsijm mpsijm commented Sep 21, 2025

This commit has been used in NWERC 2024 (d7cc716), as well as GCPC 2025 and BAPC 2025.
It follows the latest release-candidate specification of multi-pass validation: https://www.kattis.com/problem-package-format/spec/2025-09.html#multi-pass-validation (the mirror at https://icpc.io/problem-package-format/spec/2025-09.html should be deployed "soon™").
Copying the feedback directory to the next pass is an implementation of "All other files inside the feedback directory are guaranteed to persist between passes." Additionally, "Note that the nextpass.in will be removed before the next pass."

See also Kattis/problem-package-format#446 (comment) and #2307.

mkdir($passdir, 0755, true);

if ($passCnt > 1) {
system('cp -R ' . $passdir . '/../' . ($passCnt - 1) . '/feedback ' . $passdir . '/');
Copy link
Member

Choose a reason for hiding this comment

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

let's add some quoting here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good one! I've found dj_escapeshellargs in surrounding system() calls, so I've used that 🙂


if ($passCnt > 1) {
system('cp -R ' . $passdir . '/../' . ($passCnt - 1) . '/feedback ' . $passdir . '/');
system('rm ' . $passdir . '/feedback/nextpass.in');
Copy link
Member

Choose a reason for hiding this comment

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

... and here

…e nextpass.in)

This commit has been used in NWERC 2024 (d7cc716),
as well as GCPC 2025 and BAPC 2025.
It follows the latest release-candidate specification of multi-pass validation:
https://www.kattis.com/problem-package-format/spec/2025-09.html#multi-pass-validation
(the mirror at https://icpc.io/problem-package-format/spec/2025-09.html
should be deployed "soon™").
Copying the feedback directory to the next pass is an implementation of
"All other files inside the feedback directory are guaranteed to persist between passes."
Additionally, "Note that the `nextpass.in` will be removed before the next pass."

See also Kattis/problem-package-format#446 (comment)
Copy link
Member

@meisterT meisterT left a comment

Choose a reason for hiding this comment

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

Thanks!

@meisterT meisterT added this pull request to the merge queue Sep 29, 2025
Merged via the queue into DOMjudge:main with commit b30eb1a Sep 29, 2025
36 checks passed
@mpsijm mpsijm deleted the 2307-multi-pass branch September 29, 2025 17:02
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