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

Open
#1,590 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
github, typescript

Research direction

Start with src/lib/workflow/platforms/platform-provider.ts and trace postComment through github.ts, fake-github.ts, and its captured __fixtures__/gh/ output. Then read src/lib/workflow/batch-executor.ts and review-residue.ts to follow how the verdict URL reaches the Read-first renderer. Run the platform, review-residue, and batch-executor tests plus the TypeScript check; done means the rendered line links to the verdict when its URL is known and falls back to the issue pointer otherwise.

Written by the indexing model from the issue text.

Description

enhancement

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

  • Editing the comment after the fact; one post per PR stays (ADR-0021).
  • Any change to the verdict comment's content (#1521 owns its attribution line).
  • No edits under plugin/, .claude/skills/, templates/skills/ (plugin freeze).
Dominant language
TypeScript
Stars
1
Forks
1
Avg merge
11h 3m
Merged PRs (30d)
84

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from sequant-io/sequant

All issues in sequant-io/sequant

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.