Skip to content

fix(cli): import rich.progress symbols used by agentid commands#493

Open
JSap0914 wants to merge 1 commit into
openagents-org:developfrom
JSap0914:fix/cli-identity-rich-progress-import
Open

fix(cli): import rich.progress symbols used by agentid commands#493
JSap0914 wants to merge 1 commit into
openagents-org:developfrom
JSap0914:fix/cli-identity-rich-progress-import

Conversation

@JSap0914

Copy link
Copy Markdown

Bug

Every agentid subcommand in sdk/src/openagents/client/cli_identity.py crashes with NameError: name 'Progress' is not defined.

The commands use Progress, SpinnerColumn and TextColumn inside a with Progress(...) as progress: block, but cli_identity.py never imports them from rich.progress. The NameError is raised the moment the command reaches the progress block — before any network call — so the commands are completely unusable.

Affected subcommands: verify, info, resolve, verify-token, challenge, token, auth, claim.

The sibling cli_agent.py imports these symbols correctly; this just mirrors that import. (Same class of bug as the cli_agent.py missing-import fix.)

Fix

Add the missing import to cli_identity.py:

from rich.progress import Progress, SpinnerColumn, TextColumn

Verification

Added tests/agentid/test_cli_identity_imports.py, which invokes agentid verify via typer.testing.CliRunner with the verifier stubbed to stay offline, and asserts the command does not raise NameError and takes its handled error path.

$ pytest tests/agentid/test_cli_identity_imports.py -q
1 passed

Before the fix this test fails with NameError: name 'Progress' is not defined. Full tests/agentid suite still passes (51 passed).

The agentid subcommands (verify/info/resolve/verify-token/challenge/token/auth/claim) in cli_identity.py use Progress, SpinnerColumn and TextColumn inside a 'with Progress(...)' block but never imported them, so each command raised NameError: name 'Progress' is not defined before any network call.

Add the missing 'from rich.progress import Progress, SpinnerColumn, TextColumn' (mirroring cli_agent.py) and a regression test that invokes 'agentid verify' with the verifier stubbed offline and asserts no NameError.
Copilot AI review requested due to automatic review settings June 16, 2026 02:40
@vercel

vercel Bot commented Jun 16, 2026

Copy link
Copy Markdown

@JSap0914 is attempting to deploy a commit to the Raphael's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Fixes a runtime NameError in agentid CLI subcommands by importing the missing rich.progress symbols and adds a regression test to ensure agentid verify reaches the (stubbed) network layer without crashing.

Changes:

  • Import Progress, SpinnerColumn, and TextColumn in cli_identity.py to avoid NameError at runtime.
  • Add a regression test that stubs the verifier and asserts the command doesn’t crash with NameError.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
tests/agentid/test_cli_identity_imports.py Adds regression coverage for the CLI crash scenario by invoking agentid verify with a stubbed verifier.
sdk/src/openagents/client/cli_identity.py Adds missing rich.progress imports used by CLI progress blocks.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +3 to +8
The ``agentid`` subcommands (verify / info / resolve / verify-token /
challenge / token / auth / claim) use ``Progress``, ``SpinnerColumn`` and
``TextColumn`` from ``rich.progress`` inside a ``with Progress(...)`` block.
Those names were never imported in ``cli_identity.py``, so every one of those
commands crashed with ``NameError: name 'Progress' is not defined`` the moment
it reached the progress block — before any network call.
def validate(self, agent_id):
raise AgentIDConnectionError("offline (test stub)")

monkeypatch.setattr(agentid, "AgentIDVerifier", _OfflineVerifier)
Comment on lines +42 to +44
assert not isinstance(result.exception, NameError), (
f"agentid verify raised NameError: {result.exception}"
)
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.

2 participants