Repository navigation
Description
Problem or Motivation
devops pr monitor and devops pr check-readiness end a failure with this line: "Inspect failed job logs via: gh run view --log-failed <run_id>" (src/devops_cli/commands/pr.py, the print_warning call near line 699). Rule 7 of AGENTS.md says "Never run bare gh", and .claude/settings.json denies Bash(gh *). The tool tells an agent to run a command that the rules forbid. devops gh run view <run_id> --log-failed exists and does the same.
Seen on 2026-11-25 in the output of uv run devops pr monitor 7218.
Proposed Solution
Disposition: change the code.
Print devops gh run view --log-failed <run_id>. Put the text in the message catalog if it is not there. Add the run id of the failed check to the line when the command knows it.
Proof: a test of the command output that finds devops gh run view and no bare gh run view.
Existing Tool Considered
None. This is one message of the command.
Alternatives check of 2026-11-25: none.
Tool: none found.
Reason: Searches for a tool that rewrites bare gh hints or supplies the catalog string found nothing relevant; the need is a one-line fix inside the project's own pr.py warning, which no external tool covers.
Lacks:
- Hint text that names the wrapper instead of bare
gh - Run id added to the failure line
- Test asserting no bare
gh run view
Proposed design
Problem statement
The failed-check warning of devops pr monitor and devops pr check-readiness names bare gh run view. AGENTS.md rule 7 forbids bare gh, and .claude/settings.json denies Bash(gh *). The warning must name the devops gh wrapper and must not print a bare gh command.
Acceptance criteria
Requirement: Failed-check hint uses devops gh
The failed-check hint SHALL print devops gh run view --log-failed <run_id> and SHALL NOT print a bare gh run view command.
Scenario: Monitor reports a failed check
- WHEN
devops pr monitorexits with a failed check and no known run id - THEN the warning line is
Inspect failed job logs via: devops gh run view --log-failed <run_id>.
Requirement: Check-readiness hint uses devops gh
The check-readiness failed-check hint SHALL name devops gh run view and SHALL NOT name bare gh run view.
Scenario: Check-readiness reports a failed check
- WHEN
devops pr check-readinessreports a failed check - THEN the captured warning contains
devops gh run view --log-failedand no line starts withInspect failed job logs via: gh run view.
Requirement: Catalog message holds the hint
The failed-check hint SHALL be defined in the PR message catalog and formatted with the run id placeholder.
Scenario: Catalog formatting
- WHEN the failed-check hint is rendered
- THEN the warning equals
MESSAGES.pr.failed_check_log_hint.format(run_id='<run_id>').
Existing Tool Considered
The alternatives check of 2026-11-25 in the issue body records verdict none and Tool: none found. No open, maintained tool covers this one-line hint. The written cost of the in-repo change is about 2,000 tokens and 15 minutes to build, keep and fix.
Key questions
- Which command should the failed-check hint name?: Use
devops gh run view --log-failed <run_id>. Do not print baregh run view. (best practice) [sources: AGENTS.md, .claude/settings.json, src/devops_cli/commands/gh.py, docs/adr/0037-tool-commands-mirror-and-pass-through-options.md]- Rejected: Bare
gh run view. AGENTS.md rule 7 forbids baregh, and.claude/settings.jsondeniesBash(gh *). - Chosen:
devops gh run view.devops ghis the required wrapper and mirrors the GitHub CLI options. - Rejected: New PR-specific command.
devops ghalready covers the command, so a new command adds no value.
- Rejected: Bare
- Does the monitor know the failed run id?: No.
_handle_monitor_exitreadsstatus.checks_failed, and the check records expose a link, not a run id. Keep<run_id>as a placeholder. [sources: src/devops_cli/commands/pr.py] - Where should the hint text live?: Add
MESSAGES.pr.failed_check_log_hintto the PR message catalog and format it with the run id placeholder. (best practice) [sources: src/devops_cli/commands/pr.py]- Rejected: Keep the literal in
pr.py.pr.pyalready reads PR messages fromMESSAGES.pr, so a literal adds a second source. - Chosen: Add a PR catalog message. The issue asks for the catalog when the text is absent, and the command already uses
MESSAGES.pr.
- Rejected: Keep the literal in
- Should the hint parse a run id from the failed check link?: No. Parsing the link is fragile, and the issue asks for the run id only when the command knows it. Keep the placeholder. (best practice) [sources: src/devops_cli/commands/pr.py]
- Rejected: Parse the link. The link format is not a stable run id field, and parsing adds failure modes.
- Chosen: Keep
<run_id>. The monitor path has no run id field, and the placeholder matches the current hint.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 25, 2026
A one-line hint string correction with no blocker or deadline.Both involve devops gh commands, but #181 built those commands while the candidate fixes a hint string to reference them.devops-cli-service commentedon Nov 25, 2026
The result in the alternatives block of the issue body changed. Before this check: no check. A person decides what the new result means for the item.
Searches (3)
Tools considered:
Searches run:
Sources:
devops-cli-service commentedon Nov 28, 2026
Next step: the stage job writes the plan of the item. See the section Proposed design of the body.
devops-cli-service commentedon Nov 29, 2026
Released in v0.245.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.245.0
devops-cli-service commentedon Nov 29, 2026
Live since 2026-11-29 05:10 UTC