Skip to content

feat(application): add --share-token to run describe CLI command (PYS…#688

Open
dima-aignostics wants to merge 1 commit into
mainfrom
feat/PYSDK-145-read-run-with-share-token
Open

feat(application): add --share-token to run describe CLI command (PYS…#688
dima-aignostics wants to merge 1 commit into
mainfrom
feat/PYSDK-145-read-run-with-share-token

Conversation

@dima-aignostics

@dima-aignostics dima-aignostics commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Add --share-token argument to next commands to the uvx aignostics application run group:

describe
dump-metadata
dump-item-metadata
result download

@dima-aignostics dima-aignostics requested a review from a team as a code owner June 22, 2026 08:46
@dima-aignostics dima-aignostics force-pushed the feat/PYSDK-145-read-run-with-share-token branch 4 times, most recently from b524be7 to 9510e92 Compare June 22, 2026 11:36
@dima-aignostics dima-aignostics force-pushed the feat/PYSDK-132-add-run-sharing-to-python-sdk branch 6 times, most recently from 6ae872e to 0bc4980 Compare June 23, 2026 21:15
Base automatically changed from feat/PYSDK-132-add-run-sharing-to-python-sdk to main June 29, 2026 08:04
@dima-aignostics dima-aignostics force-pushed the feat/PYSDK-145-read-run-with-share-token branch 3 times, most recently from 5ab4c44 to 23c6793 Compare June 30, 2026 14:04
@codecov

codecov Bot commented Jun 30, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 77.77778% with 12 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/aignostics/application/_cli.py 82.35% 1 Missing and 5 partials ⚠️
src/aignostics/platform/resources/runs.py 75.00% 3 Missing and 1 partial ⚠️
src/aignostics/application/_service.py 50.00% 1 Missing and 1 partial ⚠️
Files with missing lines Coverage Δ
src/aignostics/application/_service.py 63.03% <50.00%> (-3.02%) ⬇️
src/aignostics/platform/resources/runs.py 84.74% <75.00%> (-0.68%) ⬇️
src/aignostics/application/_cli.py 78.10% <82.35%> (-1.53%) ⬇️

... and 5 files with indirect coverage changes

…DK-145)

Recipients holding a share token secret can now describe a run without
OAuth login by passing --share-token <secret> to `application run describe`.
The token is used directly as the Bearer token for platform API requests.

- Adds `--share-token` option to `run describe`; when set, creates a
  `Client(token_provider=…)` bypassing OAuth, with `hide_platform_queue_position=True`
- Catches `UnauthorizedException` and `ForbiddenException` when using a share
  token and surfaces a clear "Access denied" message with exit code 1
- Adds 5 integration tests covering success (text + JSON), not-found,
  unauthorized, and forbidden paths

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@dima-aignostics dima-aignostics force-pushed the feat/PYSDK-145-read-run-with-share-token branch from 23c6793 to c3c99ef Compare June 30, 2026 15:38
@sonarqubecloud

Copy link
Copy Markdown

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