Fix make reindex targets and reindex Obsidian in the vector store CLI #88

Merged
ryan merged 3 commits from fix/reindex-targets into main 2026-10-13 09:19:08 -04:00
Owner

make reindex and make reindex-obsidian have failed since they were added (April). Their python -c "\ strings used backslash continuations that kept the Makefile's tab indentation inside the Python code, so it died with IndentationError: unexpected indent.

  • Both targets now run python -m scripts.manage_vectorstore reindex | reindex-obsidian in the live color.
  • The CLI's reindex wiped the whole store but only re-indexed Paperless, silently dropping every Obsidian note. It now re-indexes both.
  • New reindex-obsidian command: clears and re-embeds only the vault.

A test pins what each command deletes and indexes. 572 unit tests and Ruff pass. make -n shows the expected commands.

Takes effect after a redeploy, since the script ships in the image.

🤖 Generated with Claude Code

`make reindex` and `make reindex-obsidian` have failed since they were added (April). Their `python -c "\` strings used backslash continuations that kept the Makefile's tab indentation inside the Python code, so it died with `IndentationError: unexpected indent`. - Both targets now run `python -m scripts.manage_vectorstore reindex | reindex-obsidian` in the live color. - The CLI's `reindex` wiped the whole store but only re-indexed Paperless, silently dropping every Obsidian note. It now re-indexes both. - New `reindex-obsidian` command: clears and re-embeds only the vault. A test pins what each command deletes and indexes. 572 unit tests and Ruff pass. `make -n` shows the expected commands. Takes effect after a redeploy, since the script ships in the image. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
ryan added 1 commit 2026-10-13 08:20:20 -04:00
Fix make reindex targets and reindex Obsidian in the vector store CLI
CI / backend (pull_request) Successful in 42s
CI / frontend (pull_request) Failing after 7s
CI / backend (push) Successful in 42s
CI / frontend (push) Failing after 7s
ec3d4229e3
`make reindex` and `make reindex-obsidian` built a `python -c` string with
backslash continuations, which kept the tab indentation inside the code, so
Python failed with IndentationError. The targets now call the existing
`scripts.manage_vectorstore` CLI. Its `reindex` wiped everything but only
re-indexed Paperless, dropping Obsidian notes; it now indexes both, and a new
`reindex-obsidian` command re-embeds only the vault.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ryan added 1 commit 2026-10-13 08:30:31 -04:00
Fetch Paperless before wiping the index in reindex
CI / backend (push) Successful in 42s
CI / frontend (push) Failing after 7s
CI / backend (pull_request) Successful in 42s
CI / frontend (pull_request) Failing after 7s
b8d8bb8a57
`reindex` deleted every chunk before contacting Paperless, so an unreachable
or empty Paperless left the store empty (which happened when Paperless was
crash-looping during its v3 upgrade). It now fetches first, aborts without
deleting if that fails or returns nothing, and indexes the fetched documents
instead of fetching twice.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Author
Owner

Review: added a fix. reindex used to wipe the whole store before contacting Paperless, so an unreachable or empty Paperless left the index empty (what happened on 2026-10-13 while Paperless was crash-looping during its v3 upgrade). It now fetches first, aborts without deleting if the fetch fails or returns nothing, and indexes the fetched documents without fetching twice. The new tests fail on the previous commit. 574 unit tests and Ruff pass.

Review: added a fix. reindex used to wipe the whole store before contacting Paperless, so an unreachable or empty Paperless left the index empty (what happened on 2026-10-13 while Paperless was crash-looping during its v3 upgrade). It now fetches first, aborts without deleting if the fetch fails or returns nothing, and indexes the fetched documents without fetching twice. The new tests fail on the previous commit. 574 unit tests and Ruff pass.
ryan added 1 commit 2026-10-13 08:58:51 -04:00
Merge branch 'main' into fix/reindex-targets
CI / backend (push) Successful in 42s
CI / frontend (push) Successful in 30s
CI / backend (pull_request) Successful in 42s
CI / frontend (pull_request) Successful in 30s
9508a8197b
ryan merged commit 47062ed207 into main 2026-10-13 09:19:08 -04:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ryan/simbarag#88