Problem: submit always emitted \`submitting\` before confirming session validity, causing a spurious log when cookies were stale. PRACTICE fallback retries incorrectly re-authenticated (reusing \`_retried\` flag for two distinct retry reasons). Login modal on stale-cookie submit was not detected as an auth failure. Solution: proactively fetch \`/\` and run the login JS check before emitting \`submitting\`. Introduce \`_practice\` flag separate from \`_retried\` so PRACTICE fallback retries reuse the existing session. Detect login modal dialog text as \`needs_relogin\`. Set \`logged_in=True\` after successful in-submit login so cookies are saved for fallback retries. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| atcoder.py | ||
| base.py | ||
| codechef.py | ||
| codeforces.py | ||
| cses.py | ||
| kattis.py | ||
| language_ids.py | ||
| models.py | ||
| timeouts.py | ||
| usaco.py | ||