Skip to content

feat: complete bounded search, discovery and result summaries - #27

Open
Nerver-zip wants to merge 25 commits into
mainfrom
feat/search-discovery-aggregates
Open

Nerver-zip wants to merge 25 commits into
mainfrom
feat/search-discovery-aggregates

Conversation

@Nerver-zip

@Nerver-zip Nerver-zip commented Dec 2, 2026 •

Copy link
Copy Markdown
Owner

v0.3.0 candidate

Source 4a3bd3c5658fd2bbb17251d58f85b802346c8b10 implements the search, discovery, summary and opening-family changes. The candidate is available for independent Evalis integration and maintainer validation. Keep this PR open and unmerged.

Closes #17
Closes #18
Closes #19
Closes #16

Hardening

  • eco_any accepts 500 raw A00–E99 codes. Other lists accept 16 raw values each and 64 combined. The query string remains limited to 8192 bytes. A complete ECO set still excludes games without usable ECO metadata. Typed normalization, cursor identity and parameterized SQLite predicates are preserved.
  • The compact Explorer path accepts result_any without increasing its 16-byte per-game projection. Exhaustive result-set fixtures match the SQL planner and an independent CPI instance, including unknown results, repeated positions, terminal occurrences, and the depth boundary.
  • The approximate matcher now counts exact alias rows once toward its candidate budget. An exhaustive ranking oracle covers edit types, first-character errors, Unicode, compound names, aliases, homonyms and event editions. The published-catalog sample had warm p95 at or below 12.62 ms and all eight negative controls were empty. The primary unique-spelling stratum retrieved 56 of 56 targets in the top ten. The supplemental Docker Masters player sample retrieved 11 of 12. The miss was reported with candidate truncation. Quality and timing evidence.
  • Exact result-set summaries share the search predicate. The production 80-code family pages counted 177,589 Masters and 76,450 Elite games. Identity-filtered position summaries matched exact counts on both collections. Deadline (408), work-limit (422), and busy (429) responses remain explicit.

Production acceptance

  • The packaged CLI completed discovery-to-PGN flows on both published snapshots. The loaded candidate image completed both flows, all new capability probes, ECO pagination, exact selective summary checks, cancellation recovery, and a software-only v0.2.0 upgrade and rollback. All 37 active dataset file digests, saved scalar cursors, and legacy response digests matched through the cycle.

  • The private Compose workload used the default 512 MiB, two CPUs, two search workers and one aggregate slot. All 80 legacy and all 40 scalar mixed-load requests succeeded, and 39 of 40 discovery requests succeeded. The cgroup peaked at 536,879,104 bytes with reclaim and swap active. No OOM or unexpected restart occurred.

  • The first advisory-cold start exceeded the health window during a concurrent image build and reached application readiness after 199 s. The advisory-cold repeat reached Compose healthy in 71.44 s and the explicit restart in 71.75 s. Run the documented probe on the integration host to establish its readiness timing. Docker evidence and rollback commands.

  • The compact path converted the common multi-result Explorer cases from work-limit responses to 200. Start-position p95 was 22.05 ms for Elite and 162.87 ms for Masters. The rare Elite result matched the SQL-backed digest and improved from 10.84 to 1.34 ms p95.

  • The 10% p95 interactive target held across all seven paths in the matched repeats and in the median paired changes for each baseline and collection. The initial +28.03% Elite event and +67.62% Masters tail excursions are retained with all per-arm p50, p95 and p99 figures. The largest median paired increase was 7.77%. Paired interactive results.

  • The full local verification gate and the candidate source CI passed. The final branch CI passed on 392e147fab63c53e4c5bf051fc00f226bc5db773, including the unified gate and reproduction runner. That commit contains the measurements, verification utilities and documentation.

Candidate packages and compatibility

Build the exact source with the checked-in production Dockerfile. The Linux x86-64 CLI comes from the AMD64 image. The package includes license files, release notes, a manifest, and checksums.

git clone --branch feat/search-discovery-aggregates https://github.com/Nerver-zip/chess-database-api.git
cd chess-database-api
candidate=4a3bd3c5658fd2bbb17251d58f85b802346c8b10
mkdir -p data
./scripts/package_candidate.sh "$candidate" "$PWD/data/v0.3.0-candidate"
(cd data/v0.3.0-candidate && sha256sum -c SHA256SUMS)
Tested artifact SHA-256
Linux x86-64 CLI af4dac2565910ad391675245c9b19a52c351eb7021e324a1f1af813baef58084
Linux AMD64 Docker archive 1d6b8d3db9b28d631dc178da8028aa6a5d1e1dacc6e99d9974fbbaa5bbc8f6f9

Package manifest · Checksums · Candidate notes

Reuse dataset-masters-otb-r3, dataset-elite-online-r1, search-masters-otb-r3-d40-v1, and search-elite-online-r1-d30-v1. Catalog schema and search-index format remain version 1 with zero persistent growth, and HTTP remains under /v1/. No migration or index rebuild is required. The v0.2.0 rollback restores the original feature set using the same mounts.

Evalis handoff

Use the per-collection capabilities from GET /v1/collections. The client owns ECO family expansion. Keep game pages independent from on-demand exact summaries, debounce approximate requests, cancel obsolete work, and preserve snapshot-local IDs with their versions. Treat 408, 422, 429 and candidate truncation as explicit states. Deliberately allowlist the new routes and parameters in the same-origin gateway. See the consumer contract. Evalis remains unchanged.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant