Repository navigation
docs(config): note that streaming-block changes need a gateway restart - #134192
Draft
liuhao1024 wants to merge 1 commit into
Draft
liuhao1024 wants to merge 1 commit into
liuhao1024 wants to merge 1 commit into
Conversation
The gateway snapshots the whole streaming: block (enabled, transport, edit_interval, buffer_threshold, cursor, fresh_final_after_seconds) when the runner is constructed (gateway/run.py), and every turn reads that snapshot (gateway/run_turn_runner.py), so edits to those keys only take effect after a restart. Per-platform display.platforms.<plat>.streaming toggles are re-read from config.yaml on every message and apply without a restart, but they can only narrow the master switch. The Gateway Streaming section now states both facts, in EN and zh-Hans. Fixes NousResearch#133804
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.
What does this PR do?
The Gateway Streaming section of the configuration guide tells users they can adjust
display.platforms.<platform>.streamingtoggles from the dashboard's Channels page or directly in~/.hermes/config.yaml, but it never says when those changes take effect. In reality the two layers behave differently:streaming:block (enabled,transport,edit_interval,buffer_threshold,cursor,fresh_final_after_seconds) is snapshotted once when the gateway runner is constructed (gateway/run.py,self.config = ... load_gateway_config_for_runner()), and every turn reads that snapshot (gateway/run_turn_runner.py,getattr(self._runner.config, 'streaming')). Editing those keys does nothing until the gateway is restarted.display.platforms.<platform>.streamingvalue is resolved per message from a freshload_user_config_effective()read ofconfig.yaml, so the dashboard Channels toggles and direct config edits apply from the next message without a restart.StreamingConfig.enabled_for:globally_enabled and (override is None or bool(override))), so flipping a platform toggle cannot turn streaming on until the master switch is enabled and the gateway has restarted.This is exactly the trap #133804 hit: the docs describe enabling streaming but omit the restart requirement. This PR documents the actual behavior in the existing "Per-platform streaming defaults" note (option two of the issue's proposal — "document the restart requirement"; the behavior-change option would touch the gateway's config snapshot lifecycle, which is a much larger change). The zh-Hans translation mirrors the same addition.
Related Issue
Fixes #133804
Type of Change
Changes Made
website/docs/user-guide/configuration.md: extended the "Per-platform streaming defaults" note in the Gateway Streaming section with the restart requirement for thestreaming:block, the no-restart behavior of the per-platform toggles, and the "per-platform can only narrow the master switch" rulewebsite/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/configuration.md: mirrored the same three facts in the zh-Hans translation of the noteHow to Test
main):gateway/run.py— the runner loadsself.configonce at construction (load_gateway_config_for_runner()), sostreaming:keys are a startup snapshot.gateway/run_turn_runner.py— each turn readsscfg = getattr(getattr(self._runner, 'config', None), 'streaming', None)(the snapshot) but resolves the per-platform value asctx.resolve_display_setting(ctx.user_config, platform_key, "streaming"), wherectx.user_configcomes from a per-messageload_user_config_effective()read (_load_gateway_config()is uncached).gateway/config.py—StreamingConfig.enabled_for()shows a per-platform value can only narrowglobally_enabled.python3 website/scripts/check_doc_links.py→ Observed result:OK: no route-style links in hand-authored docs.(exit 0)python3 -m pytest tests/website/ -q→ Observed result:46 passed in 1.74sChecklist
Code
docs(config): ...)pytest tests/ -qand all tests pass — N/A, docs-only change, no code touched;tests/website/(the docs-related suite) passes: 46 passedDocumentation & Housekeeping
docs/, docstrings) — this PR is the documentation updatecli-config.yaml.exampleif I added/changed config keys — N/A (no config keys added or changed)CONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/A