Repository navigation
feat: tell the DSS which participant and channel each chat comes from [#192] - #7
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…192] Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
| history: list[HistoryItem] | ||
| language: Language | ||
| location: Location | None = None | ||
| # Missing or null: the deployment's default, filled in by the mapping. |
Collaborator
There was a problem hiding this comment.
I am not able to understand this comment 😅
i thought null is missing and missing is null
Contributor
Author
There was a problem hiding this comment.
Updated :)
Comment on lines
+28
to
+31
| # The network participant this deployment serves, sent to the DSS as | ||
| # `context.senderId` (contract §7). No default: a deployment that forgets | ||
| # it must not start as someone else. The network registry owns its format. | ||
| # Trimmed, since a stray space is a copy-paste slip; blank after that fails. |
Collaborator
There was a problem hiding this comment.
Suggested change
| # The network participant this deployment serves, sent to the DSS as | |
| # `context.senderId` (contract §7). No default: a deployment that forgets | |
| # it must not start as someone else. The network registry owns its format. | |
| # Trimmed, since a stray space is a copy-paste slip; blank after that fails. |
IMO this is part of architecture/design found in docs or how the system works. The comment duplicates it and adds more burden to the reader when they already know about it.
Contributor
Author
There was a problem hiding this comment.
agree, removed
Comment on lines
+21
to
+24
| # `extra="ignore"`: `.env` is shared with Compose, which reads keys of its | ||
| # own (`EXPERIENCE_API_HOST_PORT`). Unknown environment variables were | ||
| # always ignored; this makes `.env` behave the same. | ||
| model_config = SettingsConfigDict( |
Collaborator
There was a problem hiding this comment.
Suggested change
| # `extra="ignore"`: `.env` is shared with Compose, which reads keys of its | |
| # own (`EXPERIENCE_API_HOST_PORT`). Unknown environment variables were | |
| # always ignored; this makes `.env` behave the same. | |
| model_config = SettingsConfigDict( | |
| model_config = SettingsConfigDict( |
We could rely on git history/blame to reason the change for "ignore" instead of a comment
RohanReddy44
approved these changes
Oct 21, 2026
Drop the extra="ignore" and sender id comments; the docs and git history hold that detail. Reword the channel comment: an absent key and an explicit null both mean the deployment default. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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
context.senderId. It is set byEXPERIENCE_API_SENDER_ID, has no default, and the app will not start without it.channel). Onlywebis accepted. A missing ornullchannel uses the deployment default (EXPERIENCE_API_CHANNEL); any other value gets a422, and nothing is sent to the DSS..env. Copy.env.example. A real environment variable always wins, and.envnever goes into the image.Why
Many Experience API deployments will share one DSS. The DSS needs to know which network participant each chat comes from, and later use that to choose providers. The channel moves from fixed config to each request, so one deployment can serve more than one channel.
The sender id is a plain label for now. Proving it is planned in OpenAgriNet/engineering-tracker#217.
Before you deploy
EXPERIENCE_API_SENDER_ID.EXPERIENCE_API_CHANNELset to anything butwebwill no longer start.Testing
uv run ruff check . && uv run ruff format --check . && uv run pyright && uv run vulture && uv run pytest: all pass, 127 tests, 18 new.podman compose configwith an env file shows the sender id passed through.Spec:
docs/.agent/specs/192-sender-and-channel.mdRelates to OpenAgriNet/engineering-tracker#192
🤖 Generated with Claude Code