fix(sessions): honor explicit default model pins#85643
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 4, 2026, 2:18 PM ET / 18:18 UTC. Summary PR surface: Source +179, Tests +830, Docs 0. Total +1009 across 37 files. Reproducibility: yes. source-reproducible. Current main resolves explicit configured-default selections into the same isDefault path that clears overrides, and the PR body supplies current-head terminal proof showing the changed persistence and clear behavior. Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Maintain one explicit product contract: either approve strict explicit-default pins with Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible. Current main resolves explicit configured-default selections into the same isDefault path that clears overrides, and the PR body supplies current-head terminal proof showing the changed persistence and clear behavior. Is this the best way to solve the issue? Unclear pending maintainer product approval. The implementation is coherent and uses the shared session override helper, but the best fix depends on whether OpenClaw wants explicit configured-primary selections to become strict pins for existing users. AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against a767c6d1df23. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +179, Tests +830, Docs 0. Total +1009 across 37 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
ClawSweeper PR egg ✨ Hatched: ✨ glimmer Neon Lint Imp Hatch commandComment Hatchability rules:
Rarity: ✨ glimmer. What is this egg doing here?
|
|
@clawsweeper re-review Addressed the compatibility finding without undoing the explicit-default pin behavior across the rest of the branch. What changed:
Verification:
Note: the repo-local |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
7c12035 to
0ba6718
Compare
|
@clawsweeper re-review Added redacted after-fix behavior proof for the current head. What changed in the PR body:
|
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review Corrected the PR body to use the exact The current body now validates locally with
|
|
🦞👀 Command router queued. I will update this comment with the next step. Re-review progress:
|
|
@clawsweeper re-review Refreshed the PR body proof on the current head Verification:
No source files changed in this follow-up; this only refreshes the public current-head proof. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Rebased this branch onto current Verification on the rebased head
The full GitHub check suite is rerunning automatically on this push. I did not refresh the separate local source-module |
|
@clawsweeper re-review Refreshed the Verification:
No source files changed in this follow-up; this only refreshes the public current-head proof. The remaining red |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review Rebased onto current Verification on the rebased head:
I also refreshed the |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review Rebased onto current Verification:
|
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Summary
/model default,session_status(model=default), andsessions.patch model:nullas the explicit clear/unpin paths.Real behavior proof
Behavior addressed: Explicit
/model <configured default>selections no longer lose user intent just because they match the configured primary; fallback policy treats them as strict user session selections, while/model defaultstill clears back to unpinned behavior.Real environment tested: Local beatrice.local source checkout at PR head
98ca4cd8b150ee0be7fcd602a01c4aed346f316con May 30, 2026. Ran a local source-module behavior probe withnode --import tsxagainst the current checkout; no channel credentials, provider API keys, live runtime files, or LaunchAgent state were used or modified.Exact steps or command run after this patch:
node --import tsx --input-type=module <<'EOF' ... EOF(local source-module behavior probe that applied an explicit configured-default selection, changed the configured primary, rendered/status, applied/model default, and rendered/statusagain)node scripts/run-vitest.mjs src/gateway/sessions-patch.test.ts src/sessions/model-overrides.test.ts src/agents/openclaw-tools.session-status.test.ts src/commands/status.summary.test.tsgit diff --checkEvidence after fix:
Terminal transcript:
Current-head refresh on June 1, 2026 at PR head
3582fabe21da45e5f1386f018480ae41fff07604:node scripts/run-vitest.mjs src/gateway/sessions-patch.test.ts src/sessions/model-overrides.test.ts src/agents/openclaw-tools.session-status.test.ts src/agents/agent-command.live-model-switch.test.tsnode --import tsx --input-type=module <<'EOF' ... EOF(minimal source-module rebase probe that confirmed the persisted explicit-default override state and/model defaultclear path without pulling in unrelated provider/plugin startup)git diff --checkObserved result after fix: The current PR head preserves an explicit configured-default selection as a user session pin,
/statusshows the pinned-session warning plusClear with: /model defaultafter the config primary changes, and/model defaultremoves the persisted override so/statusreturns to the new configured primary. The focused session/status Vitest proof also passes on the rebased head.What was not tested: No live Telegram or OpenAI provider turn was run, no channel delivery was exercised, and no live runtime files or LaunchAgent state were modified.
Current-head refresh on June 4, 2026 at PR head
44e618a93c692a8db6488a163146676c48757e6d:node scripts/run-vitest.mjs src/gateway/sessions-patch.test.ts src/sessions/model-overrides.test.ts src/agents/openclaw-tools.session-status.test.ts src/agents/agent-command.live-model-switch.test.tsnode --import tsx --input-type=module <<'EOF' ... EOF(local source-module probe that re-applied an explicit configured-default pin, switched the configured primary, rendered/status, applied/model default, and rendered/statusagain on the rebased head)git diff --check