Skip to content

An ICPC penalty charges for verdicts, and a tie is a tie - #104

Merged
kisielewski merged 1 commit into
mainfrom
fix/icpc-penalty-and-places
Sep 6, 2026
Merged

An ICPC penalty charges for verdicts, and a tie is a tie#104
kisielewski merged 1 commit into
mainfrom
fix/icpc-penalty-and-places

Conversation

@kisielewski

Copy link
Copy Markdown
Member

The boards are assembled here — the Server sends results and no ranking — so
nothing in any repository's gate was looking at the arithmetic. Three faults
were live at once, and all three were found by reading rather than by anything
going red.

What was wrong

  • Minutes were rounded, not floored. A submission at 20:30 cost twenty-one
    minutes. Up to a minute nobody spent, on every solved problem, and enough to
    swap two teams that were level.
  • Rows that tied were numbered 1 and 2 by position — and the position was
    whatever order the Server happened to send the contestants in. Stable,
    arbitrary, and it reads as a ruling.
  • The charge counted positions in front of the accepted run, not verdicts.
    A submission whose evaluation failed or which a manager cancelled cost
    twenty minutes. The Runner sends no score at all for a failure precisely
    because a zero would read as a wrong answer on every board that shows it —
    and the board charged it anyway.

What was already right: nothing after the accepted submission counts. ICPC
charges for every previously rejected run, and the word does the work.

What changed

minuteOf floors. IcpcCell carries attempts and rejected as two numbers
instead of deriving the cost from a position, and only a judged result short
of full marks is charged; failed and cancelled join the queue — shown as
?, costing nothing, cleared by a rejudge or by the manager ruling the
submission out, which the Server already keeps off the board entirely.

place shares a rank between level rows and the place after a shared one is the
position, so two firsts are followed by a third. It is shared, so the points
board gets it too, on an equal total.

A ? says which of three things it is — withheld by the freeze, not judged yet,
or no verdict returned. pendingLabel is one wording for both tables; two new
keys in both catalogues.

The fixture said something the Server never says

The fake modelled team-7's compilation error as state: "failed", which is
what an infrastructure failure leaves. A compilation error is judged —
compilation_failed returns Evaluated::Judged — so it is completed with 0,
and it is charged. Left alone, this change would have made the demo board show
a compilation error costing nothing.

That surfaced a second thing: resultDocument gave a compilation error the
ordinary three-test table, with test 1a passing 30/30, describing a program
that was never built. It now gets the document the Runner attaches — every test
carrying that verdict, worth nothing, with no measured memory. The seed also
gains one genuine unjudged run, before the freeze so the state is reachable
without ranking:read:unfrozen.

AlgoJudge/AlgoJudge-Server#95 mirrors the same two rows in ParityWorld.

Verification

scripts/check-ranking.mjs is new and gates: 35 assertions over the penalty,
the three pending reasons, ties, and the points board, driving the real
compiled module.

Every fix was sabotaged and reddened exactly the assertions that cover it —
floor→round 2, tie→position 2, charging the unjudged 4, one pending label for
all 2, counting past the accepted run 1. The two new browser assertions were
sabotaged the same way.

Green: lint (silent), lint:deps, typecheck, build, check:i18n,
check:ranking, and the full check:ui — 51 scripts.

One note on running check:ui locally: a checkout carrying a .env with
VITE_APP_API_BASE_URL fails sign-in-redirect, because the provider challenge
is built from that origin and the redirect leaves for a Server the fake run has
not got. Nothing to do with this change — it reproduces on main — and CI has
no .env.

Floors the minute, counts judged rejections rather than positions, and
shares a place between level rows on both boards. A `?` now says which of
three things it is. `check:ranking` holds the arithmetic and gates.
@kisielewski
kisielewski merged commit f25a1c2 into main Sep 6, 2026
3 checks passed
@kisielewski
kisielewski deleted the fix/icpc-penalty-and-places branch September 6, 2026 17:30
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.

1 participant