Skip to content

feat: login --dry-run + profiles rename/rm (issue #66) - #70

Merged
anujhydrabadi merged 1 commit into
mainfrom
feat/login-dry-run-profile-mgmt
Aug 4, 2026
Merged

feat: login --dry-run + profiles rename/rm (issue #66)#70
anujhydrabadi merged 1 commit into
mainfrom
feat/login-dry-run-profile-mgmt

Conversation

@anujhydrabadi

Copy link
Copy Markdown
Contributor

Implements the two accepted concerns from #66 (concern 1 — flags missing from help — was already resolved; praxis profiles already covers list; use declined since login --profile X with a stored token is already a browser-less, key-less switch).

Changes

  1. praxis login --dry-run — the safe probe login: --url and --token missing from --help flag table; no safe way to probe them #66 asked for. Reports resolved profile + URL, server reachability, whether the browser would open or a stored token be reused, and exactly what happens to installed skills — then exits. The only network traffic is one read-only GET to /ai-api/auth/me (a 401 on an empty probe proves reachability). No browser, no API key, no credential or skill writes. Exit 0 = report complete; exit 5 = unreachable.
  2. praxis profiles rename OLD NEW — credentials-only rename via new credentials.Rename (keeps URL/username/token/raptor pairing; global pointer follows when it named OLD). Kills the "re-login to rename" workaround that minted an orphaned API key. Stale --local project pointers naming OLD fall back to global harmlessly (existing LocalModeActive design) — documented in help.
  3. praxis profiles rm NAME — deletes a non-active profile's credentials without the switch → logout → switch-back double skill-cycle. Refuses the active profile with a pointer to praxis logout.
  4. CLAUDE.md — codifies the single-profile-first design principle so future work follows it: power-user features are opt-in and must never regress or add noise to the single-profile flow. All three additions comply — the default login flow is byte-identical, and a single-profile user never needs the new subcommands.
  5. Meta-skill: documents praxis profiles (previously absent), the new subcommands, and --dry-run as the AI-safe login probe. README: command surface + rewritten rename/remove sections.

Testing

  • make test / make lint green; go test -race ./... clean.
  • cmd coverage 68.6% → 68.8%, credentials 77.1% → 78.1%.
  • Dry-run matrix test covers: no token / stored-valid / stored-rejected / --force / --token valid+rejected / unreachable (exit 5), plus a no-side-effects test asserting the credentials file and pointer are byte-identical after a dry-run aimed at a new profile+URL.
  • Live-verified: login --dry-run on a multi-profile machine correctly reported "active profile switches root → default; root's praxis-* org skills are wiped" for a bare login — the exact footgun from login: --url and --token missing from --help flag table; no safe way to probe them #66 — and reuse-token (no browser) for the current profile.

Closes #66.

🤖 Generated with Claude Code

Login was the only way to probe its own flags, and it is not a no-op:
it mints a real API key, flips the active profile, and swaps the whole
org-skill catalog (issue #66). Recovering from a throwaway profile then
required hand-editing managed files or a second key-minting login.

- `praxis login --dry-run`: reports resolved profile + URL, server
  reachability, browser-vs-token-reuse, and the exact skill effect,
  then exits. One read-only GET to /auth/me; no browser, no key, no
  credential or skill writes. Exit 0 = report complete, 5 = server
  unreachable.
- `praxis profiles rename OLD NEW`: credentials-only section rename
  (keeps URL/username/token/raptor pairing); the global active-profile
  pointer follows. Stale --local project pointers stay inert by design.
- `praxis profiles rm NAME`: delete a NON-active profile's credentials
  without the switch-logout-switch double skill-cycle. Refuses the
  active profile (that's `praxis logout`, which also cleans skills).
- CLAUDE.md: codify the single-profile-first design principle — these
  are opt-in power-user tools; the default flow is unchanged.
- Meta-skill documents `profiles` (previously missing entirely),
  the new subcommands, and --dry-run as the AI-safe login probe.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 4 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9c383df6-7d95-46a2-90a3-cff64a94e2c0

📥 Commits

Reviewing files that changed from the base of the PR and between b9f7cb1 and 5eac360.

📒 Files selected for processing (11)
  • CLAUDE.md
  • README.md
  • cmd/login.go
  • cmd/login_dryrun.go
  • cmd/login_dryrun_test.go
  • cmd/profiles_manage.go
  • cmd/profiles_manage_test.go
  • internal/credentials/credentials.go
  • internal/credentials/credentials_test.go
  • internal/skillinstall/dummy.go
  • internal/skillinstall/dummy_test.go

Comment @coderabbitai help to get the list of available commands.

@anujhydrabadi
anujhydrabadi merged commit e3c4c79 into main Aug 4, 2026
3 checks passed
@anujhydrabadi
anujhydrabadi deleted the feat/login-dry-run-profile-mgmt branch August 4, 2026 09:45
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.

login: --url and --token missing from --help flag table; no safe way to probe them

1 participant