Repository navigation
Description
Problem or Motivation
CONTRIBUTING.md says to put test results, check status and the fail-to-pass evidence in a comment on the pull request, and never to type counts by hand. No command writes that comment. In one session of agent work, every agent that opened a pull request reported "no tool for a check-results comment", and typed the results into its report or into a comment by hand. A hand-typed count can be wrong, and a comment differs from one pull request to the next.
Proposed Solution & Architectural Design
- Add
devops pr evidence <number>. It reads the check runs of the head commit from GitHub, and thefail-to-passcheck run when the pull request is a fix. It writes one comment: the head commit, a table of the checks with their conclusion and link, the fail-to-pass run link, and a line for each skipped check. - The command keeps one comment: a marker line lets it update its own comment on a new head, and it never posts a second one.
- It takes no free text. The numbers come from GitHub, so a person cannot type a wrong count.
--dry-runprints the comment and the requests, as the otherprcommands do. Pacing and rate limits followdevops gh.- The comment ends with the attribution footer when run by an agent.
Open questions for the refine step: whether .github/workflows/fail-to-pass.yml already posts a comment for a fix (if it does, the command only adds the table); and whether the Service's implement job can call the same function for its own pull requests (see #3032, a trace in the pull request comment).
Target Subsystem
src/devops_cli/commands/pr.py and a new module for the comment text.
Existing Tool Considered
GitHub shows check results on the pull request page, and a workflow could post a summary. No existing action posts one comment per head with the project's rules and the fail-to-pass link. Cost to build: about 60k tokens and 3 hours. To keep: one template and its tests.
Proposed design
Problem statement
No command writes the check-results comment that CONTRIBUTING.md requires. Agents type counts by hand, so a count can be wrong and comments differ between pull requests. Add devops pr evidence to read GitHub check runs and post one stable comment.
Acceptance criteria
Requirement: Read head commit checks
The devops pr evidence command SHALL read the check runs of the pull request head commit from GitHub.
Scenario: Reads checks for the head commit
- WHEN A test runs
devops pr evidence 42against a recorded pull request with one head commit and two check runs. - THEN The command requests the check runs for that head commit SHA and builds a table with both check runs.
Requirement: Comment content
The command SHALL write one comment that holds the head commit, a table of checks with conclusion and link, the fail-to-pass run link for a fix, and one line for each skipped check.
Scenario: Builds the comment text
- WHEN The recorded head commit has a passing check and a skipped check, and the pull request is a fix with a fail-to-pass check run.
- THEN The comment names the head commit, lists each check with its conclusion and link, links the fail-to-pass run, and names the skipped check on its own line.
Requirement: Fail-to-pass link only for a fix
The command MUST add the fail-to-pass run link only when the pull request is a fix and that check run exists.
Scenario: Omits fail-to-pass for a non-fix
- WHEN A test runs the command for a pull request with a feat title and no fail-to-pass check run.
- THEN The comment text has no fail-to-pass section and no fail-to-pass link.
Requirement: One comment per pull request
The command SHALL keep one comment by a marker line, update that comment on a new head, and never post a second comment.
Scenario: Updates the marked comment
- WHEN A test runs the command twice and the recorded issue comments hold one comment with the marker line.
- THEN The second run sends one PATCH request for the marked comment and no POST request for a new comment.
Requirement: No free text
The command MUST take no free text and MUST take every number from GitHub.
Scenario: Rejects free text
- WHEN A test runs
devops pr evidence 42 --body '3 passed'. - THEN The command exits with a usage error and sends no request.
Requirement: Dry run
The command SHALL print the comment and the planned requests with --dry-run, and send no request.
Scenario: Dry run prints the plan
- WHEN A test runs
devops pr evidence 42 --dry-runagainst a recorded pull request. - THEN The command prints the comment text and the request plan and sends no write request.
Requirement: Agent attribution
The command SHALL end the comment with the attribution footer when an agent runs it.
Scenario: Agent attribution footer
- WHEN A test runs the command with the agent attribution setting and a recorded pull request.
- THEN The comment text ends with the attribution footer.
Existing Tool Considered
No alternatives check has run. GitHub shows check results on the pull request page, and a workflow could post a summary, but no open, maintained tool posts one project-formatted comment per head commit with the fail-to-pass link. The written cost to build, keep and fix that code is about 60k tokens and 3 hours.
Key questions
- Does .github/workflows/fail-to-pass.yml already post a comment for a fix?: No. The workflow runs
uv run devops ci fail-to-pass --base origin/and has no step that posts a comment. The new command must post the comment. [sources: .github/workflows/fail-to-pass.yml] - Can the Service implement job call the same comment function for its own pull requests?: Yes. Put the comment builder in the shared module
src/devops_cli/github/pr_evidence.py. The command calls it now. The Service can call it when feat(roadmap): a trace of every run, kept and shown in the PR comment and in explain #3032 wires the trace, with no command-line code. (best practice) [sources: src/devops_cli/commands/pr.py, src/devops_cli/github/pr_monitor.py]- Chosen: Shared module in src/devops_cli/github/. The command and the Service can import one builder, so the comment text has one owner.
- Rejected: Builder inside commands/pr.py. The Service would import a command module, and the text would be harder to reuse.
- Rejected: Separate copy in the Service. Two copies can differ, and the project rejects duplicated rules.
- How does the command identify its own comment to update?: Use the hidden marker line
<!-- devops-cli:pr-evidence -->at the top of the comment. Read the issue comments, select the comment that starts with the marker, and PATCH it. If none exists, POST one comment. (best practice) [sources: src/devops_cli/commands/pr.py]- Chosen: Hidden marker line. The marker identifies the comment after a restart, a new head commit or a new token.
- Rejected: Match the comment author. Another actor can use the same token or login, and the match is not stable.
- Rejected: Search the comment text. A person can write the same text, and the match is not stable.
- Which GitHub API does the command use to read check runs?: Use REST
GET /repos/{owner}/{repo}/commits/{ref}/check-runsthroughrun_gh, ascheck_verdictdoes. The response gives the check name, conclusion, details URL and head SHA. (best practice) [sources: src/devops_cli/github/check_verdict.py, src/devops_cli/github/rate_limiter.py]- Chosen: REST check-runs endpoint. It gives the conclusion, link and head SHA, and the project already reads check runs this way.
- Rejected: GraphQL status check rollup. It gives less check-run detail and adds a second query shape.
- Rejected: Parse
gh pr checkstext. The text format can change and gives no stable machine-readable fields.
- How does the command find the fail-to-pass check run?: Select the check run named
Fail-to-Pass Checkfrom the head commit check runs. If none exists, omit the link. (best practice) [sources: .github/workflows/fail-to-pass.yml]- Chosen: Check-run name. The workflow declares the stable name
Fail-to-Pass Checkfor the job. - Rejected: Workflow file name. The check-run response does not hold the workflow file path.
- Rejected: App or actor match. The same app runs other checks, so the match is not specific.
- Chosen: Check-run name. The workflow declares the stable name
- How does the command add the attribution footer?: Reuse the attribution footer builder in
pull_describeand the agent detection that the project already uses. Do not add a free-text option. (best practice) [sources: src/devops_cli/commands/pr.py, src/devops_cli/roadmap/pull_describe.py]- Chosen: Reuse the existing attribution footer. The project has one footer format, and the command takes no free text.
- Rejected: Add an attribution option. The option is free text, and the issue forbids free text.
- Rejected: Add no footer. The issue requires the footer when an agent runs the command.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
devops-cli-service commentedon Nov 2, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
featprefix of the title gives the type.(pr)scope of the title gives the scope.It removes a manual step that causes errors, but it does not block a release or fix a defect.It prevents wrong hand-typed counts and gives every PR a consistent check-results comment.The body estimates about 3 hours and one new module plus its tests.Both add a command in pr.py that reads PR check runs, but #170 waits for checks to finish while the candidate posts a formatted comment with the results.devops-cli-service commentedon Nov 2, 2026
Status set to Ready at 24ef67a (see proposed design in issue body).
devops-cli-service commentedon Nov 2, 2026
Staged: branch
feat/3199-post-the-check-results-of-a, draft pull request #3237. The pull request plans the item and closes no issue.The task groups, with the tokens of the inputs of each step, for a budget of 40000 tokens:
The plan run made 2 model request(s), and used 150600 input tokens and 9827 output tokens. The model made no tool call.
A model review of the plan found these points. They stop no draft, and a person judges them:
otherat group 1: The builder takes only the head SHA and the check runs, but its test needs a fix or feat decision. No task says where the command reads the pull request title or how it decides that the pull request is a fix. Evidence: "a function that builds the comment text from the head SHA and the check runs"docs(openspec): plan #3199 post pr check evidence comment
docs(openspec): plan #3199 post pr check evidence comment (#3237)
devops-cli-service commentedon Nov 6, 2026
Released in v0.75.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.75.0
devops-cli-service commentedon Nov 6, 2026
Live since 2026-11-06 23:46 UTC