Skip to content

feat(roadmap): post quality gate evidence on delivery PR #4129

Closed

Description

@dan-petty

Problem or Motivation

In src/devops_cli/roadmap/implement/implement_run.py, the implement job runs checks and marks the delivery pull request ready for review via self._ready(pull). However, it does not execute devops pr evidence <pull>.

AGENTS.md Rule 4 & 6 and CONTRIBUTING.md line 154 establish that every PR should carry the standardized quality gate evidence comment generated by devops pr evidence <number> (listing the head commit, status of all remote CI checks, links, and skipped runs). When the service creates a PR, it leaves behind only an internal bot step summary without the official review evidence table, requiring humans to manually run devops pr evidence.

Proposed Solution & Architectural Design

In src/devops_cli/roadmap/implement/implement_run.py:

  1. In _checks(pull) or immediately before _ready(pull) in execute(), invoke evidence_pull(self.repo, pull) (or run devops pr evidence <pull>).
  2. Ensure that when checks settle cleanly, the single check-results comment is created or updated before the PR transitions out of draft.

Target Subsystem

SDLC, Git & PR Governance

Existing Tool Considered

devops pr evidence (src/devops_cli/commands/pr.py:evidence_cmd and evidence_pull). Reusing this existing command within implement_run.py requires approximately 200 lines of glue code and tests.

Standards Compliance

  • I confirm this proposal aligns with AGENTS.md engineering principles (cyclomatic complexity <= 10, nesting <= 5, zero bare exceptions, tests that cover the changed lines).
  • I am willing to submit a pull request implementing this feature with accompanying tests.

Proposed design

Problem statement

The implement job marks a delivery pull request ready for review without posting the quality gate evidence comment. People must run devops pr evidence by hand. This change makes the job publish the evidence before it marks the pull request ready.

Acceptance criteria

Requirement: Evidence before ready

The implement job SHALL publish the delivery pull request evidence after checks pass and before marking it ready.

Scenario: Checks pass and evidence posts

  • WHEN the delivery pull request checks settle with a ready result
  • THEN the job publishes the evidence and then marks the pull request ready

Requirement: Evidence failure stops the item

The implement job MUST stop the item before marking the pull request ready when evidence publication fails.

Scenario: Evidence publication fails

  • WHEN the evidence publisher raises a GitHub operation error
  • THEN the job stops the item, leaves the pull request in draft, and sets the item Blocked

Requirement: One evidence comment

The implement job SHALL use the existing evidence publisher, which keeps one comment per head commit.

Scenario: The evidence comment already exists

  • WHEN the pull request already has an evidence comment from the same login
  • THEN the publisher updates that comment and posts no second comment

Existing Tool Considered

No alternatives check has run. The existing devops pr evidence command calls publish_pr_evidence. That function writes the head commit and check status as one updatable comment. It lacks only a call from the implement job. The job can call the function directly, so no new evidence code is needed.

Key questions

  • Should the implement job reuse the existing evidence publisher or build its own evidence comment?: Reuse publish_pr_evidence from devops_cli.github.pr_evidence. The devops pr evidence command already calls it. The job needs no second evidence renderer. (best practice) [sources: src/devops_cli/commands/pr.py, src/devops_cli/roadmap/implement/implement_run.py]
    • Chosen: Reuse publish_pr_evidence. It already builds the head commit and check table as one updatable comment.
    • Rejected: Build a second evidence renderer. It duplicates the existing command and adds maintenance cost.
    • Rejected: Run devops pr evidence as a subprocess. It adds a shell call and command parsing where an in-process function exists.
  • Where in the implement run should the job publish the evidence?: In _ItemRun._ready, after draft_readiness returns READY and before mark_ready. This point uses the final head commit and the settled checks. (best practice) [sources: src/devops_cli/roadmap/implement/implement_run.py]
    • Rejected: In _checks after the watch. The repair loop can push a new head after the watch, so evidence can become stale.
    • Rejected: In execute before _ready. It separates the evidence from the readiness decision and repeats the final head read.
    • Chosen: In _ready before mark_ready. It is the single transition point and it already reads the final pull status.
  • What should the job do when publishing the evidence fails?: Stop the item before mark_ready with a GitHubOperationError reason. The pull request stays a draft and the item becomes Blocked. (best practice) [sources: AGENTS.md, CONTRIBUTING.md, src/devops_cli/roadmap/implement/implement_run.py]
    • Rejected: Log and continue. It marks the pull request ready without the required evidence comment.
    • Chosen: Stop before ready. It keeps the evidence as a condition of the ready transition and lets a retry post it.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Alternatives check of 2026-11-18: none.
