Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,8 @@
tests/test_sc2_self_review_channel.bats \
tests/pr_review_canary.bats \
tests/dev-lead/unit/test_maintainer_review_thread_gate.bats \
tests/dev-lead/unit/test_maintainer_comment_gate.bats \
tests/dev-lead/unit/test_comment_disposition_verify.bats \
tests/dev-lead/unit/test_conflict_integrity.bats \
tests/dev-lead/unit/test_addressed_claim_verify.bats \
tests/dev-lead/unit/test_fewshot_assemble.bats \
Expand Down Expand Up @@ -254,7 +256,7 @@
timeout-minutes: 5
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
# NOTE: persist-credentials is intentionally left at the default (true) —

Check warning on line 259 in .github/workflows/lint.yml

View workflow job for this annotation

GitHub Actions / Lint

259:9 [comments-indentation] comment not indented like content
# vci_resolve_reusable needs `git fetch origin` to authenticate against this
# private repo when resolving same-repo channel tags. Setting
# persist-credentials: false would silently push every such caller into the
Expand Down
53 changes: 53 additions & 0 deletions prompts/dev-lead/fix-reviews.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,59 @@ Your reply and its marker are the *only* lever you have on resolution — which

Never stamp the addressed-marker on a thread you did not fix, and never on a marker-less human thread — even when you fixed it, and even when it is `isOutdated: true`. Reply and leave it for the maintainer. Resolution — signalling the issue is handled and giving the reviewer a clean slate — is the harness's job, not yours.

### Phase 1b — Disposition PR Issue Comments (#1813)

Review threads are only half the surface. A finding posted as a PR **issue comment** — what `gh pr comment` and the GitHub main comment box produce, and what bots like `codeant-ai`, `qodo-code-review`, and the `auto-rebase-conflict` notice use — creates **no** review thread, so it is invisible to Phase 1 above. The pr-review gate now **withholds approval** while any such comment lacks a **verified disposition**, so you must disposition every one or the PR cannot merge.

**Enumerate the PR's issue comments** (not review threads):

```bash
# Paginate through EVERY issue comment — a PR with more than 100 comments would
# otherwise strand every finding past the first page (the maintainer gate stays
# blocked on them). Loop on pageInfo.hasNextPage / endCursor until exhausted.
cursor=null
while :; do
page=$(gh api graphql -f query='query($owner:String!,$repo:String!,$pr:Int!,$cursor:String){
repository(owner:$owner,name:$repo){ pullRequest(number:$pr){
comments(first:100, after:$cursor){
nodes{ id author{login __typename} body isMinimized minimizedReason }
pageInfo{ hasNextPage endCursor } } } } }' \
-F owner="${REPO%%/*}" -F repo="${REPO##*/}" -F pr="${PR_NUMBER}" -F cursor="${cursor}")
echo "$page" | jq -c '.data.repository.pullRequest.comments.nodes[]' # process this page
[ "$(echo "$page" | jq -r '.data.repository.pullRequest.comments.pageInfo.hasNextPage')" = "true" ] || break
cursor=$(echo "$page" | jq -r '.data.repository.pullRequest.comments.pageInfo.endCursor')
done
```

**Skip** (do not disposition, never reply to):

- any comment already `isMinimized: true` with `minimizedReason` = `RESOLVED` — it is done;
- **our own** automation comments — those authored by our bot account or carrying one of our markers (`<!-- pr-review-agent … -->`, `<!-- persona:… -->`, `<!-- dev-lead … -->` including your own `<!-- dev-lead:comment-disposition … -->` replies, `<!-- dependency-advisory -->`). **Never answer your own disposition reply** — doing so would loop forever (#860 / #1813 AC7).

For **every other** comment (bot or human alike — a bot conflict report or trial-ended notice is still a finding), research it, then post **exactly one** reply comment that states specifically what you found/did (never just "done"), ending with **one** disposition marker. Post the reply with `gh pr comment ${PR_NUMBER} --body "…"`; pass the `id` node id from the query above verbatim:

```
<!-- dev-lead:comment-disposition id=<comment_node_id> disposition=<fixed|invalid|out-of-scope|answered|informational> [sha=<40-hex>] [ref=#<n>] -->
```

**Choose the disposition and satisfy its evidence rule** (the harness verifies each before it minimizes the original comment — an unverifiable disposition leaves the comment open and the PR blocked):

| Disposition | Use when | Required evidence (harness-verified) |
|---|---|---|
| `fixed` | you changed code to address the finding | `sha=` the **full 40-char** commit (`git rev-parse HEAD`) your fix rides on; the harness checks it is on the PR head with a non-empty diff |
| `out-of-scope` | the finding is real but belongs elsewhere | `ref=#<n>` a tracking issue that **exists**; open one first if needed |
| `invalid` | the finding is wrong / a false positive | a reply body with concrete reasoning (non-empty beyond the marker) |
| `answered` | the comment asked a question you answer in the reply | a reply body that actually answers it |
| `informational` | a notice with no action needed (e.g. a trial-ended notice) | a reply body noting the acknowledgement; route any follow-up to **one** tracking issue per repo (see below) |

**Emit exactly one marker per reply.** A reply with zero or more-than-one marker, an unknown disposition word, a `fixed` without a 40-hex `sha`, or an `out-of-scope` without `ref` is **unverifiable** — the harness leaves the comment open. Cite the real SHA / real issue.

**AC5 — human maintainer comments.** A comment whose `author.__typename` is `"User"` (a person, using an account like a human maintainer) is auto-resolved by the harness **only** on a verified `fixed`. For any other disposition you still post your reply, but the comment stays open for the human to resolve — you can never dismiss a person's finding by arguing it away. Bot comments (`__typename` = `"Bot"`) resolve on any verified disposition.

**AC6 — one tracking issue per repo.** When you defer findings (`out-of-scope`) or route `informational` follow-ups, funnel them into a **single** tracking issue per repository rather than opening one per comment; reference that issue's number in `ref=`.

**Never minimize a comment yourself** (no `minimizeComment` mutation). As with review threads, resolution is the harness's job: it verifies your disposition reply and minimizes the original comment RESOLVED. Your reply + its marker are your only lever.

### Phase 2 — Test Verification

After addressing all threads, run the test suite to ensure no regressions were introduced:
Expand Down
Loading
Loading