Skip to content

feat(review-residue): the Read-first comment links the QA verdict comment itself — postComment returns the comment URL #1590

Open

Description

@admarble

Follow-up of #1520 (PR #1587). The #1520 spec deferred this as its Open Question 2: postComment returns void, so the comment had no URL to link; the recommendation was "link to the issue, and the reviewer clicks once more". QA 3 named it under R-5 (the AC verdict comes last and should be one click away).

Problem

The Read-first comment ends with AC verdict: the SEQUANT_QA_VERDICT comment on #N. (src/lib/workflow/review-residue.ts:353). That links the issue, not the comment: on an issue with a spec comment, two or three QA verdicts and runner comments, the reader scrolls for the one with the marker. PlatformProvider.postComment (src/lib/workflow/platforms/platform-provider.ts:69) returns Promise<void> today (grep -c 'postComment(issueId: string, body: string): Promise<void>' → 1), so the URL is lost at the moment GitHub returns it (gh issue comment prints it on stdout).

Acceptance Criteria

  • AC-1: postComment returns the created comment's URL (Promise<{ url: string }> or equivalent), on the GitHub provider and the fake. Evidence: grep -c 'postComment(issueId: string, body: string): Promise<void>' src/lib/workflow/platforms/platform-provider.ts → 0, and npx vitest run src/lib/workflow/platforms/ → 0 failed
  • AC-2: The QA verdict post keeps the URL on the run (per issue, latest iteration) and the Read-first renderer links it: the last line reads AC verdict: <url> when a URL is known, and falls back to today's issue pointer when none is. Evidence: npx vitest run src/lib/workflow/review-residue.test.ts -t "verdict link" → ≥ 2 passed, 0 failed (new cases: URL known, URL unknown; today the filter matches 0 of 13 tests)
  • AC-2 is classified as a gate test by isGateTestEvidence; the PR body carries its SEQUANT_MUTATION record (drop the URL from the rendered line → the URL-known case fails; restore).
  • AC-3: Existing callers of postComment that ignore the result still type-check and pass. Evidence: npx tsc --noEmit -p tsconfig.json → exit 0 and npx vitest run src/lib/workflow/batch-executor.test.ts → 0 failed

May touch

src/lib/workflow/platforms/platform-provider.ts, github.ts, fake-github.ts and its captured __fixtures__/gh/ output (ADR-0019: the fake replays captured gh output, so a new gh issue comment capture is needed), src/lib/workflow/batch-executor.ts (where the verdict is posted and where postReadFirstForPR builds its args), review-residue.ts, review-residue.test.ts, docs/reference/review-residue.md, CHANGELOG.

Non-Goals

Activity

  1. added
    enhancement
    on Oct 26, 2026
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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions