Skip to content

--skip-key-check flag is not respected during startup #91

@mcowger

Description

@mcowger

Bug Report

Description

The `--skip-key-check` CLI flag defined in `argumentParser.ts` is not being respected during startup. When users pass `--skip-key-check`, the API key validation still runs and can cause the process to exit prematurely, even when the user intends to bypass it (e.g., in CI environments or when keys are injected at runtime).

Steps to Reproduce

```bash
ai-code-review . --skip-key-check
```

Expected: API key validation is skipped on startup.
Actual: API key validation still runs, potentially exiting with an error.

Root Cause

The `skipKeyCheck` option is parsed and passed through `mapArgsToReviewOptions` in `argumentParser.ts`, but it is not properly wired into the startup validation logic that gates on API key presence.

Impact

  • CI/CD pipelines that inject API keys at runtime are broken
  • Users who set keys via non-standard environment variable paths are affected

Proposed Fix

Ensure the `skipKeyCheck` flag is checked before invoking API key validation on startup.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions