Skip to content

fix(llmloop): record grace round requests - #1066

Merged
lizhengfeng101 merged 1 commit into
alibaba:mainfrom
Gongyl01:fix/grace-round-observability
Aug 26, 2026
Merged

lizhengfeng101 merged 1 commit into
alibaba:mainfrom
Gongyl01:fix/grace-round-observability

Conversation

@Gongyl01

Copy link
Copy Markdown
Contributor

Description

The grace round is the final LLM request sent after the main loop reaches its tool-request limit.

This change completes its request-level observability:

  • create the main_task record before sending the request
  • attach request identity using the record's RequestNo, allowing retry attempts to be correlated with the request
  • record the response, token usage, and actual duration even when no tool call is returned
  • record the request error and duration when the grace request fails
  • emit the same LLM telemetry as regular main-task requests
  • add tests for successful responses and suppressed request errors

Type of Change

  • Bug fix (non-breaking change that fixes an issue)

How Has This Been Tested?

  • make check
  • make test
  • make coverage - 91.4%
  • Grace-round response and suppressed-error paths

Checklist

  • My code follows the project's coding style
  • I have performed a self-review of my code
  • I have added tests that prove the fix is effective
  • New and existing unit tests pass locally

@github-actions

Copy link
Copy Markdown
Contributor

✅ OpenCodeReview: Review complete: 0 finding(s) across 1 selected item(s).

@Gongyl01
Gongyl01 marked this pull request as ready for review August 26, 2026 09:35

@lizhengfeng101 lizhengfeng101 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lizhengfeng101
lizhengfeng101 merged commit 89ec55b into alibaba:main Aug 26, 2026
12 checks passed
@Gongyl01
Gongyl01 deleted the fix/grace-round-observability branch August 27, 2026 02:09
Githab-capibara added a commit to Githab-capibara/open-code-review that referenced this pull request Sep 17, 2026
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