Repository navigation
Knowledge: import downloaded puzzles, evaluations and test positions (draft-1) - #27
Merged
Merged
Conversation
…les, evaluations and test positions (cjus/chessdb#2) knowledge/import starts an import of a file the client downloaded and answers at once; knowledge/status reports imports; knowledge/cancel stops one. The node verifies the manifest's checksum before reading a record; imports resume and repeat safely. Spec, cnp::knowledge types, tests, and a conformance session. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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.
For cjus/chessdb#2 (chessdb's knowledge library, cjus/chessdb#36).
What
A proposed
draft-1extension,knowledge/…, the import half:knowledge/import: the client hands the node a file it downloaded (absolute path + manifest: source, release, URL, retrieval date, SHA-256, SPDX licence, attribution). Answers at once; the import runs on.knowledge/status: where each import is (verifying,importing,complete,cancelled,failed), with committed counts.knowledge/cancel: stops at the next batch; what is committed stays.Kinds:
lichess-puzzles,lichess-evals,sts-epd.Design choices (for review)
failed: checksum, not imported.Not in draft 1: reading the knowledge (puzzles by theme/rating, analyses of a position), progress notifications, reading rejected records, Lumbra games.
Checks
cargo fmt --check,clippy --workspace --all-targets -D warnings,cargo test --workspace(76 pass; 6 new, one checks the spec's JSON examples against the types),RUSTDOCFLAGS=-D warnings cargo doc,cargo deny checkall pass locally. New conformance sessionknowledge/import-refusals; the example node skips it (14 passed, 59 skipped, 0 failed).🤖 Generated with Claude Code