Skip to content

feat(server): keep theorem-name index in its dataset - #556

Merged
chris-dare-dev merged 1 commit into
mainfrom
claude/theorem-names-in-dataset
Nov 15, 2026
Merged

chris-dare-dev merged 1 commit into
mainfrom
claude/theorem-names-in-dataset

Conversation

@chris-dare-dev

Copy link
Copy Markdown
Owner

What

Moves the theorem-name index from index/sqlite/theorem_names.db to <lancedb>/derived/theorem_names.db, so cutover and rollback carry it with its chunks. Each notebook now reads its own index, and notebook ingest builds it. This is phase 1 of #551.

Closes #553

Verification

  • ruff check . is clean.
  • 6 new or updated tests fail on main and pass here:
    • Config derivation: shared default, notebook-routed, and an explicit dataset path.
    • The CLI writes to the derived path.
    • Notebook ingest builds the index.
    • The backup-set checkpoint includes the shared and per-notebook copies.
  • A cutover-then-rollback test checks that the index travels with its dataset.
  • Full pytest on Linux has 1 failure, test_symlink_loop_is_rejected. It fails on main too: Python 3.13's Path.resolve() no longer raises on symlink loops.

Notes


Generated by Claude Code

The theorem-name index lived at index/sqlite/theorem_names.db, beside
the dataset rather than in it, so every notebook-routed server read the
shared corpus's names, notebook ingest never built one, and a cutover
or rollback swapped the chunks but left the index behind.

The index now lives at <lancedb>/derived/theorem_names.db. LanceDB
ignores the extra directory, so the existing renames carry the index
with its chunks. Config and ApplicationPaths derive the path from the
dataset unless ARXMCP_THEOREM_NAMES_DB_PATH is set, notebook ingest
builds it, and the backup-set checkpoint includes the shared copy.

Upgrade: an existing index/sqlite/theorem_names.db is no longer read.
find_lemma_by_name takes in_memory_scan_fallback until
python -m ingest.index_theorem_names is re-run.

Closes #553
@chris-dare-dev
chris-dare-dev merged commit 7075251 into main Nov 15, 2026
1 check passed
@chris-dare-dev
chris-dare-dev deleted the claude/theorem-names-in-dataset branch November 15, 2026 22:47
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.

#551 phase 1: move the theorem-name index into the dataset dir

2 participants