Skip to content

feat(cli): add provider profile retest - #249

Merged
mohanagy merged 1 commit into
developmentfrom
feat/204-profile-retest
Jul 26, 2026
Merged

feat(cli): add provider profile retest#249
mohanagy merged 1 commit into
developmentfrom
feat/204-profile-retest

Conversation

@mohanagy

@mohanagy mohanagy commented Jul 26, 2026

Copy link
Copy Markdown
Owner

Part of #204\n\n## Summary\n- add miftah profile test --config <file> --profile <name> [--upstream <name>] for returning users\n- reuse the existing provider-declared profile-readiness path; test-profile retains its existing startup-only behavior\n- return only the redacted readiness report and exit nonzero for every non-ready bounded status\n- document the safe boundary and cover parser, helper, installed-package dispatch, explicit-profile enforcement, and README contracts\n\n## Safety boundary\nThis command does not accept an arbitrary tool or provider output. It does not mutate config, open OAuth, read provider token caches, or run a generic upstream probe. Only an already-reviewed provider adapter can declare the read-only readiness probe.\n\n## Validation\n- npm test\n- npm run test:core\n- npm run test:coverage\n- npm run lint\n- npm run typecheck\n- npm run build\n- npm run smoke:cli\n- npm run check:pack\n- npm run test:package

Summary by CodeRabbit

  • New Features

    • Added the profile test command to rerun a reviewed, read-only readiness check for an existing provider account.
    • Supports selecting a specific profile and optional upstream.
    • Provides redacted JSON results and returns exit code 0 only when ready; otherwise returns 1.
    • Does not recreate accounts, reopen authentication, modify configuration, or expose provider data.
  • Documentation

    • Updated CLI help, README, and changelog with usage details and behavior.

@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 632a38a0-3f16-400e-826f-f9cef204c75b

📥 Commits

Reviewing files that changed from the base of the PR and between 69fe7c5 and af4b4c2.

📒 Files selected for processing (10)
  • CHANGELOG.md
  • README.md
  • docs/cli.md
  • src/cli/main.ts
  • src/cli/parse.ts
  • src/cli/profile-readiness-command.ts
  • tests/cli-parse.test.ts
  • tests/package-contract.test.ts
  • tests/profile-readiness-command.test.ts
  • tests/readme-product-contract.test.ts

📝 Walkthrough

Walkthrough

Adds miftah profile test for running a reviewed provider readiness check against an explicit profile, returning a redacted JSON report and exit code based on readiness status. CLI parsing, execution, contract tests, README, CLI documentation, and changelog entries are updated.

Changes

Profile readiness test

Layer / File(s) Summary
CLI command wiring
src/cli/parse.ts, src/cli/profile-readiness-command.ts, src/cli/main.ts
Registers profile test, forwards config, profile, and optional upstream, prints the readiness report, and returns exit code 0 only for ready.
CLI behavior validation
tests/cli-parse.test.ts, tests/profile-readiness-command.test.ts, tests/package-contract.test.ts
Tests parsing, help text, required profile validation, report output, argument forwarding, and ready or non-ready exit codes.
Documentation and product contracts
README.md, docs/cli.md, tests/readme-product-contract.test.ts, CHANGELOG.md
Documents the read-only returning-profile workflow, its restrictions, selector, output, and exit-code behavior.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Poem

A bunny checks one profile bright,
With safe-read petals, pure and light.
No browser hops, no cache to roam,
JSON tells if readiness is home.
Exit codes twitch their little nose—
Reviewed checks keep things composed.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and clearly describes the main change: adding a provider profile retest command.
Description check ✅ Passed The description is mostly complete with Summary, safety-boundary details, and Validation, though it doesn’t use the template’s exact Security impact heading.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/204-profile-retest

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

@mohanagy
mohanagy merged commit 0a5ba20 into development Jul 26, 2026
12 checks passed
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.

1 participant