Skip to content

cli: resolve external workflow run references - #32

Merged
fingon merged 1 commit into
mainfrom
feat/avr-observability-cli
Aug 13, 2026
Merged

fingon merged 1 commit into
mainfrom
feat/avr-observability-cli

Conversation

@leolannenmaki

@leolannenmaki leolannenmaki commented Aug 13, 2026 •

Copy link
Copy Markdown
Collaborator
  • Accept GitHub run IDs and exact GitHub Actions URLs.
  • Accept Avrea console run URLs for the active environment.
  • Use direct or bounded platform filters and validate URL context.
  • Regenerate command documentation.

Summary by CodeRabbit

  • New Features
    • avr run view accepts Avrea run IDs, GitHub run IDs, GitHub Actions URLs, and Avrea console URLs.
    • Organization and environment details can be inferred from supported references.
    • Omitting a reference displays the 10 most recent runs.
  • Bug Fixes
    • Added validation for invalid, unsupported, or mismatched run references.
  • Documentation
    • Updated command help, reference guides, and man pages with the new RUN argument and examples.

@coderabbitai

coderabbitai Bot commented Aug 13, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0e1abd9d-7811-493a-b7a1-9d5442b065cd

📥 Commits

Reviewing files that changed from the base of the PR and between d0af3f8 and 1875531.

📒 Files selected for processing (2)
  • avrea_cli/helpers.py
  • tests/test_helpers.py
🚧 Files skipped from review as they are similar to previous changes (1)
  • avrea_cli/helpers.py

📝 Walkthrough

Walkthrough

avr run view now accepts Avrea and GitHub run IDs, GitHub Actions URLs, and Avrea console URLs. The CLI validates references, resolves runs through the API, checks organization scope, and retains recent-run listing without a reference.

Changes

Run reference support

Layer / File(s) Summary
Reference parsing and validation
avrea_cli/run_refs.py, tests/test_run_refs.py
Added normalized reference types and strict parsing for Avrea IDs, GitHub IDs, GitHub Actions URLs, and environment-approved Avrea console URLs.
Run resolution and CLI integration
avrea_cli/commands/run.py, avrea_cli/run_refs.py, avrea_cli/helpers.py, tests/test_run_refs.py, tests/test_run_view.py, tests/test_helpers.py
avr run view resolves references by Avrea or platform ID, supports attempt-specific lookup, validates repository and organization data, and preserves recent-run listing without a reference.
Command documentation
docs/REFERENCE.md, docs/reference.json, docs/starlight/reference/run.md, man/man1/avr-run-view.1
Updated the argument name from RUN_ID to RUN and documented supported identifiers, URLs, and examples.

Estimated code review effort: 4 (Complex) | ~45 minutes

Mergeability Score: 🔵 Low · up to 18755

The PR adds support for resolving external workflow run references, but organization validation may be skipped when slug lookup falls back to an organization ID, which could allow an incorrectly scoped run reference to be accepted. The change is mergeable with explicit owner awareness or follow-up on this validation path.

Suggested reviewers: ormod

Sequence Diagram(s)

sequenceDiagram
  participant run_view
  participant parse_run_reference
  participant get_verified_org_slug
  participant resolve_run_reference
  participant ApiClient
  run_view->>parse_run_reference: parse supplied run reference
  parse_run_reference-->>run_view: return normalized RunReference
  run_view->>get_verified_org_slug: verify URL organization scope
  get_verified_org_slug->>ApiClient: request organization membership
  ApiClient-->>get_verified_org_slug: return organization slug
  run_view->>resolve_run_reference: resolve reference for organization
  resolve_run_reference->>ApiClient: request the matching run
  ApiClient-->>resolve_run_reference: return and validate run data
  resolve_run_reference-->>run_view: return resolved run
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: resolving external workflow run references in the CLI.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/avr-observability-cli

Comment @coderabbitai help to get the list of available commands.

Comment thread tests/test_run_refs.py Fixed
coderabbitai[bot]

This comment was marked as resolved.

@leolannenmaki
leolannenmaki force-pushed the feat/avr-observability-cli branch from 89163ff to d0af3f8 Compare August 13, 2026 15:56
coderabbitai[bot]

This comment was marked as resolved.

Accept positive GitHub run IDs and exact GitHub Actions URLs.

Also accept Avrea console run URLs for the active environment.

Use direct or bounded platform filters and validate URL context.

Regenerate command documentation.
@leolannenmaki
leolannenmaki force-pushed the feat/avr-observability-cli branch from d0af3f8 to 1875531 Compare August 13, 2026 16:07
@fingon
fingon merged commit 630274c into main Aug 13, 2026
11 checks passed
@fingon
fingon deleted the feat/avr-observability-cli branch August 13, 2026 16:42
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.

3 participants