feat: system test case download #268

Closed
opened 2026-02-27 00:22:21 +00:00 by barrettruth · 2 comments
barrettruth commented 2026-02-27 00:22:21 +00:00

Problem

cp.nvim only scrapes sample test cases shown on the problem statement page. After a contest ends, AtCoder makes the full system test input/output data publicly available. Being able to run a solution against the actual judge inputs locally — without submission — is invaluable for debugging solutions that passed samples but failed on submission.

Proposed solution

Add :CP fetch-system [<platform> <contest> <problem>] that calls oj download --system <URL> for the current problem. oj handles the download and places files in a directory; cp.nvim would import them into its cache/IO format alongside existing test cases.

system_tests = {
  backend = "oj",    -- "oj" | custom function
  auto_import = false,  -- auto-fetch after contest ends
}

This pairs with stress testing (issue #257): running stress tests with system inputs can immediately pinpoint the exact failing case.

Alternatives considered

Manual download via oj download --system URL and importing files by hand. This works but is friction that a :CP fetch-system command would eliminate.

## Problem cp.nvim only scrapes sample test cases shown on the problem statement page. After a contest ends, AtCoder makes the full system test input/output data publicly available. Being able to run a solution against the actual judge inputs locally — without submission — is invaluable for debugging solutions that passed samples but failed on submission. ## Proposed solution Add `:CP fetch-system [<platform> <contest> <problem>]` that calls `oj download --system <URL>` for the current problem. `oj` handles the download and places files in a directory; cp.nvim would import them into its cache/IO format alongside existing test cases. ```lua system_tests = { backend = "oj", -- "oj" | custom function auto_import = false, -- auto-fetch after contest ends } ``` This pairs with stress testing (issue #257): running stress tests with system inputs can immediately pinpoint the exact failing case. ## Alternatives considered Manual download via `oj download --system URL` and importing files by hand. This works but is friction that a `:CP fetch-system` command would eliminate.
barrettruth commented 2026-02-27 04:04:49 +00:00

DO NOTUSE OJ!

DO NOTUSE OJ!
barrettruth commented 2026-03-03 18:37:19 +00:00

Closing — none of the four supported platforms (Codeforces, AtCoder, CodeChef, CSES) provide reliable public access to system test data.

Closing — none of the four supported platforms (Codeforces, AtCoder, CodeChef, CSES) provide reliable public access to system test data.
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#268
No description provided.