The 'inSession' variable is only able to become true when a session is started but has no way of becoming false again. This causes multiple invariants to be broken as well as allowing only 1 school session to run.
At the start of a school session, the 'inSession' variable is set to true, allowing for students to enroll and preventing students from being expelled, but it is also supposed to prevent 'graduateAndUpgrade' from successfully being called but there is not require statement or revert preventing that from happening:
Breaks 2 key invariants:
A school session lasts 4 weeks
System upgrade cannot take place unless school's sessionEnd
has reached
This can allow students to receive reviews and have their grades changed after the session was supposed to end, allows the system to upgrade at any time (this is also due to another bug that allows upgrades even if all of the students haven't gotten their 4 reviews yet, which breaks another variant), and will cause the 'inSession' variable to not be reset meaning there will only ever be 1 active game that is always in session, even past the 'sessionEnd' date.
Manual review and Foundry
In the 'graduateAndUpgrade' function, include a line that resets the 'inSession' variable to false:
`graduateAndUpgrade()` can be called successfully even when the school session has not ended
`inSession` not updated after during upgrade
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.