Skip to content

prompts: clarify report's commit header format - #487

Open
kees wants to merge 1 commit into
sashiko-dev:mainfrom
kees:fix/prompt-report-header
Open

prompts: clarify report's commit header format#487
kees wants to merge 1 commit into
sashiko-dev:mainfrom
kees:fix/prompt-report-header

Conversation

@kees

@kees kees commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

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.

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>
@kees

kees commented Sep 5, 2026

Copy link
Copy Markdown
Contributor Author

This change is stand-alone, so I think it's actually better if I send this upstream to review-prompts. I've done it now: masoncl/review-prompts#99

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant