Repository navigation
feat: evolve opening explorer into chess database api - #11
Merged
Merged
Conversation
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.
Chess Database API
chess-databaseCLI. The previous CLI, environment fallbacks, image tag, network aliases, and Compose service and mount defaults remain available. Canonical and legacy environment samples render identical default and named-volume configurations. Corpus and local Gigabase helpers accept--chess-databaseand retain--opening-exploreras an alias. GitHub now usesNerver-zip/chess-database-apiand redirects the former slug. Both published releases retain their IDs and distribution asset digests.Production evidence
Both enriched snapshots passed deep verification with their canonical artifacts intact. The Elite companion install reproduced its checksums, and Masters recovery removed an abandoned stage while preserving the active snapshot. The Elite full-depth workflow verified ply 60 continuation and a terminal board at ply 97 against canonical replay.
min_plies=0The ordinal scan supports common exact rating, date and year predicates within a separate bounded posting budget. Complex predicates can still return 422. The no-op ply filter uses CPI and returned the exact legacy body. Canonical replay verified every W/D/L and continuation count, including 2,903,599 at the filtered initial position, 183,790 at the rating-filtered Sicilian and 486,306 at the Sicilian using either the year filter or the equivalent ISO date filter.
With four simulated users and two search workers, autocomplete, metadata, position search and latest-board navigation each passed 40/40. Broad rating and date filters each passed 24/40, with 16 busy responses. All 300 legacy probes passed in separate deliberate overload traffic. One aggregation slot leaves a worker available for interactive search.
Legacy compatibility
CGB3, CPI v2,
games.idx, stable IDs, canonical PGNs, immutable release IDs and legacy HTTP contracts are preserved. The final paired legacy runs matched canonical artifact inventories, response bodies and same-snapshot ETags. The warm timing gate passed. The eviction-advised sequential p50 was 1.408 ms versus 1.305 ms on main (+7.9%, above the 5% threshold). Sequential p95 was +1.4%, concurrent p95 −3.8%, and concurrent throughput +2.9%. In a five-pair confirmation, sequential p50 was −0.9% and sequential p95 was +6.7%, above the 5% threshold. Concurrent p95 improved 1.8% and throughput rose 3.4%. A second five-pair confirmation paused the QEMU guest. Sequential p50 and p95 passed at −2.3% and −1.0%. Concurrent p95 rose 12.2%, p99 rose 13.7%, and throughput fell 5.5%, failing the existing gate. An additional five-pair control used the identical candidate executable in both arms. It passed the directional gate and still measured 13.9% lower concurrent p95 in the second arm, showing variation at the scale of the observed differences. Median concurrent server CPU rose 7.8% in the paused-guest baseline comparison and fell 7.4% in the identical-binary control. The failed baseline comparisons and all raw repetitions remain in the linked reports.Serving revision
3518a8e7f38b4497a5491dca926b54440da57848, native release binary SHA-2560436ed664d6305b0d3d01dc79bec92a48fb7833b1b190d2cdf832e1941c38c31.Operational acceptance
Default startup and reload rehash recorded artifact digests, verify identity, headers and accounting, and walk every CPI block. Promotion requires deep verification. Operators can repeat it at serving time using
CHESS_DATABASE_DEEP_VALIDATE_ON_STARTUP=true.Completed Elite-only Docker checks in a local QEMU guest used 512 MiB and two CPUs, verified normal serving and feature disablement, and saw zero OOMs in the serving cgroup. The recorded live rollback took 7.8 seconds and all 214 Explorer and PGN probes succeeded across the swap. The cold deep check was stopped before readiness. Native constrained Docker is unavailable in this workspace because the cgroup mount is read-only and KVM is unavailable.
With both collections mounted, the pinned runtime with the hardened native executable reached readiness after 1,006 seconds under QEMU at 512 MiB and two CPUs. This missed the 600-second window. The first ready sample recorded 1,023 CPU seconds, a 536,875,008-byte cgroup memory peak and zero OOM events. All 480 legacy requests passed in partially overlapping interactive workloads. The broad Masters rating request returned 22 deadlines and 98 busy responses. Both discovery-to-PGN flows ultimately passed. The initial concurrent Masters probe returned search_busy. An additional 240 legacy requests passed while reload verification was active. Both collections remained ready at 606 seconds. The reload client reached its 900-second deadline without a response. After the guest resumed following native benchmarking, the server logged successful completion for both versions and the cgroup still recorded zero OOM events. The pause prevents a continuous reload duration from that timestamp.
The repository Dockerfile built successfully at
5b94bbe. With both enriched snapshots, default serving settings, 512 MiB and two CPUs, the full image reached/readyafter 549 seconds in the guest. Docker reported healthy. The cgroup used 550 CPU seconds and recorded a 536,875,008-byte peak and zero OOM events. The Elite discovery flow passed. All 720 legacy requests passed across mixed traffic and SIGHUP verification. The three Elite filters completed 259 of 360 requests before reload and 228 of 360 during reload. The remaining requests returned HTTP 429. The same-snapshot SIGHUP reload completed in 536.41 seconds. Collection versions and capabilities matched afterward. Final cgroup totals were 1,209 CPU seconds, a 536,879,104-byte peak, zero OOM events and zero restarts. Full repository image reportOn the unconstrained native host, a same-snapshot reload of both enriched versions took 14.84 seconds under mixed traffic. All 80 legacy requests and 160 interactive discovery requests passed. Representative cold startup and reload of the full image under the target cap still require a native owner-host run. The acceptance procedure compares collection versions before and after loading the alternate Elite snapshot.
The updated worktree passed all eight stages of
./scripts/validate.sh, including 217 Python cases with eight environment-dependent skips. The lightweight reproduction runner, both native discovery workflows and the fresh full Masters replay passed. Hosted CI for the code changes (644043b)Reproduce and review