Skip to content

fix(agents): keep slash-containing primary under exact allowlist - #150423

Merged
obviyus merged 10 commits into
openclaw:mainfrom
xydigitLybnnnn:fix/149796-fresh-session-primary-model
Oct 7, 2026
Merged

obviyus merged 10 commits into
openclaw:mainfrom
xydigitLybnnnn:fix/149796-fresh-session-primary-model

Conversation

@xydigitLybnnnn

@xydigitLybnnnn xydigitLybnnnn commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Issue #149796 — in a gateway with several independently configured agents, every fresh session initialized on the allowlist's first model instead of the agent's own model.primary, and session.started already recorded the wrong model, with no modelOverride/modelOverrideSource and no fallback provenance (no preceding 429/error, no [model-fallback/decision] entry).

Reported shape: agents.defaults.models used as an exact allowlist containing only chutes/deepseek-ai/DeepSeek-V3.2-TEE, while each agent has a slash-containing primary:

main   -> chutes/zai-org/GLM-5.2-TEE
athena -> chutes/deepseek-ai/DeepSeek-V4-Flash-0731-TEE
client -> chutes/google/gemma-4-31B-turbo-TEE
bot    -> chutes/unsloth/Mistral-Nemo-Instruct-2407-TEE

Every agent resolved to chutes/deepseek-ai/DeepSeek-V3.2-TEE, including agents whose primary is not in their fallback chain. Model ids with a slash are normal for Chutes/OpenRouter-style providers, so the bug hit all of them at once.

Root cause

prepareModelPolicy() in src/agents/model-selection-shared.ts built defaultRef by re-parsing params.defaultModel as provider/model text:

const defaultRef = defaultModel && params.defaultProvider
  ? parseModelRefWithCompatAlias({ ...params, raw: defaultModel, ... })
  : null;

defaultModel is already the model id of the resolved provider/model pair — createModelSelectionState() receives defaultProvider plus the model id, and buildAllowedModelSet() callers pass the same split (for example src/commands/doctor/shared/retired-model-ref-repair.ts passes currentModel.defaultRef.provider / currentModel.defaultRef.model). parseModelRef() splits at the first slash, so zai-org/GLM-5.2-TEE became provider zai-org + model GLM-5.2-TEE.

resolveInitialModelSelection() keeps the current selection only when allows(current) is true or current equals configuredDefault (the prepared defaultRef). The mis-resolved ref never matched, so selection fell through to the first allowed catalog entry.

Status of this PR: test-only, guarding an upstream fix that has no coverage

This PR started as a one-expression fix plus its regression test. While it was open, upstream/main landed #150509 (90567a8bfd4, refactor(models): preserve selected identities and centralize thinking policy), which rewrites this same selection path and, as a side effect, fixes the defect from #149796.

Merging upstream/main conflicted exactly on the defaultRef expression in prepareModelPolicy(). The conflict was resolved in favour of the upstream implementation, and the redundant source patch from this branch was dropped: after the merge the net diff against upstream/main is one new test file, and no production code.

The upstream fix is not confined to that one expression. Reinstating the pre-#150509 parseModelRefWithCompatAlias({ ...params, raw: params.defaultModel }) construction on top of today's tree still keeps the configured primary (run in Evidence §3), so the behaviour cannot — and does not need to — be pinned back to a single line here.

What upstream still lacks is coverage for the reported shape. #150509 rewrote src/agents/model-selection-shared.ts and the surrounding selection code without a case for a slash-containing primary that is omitted from an exact allowlist:

$ git show 90567a8bfd4 -- '*.test.ts' | grep -nE "zai-org|gemma|omits it|exact allowlist|slash"
(no matches)

So this PR is submitted as a test-only PR whose value is that missing regression coverage:

$ git diff upstream/main --stat
 .../reply/model-selection.exact-allowlist.test.ts  | 88 ++++++++++++++++++++++
 1 file changed, 88 insertions(+)

The change

src/auto-reply/reply/model-selection.exact-allowlist.test.ts (new) — drives the real reply-pipeline entry createModelSelectionState() with the reporter's config shape (exact allowlist + slash-containing model.primary) and asserts the fresh session keeps the configured primary, for zai-org/GLM-5.2-TEE and google/gemma-4-31B-turbo-TEE.

