fix: read the merge setting folded, as every per-model setting is - #182
Merged
Merged
Conversation
The gateway and the bridge read MergeSystemMessages by the request's exact model id, so a setting saved under another spelling was missed and the system messages went unmerged. Config.MergeSystemMessages reads it folded, modelled on Config.NoTranscript. Assisted-by: Claude
Assisted-by: Claude
… path The review of the folded merge setting found the bridge's Ask path and the config reader untested, and the panel's merge box still reading the setting by exact key while the server reads it folded, which breaks the panel-in-sync rule. The box now goes through mergeFor, the twin of noTranscriptFor; Ask, the config reader and the panel helper each have a test, the Ask one watched to fail against the raw index. The docs say the id is matched whichever way it is spelled. Assisted-by: Claude
# Conflicts: # CHANGELOG.md # internal/ui/static/app.js
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.
Resolves iss-2609201015464436: the gateway read a per-model setting by a raw map index.
What changes
Config.MergeSystemMessages(repoID)reads the merge setting folded. It is modelled onConfig.NoTranscript: the exact key first, then any spelling that folds to the model, and any spelling carrying the setting wins.Askboth use it. Before this, a setting saved under another spelling (for exampleORG/Modelagainstorg/model) was missed, and the system messages went to the model unmerged.mergeFor, the twin ofnoTranscriptFor, so it shows what the gateway does.docs/system-message-merging.mdsays the id is matched however it is spelled.impact: fix.Tests (each watched to fail first)
TestTheMergeSettingAppliesWhicheverWayItsIdIsSpelled(gateway completions)TestAskMergesWhicheverWayTheSettingsIdIsSpelled(the bridge's Ask path; it failed against the raw index)TestMergeSystemMessagesIsReadFolded(config table)TestTheMergeBoxReadsTheSettingFolded(panel)Review
Trust boundary:
internal/gatewayandinternal/config. The independent security review approved. Its two low findings were the untested Ask path and the panel box still reading by exact key; both are fixed here.Gates
gofmt -l .is empty andgo vet ./...is clean.go test -race ./...is green apart frominternal/bind's IPv6 listener test, which cannot pass in a container without IPv6.Assisted-by: Claude