Skip to content

fix(cli): allow disposable doctor project under configured root - #1327

Merged
phernandez merged 3 commits into
mainfrom
salvage/1324-doctor-project-root
Aug 25, 2026
Merged

phernandez merged 3 commits into
mainfrom
salvage/1324-doctor-project-root

Conversation

@phernandez

Copy link
Copy Markdown
Member

Summary

Salvage of #1324 by @mikemikimike (fixes #1323) — cherry-picked onto an in-repo branch so the full CI suite runs (fork PRs skip it), with their commits and authorship preserved, plus a test commit on top.

The fix (from #1324)

bm doctor failed when BASIC_MEMORY_PROJECT_ROOT points at an existing project's directory (the Docker setup in #1323): doctor tried to create its temp project inside the root and the nested-project guard rejected it. Now:

  • New server endpoint POST /v2/projects/doctor → ProjectService.add_doctor_project() creates a server-named doctor-<hex> project under the configured root via a keyword-only allow_nested=True that no public route exposes — a user-supplied doctor- name still hits the guard (tested).
  • Under project_root, add_project derives the directory from the sanitized name, so the doctor project always gets its own <root>/doctor-<hex> subdirectory — never the root itself.
  • Cleanup passes delete_notes=True so the doctor directory is removed along with its registration (addresses both Codex P1 findings on fix(cli): allow disposable doctor project under configured root #1324).

Added on top

Verified: 107 tests green across the four affected files; ruff + ty clean.

Closes #1324.

🤖 Generated with Claude Code

https://claude.ai/code/session_01G4rbaeHJN3L7CREp5v38J9

mikemikimike and others added 3 commits August 25, 2026 12:11
Add the tests the salvaged #1324 commits were missing: the service-level
nested-under-root regression for #1323 (including directory cleanup via
delete_notes), the doctor endpoint's 201 and 400 responses (dropping the
pragma on its now-tested error path), and the typed client's doctor call.
Also record the fix in the v0.23.1 changelog entry.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01G4rbaeHJN3L7CREp5v38J9
Signed-off-by: phernandez <[email protected]>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 10d437eeec

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@phernandez
phernandez merged commit 7070232 into main Aug 25, 2026
29 checks passed
@phernandez
phernandez deleted the salvage/1324-doctor-project-root branch August 25, 2026 17: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.

bm doctor fails when BASIC_MEMORY_PROJECT_ROOT equals the project directory

2 participants