You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
/run-feedback never recommends the merge when the first review has no finding #688
Attach or clone each before working on this issue.
What
/run-feedback's Recommend the Merge section says: "A pass that finds no item before the run has had a round recommends nothing, on purpose: nothing on the pull request has been reviewed or answered yet, so the run keeps checking for comments and reviews until the wait limit passes."
That reason doesn't hold once NCode Review has already reviewed the head. /ship-plan opens the pull request, NCode Review reviews it on open, and when that review has no finding at all, the first pass finds no item, the run has had no round, and so the run never recommends the merge: it checks every five minutes for 24 hours and ends without a recommendation, although the pull request is as clean as it gets. A pull request whose first review has two nits gets a recommendation in its first pass (the pass found items); one whose first review has none never does.
Seen in NCodeGroup/Collections.Providers#41 (Update from project-template v0.154.0): NCode Review's summary says Verdict: ✅ Approve — No findings, the NCode Review Approver approved the head b7e9a73, every check passed and the default branch's newest commit is green, but the first pass has no item and no round, so /run-feedback 41 may post no recommendation.
Change
In run-feedback.prompt.md (and its Claude command and skill copies), also recommend the merge after a pass that finds no item when NCode Review's review of the pull request's head is in, as the Code review check run on the head shows, and found nothing left to act on; keep recommending nothing while no review of the head has arrived.
Not in this issue
The max-review-rounds cap and the merge-only push rules.
Also seen in NCodeGroup/Extensions.DataProtection#39 (Update from project-template v0.154.0): NCode Review's summary says Verdict: ✅ Approve — No findings, the NCode Review Approver approved the head 91599fc, and the first pass has no item and no round, so /run-feedback 39 posts no recommendation. NCodeGroup/Extensions.DataProtection's next /run-feedback can check the fix too.
Also seen in NCodeGroup/identity-platform#52 (Update to project-template v0.154.0): NCode Review's summary says Verdict: ✅ Approve — No findings, the NCode Review Approver approved the head e78feb3, every check passed and the default branch's newest commit is green, but the first /run-feedback 52 pass has no item and no round, so it posts no recommendation. NCodeGroup/identity-platform's next /run-feedback can check the fix too.
Also seen in NCodeGroup/code-review#264 (Update from project-template v0.154.0): NCode Review's summary says Verdict: ✅ Approve — No findings in this repository's own files (its two findings belong upstream, in .template/Update-Project.ps1, so they get no thread), the NCode Review Approver approved the head 5534c34, and the first /run-feedback 264 pass has no item and no round, so it posts no recommendation. NCodeGroup/code-review's next /run-feedback can check the fix too.
Also seen in NCodeGroup/PropertyBag#91 (Update from project-template v0.154.0): NCode Review's first review said Verdict: ✅ Approve — No findings and the NCode Review Approver approved head d483368, so the first pass found no item and, with no round yet, recommended nothing. The run only reached a recommendation because the pull request was later retargeted to v0.154.1, whose push and /review brought two nit findings.
#689: an update that adds .github/workflows/codeql.yml prints the baseline command twice in two forms, because Get-CodeQLWorkflowNote still prints tools/Set-RepositoryBaseline.ps1 -Repo <name> -Owner <owner> while Get-BaselineNote prints ADR-0068's -Repo <owner>/<name>. After this plan every baseline command an update or an adoption prints uses -Repo <owner>/<name>. #688: /run-feedback never recommends the merge when NCode Review's first review has no finding, because a pass with no item before any round recommends nothing. After this plan such a pass recommends the merge once NCode Review's review of the pull request's head commit is in, as its Code review check run shows, and still recommends nothing while no review of the head has arrived. /run-issues has the same gap and gets the same fix.
Context for the executor
Build: none (AGENTS.md names no build command).
Test:
pwsh -NoProfile -File tests/Test-UpdateNotes.ps1 (about 50 seconds, no Node.js needed).
pwsh -NoProfile -File tests/Test-Template.ps1 -Only none (one to three minutes, depending on the PC's load). It needs Node.js 26 on PATH, and Node.js is not on PATH in this PC's shells. So every Done-when command that runs it first runs $env:Path = [Environment]::GetEnvironmentVariable('Path','Machine') + ';' + [Environment]::GetEnvironmentVariable('Path','User'); . nvs.ps1 use 26 | Out-Null in the same command. Copier is already installed. -Only none skips the project renders and runs every workflow check.
Scripts are PowerShell 7. Keep each edited line's indentation as it is.
The workflow's prompt sources are workflow/templates/*.md. _run-feedback-body.md is the body of /run-feedback in every tool. run-issues.md (Claude Code) and run-issues-copilot.md (Copilot) are the two sources of /run-issues.
Each numbered item or paragraph in these Markdown sources is one long line. "Replace X with Y" means: find X, which appears exactly once in the file, and put Y in its place on the same line. Never start a new line unless the step says so.
Copy every quoted text exactly as given, including backticks, quotes, {owner}/{repo} and spacing. The files use LF line endings.
Write prose with no AI agent attribution.
Gotchas:
Never edit a generated file by hand. Step 7 regenerates them with tools/Update-Template.ps1. The generated folders are template/.claude/commands/, template/.claude/agents/, template/.github/prompts/, template/.github/skills/, template/.github/agents/, and the same folders at the repository root.
tests/Test-Template.ps1 fails while a generated copy lacks the text step 4 pins. So steps 4 to 6 expect that one failure, and the suite passes from step 7 on.
The Copilot copies must not contain ExitWorktree, EnterWorktree, .claude/commands/, {{, $ARGUMENTS or as a background command. The new text uses none of these.
Adopt-Project.ps1 holds a word-for-word copy of Get-CodeQLWorkflowNote from template/.template/Update-Project.ps1. tests/Test-UpdateNotes.ps1's copies: check fails unless the two functions are character for character the same.
Step 1's run fails on purpose, so tests/Test-UpdateNotes.ps1 keeps its work folder, project-template-update-notes-test-<PID> in the temp folder. Leave it.
tests/Test-Adoption.ps1 without -UnitOnly and tests/Test-AdoptEdgeCases.ps1 take far more than two minutes. No step runs them; the reviewer does.
A script or command never passes a relative path to a .NET method, such as [IO.File]::ReadAllText, [IO.File]::WriteAllText or [IO.Directory]::GetFiles: .NET resolves it against the process's folder, which Set-Location doesn't move and which in a Copilot session is the main checkout, not the plan's worktree. Use Get-Content -LiteralPath, Set-Content -LiteralPath or Get-ChildItem, or make the path absolute first with Join-Path (Get-Location) <path>.
Root cause /run-feedback never recommends the merge when the first review has no finding #688: _run-feedback-body.md's Recommend the Merge recommends only "once the run has had a round or that pass found items", and says a pass with no item before a round recommends nothing. Nothing reads whether NCode Review already reviewed the head: Wait tracks only the review of <pushed>, a push the run made. A clean first review gives no item and no round, so the condition never holds (Collections.Providers#41, Extensions.DataProtection#39, identity-platform#52, code-review#264).
/run-feedback never recommends the merge when the first review has no finding #688 fix: a pass with no item before any round reads the Code review check run on the pull request's head commit and recommends when a completed NCode Review run there has the conclusion neutral and a title that doesn't start with Review. Evidence, from NCodeGroup/code-review's src/publish.ts and src/checks.ts: a posted review completes the check run neutral with a title that counts its findings (No findings, No new findings, … or <n> blocker, <n> should-fix, <n> nit); a run that posted no review completes it with Review skipped, Review budget used up, Review paused (all neutral), Review failed, Review stopped, Review cancelled or Reviewed <sha> instead. The query returns 1 on Collections.Providers#41's head (No findings) and counts code-review#264's head (0 blocker, 0 should-fix, 2 nit, whose findings have no thread here) as reviewed, as the issue asks.
The run-feedback recommendation names <head commit>, and a no-round recommendation is skipped when an Autopilot: comment already recommends that commit, so a restarted /run-feedback doesn't recommend the same head twice ("each head of the branch gets at most one recommendation").
/run-issues (Review the Pull Request item 9) has the same gap: a first review with no finding is neither a round nor a check that found findings. It gets the same check-run condition. /run-issues-all-in already recommends "whether or not the entry has had a round" and needs nothing.
No decision record changes: ADR-0019 decision 4 already says the commands recommend once NCode Review's findings are answered and its review is in.
Both issues' author is a MEMBER, so the changelog thanks no one.
Out of scope
tools/Set-RepositoryBaseline.ps1, New-Project.ps1 and template/.template/Test-MergeGate.ps1, which still pass or print -Owner; see Follow-ups.
The max-review-rounds cap, the merge-only push rules, Wait's hour-long wait for <pushed>, _land-auto.md and _stop-the-line.md.
_run-issues-all-in-body.md, address-feedback, ship-plan and every decision record.
Rewording any sentence a step doesn't quote.
Running tools/Set-RepositoryBaseline.ps1 or any end-to-end test under tests/e2e/.
Steps
[ ] 1. Add a failing check that the CodeQL note prints -Repo /
In the comment-based help, replace the four lines of the codeql paragraph (from codeql Get-CodeQLWorkflowNote names codeql.yml, … through modifies it or adds another file.) with these five lines, indented as the old ones are: 6 spaces before codeql, 16 spaces before each other line:
codeql Get-CodeQLWorkflowNote names codeql.yml, the languages, the gh api command that turns the default setup
off for the origin's repository, or <owner>/<name>, before the merge, the re-run, the baseline command
tools/Set-RepositoryBaseline.ps1 -Repo with that same <owner>/<name> and no -Owner, and 'Enabled with
advanced setup allowed' when the update adds codeql.yml, and says nothing when it modifies it or adds
another file.
In the $codeqlNote block, replace 'tools/Set-RepositoryBaseline.ps1 -Repo brand -Owner NCodeGroup' with 'tools/Set-RepositoryBaseline.ps1 -Repo NCodeGroup/brand from the template''s clone'.
Replace 'tools/Set-RepositoryBaseline.ps1 -Repo <name> -Owner <owner>' with 'tools/Set-RepositoryBaseline.ps1 -Repo <owner>/<name> from the template''s clone'.
In the line Check "codeql: $name" (…), replace -and -not $note.Contains('once this update merges, you run')) with -and -not $note.Contains('once this update merges, you run') -and -not $note.Contains(' -Owner ')).
tests/Test-Template.ps1: right after the line that starts Check 'workflow: run-feedback reaches Claude Code from run-feedback.md, and before the comment line # run-issues-all-in follows run-issues' installed file …, add these six lines:
# Before any round, a pass or check with nothing to answer recommends the merge once NCode Review's review of the pull request's head commit is in, as its Code review check run shows, and nothing while none has arrived (#688).
$headReviewText = '.conclusion == "neutral" and ((.output.title // "Review") | startswith("Review") | not)'
$m = @(Get-MissingText ($feedbackFiles + $copilotFeedbackFiles) ('A pass that finds no item before the run has had a round reads that review', 'commits/<head commit>/check-runs?check_name=Code%20review', $headReviewText, 'already recommends the merge at `<head commit>`', 'ready to merge at `<head commit>` as far as this run can tell'))
$m += @(Get-MissingText ($runFiles + $copilotRunFiles) ('or that check found nothing awaiting an answer and NCode Review''s review of `<head commit>`', 'commits/<head commit>/check-runs?check_name=Code%20review', $headReviewText, 'a check that finds nothing awaiting an answer before the entry''s first round recommends nothing'))
$m += @(foreach ($p in $feedbackFiles + $copilotFeedbackFiles) { if ([IO.File]::ReadAllText((Join-Path $repoRoot $p)).Contains('before the run has had a round recommends nothing, on purpose')) { "${p}: still recommends nothing after a first pass with no item" } })
Check 'workflow: run-feedback and run-issues recommend the merge after a first pass or check with nothing to answer once NCode Review''s review of the head commit is in, and recommend nothing while none has arrived (#688)' (-not $m) ($m -join '; ')
docs/tests.md: right before the line that starts - `_land-auto.md` and `_stop-the-line.md` are in each generated copy, add these two lines:
- Each generated copy of `run-feedback` and `run-issues` recommends the merge after a pass or check that finds nothing to answer before the first round once NCode Review's `Code review` check run on the pull request's head commit shows a posted review, and recommends nothing while none has arrived
- **For:** Always
Done when: $env:Path = [Environment]::GetEnvironmentVariable('Path','Machine') + ';' + [Environment]::GetEnvironmentVariable('Path','User'); . nvs.ps1 use 26 | Out-Null; $o = pwsh -NoProfile -File tests/Test-Template.ps1 -Only none 2>&1; $code = $LASTEXITCODE; $fails = @($o | Where-Object { "$_" -match '^FAIL ' }); if ($code -and $fails.Count -eq 1 -and "$($fails[0])" -match '^FAIL workflow: run-feedback and run-issues recommend the merge after a first pass' -and (Select-String -LiteralPath docs/tests.md -SimpleMatch -Pattern 'shows a posted review, and recommends nothing while none has arrived' -Quiet)) { exit 0 } else { exit 1 }
[ ] 5. Recommend the merge after a clean first review in run-feedback
Change: make these four replacements. Each old text appears exactly once.
Start item 2. Old: once NCode Review's review of the last push it asked for is in, and still judges
New: once NCode Review's review of the last push it asked for is in, or, before any round, after a pass that finds no item once NCode Review's review of the pull request's head commit is in, and still judges
Recommend the Merge. Old: once the run has had a round or that pass found items: every item is then fixed, declined, answered or put to me, and NCode Review's review of the last push the run asked it to review came back with nothing left to act on.
New: once the run has had a round, that pass found items, or NCode Review's review of `<head commit>`, the pull request's head commit, which `gh pr view <number> --json headRefOid --jq .headRefOid` prints, is in, as the next sentence checks: every item is then fixed, declined, answered or put to me, and NCode Review's review of the last push the run asked it to review, or of `<head commit>`, came back with nothing left to act on.
Recommend the Merge. Old: the whole sentence that starts A pass that finds no item before the run has had a round recommends nothing, on purpose: and ends until the wait limit passes. New, as one line:
A pass that finds no item before the run has had a round reads that review: `gh api "repos/{owner}/{repo}/commits/<head commit>/check-runs?check_name=Code%20review" --jq '[.check_runs[] | select(.app.slug == "ncode-review" and .status == "completed" and .conclusion == "neutral" and ((.output.title // "Review") | startswith("Review") | not))] | length'`. NCode Review completes its `Code review` check run on a commit with the conclusion `neutral` and a title that counts its findings, such as `No findings`, once it has posted its review of that commit, and with a title that starts with `Review`, such as `Review skipped`, `Review budget used up` or `Review failed`, when it reviewed nothing there. When the command prints a number above 0, the review of `<head commit>` is in and, since the pass found no item, nothing it raised is left to act on: recommend the merge, unless a top-level comment on the pull request that starts with `Autopilot:` already recommends the merge at `<head commit>`. When it prints 0, or the call fails, recommend nothing: no review of `<head commit>` has arrived and nothing on the pull request has been answered yet, so the run keeps checking for comments and reviews until the wait limit passes, and reads the check run again at each later pass that finds no item.
Recommend the Merge. Old: that says the pull request is ready to merge as far as this run can tell, why (the rounds so far, that each item was fixed, declined, answered or put to me, and, once the rounds passed
New: that says the pull request is ready to merge at `<head commit>` as far as this run can tell, why (the rounds so far, that each item was fixed, declined, answered or put to me, or, with no round and no item, that NCode Review's review of `<head commit>` left nothing to act on, and, once the rounds passed
Done when: $f = Get-Content -Raw -LiteralPath workflow/templates/_run-feedback-body.md; $miss = @('or, before any round, after a pass that finds no item once NCode Review', 'once the run has had a round, that pass found items, or NCode Review', 'A pass that finds no item before the run has had a round reads that review', '/check-runs?check_name=Code%20review" --jq', '((.output.title // "Review") | startswith("Review") | not))] | length', 'already recommends the merge at ', 'when it reviewed nothing there', 'left nothing to act on, and, once the rounds passed') | Where-Object { -not $f.Contains($_) }; if ($miss -or $f.Contains('recommends nothing, on purpose') -or $f.Contains('once the run has had a round or that pass found items')) { $miss; exit 1 } else { exit 0 }
[ ] 6. Recommend the merge after a clean first review in run-issues
Change: in Review the Pull Request item 9 of each file, replace once the entry has had a round or that check found NCode Review findings awaiting an answer: each finding is then fixed, declined, answered, left as a follow-up or left for me, and NCode Review's review of the last push the run asked it to review came back with nothing left to act on. (exactly once in each file) with this text, as one line:
once the entry has had a round, that check found NCode Review findings awaiting an answer, or that check found nothing awaiting an answer and NCode Review's review of `<head commit>`, the pull request's head commit, which `gh pr view <number> --json headRefOid --jq .headRefOid` prints, is in: `gh api "repos/{owner}/{repo}/commits/<head commit>/check-runs?check_name=Code%20review" --jq '[.check_runs[] | select(.app.slug == "ncode-review" and .status == "completed" and .conclusion == "neutral" and ((.output.title // "Review") | startswith("Review") | not))] | length'` prints a number above 0, since NCode Review completes its `Code review` check run on a commit with the conclusion `neutral` and a title that counts its findings, such as `No findings`, once it has posted its review of that commit, and with a title that starts with `Review`, such as `Review skipped`, `Review budget used up` or `Review failed`, when it reviewed nothing there. Each finding is then fixed, declined, answered, left as a follow-up or left for me, and NCode Review's review of the last push the run asked it to review, or of `<head commit>`, came back with nothing left to act on. While that command prints 0, or the call fails, a check that finds nothing awaiting an answer before the entry's first round recommends nothing.
Done when: $bad = foreach ($p in 'workflow/templates/run-issues.md', 'workflow/templates/run-issues-copilot.md') { $t = Get-Content -Raw -LiteralPath $p; foreach ($x in 'or that check found nothing awaiting an answer and NCode Review', '/check-runs?check_name=Code%20review" --jq', '((.output.title // "Review") | startswith("Review") | not))] | length', 'when it reviewed nothing there. Each finding is then fixed', 'before the entry''s first round recommends nothing.') { if (-not $t.Contains($x)) { "$p missing $x" } }; if ($t.Contains('once the entry has had a round or that check found')) { "$p still has the old condition" } }; if ($bad) { $bad; exit 1 } else { exit 0 }
[ ] 7. Regenerate the template's and the repository's workflow files
Run pwsh -NoProfile -File tools/Update-Template.ps1 from the repository root, and change nothing by hand.
Then git status --short must list, besides the files steps 1 to 6 changed, only files under the six folders above: run-feedback and run-issues in each folder.
When it lists any other file, such as one under .claude/agents/, .github/agents/ or template/.template/, stop, mark the step [?] and quote it.
Change: right after the line that starts - After a pass that leaves every item fixed, declined, answered or put to you, once the bot's review of the last push it asked for is in, it recommends the merge, add this line, indented two spaces as a sub-bullet:
- Before its first round, a pass that finds nothing to answer recommends the merge once the bot's review of the pull request's head commit is in, as its `Code review` check run shows, and recommends nothing while no review of that commit has arrived.
Done when: $l = Get-Content -LiteralPath USAGE.md; $i = [array]::FindIndex([string[]]$l, [Predicate[string]]{ param($x) $x.StartsWith('- After a pass that leaves every item fixed, declined, answered or put to you') }); if ($i -ge 0 -and $l[$i + 1].StartsWith(' - Before its first round, a pass that finds nothing to answer recommends the merge once the bot''s review of the pull request''s head commit is in')) { exit 0 } else { exit 1 }
Right below the line ## [Unreleased] (which has no entries), insert a blank line, then ## [0.154.2] - <date>, where <date> is what Get-Date -Format yyyy-MM-dd prints, then a blank line, ### Fixed, a blank line, and these two entries, each one line:
- `.template/Update-Project.ps1` and `Adopt-Project.ps1` print the baseline command as `tools/Set-RepositoryBaseline.ps1 -Repo <owner>/<name>`, the form ADR-0068 gives, in the note they print when they add `.github/workflows/codeql.yml`, and the adoption in its command that protects the default branch too, so a run no longer prints the command in two forms ([#689](https://github.com/NCodeGroup/project-template/issues/689), [ADR-0068](template/docs/decisions/project-template/0068-a-repositorys-answers-are-its-manifest-and-the-baseline-needs-only-its-name.md)).
- `/run-feedback` recommends the merge after a pass that finds nothing to answer before its first round once NCode Review's review of the pull request's head commit is in, as its `Code review` check run shows, so a pull request whose first review has no finding gets its recommendation; it still recommends nothing while no review of the head commit has arrived, and `/run-issues` does the same for a pull request whose first review has no finding ([#688](https://github.com/NCodeGroup/project-template/issues/688)).
Keep one blank line between the last entry and the existing ## [0.154.1] - 2026-11-30 heading.
In the link reference definitions at the end of the file, replace [unreleased]: https://github.com/NCodeGroup/project-template/compare/v0.154.1...HEAD with [unreleased]: https://github.com/NCodeGroup/project-template/compare/v0.154.2...HEAD, and add the line [0.154.2]: https://github.com/NCodeGroup/project-template/compare/v0.154.1...v0.154.2 right after it, above the [0.154.1]: line.
Run pwsh -NoProfile -File tests/Test-AdoptEdgeCases.ps1 and pwsh -NoProfile -File tests/Test-Adoption.ps1 -SkipDotnetBuild; both pass, with the ci-existing, plain and scaffold baseline-command checks showing -Repo <owner>/<name>.
Get-CodeQLWorkflowNote in template/.template/Update-Project.ps1 and Adopt-Project.ps1 are character for character equal, and neither function nor the adoption's protect command prints -Owner.
An update that adds codeql.yml on a GitHub origin prints -Repo <owner>/<name> in the CodeQL note and in the baseline note right after it, the same form twice.
In every generated run-feedback copy, a first pass with no item reads the head commit's Code review check run, recommends only when a posted NCode Review review is there, recommends nothing while none has arrived (a project without NCode Review never gets one this way, as before), and never recommends the same head commit twice across restarted runs.
In every generated run-issues copy, item 9's new condition reads as one sentence chain and keeps the default-branch hold that follows it.
The jq filter parses in gh: gh api "repos/NCodeGroup/Collections.Providers/commits/<head sha of #41>/check-runs?check_name=Code%20review" --jq '<the filter>' prints a number.
Run tests/e2e/Test-RunFeedback.ps1 by hand, as docs/tests.md asks after a change to /run-feedback.
After the release, a template update in NCodeGroup/Collections.Providers, NCodeGroup/Extensions.DataProtection, NCodeGroup/identity-platform or NCodeGroup/code-review, then /run-feedback on a pull request whose first review has no finding, posts the recommendation in its first pass.
Follow-ups
Print the baseline command as -Repo / everywhere: template/.template/Test-MergeGate.ps1 (its -Repo $repoName -Owner $owner -WhatIf hint) and New-Project.ps1 (its "Run it again with:" warning) still print tools/Set-RepositoryBaseline.ps1 -Repo <name> -Owner <owner>, so a user still meets two forms of ADR-0068's one command; change both, and their tests in tests/Test-MergeGate.ps1 and tests/Test-NewProjectRemote.ps1.
Also seen in NCodeGroup/brand#55 (Update from project-template v0.154.0): NCode Review's first review said Verdict: ✅ Approve with no finding in the project's own files and approved head b1096a6, so a first pass had no item and no round. The run reached a recommendation only because the pull request was retargeted to v0.154.1, whose push and /review gave it a round. NCodeGroup/brand's next /run-feedback can check the fix too.
Activity
polewskm commentedon Nov 30, 2026
Also seen in NCodeGroup/Extensions.DataProtection#39 (Update from project-template v0.154.0): NCode Review's summary says
Verdict: ✅ Approve — No findings, the NCode Review Approver approved the head91599fc, and the first pass has no item and no round, so/run-feedback 39posts no recommendation.NCodeGroup/Extensions.DataProtection's next/run-feedbackcan check the fix too.polewskm commentedon Nov 30, 2026
Also seen in NCodeGroup/identity-platform#52 (Update to project-template v0.154.0): NCode Review's summary says
Verdict: ✅ Approve — No findings, the NCode Review Approver approved the heade78feb3, every check passed and the default branch's newest commit is green, but the first/run-feedback 52pass has no item and no round, so it posts no recommendation.NCodeGroup/identity-platform's next/run-feedbackcan check the fix too.polewskm commentedon Nov 30, 2026
Also seen in NCodeGroup/code-review#264 (Update from project-template v0.154.0): NCode Review's summary says
Verdict: ✅ Approve — No findings in this repository's own files(its two findings belong upstream, in.template/Update-Project.ps1, so they get no thread), the NCode Review Approver approved the head5534c34, and the first/run-feedback 264pass has no item and no round, so it posts no recommendation.NCodeGroup/code-review's next/run-feedbackcan check the fix too.polewskm commentedon Dec 1, 2026
Also seen in NCodeGroup/PropertyBag#91 (Update from project-template v0.154.0): NCode Review's first review said
Verdict: ✅ Approve — No findingsand the NCode Review Approver approved headd483368, so the first pass found no item and, with no round yet, recommended nothing. The run only reached a recommendation because the pull request was later retargeted to v0.154.1, whose push and/reviewbrought two nit findings.polewskm commentedon Dec 1, 2026
Plan snapshot. The working copy is
PLAN.mdin the plan's checkout; this comment is not updated as steps run.Plan: Fix the baseline note's form and the clean-first-review recommendation (9 steps)
Plan: Fix the baseline note's form and the clean-first-review recommendation
Issue: #689 #688
Release: v0.154.2
Goal
#689: an update that adds
.github/workflows/codeql.ymlprints the baseline command twice in two forms, becauseGet-CodeQLWorkflowNotestill printstools/Set-RepositoryBaseline.ps1 -Repo <name> -Owner <owner>whileGet-BaselineNoteprints ADR-0068's-Repo <owner>/<name>. After this plan every baseline command an update or an adoption prints uses-Repo <owner>/<name>. #688:/run-feedbacknever recommends the merge when NCode Review's first review has no finding, because a pass with no item before any round recommends nothing. After this plan such a pass recommends the merge once NCode Review's review of the pull request's head commit is in, as itsCode reviewcheck run shows, and still recommends nothing while no review of the head has arrived./run-issueshas the same gap and gets the same fix.Context for the executor
AGENTS.mdnames no build command).pwsh -NoProfile -File tests/Test-UpdateNotes.ps1(about 50 seconds, no Node.js needed).pwsh -NoProfile -File tests/Test-Template.ps1 -Only none(one to three minutes, depending on the PC's load). It needs Node.js 26 onPATH, and Node.js is not onPATHin this PC's shells. So every Done-when command that runs it first runs$env:Path = [Environment]::GetEnvironmentVariable('Path','Machine') + ';' + [Environment]::GetEnvironmentVariable('Path','User'); . nvs.ps1 use 26 | Out-Nullin the same command. Copier is already installed.-Only noneskips the project renders and runs every workflow check.pwsh -NoProfile -File tests/Test-Adoption.ps1 -UnitOnly(about 10 seconds).workflow/templates/*.md._run-feedback-body.mdis the body of/run-feedbackin every tool.run-issues.md(Claude Code) andrun-issues-copilot.md(Copilot) are the two sources of/run-issues.{owner}/{repo}and spacing. The files use LF line endings.tools/Update-Template.ps1. The generated folders aretemplate/.claude/commands/,template/.claude/agents/,template/.github/prompts/,template/.github/skills/,template/.github/agents/, and the same folders at the repository root.tests/Test-Template.ps1fails while a generated copy lacks the text step 4 pins. So steps 4 to 6 expect that one failure, and the suite passes from step 7 on.ExitWorktree,EnterWorktree,.claude/commands/,{{,$ARGUMENTSoras a background command. The new text uses none of these.Adopt-Project.ps1holds a word-for-word copy ofGet-CodeQLWorkflowNotefromtemplate/.template/Update-Project.ps1.tests/Test-UpdateNotes.ps1'scopies:check fails unless the two functions are character for character the same.tests/Test-UpdateNotes.ps1keeps its work folder,project-template-update-notes-test-<PID>in the temp folder. Leave it.tests/Test-Adoption.ps1without-UnitOnlyandtests/Test-AdoptEdgeCases.ps1take far more than two minutes. No step runs them; the reviewer does.[IO.File]::ReadAllText,[IO.File]::WriteAllTextor[IO.Directory]::GetFiles: .NET resolves it against the process's folder, whichSet-Locationdoesn't move and which in a Copilot session is the main checkout, not the plan's worktree. UseGet-Content -LiteralPath,Set-Content -LiteralPathorGet-ChildItem, or make the path absolute first withJoin-Path (Get-Location) <path>..claude/,.github/andtemplate/folders hold protected paths. The maintainer named Update-Project.ps1's CodeQL note still prints the baseline as -Repo <name> -Owner <owner>, beside ADR-0068's -Repo <owner>/<name> #689 and /run-feedback never recommends the merge when the first review has no finding #688 by number, which authorizes this plan's changes to them. Still, change only the files each step lists.origin/mainexcept this plan's emptyPlan:commit.NCodeGroup/code-review(its pull request Install global.json's SDK and the older test runtimes in GitLab CI #264's review found the gap) and /run-feedback never recommends the merge when the first review has no finding #688's namesNCodeGroup/Collections.Providers(its pull request pre-push: refuse the push when awk or tr is missing #41 shows the gap). This plan changes nothing in either; they only check the fix once it is released.Decisions
origin, because the fix ships intemplate/,workflow/andAdopt-Project.ps1.Get-CodeQLWorkflowNotepredates ADR-0068 and splits$sluginto$ownerand$namefor its last line. v0.154.0 addedGet-BaselineNotewith-Repo <owner>/<name>but left this note alone, andtests/Test-UpdateNotes.ps1pins the old form ('tools/Set-RepositoryBaseline.ps1 -Repo brand -Owner NCodeGroup'). Evidence:template/.template/Update-Project.ps1lines 1029-1039 and 1045-1050.-Repo $slug, the issue's first option. Dropping the line instead would breakAdopt-Project.ps1, whose copy must stay equal and which prints no baseline note after it, and an update whose origin isn't on GitHub, which prints no baseline note at all.Adopt-Project.ps1's own "Protect the default branch" command also moves to-Repo $originRepository. Otherwise the adoption would print-Repo plain -Owner exampleand then the CodeQL note's-Repo example/plain, the same two-forms problem Update-Project.ps1's CodeQL note still prints the baseline as -Repo <name> -Owner <owner>, beside ADR-0068's -Repo <owner>/<name> #689 reports.docs/adopt.md2.1 already says-Repo <owner>/<name>._run-feedback-body.md's Recommend the Merge recommends only "once the run has had a round or that pass found items", and says a pass with no item before a round recommends nothing. Nothing reads whether NCode Review already reviewed the head: Wait tracks only the review of<pushed>, a push the run made. A clean first review gives no item and no round, so the condition never holds (Collections.Providers#41, Extensions.DataProtection#39, identity-platform#52, code-review#264).Code reviewcheck run on the pull request's head commit and recommends when a completed NCode Review run there has the conclusionneutraland a title that doesn't start withReview. Evidence, fromNCodeGroup/code-review'ssrc/publish.tsandsrc/checks.ts: a posted review completes the check runneutralwith a title that counts its findings (No findings,No new findings, …or<n> blocker, <n> should-fix, <n> nit); a run that posted no review completes it withReview skipped,Review budget used up,Review paused(allneutral),Review failed,Review stopped,Review cancelledorReviewed <sha> instead. The query returns 1 on Collections.Providers#41's head (No findings) and counts code-review#264's head (0 blocker, 0 should-fix, 2 nit, whose findings have no thread here) as reviewed, as the issue asks.<head commit>, and a no-round recommendation is skipped when anAutopilot:comment already recommends that commit, so a restarted/run-feedbackdoesn't recommend the same head twice ("each head of the branch gets at most one recommendation")./run-issues(Review the Pull Request item 9) has the same gap: a first review with no finding is neither a round nor a check that found findings. It gets the same check-run condition./run-issues-all-inalready recommends "whether or not the entry has had a round" and needs nothing.MEMBER, so the changelog thanks no one.Out of scope
tools/Set-RepositoryBaseline.ps1,New-Project.ps1andtemplate/.template/Test-MergeGate.ps1, which still pass or print-Owner; see Follow-ups.max-review-roundscap, the merge-only push rules, Wait's hour-long wait for<pushed>,_land-auto.mdand_stop-the-line.md._run-issues-all-in-body.md,address-feedback,ship-planand every decision record.tools/Set-RepositoryBaseline.ps1or any end-to-end test undertests/e2e/.Steps
[ ] 1. Add a failing check that the CodeQL note prints -Repo /
tests/Test-UpdateNotes.ps1(edit)codeqlparagraph (fromcodeql Get-CodeQLWorkflowNote names codeql.yml, …throughmodifies it or adds another file.) with these five lines, indented as the old ones are: 6 spaces beforecodeql, 16 spaces before each other line:$codeqlNoteblock, replace'tools/Set-RepositoryBaseline.ps1 -Repo brand -Owner NCodeGroup'with'tools/Set-RepositoryBaseline.ps1 -Repo NCodeGroup/brand from the template''s clone'.'tools/Set-RepositoryBaseline.ps1 -Repo <name> -Owner <owner>'with'tools/Set-RepositoryBaseline.ps1 -Repo <owner>/<name> from the template''s clone'.Check "codeql: $name" (…), replace-and -not $note.Contains('once this update merges, you run'))with-and -not $note.Contains('once this update merges, you run') -and -not $note.Contains(' -Owner ')).$o = pwsh -NoProfile -File tests/Test-UpdateNotes.ps1 2>&1; $code = $LASTEXITCODE; $fails = @($o | Where-Object { "$_" -match '^FAIL ' }); if ($code -and $fails.Count -eq 2 -and @($fails | Where-Object { "$_" -match '^FAIL codeql: added ' }).Count -eq 1 -and @($fails | Where-Object { "$_" -match '^FAIL codeql: added, origin not on GitHub ' }).Count -eq 1) { exit 0 } else { exit 1 }[ ] 2. Print the CodeQL note's baseline command as -Repo /
template/.template/Update-Project.ps1(edit),Adopt-Project.ps1(edit)function Get-CodeQLWorkflowNoteof each file, make the same two edits, so the two copies stay character for character equal:$owner, $name = $slug -split '/', 2.-Repo $name -Owner $owner from the template's clonewith-Repo $slug from the template's clone.Get-BaselineNoteright below it inUpdate-Project.ps1, which prints-Repo $Repository.$o = pwsh -NoProfile -File tests/Test-UpdateNotes.ps1 2>&1; $code = $LASTEXITCODE; if ($code -or -not ($o -match '^PASS codeql: added$') -or -not ($o -match '^PASS codeql: added, origin not on GitHub$') -or -not ($o -match '^PASS copies: ') -or (Select-String -LiteralPath template/.template/Update-Project.ps1, Adopt-Project.ps1 -SimpleMatch -Pattern '-Repo $name -Owner $owner' -Quiet)) { exit 1 } else { exit 0 }[ ] 3. Print the adoption's baseline command as -Repo /
Adopt-Project.ps1(edit),tests/Test-Adoption.ps1(edit),tests/Test-AdoptEdgeCases.ps1(edit)Adopt-Project.ps1, in theif ($originRepository) {block that printsProtect the default branch, …:$owner, $repo = $originRepository -split '/', 2with$repo = ($originRepository -split '/', 2)[1].'tools/Set-RepositoryBaseline.ps1') -Repo $repo -Owner $owner"with'tools/Set-RepositoryBaseline.ps1') -Repo $originRepository".tests/Test-Adoption.ps1:$out.Contains('-Repo plain -Owner example')with$out.Contains('-Repo example/plain') -and -not $out.Contains('-Repo plain -Owner').$out.Contains('-Repo Demo -Owner NCodeGroup')with$out.Contains('-Repo NCodeGroup/Demo') -and -not $out.Contains('-Repo Demo -Owner').tests/Test-AdoptEdgeCases.ps1: replace$ciOut.Contains('-Repo ci-existing -Owner example')with$ciOut.Contains('-Repo example/ci-existing') -and -not $ciOut.Contains('-Repo ci-existing -Owner').$bad = @(foreach ($f in 'Adopt-Project.ps1', 'tests/Test-Adoption.ps1', 'tests/Test-AdoptEdgeCases.ps1') { $errs = $null; [void][Management.Automation.Language.Parser]::ParseFile((Join-Path (Get-Location) $f), [ref]$null, [ref]$errs); if ($errs) { "$f does not parse" } }); $a = Get-Content -Raw -LiteralPath Adopt-Project.ps1; $t = Get-Content -Raw -LiteralPath tests/Test-Adoption.ps1; $e = Get-Content -Raw -LiteralPath tests/Test-AdoptEdgeCases.ps1; if (-not $a.Contains('tools/Set-RepositoryBaseline.ps1'') -Repo $originRepository"') -or -not $a.Contains('$repo = ($originRepository -split ''/'', 2)[1]') -or $a.Contains('-Owner $owner') -or -not $t.Contains('$out.Contains(''-Repo example/plain'')') -or -not $t.Contains('$out.Contains(''-Repo NCodeGroup/Demo'')') -or $t.Contains('-Repo plain -Owner example') -or $t.Contains('-Repo Demo -Owner NCodeGroup') -or -not $e.Contains('$ciOut.Contains(''-Repo example/ci-existing'')') -or $e.Contains('-Repo ci-existing -Owner example')) { $bad += 'text' }; pwsh -NoProfile -File tests/Test-Adoption.ps1 -UnitOnly | Out-Null; if ($LASTEXITCODE) { $bad += 'unit' }; if ($bad) { $bad; exit 1 } else { exit 0 }[ ] 4. Add a failing check that a clean first review gets the merge recommended
tests/Test-Template.ps1(edit),docs/tests.md(edit)tests/Test-Template.ps1: right after the line that startsCheck 'workflow: run-feedback reaches Claude Code from run-feedback.md, and before the comment line# run-issues-all-in follows run-issues' installed file …, add these six lines:docs/tests.md: right before the line that starts- `_land-auto.md` and `_stop-the-line.md` are in each generated copy, add these two lines:$env:Path = [Environment]::GetEnvironmentVariable('Path','Machine') + ';' + [Environment]::GetEnvironmentVariable('Path','User'); . nvs.ps1 use 26 | Out-Null; $o = pwsh -NoProfile -File tests/Test-Template.ps1 -Only none 2>&1; $code = $LASTEXITCODE; $fails = @($o | Where-Object { "$_" -match '^FAIL ' }); if ($code -and $fails.Count -eq 1 -and "$($fails[0])" -match '^FAIL workflow: run-feedback and run-issues recommend the merge after a first pass' -and (Select-String -LiteralPath docs/tests.md -SimpleMatch -Pattern 'shows a posted review, and recommends nothing while none has arrived' -Quiet)) { exit 0 } else { exit 1 }[ ] 5. Recommend the merge after a clean first review in run-feedback
workflow/templates/_run-feedback-body.md(edit)once NCode Review's review of the last push it asked for is in, and still judgesNew:
once NCode Review's review of the last push it asked for is in, or, before any round, after a pass that finds no item once NCode Review's review of the pull request's head commit is in, and still judgesonce the run has had a round or that pass found items: every item is then fixed, declined, answered or put to me, and NCode Review's review of the last push the run asked it to review came back with nothing left to act on.New:
once the run has had a round, that pass found items, or NCode Review's review of `<head commit>`, the pull request's head commit, which `gh pr view <number> --json headRefOid --jq .headRefOid` prints, is in, as the next sentence checks: every item is then fixed, declined, answered or put to me, and NCode Review's review of the last push the run asked it to review, or of `<head commit>`, came back with nothing left to act on.A pass that finds no item before the run has had a round recommends nothing, on purpose:and endsuntil the wait limit passes.New, as one line:that says the pull request is ready to merge as far as this run can tell, why (the rounds so far, that each item was fixed, declined, answered or put to me, and, once the rounds passedNew:
that says the pull request is ready to merge at `<head commit>` as far as this run can tell, why (the rounds so far, that each item was fixed, declined, answered or put to me, or, with no round and no item, that NCode Review's review of `<head commit>` left nothing to act on, and, once the rounds passed$f = Get-Content -Raw -LiteralPath workflow/templates/_run-feedback-body.md; $miss = @('or, before any round, after a pass that finds no item once NCode Review', 'once the run has had a round, that pass found items, or NCode Review', 'A pass that finds no item before the run has had a round reads that review', '/check-runs?check_name=Code%20review" --jq', '((.output.title // "Review") | startswith("Review") | not))] | length', 'already recommends the merge at ', 'when it reviewed nothing there', 'left nothing to act on, and, once the rounds passed') | Where-Object { -not $f.Contains($_) }; if ($miss -or $f.Contains('recommends nothing, on purpose') -or $f.Contains('once the run has had a round or that pass found items')) { $miss; exit 1 } else { exit 0 }[ ] 6. Recommend the merge after a clean first review in run-issues
workflow/templates/run-issues.md(edit),workflow/templates/run-issues-copilot.md(edit)once the entry has had a round or that check found NCode Review findings awaiting an answer: each finding is then fixed, declined, answered, left as a follow-up or left for me, and NCode Review's review of the last push the run asked it to review came back with nothing left to act on.(exactly once in each file) with this text, as one line:$bad = foreach ($p in 'workflow/templates/run-issues.md', 'workflow/templates/run-issues-copilot.md') { $t = Get-Content -Raw -LiteralPath $p; foreach ($x in 'or that check found nothing awaiting an answer and NCode Review', '/check-runs?check_name=Code%20review" --jq', '((.output.title // "Review") | startswith("Review") | not))] | length', 'when it reviewed nothing there. Each finding is then fixed', 'before the entry''s first round recommends nothing.') { if (-not $t.Contains($x)) { "$p missing $x" } }; if ($t.Contains('once the entry has had a round or that check found')) { "$p still has the old condition" } }; if ($bad) { $bad; exit 1 } else { exit 0 }[ ] 7. Regenerate the template's and the repository's workflow files
template/.claude/commands/(edit),template/.github/prompts/(edit),template/.github/skills/(edit),.claude/commands/(edit),.github/prompts/(edit),.github/skills/(edit)pwsh -NoProfile -File tools/Update-Template.ps1from the repository root, and change nothing by hand.git status --shortmust list, besides the files steps 1 to 6 changed, only files under the six folders above:run-feedbackandrun-issuesin each folder..claude/agents/,.github/agents/ortemplate/.template/, stop, mark the step[?]and quote it.git add -- template/.claude/commands template/.github/prompts template/.github/skills .claude/commands .github/prompts .github/skills.$env:Path = [Environment]::GetEnvironmentVariable('Path','Machine') + ';' + [Environment]::GetEnvironmentVariable('Path','User'); . nvs.ps1 use 26 | Out-Null; $o = pwsh -NoProfile -File tests/Test-Template.ps1 -Only none 2>&1; $code = $LASTEXITCODE; if ($code -or -not ($o -match '^PASS workflow: run-feedback and run-issues recommend the merge after a first pass')) { exit 1 } else { exit 0 }[ ] 8. Describe the clean-first-review recommendation in USAGE.md
USAGE.md(edit)- After a pass that leaves every item fixed, declined, answered or put to you, once the bot's review of the last push it asked for is in, it recommends the merge, add this line, indented two spaces as a sub-bullet:$l = Get-Content -LiteralPath USAGE.md; $i = [array]::FindIndex([string[]]$l, [Predicate[string]]{ param($x) $x.StartsWith('- After a pass that leaves every item fixed, declined, answered or put to you') }); if ($i -ge 0 -and $l[$i + 1].StartsWith(' - Before its first round, a pass that finds nothing to answer recommends the merge once the bot''s review of the pull request''s head commit is in')) { exit 0 } else { exit 1 }[ ] 9. Write the v0.154.2 changelog section
CHANGELOG.md(edit)## [Unreleased](which has no entries), insert a blank line, then## [0.154.2] - <date>, where<date>is whatGet-Date -Format yyyy-MM-ddprints, then a blank line,### Fixed, a blank line, and these two entries, each one line:## [0.154.1] - 2026-11-30heading.[unreleased]: https://github.com/NCodeGroup/project-template/compare/v0.154.1...HEADwith[unreleased]: https://github.com/NCodeGroup/project-template/compare/v0.154.2...HEAD, and add the line[0.154.2]: https://github.com/NCodeGroup/project-template/compare/v0.154.1...v0.154.2right after it, above the[0.154.1]:line.$t = Get-Content -Raw -LiteralPath CHANGELOG.md; if ($t -match '(?m)^## \[Unreleased\]\r?\n\r?\n## \[0\.154\.2\] - \d{4}-\d{2}-\d{2}\r?\n\r?\n### Fixed\r?\n\r?\n- ' -and $t -match '\(\[#688\]\(https://github\.com/NCodeGroup/project-template/issues/688\)\)\.\r?\n\r?\n## \[0\.154\.1\] - 2026-11-30' -and $t.Contains('[#689](https://github.com/NCodeGroup/project-template/issues/689)') -and $t -match '(?m)^\[unreleased\]: https://github\.com/NCodeGroup/project-template/compare/v0\.154\.2\.\.\.HEAD\r?\n\[0\.154\.2\]: https://github\.com/NCodeGroup/project-template/compare/v0\.154\.1\.\.\.v0\.154\.2\r?\n\[0\.154\.1\]: ') { exit 0 } else { exit 1 }Review checklist
pwsh -NoProfile -File tests/Test-AdoptEdgeCases.ps1andpwsh -NoProfile -File tests/Test-Adoption.ps1 -SkipDotnetBuild; both pass, with theci-existing,plainandscaffoldbaseline-command checks showing-Repo <owner>/<name>.Get-CodeQLWorkflowNoteintemplate/.template/Update-Project.ps1andAdopt-Project.ps1are character for character equal, and neither function nor the adoption's protect command prints-Owner.codeql.ymlon a GitHub origin prints-Repo <owner>/<name>in the CodeQL note and in the baseline note right after it, the same form twice.run-feedbackcopy, a first pass with no item reads the head commit'sCode reviewcheck run, recommends only when a posted NCode Review review is there, recommends nothing while none has arrived (a project without NCode Review never gets one this way, as before), and never recommends the same head commit twice across restarted runs.run-issuescopy, item 9's new condition reads as one sentence chain and keeps the default-branch hold that follows it.gh:gh api "repos/NCodeGroup/Collections.Providers/commits/<head sha of #41>/check-runs?check_name=Code%20review" --jq '<the filter>'prints a number.tests/e2e/Test-RunFeedback.ps1by hand, asdocs/tests.mdasks after a change to/run-feedback./run-feedbackon a pull request whose first review has no finding, posts the recommendation in its first pass.Follow-ups
template/.template/Test-MergeGate.ps1(its-Repo $repoName -Owner $owner -WhatIfhint) andNew-Project.ps1(its "Run it again with:" warning) still printtools/Set-RepositoryBaseline.ps1 -Repo <name> -Owner <owner>, so a user still meets two forms of ADR-0068's one command; change both, and their tests intests/Test-MergeGate.ps1andtests/Test-NewProjectRemote.ps1.polewskm commentedon Dec 1, 2026
Also seen in NCodeGroup/brand#55 (Update from project-template v0.154.0): NCode Review's first review said
Verdict: ✅ Approvewith no finding in the project's own files and approved headb1096a6, so a first pass had no item and no round. The run reached a recommendation only because the pull request was retargeted to v0.154.1, whose push and/reviewgave it a round.NCodeGroup/brand's next/run-feedbackcan check the fix too.chore(agents): update to project-template v0.154.5 (#55)