Repository navigation
Add preflight rounds before competition start - #191
Merged
Merged
Conversation
tire-fire
force-pushed
the
feature/preflight-rounds
branch
from
November 8, 2026 16:54
303b61c to
dd770b3
Compare
tire-fire
force-pushed
the
feature/preflight-rounds
branch
from
November 8, 2026 17:27
dd770b3 to
2a45ffa
Compare
tire-fire
force-pushed
the
feature/preflight-rounds
branch
from
November 9, 2026 07:08
2a45ffa to
2a31d13
Compare
This was referenced Nov 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
While an
rvbcompetition is not started and no scored round exists yet, the engine runs preflight rounds: the same checks a scored round would run (inactive teams, disabled team services and checks without seeded credentials are skipped alike), with results stored in newpreflight_round_schemas/preflight_check_schemastables. They are never scored and never touchround_schemas, so points, uptime, and SLAs start clean.round_idandpreflight, and the result collector ignores results from the other kind of round.rvbcase only, from the DB rather than the in-memory round counter (which advances on rounds that stored nothing and is reseeded on restart): preflight while the competition is not started (GetCompetitionStarted, the same reader the UI and API gate on) and no scored round has been stored (GetLastRound). On a read error that iteration runs a preflight round, delaying scoring by one round. Stopping a competition that has stored scored rounds does not bring preflight back.GET /api/engine/resetnow also drops preflight rounds. Reset while stopped (or stopping before the first scored round is stored) re-enters preflight; competition state is kept, so injects keep their anchor.GET /api/engine/preflight(admin-only; stored error/debug text can contain credentials) returns the latest preflight round.preflightflag are discarded; scored rounds are unaffected. The new tables are added byAutoMigrate.ROUNDplaceholder is the preflight round number during preflight and the scored round number afterwards (both start at 1); documented in README anddocs/custom-checks.md.testutil.ResetCompetitionState). Integration tests cover preflight storage, empty rounds, isolation from scored rounds, the start/stop/legacy-row gate, stopping after an unstored empty round, and reset re-entering preflight while keeping the competition start.Known limits:
GET /api/engine/resetis a pre-existing cookie-only GET that changes state; it should become aPOSTin its own change.