Skip to content

fix(cli): report an unknown project as not found in reindex - #2053

Merged
phernandez merged 1 commit into
mainfrom
fix/2029-index-unknown-project
Nov 4, 2026
Merged

phernandez merged 1 commit into
mainfrom
fix/2029-index-unknown-project

Conversation

@phernandez

Copy link
Copy Markdown
Member

Fixes #2029.

bm reindex -p <name> and bm project index <name> reported a mistyped name as "is a cloud project". When no local project matched, the code asked get_project_mode(), which treats every name missing from config as CLOUD. The not-found branch was unreachable for a typo.

Now only a config entry marked cloud gets the cloud message. Any other name gets:

Project 'zzzznotreal' not found. Local projects: main, research

The exit code is still 1 in both cases.

Tests in tests/cli/test_db_reindex.py use a real config and database, with no monkeypatching:

  • test_reindex_reports_an_unknown_project_as_not_found fails on main and passes here.
  • test_reindex_still_refuses_a_configured_cloud_project keeps the cloud message for a configured cloud project.

#1809 is the MCP side of the same kind of message and is not covered here.

πŸ€– Generated with Claude Code

https://claude.ai/code/session_01CMYVL4TcbWdXhdvAzxfqjo

reindex -p and project index asked get_project_mode() about a name that
matched no local project. That method treats every name missing from
config as CLOUD, so a typo was reported as a cloud project and the
not-found branch was unreachable. Only a config entry marked cloud is a
cloud project now; anything else is not found, with the local project
names listed.

Fixes #2029

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CMYVL4TcbWdXhdvAzxfqjo
Signed-off-by: phernandez <paul@basicmachines.co>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
πŸ“ Code Review βœ… Completed 2026-11-04T21:56:46.996518Z 06281bb PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with πŸ‘€ while any review is running, comments if it has suggestions, and reacts with πŸ‘ once all reviews finish with no findings.

@phernandez
phernandez merged commit 571277d into main Nov 4, 2026
51 checks passed
@phernandez
phernandez deleted the fix/2029-index-unknown-project branch November 4, 2026 22:14
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.

[BUG] reindex -p / project index with an unknown project name reports "is a cloud project" instead of "not found"

1 participant