Skip to content

[Integration] Position search — maintainer acceptance of PR #11 - #12

Merged
itshak merged 24 commits into
mainfrom
integration/position-search-pr11
Dec 4, 2026
Merged

itshak merged 24 commits into
mainfrom
integration/position-search-pr11

Conversation

@itshak

@itshak itshak commented Dec 2, 2026 •

Copy link
Copy Markdown
Owner

Scope

Integrates Tulio Vianna's PR #11 with its original commits preserved. CBVault provides canonical, independently validated partial-position search across classic CBH and native 2CBH. Supports bounded First/Last, persistence, mirrors, jokers, record scope, FEN/relative numbering and optional branch-local variations. Does not reproduce the observed ChessBase window defects.

See ADR-009, search guide, validation report and acceptance runbook.

Verification

  • Original hardened integration (2a31c08): all eight CI jobs passed.
  • Published GigaChess 0.3.1 dependency upgrade (beff433): cross-platform functional CI passed (run); native corpus checks run.
  • On aiserver, all 20 position tests passed in both mapped and positioned modes; acceptance-tool tests 15/15 passed. Strict OpenSpec validation passed.
  • Fresh licensed Mega 2026 validation using the published GigaChess 0.3.1 build: Gate A 22/22 checks over 1,213 stratified records, Gate B 66/66 exact discrepancy-accountability checks over eleven searches and six execution configurations. Zero unaccounted differences; historical ChessBase reference memberships remain immutable. Full integrity scan: 11,743,083 records, 933,185,514 total plies, zero failures.
  • Independent replay of CBVault-exported PGN checks semantic matching rather than independently decoding every record. Full-set discrepancy partitions are supported by controlled ChessBase experiments and independent sampled witnesses, not exhaustive independent PGN decoding.
  • Public synthetic regressions cover both formats and no licensed data is required in CI. Prior native benchmark evidence and full paired measurements are retained in the validation report.
  • Fresh paired pre/post GigaChess upgrade Mega benchmark, 4 workers positioned I/O, three alternating repetitions each: initial position 0.490084 → 0.466586 s; rare bishop 9.777245 → 9.765316 s; bounded king position 2.550084 → 2.561676 s. Exact ordered memberships agree in all comparisons. Full verification passed; private data remained local.

Integration

Latest branch changes after beff433 enable automatic functional and native CI on each integration push. Do not disclose licensed data or private membership fingerprints. Preserve contributor attribution and merge history. Final native benchmark and upstream npm release retry status will be recorded before release.

tuliovianna-lab and others added 24 commits November 30, 2026 09:29
- query::PositionQuery on GameDataQuery::position: "Look for", "Or" and
  "Exclude" boards of men (a piece of a colour, or a joker for any man of a
  colour), horizontal and vertical mirrors (colours swapped), and First,
  Length, Last with the dialog's defaults. "Sacrifice" is refused as
  unsupported.
- The fragment compiles to bitboards per orientation; the replay stage tests
  it on each main-line position in the same single replay as the endings, and
  stops once the answer is known. Ending-only queries keep their own sink.
- parse_fragment and the cbvault search options --look-for, --or, --exclude,
  --mirror, --first-move, --length, --last-move, --sacrifice.
- Tests on classic and 2CBH fixtures, CLI tests, fixture and whole-database
  benchmarks, docs/search.md and the OpenSpec change search-position.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ovenance and measurements

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eview tests

- Tracker::passed: after a main-line move, a next move past Last settles the
  answer, so the move after Last is never decoded (a corrupt one no longer
  fails a valid 1..=Last search).
- MainLine::resume ends the main line, so no variation move is decoded.
- Tests: a 2CBH variation, both mirrors together, a set-up start (Black to
  move on move 10), Length up to Last, the same man in Look for and Exclude,
  a corrupt move right after Last, and an exhaustive square-by-square
  gigachess reference over every man on every square plus 2,000
  pseudo-random combinations of boards, mirrors and windows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
"Vertical" reflects across the vertical axis (files a<->h); "Horizontal"
across the horizontal axis (ranks 1<->8) with the colours swapped. Checked
against ChessBase on Mega Database 2026 (white bishop on h7): Horizontal
344,642 (cbvault 342,106), Vertical 395,103 (cbvault 389,913); the dialog
draws the axis as a red line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Mirror axes, "Or" and the start position agree with ChessBase on Mega
Database 2026; ChessBase reads past move Last by a rule not yet
established, recorded with the counts in docs/search.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Measured on Mega Database 2026: ChessBase looks at every position from the
start through move max(Last, First + 1), plus the position after White's
following move; First does not cut the positions before it. Eleven searches
agree within 0.03% (docs/search.md).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…cope, MoveNumbering, variations, and Gates A/B
@itshak
itshak marked this pull request as ready for review December 4, 2026 01:18
@itshak
itshak merged commit eb3e8a3 into main Dec 4, 2026
16 checks passed
@itshak itshak mentioned this pull request Dec 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants