Skip to content

🤖 tests: check workspace model changes through the change record and AI selection - #5899

Closed
ibetitsmike wants to merge 3 commits into
mike/server-side-ai-story-seedsfrom
mike/server-side-ai-model-checks
Closed

ibetitsmike wants to merge 3 commits into
mike/server-side-ai-story-seedsfrom
mike/server-side-ai-model-checks

Conversation

@ibetitsmike

@ibetitsmike ibetitsmike commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The agent-switch sync test and three UI model tests read the per-workspace model:{workspace} key, which stops being the source of the model in #5901. They now check what holds before and after that switch: the explicit model change record in the WorkspaceModeAISync test, and getWorkspaceAiSelection, which unsent picks and backend metadata already feed, in the UI tests. Production code does not change.

Stack

Milestone M4 of the server-side settings stack, on top of M3 (#5869 to #5879): per-workspace AI picks (model, thinking level, reasoning mode, agent and Auto routing) are stored in workspace metadata in config.json instead of per-browser localStorage keys, so every browser shows the same picks. An unsent picker change stays in memory in its tab until a send saves it, and a reload before sending drops it, as the plan accepts. Layer 6 of 20.

Testing

  • "only records explicit model changes when agentId changes" (WorkspaceModeAISync.test.tsx) checks the change record without seeding or waiting on the model key.
  • "only a sent deliberate pick pins; plain sends and backend reseeds never do" (reawakenAiPins.test.ts), and the model selection steps in thinkingPersistence.test.ts and thinkingSelector.test.ts, read the model through getWorkspaceAiSelection.
  • The rewritten checks pass on the code before the switch in 🤖 refactor: resolve the workspace model from metadata and an unsent pick #5901 and after it, and the old key forms fail after the switch (verified for WorkspaceModeAISync and the jest suites reawakenAiPins, thinkingPersistence and thinkingSelector).
  • make static-check and the touched test suites pass at the top of the stack; CI checks each layer on its own.

Review record

…selection

The agent-switch sync test and three UI model tests read the per-workspace model key. They now
check the explicit model change record and getWorkspaceAiSelection, which picks and backend
metadata already feed, so the same checks hold before and after the model moves to the
resolver.

Stack-Layer: A2c1
@ibetitsmike
ibetitsmike added this pull request to stack #5868 October 8, 2026 21:03
@ibetitsmike ibetitsmike changed the title mike/server side ai model checks 🤖 tests: check workspace model changes through the change record and AI selection Oct 8, 2026
@ibetitsmike
ibetitsmike marked this pull request as ready for review October 8, 2026 21:32
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-09T00:25:23.048454Z 568a055 New commits
🔒 Security Review ✅ Completed 2026-10-09T00:25:48.750237Z 568a055 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@ibetitsmike
ibetitsmike removed this pull request from stack #5868 October 9, 2026 04:49
@ibetitsmike

Copy link
Copy Markdown
Contributor Author

Landed in #5916 (7b9899d), which collapsed this stack into one squash merge.

@ibetitsmike ibetitsmike closed this Oct 9, 2026
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