Skip to content

fix: read the merge setting folded, as every per-model setting is - #182

Merged
REPPL merged 4 commits into
mainfrom
fix/folded-merge-setting
Oct 4, 2026
Merged

REPPL merged 4 commits into
mainfrom
fix/folded-merge-setting

Conversation

@REPPL

@REPPL REPPL commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

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 on Config.NoTranscript: the exact key first, then any spelling that folds to the model, and any spelling carrying the setting wins.
  • The gateway's completions path and the bridge's Ask both use it. Before this, a setting saved under another spelling (for example ORG/Model against org/model) was missed, and the system messages went to the model unmerged.
  • The panel's merge box is ticked through mergeFor, the twin of noTranscriptFor, so it shows what the gateway does.
  • docs/system-message-merging.md says 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/gateway and internal/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 and go vet ./... is clean. go test -race ./... is green apart from internal/bind's IPv6 listener test, which cannot pass in a container without IPv6.

Assisted-by: Claude

REPPL added 4 commits October 3, 2026 22:21
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
… 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
@REPPL
REPPL added this pull request to the merge queue Oct 4, 2026
Merged via the queue into main with commit c843587 Oct 4, 2026
8 checks passed
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