kattis: no contest concept — architecture mismatch #298

Closed
opened 2026-03-05 05:44:39 +00:00 by barrettruth · 1 comment
barrettruth commented 2026-03-05 05:44:39 +00:00

Kattis problems are identified by a slug alone with no enclosing contest. The current `platform + contest_id + problem_id` model doesn't fit: there is no meaningful `contest_id`, and 'contest' and 'problem' collapse into one thing.

`:CP kattis <problem_slug>` needs a code path that bypasses the contest layer entirely. This affects:

  • `parse_command`: what does `:CP kattis ` map to?
  • `setup_contest` / `setup_problem`: how does cache keying work with no contest?
  • `state.lua`: `contest_id` would be `nil` or equal to `problem_id`

This is a prerequisite for #296 (login + submit for Kattis).

Kattis problems are identified by a slug alone with no enclosing contest. The current \`platform + contest_id + problem_id\` model doesn't fit: there is no meaningful \`contest_id\`, and 'contest' and 'problem' collapse into one thing. \`:CP kattis <problem_slug>\` needs a code path that bypasses the contest layer entirely. This affects: - \`parse_command\`: what does \`:CP kattis <slug>\` map to? - \`setup_contest\` / \`setup_problem\`: how does cache keying work with no contest? - \`state.lua\`: \`contest_id\` would be \`nil\` or equal to \`problem_id\` This is a prerequisite for #296 (login + submit for Kattis).
barrettruth commented 2026-03-06 21:50:42 +00:00

Resolved by the slug-as-contest-id workaround. Both the single-problem path and the contest path are now covered by offline tests in #342.

Resolved by the slug-as-contest-id workaround. Both the single-problem path and the contest path are now covered by offline tests in #342.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
barrettruth/cp.nvim#298
No description provided.