Skip to content

Conversation

@tuupke
Copy link
Contributor

@tuupke tuupke commented Dec 16, 2025

Replaces show_balloons_postfreeze with minimum_number_of_balloons which allows for sending out balloons to teams even during the freeze while still supporting the old behavior if desired.

This is useful as a motivational tool for teams that have not yet solved 'enough' problems before entering the freeze. e.g. 2 problems before the freeze while the expected number of problems to solve before the freeze is 3. By setting this new value to 3 the team will receive a balloon as long as the problem they've solved has been solved before the freeze.

Kept on draft until I fix the documentation and do some minor cleanup.

@tuupke
Copy link
Contributor Author

tuupke commented Dec 16, 2025

Mhh come to think of it, we don't really have the full old behavior anymore. Because now problems that are only solved in the freeze will never receive a balloon regardless of the value.

What do you think, should the old config var be reinstated?

@tuupke tuupke force-pushed the Feature/balloon-rework branch 2 times, most recently from 60343b5 to 682de1f Compare December 17, 2025 10:27
@cubercsl
Copy link
Contributor

cubercsl commented Dec 17, 2025

Possibly related to #2778

@tuupke
Copy link
Contributor Author

tuupke commented Dec 19, 2025

Possibly related to #2778

Yes thank you! I was looking for this exact issue but couldn't find it for some reason. These indeed serve the same purpose.

@tuupke tuupke marked this pull request as ready for review December 19, 2025 14:21
@tuupke
Copy link
Contributor Author

tuupke commented Dec 19, 2025

I'm quite sure the remarks phpstan makes are incorrect. Since otherwise it would not work at all while it does 🙃

@nickygerritsen
Copy link
Member

I'm quite sure the remarks phpstan makes are incorrect. Since otherwise it would not work at all while it does 🙃

Probably the docblocks for the methods being called are wrong.

Use

cd webapp
vendor/bin/phpstan analyze --configuration phpstan.dist.neon

to check locally btw.

Copy link
Contributor

@Kevinjil Kevinjil left a comment

Choose a reason for hiding this comment

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

Just a general question: has something (e.g. at SEERC) influenced why we want this feature compared to the last time it was discussed IRL at the hackathon?

@tuupke tuupke force-pushed the Feature/balloon-rework branch from 682de1f to 52d58f0 Compare December 19, 2025 16:12
@tuupke
Copy link
Contributor Author

tuupke commented Dec 19, 2025

Just a general question: has something (e.g. at SEERC) influenced why we want this feature compared to the last time it was discussed IRL at the hackathon?

Partly. Some were just because we we're already looking at this code because of a bug (hence Nicky's PR) Some discussion and talks 'inspired' me on how to implement and that this is a nice feature. It was also the case that there were some teams that only solved some of the easy problems in the freeze. Because this is somewhat common -especially on the early rungs of the tournament ladder- it might be a nice motivational feature to add.

The replacing of the old config flag came after (incorrectly) thinking that this change offered at least the same functionality as before.

Tbh I cannot recall this discussion, but if we're opposed we can close the PR; I don't think it hurts anything while it does add a new functionality. When declining the pr we should cherry-pick 706147e since it DRYs up the retrieving of balloon updates.

Balloons can be quite a motivator for a team and it can be frustrating
to spend >4 hours solving a problem to only get an AC during the freeze.
We used to have the show_balloons_postfreeze configflag to send balloons
during the freeze but this would always send balloons during the freeze.

show_balloons_postfreeze has now been replaced with
'minimum_number_of_balloons'. This setting now expresses the minimum
number of balloons to send to a team even during the freeze. To prevent
an information leak only balloons for problems that have been solved
before the freeze can be sent out.

Leaving this value to 0 keeps the 'old' behavior of not sending any
balloons while setting it to a value >#contestproblems results in the
old behaviour of sending all balloons during the freeze.
The computation for which balloons need to be sent out is a bit more
complex than before. Reusing the logic of the BalloonService keeps it
nice and DRY.
@tuupke tuupke force-pushed the Feature/balloon-rework branch from 52d58f0 to 37f27e8 Compare December 19, 2025 16:24
@tuupke tuupke requested a review from Kevinjil December 19, 2025 16:25
Copy link
Member

@vmcj vmcj left a comment

Choose a reason for hiding this comment

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

I think we shouldn't merge this without tests. I do agree it happens relatively often but some in the team had strong opinions on such a feature, because of the same opinion we don't test this ourselves at competitions so I think if we ship this we should test it in a different way (with Unit tests for example..)

@eldering
Copy link
Member

I'm not in favor of adding this because it adds extra complexity and weird exceptions. For example, what if a teams solves their first problem in the freeze, but it is an as yet unsolved problem? Highly unlikely maybe, but then that exposes crucial information during the freeze. There are likely similar edge-case issues, which I think is the reason we should not add this.

@eldering
Copy link
Member

I think a better way to solve this, is when show_balloons_postfreeze is enabled to show clearly which balloons are post-freeze and how many problems the team already solved. Then it becomes an easy non-technical detail to choose which teams to hand a post-freeze balloon out to.

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.

6 participants