prompts: clarify report's commit header format - #487
Open
kees wants to merge 1 commit into
Open
Conversation
While watching stage turns, we noticed sometimes the report generation stage would make multiple needless round-trips with the sanity checker because it kept producing a header starting with "commit:" instead of the checked "commit ". This is a weakness of the report prompt. The inline report must open with "commit <hash>", and the validator checks for exactly that: the literal prefix "commit " at the start of a line. The template's Structure list, which is where the report's contents are specified, asked only for the "git sha of the commit" and immediately below it for the "Author: line". Content but not form, with a colon shown in the neighbouring item and more colons in the Link: and Date: lines nearby. So "commit:" is a reasonable guess, and a report that guesses it is rejected and regenerated in full. Specify the header where the list already describes it: the word commit, one space, the sha, no colon, naming the wrong forms. Say why it differs from the lines under it, since that should help specify it well. Signed-off-by: Kees Cook <kees@kernel.org>
Contributor
Author
|
This change is stand-alone, so I think it's actually better if I send this upstream to |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
While watching stage turns, we noticed sometimes the report generation stage would make multiple needless round-trips with the sanity checker because it kept producing a header starting with "commit:" instead of the checked "commit ". This is a weakness of the report prompt.
The inline report must open with "commit ", and the validator checks for exactly that: the literal prefix "commit " at the start of a line. The template's Structure list, which is where the report's contents are specified, asked only for the "git sha of the commit" and immediately below it for the "Author: line". Content but not form, with a colon shown in the neighbouring item and more colons in the Link: and Date: lines nearby. So "commit:" is a reasonable guess, and a report that guesses it is rejected and regenerated in full.
Specify the header where the list already describes it: the word commit, one space, the sha, no colon, naming the wrong forms. Say why it differs from the lines under it, since that should help specify it well.