Combining feedback and editing instead of posting new comments is possible.
The formatting check already finds an existing comment using an embedded HTML comment, in the Markdown of the first GitHub comment it posts. We could segment that one comment with further HTML comments for sections if needed. As long as all the things that would add to these notes are sequential, to avoid a race to edit.
(the undef checker is actually one of the “formatters”, because that gives it this edit/update feature for free)
The nice part of it being in the file is anyone can change them without finding the automation script. So if someone moved the file for instance, they don’t lose the annotation.
If we did this in Python, they have to find the automation script and we may end up with checks that don’t fire because the file was moved at some point. However Python gives you all the logic for “free” if you want to do more complicated things.
Could of course do both. If 99% of the use cases are “any edit to this file triggers this comment” then put that in the file, the 1% that are more complex (like the undef checker) can be in Python.
Which could be a way to mitigate this part. As it’s not just that a common reviewer note might get ignored itself, but a valid one might be ignored because it’s surrounded by spammy notes.
So perhaps we try to set a standard like:
- Any edit produces a note - can be done in the file (and if it’s too noisy, removing it is very easy)
- Anything more complex - must be done in an automation using Python (and we make it easy to add one without being an expert in the whole thing)
I think maintainers would be able to make that decision.
It does depend on what the split is, what sorts of things would we want to check in addition to the one suggestion we have so far? Would be good to gather more.
And if what you’re suggesting would be valuable for reviews right now, we don’t have to wait for some framework to be made, we could add it using Python in the short term.