Skip to content

Keep the bot's hidden explanations out of the prompt, so a wrong one stops repeating itself - #243

Merged
danielchalmers merged 1 commit into
mainfrom
c/strip-hidden-summaries-b23c0f
Nov 10, 2026
Merged

danielchalmers merged 1 commit into
mainfrom
c/strip-hidden-summaries-b23c0f

Conversation

@danielchalmers

Copy link
Copy Markdown
Owner

Every comment AutoTriage posts ends with a hidden block that holds the run's summary and the reason for each operation.
A later run on the same thread got those blocks back in the timeline, and the model read its own earlier reasoning as evidence.
On MudBlazor pull request 11552 an earlier summary said the author was not a maintainer, and later runs repeated it in 3 of 4 replays.

What changes

  • A bot's earlier comments reach the prompt without the hidden block.
  • The block is still posted, because maintainers open a comment to see why the bot acted.
  • Only a comment by a bot account that ends with a block of the exact shape the action writes is changed. People's comments, item bodies and reviews are read as before.
  • One pattern in src/triage.ts reads the block back for the log preview and the prompt. It also accepts CRLF line endings, which is how GitHub returns a comment that was edited on the website.

No inputs, defaults or permissions change.

Verification

  • npm run verify passes: both typechecks, 342 tests, the build and the dist/ check.
  • New tests cover a bot comment with and without a block, an escaped --> inside the explanation, CRLF line endings, a comment longer than the length limit, people's comments, item bodies and reviews, and that the posted comment still carries the block.
  • Checked offline against 300 saved MudBlazor threads, with no model calls: 111 bot comments lost their block, none still ended in one, and nothing else in any prompt changed. On the 180 current threads the user prompts are 13% shorter.

Remaining risk

  • The effect on the model's decisions isn't measured yet. A Haiku replay is planned before v5 moves.
  • The action can't tell which bot account is its own, so any bot's comment that ends with a block of this exact shape loses it.
  • A repository that runs the action with a personal access token posts as a user, so its comments keep their blocks, as they do today.

…stops repeating itself

Every comment the action posts ends with a hidden block that holds the run's summary and the reason for each operation.
A later run on the same thread got those blocks back in the timeline, and the model read its own earlier reasoning as evidence.
On one MudBlazor pull request an earlier summary said the author was not a maintainer, and later runs repeated it.

The block now comes out of a bot's earlier comments before the timeline reaches the prompt.
It is still posted, because maintainers open a comment to see why the bot acted.
Only a comment by a bot account that ends with a block of the exact shape the action writes is changed, so people's comments, item bodies and reviews are read as before.
One pattern in src/triage.ts reads the block back for both the preview and the prompt, and a test posts blocks through the writer and checks that the pattern removes each one whole.
@github-actions github-actions Bot added the bug Something isn't working label Nov 10, 2026
@danielchalmers
danielchalmers merged commit 17cacb3 into main Nov 10, 2026
5 checks passed
@danielchalmers
danielchalmers deleted the c/strip-hidden-summaries-b23c0f branch November 10, 2026 01:12
@danielchalmers

Copy link
Copy Markdown
Owner Author

Merged as 17cacb3, and v5 was moved to it on 2026-11-10 at about 01:12 UTC.
The Haiku replay listed under "Remaining risk" did not run before the tag moved. This is what was checked instead.

Before merging, the timeline of MudBlazor pull request 11552 was run through this branch's prompt builder.
Its two bot comments went from 2,091 and 1,321 characters to 61 each.
The earlier "not on the maintainer list" conclusion was only in their hidden blocks, so it no longer reaches the prompt.

After the tag moved, four dry runs of 11552 on v5 at 17cacb3 each read the author as a listed maintainer and planned nothing, which is the right result for that thread.
Earlier replays had repeated the wrong answer in 3 of 4.

Limits: this is one thread and four runs, and the thread's stale label was removed between the earlier replays and these runs, so it is not a controlled comparison.
No replay at scale has run.

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

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant