Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Balloon list: only add 'first in contest' if there is no earlier unju… #2812

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

meisterT
Copy link
Member

…dged submission.

The 'first for problem' is already working correctly as it re-uses the corresponding scoreboard data.

Fixes #2810.

Example submission list:
image

Corresponding balloon list:
image

Previously we would have awarded the first balloon a "first in contest".

…dged submission.

The 'first for problem' is already working correctly as it re-uses the
corresponding scoreboard data.

Fixes DOMjudge#2810.
@meisterT meisterT enabled auto-merge November 21, 2024 10:25
@eldering eldering disabled auto-merge November 21, 2024 10:44
@eldering
Copy link
Member

eldering commented Nov 21, 2024

How will this deal with the scenario where team A submits, then team B submits, B gets judged as correct, and then A gets judged as wrong answer?

  1. Will the balloon already be marked for team B even when A's submission is still pending?
  2. I so, will B's balloon retro-actively be updated to be marked as first in contest?

@eldering
Copy link
Member

How will this deal with the scenario where team A submits, then team B submits, B gets judged as correct, and then A gets judged as wrong answer?

1. Will the balloon already be marked for team B even when A's submission is still pending?

2. I so, will B's balloon retro-actively be updated to be marked as `first in contest`?

I think the ideal scenario is that a balloon will only be added once, never updated, and so a balloon should only be added after it is known that it's contents (including first in contest/for problem) won't change anymore.
Otherwise there's a high risk that users of the balloon interface hand out the wrong balloons.

@meisterT
Copy link
Member Author

In the same way as on the scoreboard as of today. We mark it as solved, but not first to solve while we have incomplete information. Then we have more information and you revisit that page later it gets marked as first to solve.

We could decide to hold the balloon back or mark it as potentially first to solve. Both things are more complex than this but of course can be done. Since this is fixing a clear bug and not making anything worse, I think we should address that separately.

@meisterT
Copy link
Member Author

@nickygerritsen how is this btw handled in ICPC tools?

@nickygerritsen
Copy link
Member

@nickygerritsen how is this btw handled in ICPC tools?

🤷 I can check the code to see if I can determine this, but I think it's easier there since it is a long running process that has state.

@eldering
Copy link
Member

In the same way as on the scoreboard as of today. We mark it as solved, but not first to solve while we have incomplete information. Then we have more information and you revisit that page later it gets marked as first to solve.

We could decide to hold the balloon back or mark it as potentially first to solve. Both things are more complex than this but of course can be done. Since this is fixing a clear bug and not making anything worse, I think we should address that separately.

I'm a bit wary of various such fixes we've been making over time that all patch a bug by doing their own DB querying, leading to inconsistent logic and making it harder to eventually implement other scoring strategies as we'd have to refactor each of these.

But ok, merge it. Also tagging #2525 for visibility.

@meisterT
Copy link
Member Author

That's a fair point with the DB query. We currently don't have first in contest in the award service, otherwise I would have checked whether we can reuse that. But this doesn't address the other point that you are making about immutability. Let's discuss in person before merging anything.

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.

Balloon list may have problem on awarding the "first to solve"
3 participants