[Compyle] Task cmgnd0cd0000qq2iboczqm0ls updates for Ordo#36
Conversation
WalkthroughPer-broker login flow added in Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant CLI as otp_cli.py (login)
participant API as Backend API
User->>CLI: Run login --broker {fyers|hdfc|mock} [options]
CLI->>API: initiate_login_api(broker, credentials)
API-->>CLI: session_data
alt fyers (OAuth)
CLI->>User: Show auth URL, prompt for redirect URL
User-->>CLI: Paste redirect URL
CLI->>CLI: parse_redirect_url() => auth_code, state
CLI->>API: complete_login_api(broker, session_data, auth_code, state)
API-->>CLI: tokens / success
else hdfc (OTP)
CLI->>User: Prompt for OTP
User-->>CLI: Enter OTP
CLI->>API: complete_login_api(broker, session_data, auth_code=None) with OTP in request_body
API-->>CLI: session confirmed
else mock
CLI->>API: complete_login_api(broker, session_data)
API-->>CLI: mock success
end
CLI-->>User: Print result / errors
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: ASSERTIVE Plan: Pro 📒 Files selected for processing (1)
🔇 Additional comments (5)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
scripts/otp_cli.py(3 hunks)
🧰 Additional context used
🪛 GitHub Actions: Python CI
scripts/otp_cli.py
[error] 151-151: Unsupported broker: invalid_broker. Supported brokers: fyers, hdfc, mock. This caused a typer.Exit(1) during test test_login_command_api_error, leading to test failure.
Summary
Base branch:
masterFeature branch:
compyle/cmgnd0cd0000qq2iboczqm0ls-2e8fda3Edited files
scripts/otp_cli.pySummary by CodeRabbit
New Features
Refactor