Skip to content

feat(submitqueue): Publish request hook events from the gateway to the orchestrator's hook stage - #1110

Open
roychying wants to merge 3 commits into
mainfrom
chenghan.ying/sq-gateway-hook-publishing
Open

roychying wants to merge 3 commits into
mainfrom
chenghan.ying/sq-gateway-hook-publishing

Conversation

@roychying

@roychying roychying commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

Why?

The parent PR (#1106 ) lets the gateway's request materializer publish request hook events, but nothing turns it on. The SubmitQueue domain already has one hook topic, submitqueue-hook, and a stage that consumes it in the orchestrator pipeline. The gateway shares that queue backend, so it can publish there rather than run a second hook stage of its own.

What?

  • The OSS gateway server registers submitqueue-hook as a publish-only topic and builds the materializer with WithHookPublishing. Both Land and the log consumers then publish request events.
  • A test checks that every topic the gateway publishes to matches the orchestrator stage's name: start, cancel and the hook topic. Renaming one side without the other fails CI instead of silently stranding messages.
  • Docs:
    • Hook RFC: the status, plus a decision bullet on why SubmitQueue request events follow the gateway summary and what that costs.
    • Workflow RFC: who publishes to the hook stage.
    • Gateway README: a short section on request hook events.

service/submitqueue/orchestrator/server still resolves every event to noop, so OSS behavior is unchanged apart from the extra messages. The comment hook follows in an internal deployment.

Test Plan

  • bazel test //service/submitqueue/gateway/server/...

  • Local Compose stack (make local-submitqueue-start, fake provider), with this stack replayed onto current main:

    Request Changes Result Hook events dispatched
    1 1 landed 1 received, 1 landed
    2 3 (stacked) landed 3 received, 3 landed
    3 1 (bogus URI) landed 1 received, 1 landed
    4 1 landed 1 received, 1 landed
    5 1 (same URI as 4) error 1 received, 1 failed
    • 14 events in total.
      • Every event ID is unique and matches what hookevent computes from the summary.
      • Requests 4 and 5 share a URI but get different IDs.
      • Intermediate statuses published nothing.
    • The orchestrator's hook stage acked every event through the noop hook: no hook or publish errors, and no messages left in the queue.

Issue

@roychying
roychying added this pull request to stack #1111 November 17, 2026 19:44
@roychying
roychying force-pushed the chenghan.ying/sq-gateway-hook-publishing branch from 417fb9b to 396165b Compare November 23, 2026 07:43
@roychying
roychying force-pushed the chenghan.ying/sq-gateway-hook-publishing branch from 396165b to 309899c Compare November 30, 2026 16:33
@roychying
roychying force-pushed the chenghan.ying/sq-gateway-hook-publishing branch 2 times, most recently from 2cbc2f1 to 4c64ba8 Compare December 1, 2026 06:50
@roychying
roychying marked this pull request as ready for review December 1, 2026 17:15
@roychying
roychying requested review from a team and sbalabanov as code owners December 1, 2026 17:15
@roychying
roychying force-pushed the chenghan.ying/sq-gateway-hook-publishing branch 2 times, most recently from 9bf432e to de3cd81 Compare December 2, 2026 22:23
Base automatically changed from chenghan.ying/sq-hook-request-started to main December 2, 2026 22:55
@roychying
roychying force-pushed the chenghan.ying/sq-gateway-hook-publishing branch from de3cd81 to 8e161b7 Compare December 2, 2026 22:55

This branch has not been deployed

No deployments
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.

1 participant