Skip to content

feat: publish batching and scoring request logs#298

Closed
albertywu wants to merge 1 commit into
mainfrom
add-batching-scoring-request-logs
Closed

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

Conversation

@albertywu

@albertywu albertywu commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds a scoring request log status
  • Publish scoring and batching request log status upon controller start. There is already a scored and batched request log that is published upon controller completion.

Test plan

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

Copilot AI review requested due to automatic review settings July 6, 2026 20:33
@albertywu albertywu requested review from a team, behinddwalls and sbalabanov as code owners July 6, 2026 20:33
@albertywu albertywu marked this pull request as draft July 6, 2026 20:34

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 extends SubmitQueue’s request-log stream to make pipeline progress more visible by introducing a new scoring request status and emitting batching/scoring log entries earlier in the orchestrator pipeline.

Changes:

  • Add RequestStatusScoring to the request log status enum for gateway-visible score progress.
  • Publish batching request logs in mergeconflictsignal before handing mergeable requests to the batch topic.
  • Publish scoring request logs in score before invoking the scorer, while keeping existing scored logs after persistence.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

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 Adjusts publisher mock behavior to ignore log-topic publishes during score tests.
submitqueue/orchestrator/controller/mergeconflictsignal/mergeconflictsignal.go Publishes a batching log entry before publishing the request ID to the batch topic.
submitqueue/orchestrator/controller/mergeconflictsignal/mergeconflictsignal_test.go Updates test topic registry and publisher mock to tolerate the new log publish.
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 thread submitqueue/orchestrator/controller/score/score.go
Comment thread submitqueue/orchestrator/controller/mergeconflictsignal/mergeconflictsignal.go Outdated
Comment thread submitqueue/orchestrator/controller/score/score_test.go
Copilot AI review requested due to automatic review settings July 6, 2026 20:44

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

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Comment thread submitqueue/orchestrator/controller/batch/batch_test.go Outdated
Comment thread submitqueue/orchestrator/controller/score/score.go
Copilot AI review requested due to automatic review settings July 6, 2026 20:59

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

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

Comment thread submitqueue/orchestrator/controller/score/score_test.go Outdated
Copilot AI review requested due to automatic review settings July 6, 2026 21:03

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

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Comment thread submitqueue/orchestrator/controller/score/score.go
Comment thread submitqueue/orchestrator/controller/batch/batch.go
@albertywu albertywu force-pushed the add-batching-scoring-request-logs branch from 05a6d75 to 145244c Compare July 6, 2026 21:07
@albertywu albertywu changed the title Publish batching and scoring request logs feat: publish batching and scoring request logs Jul 6, 2026
@albertywu albertywu force-pushed the add-batching-scoring-request-logs branch from 145244c to 83c5c30 Compare July 6, 2026 21:15
Copilot AI review requested due to automatic review settings July 6, 2026 21:15
@albertywu albertywu force-pushed the add-batching-scoring-request-logs branch from 83c5c30 to 6ef5943 Compare July 6, 2026 21:17

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

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

Comments suppressed due to low confidence (1)

submitqueue/orchestrator/controller/score/score_test.go:55

  • requestLogsFromMessages is introduced but never used in this test file, which adds dead code and can confuse future readers. Either remove it or add assertions that use it (e.g. validating the new scoring/scored request-log publishes).
// testBatch returns a standard test batch for score tests.
func testBatch() entity.Batch {
	return entity.Batch{
		ID:       "test-queue/batch/1",
		Queue:    "test-queue",
		Contains: []string{"test-queue/1"},
		State:    entity.BatchStateCreated,
		Version:  1,
	}
}

Comment thread submitqueue/orchestrator/controller/score/score.go
Copilot AI review requested due to automatic review settings July 6, 2026 21:18

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

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Comment thread submitqueue/orchestrator/controller/score/score.go
Comment on lines +121 to +125
batchingLog := entity.NewRequestLog(request.ID, entity.RequestStatusBatching, 0, "", nil)
if err := corerequest.PublishLog(ctx, c.registry, batchingLog, request.ID); err != nil {
metrics.NamedCounter(c.metricsScope, opName, "request_log_errors", 1)
return fmt.Errorf("failed to publish batching request log for request %s: %w", request.ID, err)
}
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>
@albertywu albertywu force-pushed the add-batching-scoring-request-logs branch from 6ef5943 to 5a36a03 Compare July 6, 2026 21:22
@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