feat: publish batching and scoring request logs#300
Closed
albertywu wants to merge 1 commit into
Closed
Conversation
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>
There was a problem hiding this comment.
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.RequestStatusScoringto represent in-progress scoring before persistence of the batch score. - Publish a
batchingrequest log when the batch controller begins active batch creation work for a request. - Publish
scoringlogs before invoking the scorer, while keeping the existingscoredlogs 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) | ||
| } |
Contributor
Author
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
scoringrequest log statusscoringandbatchingat the start of the respective controllers. There are alreadyscoredandbatchedrequest logs which are published at the end.Test plan
✅
make fmt && make build && make test && make check-mocks && make e2e-test