Skip to content

fix(control): resolve review findings on lines the diff doesn't show - #364

Merged
kalaspuff merged 2 commits into
mainfrom
fctl/609-shouldn-t-also-a-comment-from-the-review
Oct 31, 2026
Merged

kalaspuff merged 2 commits into
mainfrom
fctl/609-shouldn-t-also-a-comment-from-the-review

Conversation

@fctl-sh

@fctl-sh fctl-sh Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Summary

A review's findings on lines the diff doesn't show go in its summary comment, not in threads of their own. A later review had no way to resolve them: fctl review threads didn't list them, and resolved took only thread ids. So a summary that held one never counted as addressed, and stayed shown after its issue was fixed. Inline findings already get resolved and their summaries hidden. kalaspuff/dynamoxy#126 shows the problem: the second review saw the fix but said "it has no thread to resolve".

Now:

  • fctl review threads lists each finding in an earlier summary's text, with an id made of the summary's id and the finding's number there (IC_…#1), its path and line. It shows as resolved once fixed, or once the summary is hidden.
  • resolved in fctl review submit takes those ids. The agent's instructions, the review agent's AGENTS.md, fctl review submit --help and the docs say so.
  • The later review strikes through the finding's title in the summary and adds a "Fixed in sha." line with the agent's note. It records the finding's number in the summary's hidden note and counts it in the "Addressed as of …" line. Once every issue in the summary is addressed, it hides the summary as outdated, as for threads. If GitHub refuses the edit, the summary stays shown.
  • Findings in the text of summaries still shown count as still open, like open threads. So a review with nothing new to report and such a finding open gets a neutral check, not a passed one.
  • New summaries' notes record how many findings their text holds (in_text). Without that, a list the agent wrote in its own summary text could pass for fctl's. Older summaries, like dynamoxy#126's, are read from their list, up to the number of issues found.
  • Restating an earlier summary no longer removes fctl's marks from the text the agent wrote. A finding that quoted one could otherwise lose text, or be merged with the next finding, and the wrong finding could be struck through.

I verified it with unit tests in fctl_domain::reviews: listing, ids, marking, standing and hiding, a summary in the exact older format, a finding that quotes fctl's mark, and a list faked in the agent's text. I also rendered a marked summary with GitHub's Markdown API to check that the struck-through title and the "Fixed in" line show as intended. I didn't run a review end to end against GitHub.

Worth confirming

  • Decision: A fixed finding stays in the summary with its title struck through and a "Fixed in" line under it, rather than being removed. This mirrors how fixed inline comments read.
  • Decision: An open finding in a summary's text keeps a review's check neutral until a later review finds it fixed or someone hides the summary. People can't resolve it any other way, since it has no thread. Pull requests whose old summaries hold such findings will see neutral checks where they passed before, until those findings are marked fixed.

fctl session


Note

Low risk. It changes how fctl's own review comments are restated and counted, in the control plane's review posting code; a mistake would show as a wrong review outcome or a summary left unmarked, not as lost data.

What it does. Findings that an earlier review put in its summary's text, because their lines weren't in the diff, can now be resolved by a later review through ids like IC_…#1, listed by fctl review threads. The summary marks them fixed with a strike-through and a note, and hides itself once everything in it is addressed. Since the last review it keeps the agent's text whole when restating a summary, keeps a summary shown when its edit failed, and counts unfixed in-text findings as still open, so the check stays neutral. The CLI help, docs and the review agent's prompt now name the new ids.

Review outcome. A re-review with no new findings now ends neutral instead of passing while a shown summary still holds unfixed findings in its text.

fctl review's first look at d239f0d · 8 files, +624 −75 · Review agent settings

Findings on lines the diff doesn't show go in a review's summary, which
has no thread for them. fctl review threads didn't list them, so a later
review couldn't resolve them, and a summary that held any never counted
as addressed and stayed shown after its issues were fixed.

fctl review threads now lists them by the summary's id and their number
there (IC_…#1), resolved accepts those ids, and a later review strikes
the finding through in the summary with what fixed it, notes its number
in the summary's note, counts it as fixed, and hides the summary once
everything in it is addressed. Summaries now note how many findings
their text holds, so that a list in the agent's own text isn't taken for
fctl's.
@fctl-sh
fctl-sh Bot requested a review from kalaspuff as a code owner October 31, 2026 02:30
@fctl-review

fctl-review Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Partly addressed as of d239f0d. Later commits fixed 2 of the 4 issues this review found.


fctl reviewed bcdcdd5 and found 4 issues.

Two agreed concerns from independent reviewers: a failed summary edit can still hide the summary, and unmarked can shift finding numbers. Also, still_open in post ignores unfixed findings in summaries' text, so a re-review with no new findings can pass while fctl review threads still lists them as open. The new IC_…#n ids aren't in fctl review submit --help or docs/cli.md.

On lines the diff doesn't show:

  • Open findings in summaries don't count as still open · Low severity · crates/fctl-control/src/reviews.rs line 2484: fctl review threads now lists unfixed in-text findings as open, but still_open and the review's outcome count only threads. A re-review with no new findings gets Passed while such a finding is still open.
  • New IC_…#n ids are missing from the CLI help and docs · Low severity · crates/fctl/src/cmd/review.rs line 152: The fctl review submit help example and docs/cli.md only show PRRT_… thread ids, and the text of the review agent's AGENTS.md in crates/fctl-agent/src/prompt.rs doesn't mention the in-text ids. Only the system prompt in fctl-domain was updated, so people and agents won't learn that resolved takes IC_…#1.

Reviewed by fctl · Review agent settings

Comment thread crates/fctl-control/src/reviews.rs Resolved
Comment thread crates/fctl-domain/src/reviews.rs Resolved
A summary whose edit failed is no longer hidden for findings it doesn't
show fixed. Restating keeps the summary's text as it is rather than
taking fctl's marks out of it, which could merge or drop findings that
quote them. Findings in the text of summaries still shown count as still
open. The submit help, the review agent's AGENTS.md and the docs name
the IC_…#1 ids.
@fctl-sh

fctl-sh Bot commented Oct 31, 2026

Copy link
Copy Markdown
Contributor Author

On the two findings in the summary of the review of bcdcdd5:

  • Open findings in summaries do not count as still open: fixed in d239f0d. Unfixed findings in the text of earlier summaries that are still shown now count toward still_open, so a review with nothing new and such a finding open gets a neutral check. The description says this under Worth confirming, since it changes when checks pass.
  • The new ids are missing from the CLI help and docs: fixed in d239f0d. fctl review submit --help shows an IC_…#1 entry in resolved and says which ids it takes. The review agent's AGENTS.md in crates/fctl-agent/src/prompt.rs and docs/cli.md name both kinds of id.

@kalaspuff
kalaspuff merged commit e4bc483 into main Oct 31, 2026
10 of 12 checks passed
@kalaspuff
kalaspuff deleted the fctl/609-shouldn-t-also-a-comment-from-the-review branch October 31, 2026 03:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant