Repository navigation
feat(submitqueue): Announce received and finished requests from the gateway's request materializer - #1106
Open
roychying wants to merge 1 commit into
Open
feat(submitqueue): Announce received and finished requests from the gateway's request materializer#1106roychying wants to merge 1 commit into
roychying wants to merge 1 commit into
Conversation
roychying
marked this pull request as ready for review
November 16, 2026 23:41
roychying
requested review from
a team,
behinddwalls and
sbalabanov
as code owners
November 16, 2026 23:41
roychying
force-pushed
the
chenghan.ying/sq-hook-request-started
branch
from
November 17, 2026 04:56
93b20df to
86f8b0a
Compare
roychying
force-pushed
the
chenghan.ying/sq-hook-request-started
branch
from
November 17, 2026 06:30
86f8b0a to
bf89510
Compare
…ateway's request materializer
roychying
force-pushed
the
chenghan.ying/sq-hook-request-started
branch
from
November 17, 2026 08:12
bf89510 to
5540e3f
Compare
This branch has not been deployed
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.
Why?
SubmitQueue v2 says nothing on a pull request or diff after a land. v1 comments when it receives a request, with a link to it, and again when the request lands or fails. The hooks framework is the seam for side effects like this, but SubmitQueue publishes no request events yet.
These events follow the request's summary in the gateway, the status users see, rather than pipeline transitions. That way a hook agrees with the UI in every case, including a request whose start failed before the orchestrator saved it. That request is only ever an
errorlog with request version 0, and it gets no pipeline transition to hang an event on.What?
submitqueue/core/hookeventholds SubmitQueue's hook source and three event types:request.received: the request left the internalacceptingstatus, normally whenLandrecordsaccepted. Its id carries version 0, since a request is received once.request.landedandrequest.failed: the summary reachedlandedorerror. The id carries the summary's request version, so a restated status mints the same id and a later finished version mints a new one.{queue, request_id, change_uris}. The events are consumed by the orchestrator's hook stage (next PR), which cannot read the gateway's store. A request's URIs never change, so they cannot go stale on redelivery.ReceivedAtMsorStatusTimestampMs), so a constructor is pure.MaterializergainsWithHookPublishing(registry). It publishes only on the summary update that crosses a transition, received first on the request's partition. A log that restates the summary publishes nothing, so a hook does no work for redeliveries, repair resends or stale logs.hookeventpackage doc:request_hook.publish_errorsand returned to the caller.request.receivedis published inside theLandRPC.start,TerminateRequestand the terminal-log resend.Test Plan
bazel test //submitqueue/core/hookevent/... //submitqueue/gateway/core/request/...make lint check-gazelle check-mocksmake test: all pass.Issue