Skip to content

feat: publish batching and scoring request logs#300

Closed
albertywu wants to merge 1 commit into
mainfrom
add-request-progress-logs-v2
Closed

feat: publish batching and scoring request logs#300
albertywu wants to merge 1 commit into
mainfrom
add-request-progress-logs-v2

Conversation

@albertywu

@albertywu albertywu commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add a scoring request log status
  • Publishes scoring and batching at the start of the respective controllers. There are already scored and batched request logs which are published at the end.

Test plan

make fmt && make build && make test && make check-mocks && make e2e-test

Emit gateway-visible progress logs when requests enter active batching and scoring, while keeping tests focused on existing controller behavior.

Co-authored-by: Cursor <cursoragent@cursor.com>
Copilot AI review requested due to automatic review settings July 6, 2026 21:24
@albertywu albertywu marked this pull request as ready for review July 6, 2026 21:28
@albertywu albertywu requested review from a team, behinddwalls and sbalabanov as code owners July 6, 2026 21:28

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR enhances SubmitQueue’s request-log progress reporting (persisted by the gateway log consumer) to surface batching and scoring progress more explicitly, including a new scoring request status and additional orchestrator-side log publishes.

Changes:

  • Add entity.RequestStatusScoring to represent in-progress scoring before persistence of the batch score.
  • Publish a batching request log when the batch controller begins active batch creation work for a request.
  • Publish scoring logs before invoking the scorer, while keeping the existing scored logs after score persistence (and extend unit tests accordingly).

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
submitqueue/orchestrator/controller/score/score.go Publishes per-request scoring logs prior to scoring a batch.
submitqueue/orchestrator/controller/score/score_test.go Updates publish mocking and adds coverage asserting scoring + scored log emission.
submitqueue/orchestrator/controller/batch/batch.go Publishes an early batching progress log before batch creation work begins.
submitqueue/orchestrator/controller/batch/batch_test.go Updates log-related assertions to expect batching then batched, and adjusts race test expectations.
submitqueue/entity/request_log.go Adds the new scoring request status constant.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +134 to +139
if err := corerequest.PublishBatchLogs(ctx, c.registry, batch.Contains, entity.RequestStatusScoring, map[string]string{
"batch_id": batch.ID,
}); err != nil {
metrics.NamedCounter(c.metricsScope, opName, "request_log_errors", 1)
return fmt.Errorf("failed to publish scoring request logs for batch %s: %w", batch.ID, err)
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is a fair point.

Stepping back a bit, I don't think scoring and batching states provide much value -- these states would complete very quickly (milliseconds), so from a UX point of view add little value.

Will close out this PR.

@albertywu albertywu closed this Jul 6, 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