Skip to content

perf(gateway): reuse loaded turn config for timestamp check (#65645 salvage) - #77612

Merged
kshitijk4poor merged 1 commit into
NousResearch:mainfrom
kshitijk4poor:salvage/65645-config-reuse
Aug 3, 2026
Merged

perf(gateway): reuse loaded turn config for timestamp check (#65645 salvage)#77612
kshitijk4poor merged 1 commit into
NousResearch:mainfrom
kshitijk4poor:salvage/65645-config-reuse

Conversation

@kshitijk4poor

Copy link
Copy Markdown
Collaborator

Salvage of #65645 by @MaartenDMT — 1-line intent re-derived onto current main with authorship preserved (original was 4,708 commits behind; the touched function moved into TurnContext).

The timestamp check in the gateway message path re-loaded config via _load_gateway_config() when the already-loaded ctx.user_config was in scope. Reuse it. 19 gateway tests green.

Closes #65645.

Re-derivation of PR NousResearch#65645 onto current main: _build_gateway_agent_history
already runs inside a turn whose config was loaded once into
ctx.user_config; re-reading config from disk via _load_gateway_config()
per turn is redundant. Reuse the loaded turn config.
@kshitijk4poor
kshitijk4poor enabled auto-merge (rebase) August 3, 2026 11:40
@alt-glitch alt-glitch added type/perf Performance improvement or optimization P3 Low — cosmetic, nice to have comp/gateway Gateway runner, session dispatch, delivery sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages labels Aug 3, 2026
@kshitijk4poor
kshitijk4poor merged commit c8df422 into NousResearch:main Aug 3, 2026
36 checks passed
@Ruanjq98

Ruanjq98 commented Aug 3, 2026

Copy link
Copy Markdown

Code Review: #77612

Verdict: Approve

Test for xAI OAuth write-through: validates contract stamping.

LGTM - Reviewed diff. Changes are sound.

@kshitijk4poor
kshitijk4poor deleted the salvage/65645-config-reuse branch August 5, 2026 07:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/gateway Gateway runner, session dispatch, delivery P3 Low — cosmetic, nice to have sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages type/perf Performance improvement or optimization

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants