Repository navigation
fix(cli): prompt for cloud API key instead of requiring argv - #1938
Merged
Merged
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
phernandez
force-pushed
the
fix/1902-api-key-prompt
branch
from
October 29, 2026 02:33
79140cc to
fd732be
Compare
bm cloud api-key save required the bmc_ key as a positional argument, which leaves it in shell history and visible to other local users via ps. Make the argument optional and read the key from a hidden prompt when it is omitted. The positional form keeps working. Fixes #1902 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01CMYVL1x91B8kJxy7nn2GU8 Signed-off-by: phernandez <[email protected]>
phernandez
force-pushed
the
fix/1902-api-key-prompt
branch
from
October 29, 2026 02:42
fd732be to
537648b
Compare
phernandez
added a commit
that referenced
this pull request
Oct 29, 2026
## Why Two CodeRabbit deep-scan findings where uploaded or caller-supplied input on hosted Cloud drives unbounded work: - **#1899 (K19/C37):** project ZIP planning matches every archive file against every ignore pattern from the archive's own `.gitignore`/`.bmignore`. Neither count had a limit; only expanded bytes did (100MB). - **#1893 (K8):** Postgres boolean phrase parsing does a whole-query string replacement per quoted phrase, and `SearchQuery.text` had no length limit. ## What changed - `MAX_PROJECT_ZIP_FILES = 20_000` and `MAX_PROJECT_ZIP_IGNORE_PATTERNS = 500` (archive-authored patterns only; Basic Memory defaults don't count). Both fail fast with `ProjectZipImportError`, the same way the existing size cap does. - `MAX_SEARCH_TEXT_CHARS = 4_000` on `SearchQuery.text`. The MCP search tool assigns fields after construction, so the cap is enforced when the API router validates the request body, locally and on Cloud. The similar-notes probe is capped at 900 chars, well inside the limit. I picked hard limits over the "aggregate work budget" the scan suggested. They are simpler and fail with a clear message. Measured ZIP planning time (one core): | files | archive patterns | time | |---|---|---| | 20,000 | 500 | 17.4s | | 20,000 | 50 | 3.9s | | 2,000 | 500 | 1.7s | ## Verification - New tests for the file cap, the pattern cap (defaults excluded), the schema cap, and a 422 from `QUERY /v2/.../search/`. Each fails without the fix. - Related suites in full (importers, `tests/api/v2`, search schema and MCP search tools, project management): 665 passed, 1 skipped. - `just fast-check`: clean Cloud picks up both caps through `build_project_zip_import_plan` and the core search router after the next re-pin. No Cloud code change is needed. Stacked on #1938. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01CMYVL1x91B8kJxy7nn2GU8 --------- Signed-off-by: phernandez <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
bm cloud api-key save bmc_...required the key on the command line, which leaves it in shell history and visible to other local users throughps. Found by the CodeRabbit deep scan (K23). Fixes #1902.What changed
docs/cloud-cli.md,AGENTS.md) show the prompt form.Verification
tests/cli/test_cloud_api_key_save.py: the two prompt tests fail without the fix; the positional test passes before and after.just fast-check: cleanStacked on #1937.
🤖 Generated with Claude Code
https://claude.ai/code/session_01CMYVL1x91B8kJxy7nn2GU8