It is a sibling suite rather than an addition to model-selection.test.ts because that file is grandfathered by check:line-cap-ratchet (2527 counted lines against a 1000 cap) and CI rejects growth of a grandfathered file. The extracted suite supplies its own prepared catalog through the preparedModelCatalog parameter instead of mocking the catalog runtime, and no coverage was trimmed.

Evidence

1. The bug is real — recorded reproduction on the pre-#150509 selection code

Recorded while this branch still carried its own fix, by pinning src/agents/model-selection-shared.ts to base 080edbedaa6 (a revision that predates #150509) and running the real reply-pipeline entry. The harness passes only the model catalog through createModelSelectionState()'s own preparedModelCatalog parameter; everything else is the reporter's config.

$ git checkout 080edbedaa6 -- src/agents/model-selection-shared.ts   # pre-#150509 source
$ node --import ./scripts/tsx.mjs .../harness/model-selection-before-after.mts
allowlist (agents.defaults.models): chutes/deepseek-ai/DeepSeek-V3.2-TEE
agent "athena" model.primary:        chutes/zai-org/GLM-5.2-TEE
pipeline defaultProvider/defaultModel: chutes / zai-org/GLM-5.2-TEE

root cause, defaultRef construction:
  parseModelRef("zai-org/GLM-5.2-TEE", "chutes")     -> {"provider":"zai-org","model":"GLM-5.2-TEE"}
  normalizeModelRef("chutes", "zai-org/GLM-5.2-TEE") -> {"provider":"chutes","model":"zai-org/GLM-5.2-TEE"}

fresh session resolves to: chutes/deepseek-ai/DeepSeek-V3.2-TEE
configured primary:        chutes/zai-org/GLM-5.2-TEE
RESULT: SUBSTITUTED by the allowlist
exit=1

And the same pinned revision against the suite added by this PR — the two cases fail, which is exactly the behaviour the coverage is meant to lock down:

$ git checkout 080edbedaa6 -- src/agents/model-selection-shared.ts
$ node scripts/run-vitest.mjs run src/auto-reply/reply/model-selection.exact-allowlist.test.ts
 ×  keeps the configured primary zai-org/GLM-5.2-TEE under an exact allowlist that omits it 861ms
   → expected 'deepseek-ai/DeepSeek-V3.2-TEE' to be 'zai-org/GLM-5.2-TEE' // Object.is equality
 ×  keeps the configured primary google/gemma-4-31B-turbo-TEE under an exact allowlist that omits it 532ms
   → expected 'deepseek-ai/DeepSeek-V3.2-TEE' to be 'google/gemma-4-31B-turbo-TEE' // Object.is equality
 Test Files  1 failed (1)
      Tests  2 failed (2)
[test] FAILED (exit 1)

Transcripts: logs/real_behavior/issue-149796-evidence/harness/before-fix.txt, regression-before.txt; harness: .../harness/model-selection-before-after.mts.

2. Same suite on this PR's merge head (90ca1650df7)

$ node scripts/run-vitest.mjs run src/auto-reply/reply/model-selection.exact-allowlist.test.ts
 ✓  auto-reply  ...model-selection.exact-allowlist.test.ts > keeps the configured primary zai-org/GLM-5.2-TEE under an exact allowlist that omits it 766ms
 ✓  auto-reply  ...model-selection.exact-allowlist.test.ts > keeps the configured primary google/gemma-4-31B-turbo-TEE under an exact allowlist that omits it 604ms
 Test Files  1 passed (1)
      Tests  2 passed (2)
[test] passed 1 Vitest shard in 54.58s
$ node --import ./scripts/tsx.mjs .../harness/model-selection-before-after.mts
fresh session resolves to: chutes/zai-org/GLM-5.2-TEE
configured primary:        chutes/zai-org/GLM-5.2-TEE
RESULT: configured primary kept
exit=0

3. Upstream's fix is broader than the conflicted expression

Today's tree, with the pre-#150509 defaultRef construction reinstated inside prepareModelPolicy():

$ # edit: defaultRef = params.defaultProvider ? parseModelRefWithCompatAlias({ ...params, raw: params.defaultModel }) : ...
$ node scripts/run-vitest.mjs run src/auto-reply/reply/model-selection.exact-allowlist.test.ts
 Test Files  1 passed (1)
      Tests  2 passed (2)
$ node --import ./scripts/tsx.mjs .../harness/model-selection-before-after.mts
RESULT: configured primary kept
exit=0

Both still pass, which is why this PR keeps the upstream implementation and drops its own source change.

4. Checks on this merge head

$ pnpm tsgo:core
(exit 0, clean)
$ pnpm check:line-cap-ratchet --base upstream/main
Line-cap ratchet OK: 1 changed source files; no new violations or over-cap growth.
$ pnpm check:max-lines-ratchet --base upstream/main
max-lines ratchet OK: 822 grandfathered suppressions.
OPENCLAW_* count 492/492

Linked context

Fixes #149796. The behaviour is already fixed on main by #150509; this PR keeps the regression coverage that #150509 did not add.

Tests and validation

  • src/auto-reply/reply/model-selection.exact-allowlist.test.ts — 2 passed on the merge head, 2 failed against the pre-refactor(models): preserve selected identities and centralize thinking policy #150509 source
  • pnpm tsgo:core — clean
  • pnpm check:line-cap-ratchet --base upstream/main — Line-cap ratchet OK: 1 changed source files; no new violations or over-cap growth.
  • pnpm check:max-lines-ratchet --base upstream/main — max-lines ratchet OK: 822 grandfathered suppressions.
  • pnpm install --frozen-lockfile — clean
  • Local quality run note: unrelated failures in src/flows/channel-setup.status.test.ts and src/proxy-capture/proxy-server.test.ts reproduce identically on clean main in this environment and are outside the src/agents / src/auto-reply selection path.

Risk checklist

  • Test-only diff against upstream/main: no production code, no config, no migration, no new options
  • The suite asserts the selection entry point's output rather than internal helpers, so it keeps working across further refactors of the selection path
  • No existing test was modified, moved, or trimmed; the new file is separate from model-selection.test.ts to stay clear of the line-cap ratchet

🤖 AI-assisted: This PR was developed with AI assistance.

Current-main Gateway verification

Built Gateway per-agent session.started proof, discriminating historical-hunk reversal, and gpt-5-mini live gate on d6d2fe792786d3df8a47533e7d538fc9639a0f15. No overlap with Pash/Sarah changes.

prepareModelPolicy re-parsed the already-resolved defaultModel as
provider/model text, which split model ids containing slashes (for example
"zai-org/GLM-5.2-TEE") into a bogus provider/model pair. The mis-resolved
configuredDefault then failed to match the current selection in
resolveInitialModelSelection, so fresh sessions on independently-configured
agents were replaced with the allowlist's first model.

Build defaultRef with normalizeModelRef on the resolved provider/model pair
instead, and add regression coverage for exact allowlists that omit a
slash-containing primary.

Fixes openclaw#149796
@clawsweeper

clawsweeper Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: S labels Sep 17, 2026
@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 17, 2026
@clawsweeper

clawsweeper Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed October 6, 2026, 10:10 PM ET / October 7, 2026, 02:10 UTC (Revision 12).

ClawSweeper review

What this changes

Adds two reply-pipeline tests ensuring fresh sessions retain slash-containing primary model IDs when a legacy exact allowlist omits them.

Merge readiness

✅ Ready for maintainer review

Keep open: current main fixes the production behavior, but this PR retains useful, discriminating regression coverage. The latest change resolves the prior mock-export finding; no blocking patch defect remains.

Priority: P2
Reviewed head: 96b6717112a9586af891ae1dda403c24f17a3d1e

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Focused, useful regression coverage with convincing Gateway observations and a discriminating failure control; the previous actionable finding is resolved.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (logs): Supplied built-Gateway evidence exercises fresh-session model selection and persisted session.started events for three distinct primaries through a local provider. Historical-hunk reversal makes both regression cases fail, and the final head changes only mock export preservation. No stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (logs): Supplied built-Gateway evidence exercises fresh-session model selection and persisted session.started events for three distinct primaries through a local provider. Historical-hunk reversal makes both regression cases fail, and the final head changes only mock export preservation. No stored-data contract changes.
Evidence reviewed 8 items Verified introduced change: The pinned merge-base-to-head delta adds only the regression suite. Both cases call the production reply-selection entry point and assert the selected provider and literal model ID; no production, dependency, configuration, or storage change is introduced.
Prior finding resolved: The exact-head GitHub commit patch confirms that the previously closed auth mock now spreads importOriginal before replacing ensureAuthProfileStore. This follows the documented export-completeness path without adding an exemption or changing the baseline.
Current selection owner: Current main carries the resolved default as a provider/model tuple. The visibility-policy owner retains that configured automatic default under an exact-only policy. Unmarked legacy configuration still derives restrictions from agents.defaults.models, so this fixture continues to exercise an actual compatibility path.
Findings None None.
Security None None.

How this fits together

Reply model selection combines agent configuration, model policy, and stored session choices to select the provider and model used for a turn. These tests protect fresh-session selection before provider execution.

flowchart TD
  A[Agent primary model] --> D[Reply model selection]
  B[Exact model allowlist] --> D
  C[Prepared model catalog] --> D
  D --> E{Configured primary retained}
  E --> F[Selected provider and model]
  F --> G[Provider execution]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +90. Total +90 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 90 0 +90
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 90 0 +90

Review metrics

None.

Technical review

Best possible solution:

Retain focused coverage at the reply-selection boundary so later identity or policy refactors cannot silently replace an agent's configured primary.

Do we have a high-confidence way to reproduce the issue?

No current-main failure is established: source and supplied Gateway observations preserve the configured primaries. Historical-hunk reversal provides a concrete failing control for the proposed regression cases.

Is this the best way to solve the issue?

Yes: testing the existing reply-selection entry point protects the reported configuration without restoring redundant production code or adding a test-only API.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 07e9a2519420.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This is bounded regression coverage for model selection, with the production defect already repaired.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (logs): Supplied built-Gateway evidence exercises fresh-session model selection and persisted session.started events for three distinct primaries through a local provider. Historical-hunk reversal makes both regression cases fail, and the final head changes only mock export preservation. No stored-data contract changes.
  • proof: sufficient: Contributor real behavior proof is sufficient. Supplied built-Gateway evidence exercises fresh-session model selection and persisted session.started events for three distinct primaries through a local provider. Historical-hunk reversal makes both regression cases fail, and the final head changes only mock export preservation. No stored-data contract changes.

Evidence

What I checked:

  • Verified introduced change: The pinned merge-base-to-head delta adds only the regression suite. Both cases call the production reply-selection entry point and assert the selected provider and literal model ID; no production, dependency, configuration, or storage change is introduced. (src/auto-reply/reply/model-selection.exact-allowlist.test.ts:39, 96b6717112a9)
  • Prior finding resolved: The exact-head GitHub commit patch confirms that the previously closed auth mock now spreads importOriginal before replacing ensureAuthProfileStore. This follows the documented export-completeness path without adding an exemption or changing the baseline. (src/auto-reply/reply/model-selection.exact-allowlist.test.ts:7, 96b6717112a9)
  • Current selection owner: Current main carries the resolved default as a provider/model tuple. The visibility-policy owner retains that configured automatic default under an exact-only policy. Unmarked legacy configuration still derives restrictions from agents.defaults.models, so this fixture continues to exercise an actual compatibility path. (src/auto-reply/reply/model-selection.ts:182, 07e9a2519420)
  • Merged production repair: GitHub verifies refactor(models): preserve selected identities and centralize thinking policy #150509 merged as 90567a8. Its commit patch changes reply-policy construction to carry the selected default tuple and marks initial selection as resolved. This establishes the production repair, while the proposed test coverage remains distinct. (src/auto-reply/reply/model-selection.ts, 90567a8bfd42)
  • Latest-release inclusion: GitHub identifies v2026.9.8 as the latest release. Comparing the production repair with its supplied release commit returns ahead, behind_by 0, and the repair as merge base, establishing inclusion in that release ancestry; this does not establish the first release containing it. (fc23bc864e45)
  • Distinct coverage remains: Current main has no exact-allowlist regression file. Inspected neighboring coverage exercises stored pins, namespace collisions, and automatic-primary reasoning, rather than these fresh-session slash-containing primaries omitted from a legacy exact allowlist. (src/auto-reply/reply/model-selection.resolved-pin.test.ts:154, 07e9a2519420)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • obviyus: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (11 earlier review cycles; latest 8 shown)
  • reviewed 2026-09-17T03:02:27.881Z sha ccaba21 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-17T03:28:18.599Z sha 7856f30 :: blocked before merge. :: none
  • reviewed 2026-09-17T05:07:39.382Z sha 90ca165 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-17T06:28:56.468Z sha a636b0c :: needs maintainer review before merge. :: none
  • reviewed September 24, 2026, 6:29 PM ET / 22:29 UTC (Revision 8) sha unknown :: needs maintainer review before merge. :: none
  • reviewed September 24, 2026, 6:29 PM ET / 22:29 UTC (Revision 9) sha unknown :: needs maintainer review before merge. :: none
  • reviewed 2026-10-06T04:34:13.236Z sha a636b0c :: needs maintainer review before merge. :: none
  • reviewed 2026-10-07T02:04:23.945Z sha d6d2fe7 :: needs changes before merge. :: [P3] Explain isolation for the new closed auth mock

`src/auto-reply/reply/model-selection.test.ts` is grandfathered by the line-cap
ratchet (2527 counted lines against a 1000 cap), so CI rejected the added cases
as growth:

  src/auto-reply/reply/model-selection.test.ts: 2527 -> 2579 counted lines (cap 1000)

The same two cases now live in `model-selection.exact-allowlist.test.ts`, which
drives `createModelSelectionState()` with the allowlist and the resolved pair and
supplies its own prepared catalog instead of mocking the catalog runtime. The
grandfathered file is unchanged from the base, so no coverage was trimmed.
…ssion-primary-model

# Conflicts:
#	src/agents/model-selection-shared.ts
@openclaw-barnacle openclaw-barnacle Bot removed the agents Agent runtime and tooling label Sep 17, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. and removed P1 High-priority user-facing bug, regression, or broken workflow. labels Sep 17, 2026
@obviyus

obviyus commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@obviyus

obviyus commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

Verified on d6d2fe792786d3df8a47533e7d538fc9639a0f15, after merging main 3d24e87e64a5f9c16750c0f8c9ef96bd91bfa7b3 without rebasing the contributor commits. The only PR change remains the two regression cases; production code is current main.

A built Gateway using the reported one-entry exact allowlist (chutes/deepseek-ai/DeepSeek-V3.2-TEE) started three fresh sessions. A local mock provider answered each turn. Reading the persisted session.started trajectory events showed:

Agent Recorded provider/model
main chutes/zai-org/GLM-5.2-TEE
athena chutes/deepseek-ai/DeepSeek-V4-Flash-0731-TEE
client chutes/google/gemma-4-31B-turbo-TEE

All three completed with MOCK_OK; none selected the allowlist's first model. This confirms current main fixes this reported configuration.

git log -S 'defaultModel: { provider: defaultProvider, model: defaultModel }' -- src/auto-reply/reply/model-selection.ts identifies the identity-preservation repair in 90567a8bfd42 (#150509). The exact PR test passes both cases. Reversing that commit's causal selected-default tuple and policy-parser hunks on current source makes both cases fail at the model assertion: each returns deepseek-ai/DeepSeek-V3.2-TEE instead of its configured primary. This was a targeted historical-hunk reversal, not a full reversal of the 79-file refactor. The original source was restored afterward. The regression test is discriminating, not a pass-on-both-sides test.

Additional verification: pnpm build:docker, focused regression suite, and real pnpm tsgo passed in isolation. One real Gateway call to openai/gpt-5-mini, thinking low, configured output budget 4096, completed with LIVE_GATE_OK (73 output tokens including 64 reasoning tokens). No Chutes paid calls were made.

Contributor credit remains intact. No production fix or changelog change is needed in this test-only PR.

@obviyus

obviyus commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@obviyus

obviyus commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator

Updated head: 96b6717112a9586af891ae1dda403c24f17a3d1e.

The first CI run identified a new mock-export guard violation in this test's auth-runtime mock. The mock now spreads importOriginal before replacing ensureAuthProfileStore; no guard exemption or baseline change was added. The focused suite still passes both cases, and reversing the historical identity-preservation hunks still fails both with the allowlisted substitute. Real pnpm tsgo passes again.

This follow-up changes only the test mock. Production code, build inputs, Gateway configuration, and provider execution are unchanged, so the three-agent built-Gateway proof and single gpt-5-mini live call remain applicable. No additional paid call was made.

@obviyus
obviyus merged commit f06e9b1 into openclaw:main Oct 7, 2026
95 checks passed
@obviyus

obviyus commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator

Landed in f06e9b1. Thanks @xydigitLybnnnn! Current main already starts each agent on its own slash-containing primary under an exact allowlist (checked on a built Gateway with your reported config); this test fails if that identity-preservation fix is reverted, so it now guards #149796.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 7, 2026
…enclaw#150423)

Guard that agents with slash-containing model.primary values keep their own primary for fresh sessions when agents.defaults.models is an exact allowlist, instead of starting on the allowlist's first model. Main already fixes the behavior; this pins it.

Fixes openclaw#149796.

Co-authored-by: Ayaan Zaidi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

2 participants