Skip to content

CLI help eagerly builds the analyzer graph and emits missing-key warnings #435

Closed

Description

@deepujain

Problem

Running skillspector --help constructs the complete analysis graph before Typer can render help. On a machine without LLM credentials, the help-only command takes roughly 17 seconds and emits analyzer availability warnings after the usage text:

WARNING [skillspector.graph] Skipping analyzer semantic_developer_intent: required API key is missing
WARNING [skillspector.graph] Skipping analyzer semantic_quality_policy: required API key is missing
WARNING [skillspector.graph] Skipping analyzer semantic_security_discovery: required API key is missing

The same eager initialization affects --version and other import-only CLI paths. These commands do not run a scan, so analyzer availability is irrelevant and the warnings look like help-command failures.

Reproduction

With the current main, clear provider credentials and run:

time skillspector --help

The command renders valid help, then prints the missing-key warnings. The delay comes from the module-level graph = create_graph() in skillspector.graph, imported by the CLI before argument dispatch.

Expected behavior

Help and version commands should return promptly without constructing analyzers or emitting scan-time warnings. The graph should still be constructed, and unavailable-analyzer warnings should still be emitted, when a real scan first invokes it.

Proposed scope

Make the exported graph object compile on first graph operation rather than at module import, preserving the existing graph.invoke / graph.ainvoke API. Add subprocess coverage that proves --help stays quiet without credentials and focused coverage that first invocation still delegates to the compiled graph.

Activity

  1. rng1995 commented on Sep 16, 2026

    @rng1995
    Collaborator

    Implementation is in progress in PR #436, which defers analyzer-graph initialization for CLI help. Keeping this issue open until the PR merges and help/version paths are verified not to initialize providers or emit key warnings.

  2. rng1995 commented on Oct 4, 2026

    @rng1995
    Collaborator

    Merge-state update checked on 2026-10-06: PR #436 has merged, and GitHub automatically closed this issue as completed.

    Graph initialization is deferred so CLI help and lightweight imports do not eagerly initialize analyzers. Graph-proxy/help regressions pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions