Skip to content

feat(source-control): add the pull-request evidence posting step #11391

Description

@kyle-sexton

Parent

Refs #8651. Evidence-verification plan: Brief and acceptance criteria at #11364 (comment); Design and Plan comments are on #11364.

Depends on

Outcome

/source-control:pull-request evidence upserts one marker comment holding the run's text summary and a link to the retained capture artifact, after a leak scan.

Demo: run /skill-quality:check pull-request; the refused-file, second-head-edit and no-artifact cases pass.

Plan (phase S5a)

Satisfies: AC8
Size Small-Medium. Depends on: S3 (#11387) (publishable list). Plugin: source-control. Design: Contracts C6, T9.

  • skills/pull-request gains evidence (new reference/evidence.md): one marker comment linking the retained capture artifact (pr-capture-<pr>-<head>, expiry stated) plus the run's text summary. Where no CI capture exists, the comment carries the text summary and says media was not uploaded. The comment body is scanned with the same literal values and patterns before posting; a hit posts nothing. Upsert: list the PR's issue comments with gh api, find the marker, edit that comment by id (PATCH repos/{owner}/{repo}/issues/comments/{id}), else create. Moves the text and artifact-link parts of plugins/playwright/skills/demo-video/reference/posting.md here. Update plugins/source-control/skills/pull-request/reference/create.md:389 Visual evidence (stale "no upload option").
  • Run budget: at most 2 runs per eval case, 1 rerun after a fix; stop on the first usage-limit error.
  • Sanity Check: eval "file not in publishable list → refused"; eval "second head → existing marker comment edited by id, not a second comment"; eval "no artifact → text summary, media not uploaded"; /skill-quality:check pull-request PASS.

Design excerpt

  • source-control: /source-control:pull-request evidence posts one marker comment (local
    gh --attach; CI from source-control-babysit-merge after PASS, before enqueue); create.md's
    Visual evidence updated; playwright demo-video's reference/posting.md moves here, demo-video
    calls it.
components:
  schemas:
    PostEvidence:            # C6, /source-control:pull-request evidence
      type: object
      required: [pr, head_sha]
      properties:
        pr: {type: integer}
        head_sha: {type: string}
        summary: {type: string}                             # text summary; no files uploaded (AC10)
        artifact_url: {type: [string, "null"]}              # CI: pr-capture-<pr>-<head> link
        retention_days: {type: [integer, "null"]}
        marker: {const: "<!-- evidence-verification -->"}
  • /source-control:pull-request evidence <pr> [--artifact-url <url>] [--summary <file>]: one
    marker comment upserted by comment id; links the retained capture artifact; uploads no files
    (attachments have no retention period, AC10).

Acceptance criteria

Brief criteria this slice satisfies:

  • AC8: A passing PR carries one comment linking redacted evidence; account and usage lines never appear in uploaded captures.

Done when:

  • Sanity Check passes: eval "file not in publishable list → refused"; eval "second head → existing marker comment edited by id, not a second comment"; eval "no artifact → text summary, media not uploaded"; /skill-quality:check pull-request PASS.
  • The comment is upserted by comment id (PATCH repos/{owner}/{repo}/issues/comments/{id}), found by the marker <!-- evidence-verification -->
  • A scan hit on the comment body posts nothing
  • The stale "no upload option" line in create.md Visual evidence is updated without adding a media upload path
  • The plugin's version and CHANGELOG are bumped per the repository's release convention
  • ci-status is green on the PR head

Owner decision Q12 (2026-10-30)

Q12 answered by the owner: "the end approved artifacts should be gh --attach on the PR (collapsed, accordion sections) - clean/tidy (format might change over time)". In scope here: after a pass, one marker comment posted with gh pr comment --attach (images and video, publishable captures only), each acceptance criterion or entry point in its own collapsed <details> section, upserted by the marker. The comment layout comes from a template file the skill reads, not from inline text, so the format can change by editing the template. Retention (AC10) applies to CI artifacts and run directories; the PR attachments are the approved record.

🤖 Generated with Claude Code

https://claude.ai/code/session_01UJUn7KoThXoYQoxfvdCVi7

Activity

  1. added
    priority: mediumReal value, no hard deadline; normal backlog flow.
    work-class: scopedA briefed fix or small feature; blast radius bounded by the brief, tests exist.
    on Oct 30, 2026
  2. github-actions commented on Oct 30, 2026

    @github-actions
    Contributor

    Proposed work class: work-class: scoped
    Basis: automated intake triage; the lanes App applied this class.

    Size: Medium
    Complexity: Medium
    Uncertainty: Known
    Flags: none
    Blocked by: none

    Decision recorded. The owner's 2026-10-31 decision (#11391 (comment)) and Q12 (#11364 (comment)) answer the triage and refinement questions:

    1. Media is attached: publishable captures go on the PR with gh pr comment --attach.
    2. The upsert is gh pr comment --edit-last --create-if-none --attach, with delete-and-repost as the fallback.
    3. The create.md line points at the evidence step as the attach path.

    [quote truncated; the full decision is at the link]

    #11391 (comment)

    This decision settles the open questions. The work is to add an evidence step to the pull-request skill. It posts one comment after the verifier passes, with attached captures in collapsed sections laid out by a template. It also needs the create.md line updated. #11387 doesn't appear among the open issues, so I treated it as not blocking.

    Automated triage, applied by the lanes App.

  3. added
    status: needs-decisionAwaiting a human or maintainer judgment call.
    and removed
    status: readyTriaged, unblocked, and fully specified; eligible to pick up.
    on Oct 30, 2026
  4. melodic-automation-lanes commented on Oct 30, 2026

    @melodic-automation-lanes
    Contributor

    Not admitted to the issue lane: its title or body names a charge (retention), which needs an owner decision. Admission takes the issue once each of those is met, when intake triages it again (.github/actions/resolve-config/admission-rules.json).

  5. melodic-automation-lanes commented on Oct 30, 2026

    @melodic-automation-lanes
    Contributor

    The latest triage verdict holds nothing: the issue is at status: ready.

  6. kyle-sexton commented on Oct 31, 2026

    @kyle-sexton
    MemberAuthor

    Decision 2026-10-31 (owner: keep PRs clean, edit in place, post only after validation): one evidence comment per PR, posted only after the verifier passes, from an identity that posts nothing else on the PR, updated in place with gh pr comment --edit-last --create-if-none --attach. First task: test that --edit-last accepts --attach; if it does not, delete and repost so the PR still carries one comment. Video is attached only once every frame passes the masking check (#11387).

  7. added
    status: needs-decisionAwaiting a human or maintainer judgment call.
    needs-triageNot yet classified. Floor until a type and one priority tier are set.
    on Oct 31, 2026
  8. melodic-automation-lanes commented on Oct 31, 2026

    @melodic-automation-lanes
    Contributor

    Refinement. A read-only run explored this repository, searched its issues and pull requests, and read the allowed docs to draft what follows. On an issue a listed human filed, it counts as the issue's spec once posted, while unedited; it is still model text, so check it.

    Intended outcome: /source-control:pull-request evidence upserts one marker comment per PR, after verifier pass and a leak scan, attaching publishable media with gh pr comment --edit-last --create-if-none --attach in collapsed details sections laid out by a template file.

    Related work

    Open questions

    1. Does the owner's 2026-10-31 comment, which lacks the Decision recorded first line, settle that the comment attaches publishable media with gh --attach rather than only linking a CI artifact with text?
      RECOMMENDED: Yes: attach media per Q12 and the 2026-10-31 comment, and reword the issue's 'uploads no files' lines (Outcome, Design, AC10 note). Basis: judgment
    2. Is the upsert gh pr comment --edit-last --create-if-none --attach (delete and repost if --edit-last rejects --attach), replacing the PATCH by comment id found via marker in the done-when?
      RECOMMENDED: Use --edit-last --create-if-none --attach with delete-and-repost fallback, and keep the marker <!-- evidence-verification --> as a guard against editing a foreign comment. Basis: judgment
    3. Should the done-when item 'create.md Visual evidence updated without adding a media upload path' be reworded now that media is attached?
      RECOMMENDED: Yes: update create.md:389 to point at the evidence step as the attach path and drop the 'without adding a media upload path' clause. Basis: plugins/source-control/skills/pull-request/reference/create.md:389

    Sources read

    • plugins/playwright/skills/demo-video/reference/posting.md:8-41: documents local gh pr comment --attach (gh 2.99.0+) and a CI artifact upload path, the content that moves to the evidence step
    • plugins/source-control/skills/pull-request/reference/create.md:389: holds the Visual evidence line the issue calls stale

    To answer, post a comment that starts with this line:

    **Decision recorded.** <answer>
    

    Automated refinement by the lanes App. Answer with a comment whose first line is **Decision recorded.**.

  9. kyle-sexton commented on Nov 1, 2026

    @kyle-sexton
    MemberAuthor

    Decision recorded. The owner's 2026-10-31 decision (#11391 (comment)) and Q12 (#11364 (comment)) answer the triage and refinement questions:

    1. Media is attached: publishable captures go on the PR with gh pr comment --attach.
    2. The upsert is gh pr comment --edit-last --create-if-none --attach, with delete-and-repost as the fallback.
    3. The create.md line points at the evidence step as the attach path.

    Where the body disagrees, this replaces it: done-when item 2 (upsert by comment id with PATCH), the "edited by id" wording of the item 1 eval, done-when item 4's "without adding a media upload path", and the Outcome and Design excerpt lines that say no files are uploaded.

    • The evidence step posts or updates one comment with gh pr comment --edit-last --create-if-none --attach, only after the verifier passes, attaching publishable captures in collapsed <details> sections laid out by a template file the skill reads
    • When gh rejects --attach with --edit-last, the step deletes its earlier evidence comment and posts a new one, so the PR carries one evidence comment
    • The stale "no upload option" line in create.md Visual evidence points at the evidence step as the attach path
    • Video is attached only when every frame passes the masking check
  10. added
    needs-triageNot yet classified. Floor until a type and one priority tier are set.
    and removed
    status: needs-decisionAwaiting a human or maintainer judgment call.
    needs-triageNot yet classified. Floor until a type and one priority tier are set.
    on Nov 1, 2026
  11. added
    status: readyTriaged, unblocked, and fully specified; eligible to pick up.
    admission-deferredAdmitted but waiting for WIP room; the hourly work-unblock sweep labels it agent-ready.
    agent-readyFully specified and briefed; eligible for autonomous pickup from the frontier.
    and removed
    admission-deferredAdmitted but waiting for WIP room; the hourly work-unblock sweep labels it agent-ready.
    on Nov 1, 2026
  12. github-actions commented on Nov 1, 2026

    @github-actions
    Contributor
    No description provided.
  13. github-actions commented on Nov 1, 2026

    @github-actions
    Contributor
    No description provided.
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

    agent-readyFully specified and briefed; eligible for autonomous pickup from the frontier.priority: mediumReal value, no hard deadline; normal backlog flow.status: readyTriaged, unblocked, and fully specified; eligible to pick up.work-class: scopedA briefed fix or small feature; blast radius bounded by the brief, tests exist.

    Fields

    No fields configured for Feature.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions