Repository navigation
Re-select group sessions stuck on an old provider - #1131
Conversation
applyModel returned early once appliedModel matched and modelStale was unset, and reopening a group session only repaired a stale Bot. A session whose last request still named another provider kept that route. Re-select those sessions on the settled apply and before the next turn, and start a fresh part on the Bot's model. Fixes #1127 Co-authored-by: Danyang Chen <birfychen@gmail.com>
|
Verdict: PASS at 1ebd550 Ran:
Not run:
Findings: no actionable findings against #1127. Acceptance:
Security fence / display names: not in this diff. Residual, not a fail: liveRoute compares provider and model only. An effort-only sticky header is not re-selected while the record is settled. Changing bot.effort still takes the full apply path, because appliedEffort would differ. The reported failure is the provider route. This PASS is not merge authority. I am not enqueueing. |
1 similar comment
|
Verdict: PASS at 1ebd550 Ran:
Not run:
Findings: no actionable findings against #1127. Acceptance:
Security fence / display names: not in this diff. Residual, not a fail: liveRoute compares provider and model only. An effort-only sticky header is not re-selected while the record is settled. Changing bot.effort still takes the full apply path, because appliedEffort would differ. The reported failure is the provider route. This PASS is not merge authority. I am not enqueueing. |
Written-by: Dev
Owner: Dev
Reviewer: Reviewer
Fixes #1127
What changed
A group session could keep requesting the previous provider after the Bot record already said the new model was applied (
appliedModelmatched,modelStaleunset).applyModelreturned before touching those sessions, and opening an existing group session only repaired a stale Bot.A settled apply now re-selects a group session whose last request used another provider or model. Opening that session does the same before the next turn. The Bot's own chat, and any session that is not one of its group sessions, stay as they are. A session whose route cannot be read is left alone, so the #289 settled early return still holds. A fresh part starts on the Bot's model instead of copying the previous request header.
Verification at the tip
Tip SHA:
1ebd550dcde7b652cc3293ce960170f442591c3cRan:
node --import ./test/harness-resolve.mjs --test --test-name-pattern '1127|289' test/models.test.js test/room-participant.test.js— 3 failed, 3 passed. SettledapplyModelleftg1ondeepseek-official/deepseek-flash; a refusing drifted session did not setmodelStale; opening the existing session made 0selectModelcalls.#289and force-apply passed on that tip.TZ=UTC npm run verify— exit 0. arch-docs OK (13 changed files). ds-bot patches check ok. core 1475 pass, social 489, tree 125, timeline 125,.github/scripts417, interop 37, live-e2e unit 16.node .github/scripts/check-empty-catch.mjsexit 0.node .github/scripts/changelog.mjs checkexit 0.node core/scripts/build-client.mjs --checkexit 0.Not run:
dev/bench.sh/dev/smoke.mjs). It needs a DeepSeek Harness checkout withapps/weband pnpm; this environment has the npm harness packages only.appliedModelalready B,modelStaleunset) and assertselectSessionModelplus the next request header.Root cause
applyModelreturned whenappliedModelalready equalled the desired model andmodelStalewas unset, so it never calledselectSessionModelon existing group sessions.room-participant.jsopen()calledapplyModelonly whenmodelStalewas set. A DSH session whose last request was stilldeepseek-official/deepseek-flashtherefore survived a Models change that had already recordedopencsitool/.... Force-apply (updateBotpasses{ force: true }) already re-selected every group session; the hole was the settled record and the next turn. A fresh part also copied that stale request header onto the next part.