Skip to content

Replace the brittle tail -n 1 parsing with something that searches for the marker#1905

Merged
dgageot merged 1 commit intodocker:mainfrom
derekmisler:fix/triage-result-parsing
Mar 3, 2026
Merged

Replace the brittle tail -n 1 parsing with something that searches for the marker#1905
dgageot merged 1 commit intodocker:mainfrom
derekmisler:fix/triage-result-parsing

Conversation

@derekmisler
Copy link
Contributor

@derekmisler derekmisler commented Mar 3, 2026

Summary

Fix result marker parsing in the auto-issue-triage workflow. The previous tail -n 1 approach silently discarded valid agent results when LLM output contained trailing empty lines — which happened on the very first production run (actions/runs/22631502933), where the agent successfully diagnosed and fixed issue #1651 but the result was dropped.

Changes

  • Replace tail -n 1 | tr -d '[:space:]' with grep -oE 'RESULT:(NEEDS_INFO|FIXED|NO_CHANGES)' | tail -n 1 to search the entire output for the result marker instead of relying on it being the literal last line
  • Update the warning message to reflect the new search-based approach

Test plan

  • Re-run the triage workflow on an issue with kind/bug label — verify the result marker is correctly parsed even with trailing empty lines in agent output
  • Verify RESULT:NEEDS_INFO, RESULT:FIXED, and RESULT:NO_CHANGES paths still work correctly
  • Verify that when no marker is present, the fallback action=none is still set

…r the marker

Signed-off-by: Derek Misler <derek.misler@docker.com>
@derekmisler derekmisler marked this pull request as ready for review March 3, 2026 16:17
@derekmisler derekmisler requested a review from a team as a code owner March 3, 2026 16:17
@dgageot dgageot merged commit ae21d96 into docker:main Mar 3, 2026
11 checks passed
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.

2 participants