Tool: none found.
Reason: Web searches found only generic PR-comment upserters, which render no head-commit or CI-check evidence and cannot be called from the Python implement job; the needed publisher already exists inside the project's own repository.

Lacks:

  • No head-commit and CI-check status table
  • No links or skipped-run rendering
  • Not callable from the Python implement job
  • No gate on marking the pull request ready

Activity

  1. added
    source/agent
    type/feature
    scope/roadmap
    status/new
    value/medium
    effort/medium
    on Nov 8, 2026
  2. dan-petty commented on Nov 8, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/feature. The feat prefix of the title gives the type.
    • Scope: scope/roadmap. The (roadmap) scope of the title gives the scope.
    • Priority: P2-Medium. Project standards mandate the evidence comment, but delivery is not blocked without it.
    • Value: Medium. Removes a manual step and enforces a project standard on every delivery PR.
    • Effort: Medium. The body estimates roughly 200 lines of glue code and tests.
    • Related: feat(roadmap): Run devops review on the diff before marking PR ready #3049, which asks for a different change. Both hook into the before-ready seam in implement_run.py, but #3049 runs devops review while the candidate runs devops pr evidence.
  3. added
    priority/p2-medium
    on Nov 8, 2026
  4. added
    status/ready
    and removed
    status/new
    on Nov 9, 2026
  5. devops-cli-service commented on Nov 9, 2026

    @devops-cli-service
    Contributor

    Status set to Ready at 719cd43 (see proposed design in issue body).

  6. devops-cli-service commented on Nov 10, 2026

    @devops-cli-service
    Contributor

    Alternatives check: in-use

    Reason: Web searches for an open tool that renders a quality-gate evidence comment (head commit plus remote check statuses) returned only unrelated MDN pages, and the need is project-specific. The repository's own devops pr evidence command and its publish_pr_evidence function already produce that single updatable comment, so the whole need is covered by a tool the issue already names; only the call from the implement job before mark_ready is missing.

    The item already names this tool.

    Tool: dan-petty/devops-cli (https://github.com/dan-petty/devops-cli)

    • License: MIT
    • Last activity: 2026-11-10
    • Maintained: yes

    Covers:

    • Builds the standardized quality gate evidence comment: head commit, status of remote CI checks, links and skipped runs
    • Keeps one comment per head commit: it updates an existing evidence comment from the same login instead of posting a second one
    • Exposed as devops pr evidence <pull> (evidence_cmd in src/devops_cli/commands/pr.py) and as the in-process publish_pr_evidence in devops_cli.github.pr_evidence
    • Can be called directly from the implement job, so no subprocess call or second evidence renderer is needed

    Lacks:

    • The implement job (_ItemRun._ready / execute) never calls the publisher, so delivery PRs still leave draft with only the bot step summary
    • No failure handling yet: a GitHubOperationError from the publisher does not stop the item before mark_ready and does not leave the PR in draft
    • No test that the evidence is published after checks settle and before the ready transition

    Tools considered:

    Searches run:

    • tool that posts pull request evidence comment with CI check status table, results: 5
    • GitHub Action create or update single comment with commit status and check results on pull request, results: 5

    Sources:

    Checked on 2026-11-10. A person decides what this means for the item. The check changes no label and closes no issue.

  7. dan-petty commented on Nov 11, 2026

    @dan-petty
    OwnerAuthor

    Scope from the iteration lane plan (2026-11-11)

    This issue is child 13 of #4667. The scope adds one line to the evidence comment: the gate lane, the Workflow, the patch-id, the base and the checks. Without it, the pull request does not show that the change passed the gate before the push.

    Acceptance added: a test shows the gate line for the lanes cluster, in-pod, local and unavailable.

    Depends on: #4698.

  8. added
    owner/service
    on Nov 18, 2026
  9. 22 remaining items

  10. added
    status/in-review
    and removed
    status/in-progress
    on Nov 19, 2026
  11. devops-cli-service commented on Nov 19, 2026

    @devops-cli-service
    Contributor

    Pull request #6426 is ready for review. The checks passed.

    Spend: 133 model requests, 11641591 input tokens, 103542 output tokens.

  12. removed
    owner/service
    on Nov 19, 2026
  13. removed
    status/in-review
    on Nov 19, 2026
  14. devops-cli-service commented on Nov 20, 2026

    @devops-cli-service
    Contributor
  15. devops-cli-service commented on Nov 20, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-20 00:02 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/mediumpriority/p2-mediumscope/roadmapsource/agenttype/featurevalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions