Skip to content

[4/N] feat(gateway): persist request context on Land#327

Draft
albertywu wants to merge 1 commit into
wua/status-list-read-model-storagefrom
wua/status-list-admission-projection
Draft

[4/N] feat(gateway): persist request context on Land#327
albertywu wants to merge 1 commit into
wua/status-list-read-model-storagefrom
wua/status-list-admission-projection

Conversation

@albertywu

@albertywu albertywu commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Add a focused admission writer that creates authoritative request context, change URI mappings, and the initial queue projection before first request log publish.

The gateway persists all request-context rows before publishing the request to the orchestrator. If any context write fails, the Land call fails before pipeline publication. The client can retry Land, which generates a new sqid for the new attempt.

This change also unblocks implementation of the HistoryAPI, because change uri -> request mappings will be stored prior to first request log, which is needed for the HistoryByChangeIDRequest endpoint described here

Test Plan

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

Stack

  1. [1/N Status & List APIs] docs: RFC for Status and List APIs #314
  2. [2/N Status & List APIs] feat(storage): add request read-model schema #321
  3. [3/N Status & List APIs] feat(storage): add request read-model stores #322
  4. @ [4/N] feat(gateway): persist request context on Land #327

Summary:
Add a focused admission writer that creates authoritative request context, change URI mappings, and the initial queue projection before Land appends its accepted log or publishes asynchronous work.

Duplicate creates are reconciled in the application layer so identical retries converge and conflicting immutable context fails fast.

Test Plan:
make fmt
make gazelle
./tool/bazel test //submitqueue/core/request:go_default_test //submitqueue/gateway/controller:go_default_test --test_output=errors

Revert Plan:
Revert this commit to stop writing request context. Existing additive rows may remain unused.

API Changes:
None.

Monitoring and Alerts:
Land controller operation metrics report admission write failures through the existing failure path.
@albertywu albertywu force-pushed the wua/status-list-admission-projection branch from 9a8ea9c to a165683 Compare July 10, 2026 23:54
@albertywu albertywu force-pushed the wua/status-list-read-model-storage branch from fa19c8d to 5d0f839 Compare July 10, 2026 23:54
@albertywu albertywu changed the title feat(gateway): persist request context on Land [4/N] feat(gateway): persist request context on Land Jul 10, 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.

1 participant