Skip to content

The client is not the source of truth#7438

Merged
jamadeo merged 2 commits intomainfrom
dont-override-the-client
Feb 26, 2026
Merged

The client is not the source of truth#7438
jamadeo merged 2 commits intomainfrom
dont-override-the-client

Conversation

@DOsinga
Copy link
Collaborator

@DOsinga DOsinga commented Feb 23, 2026

Summary

We did it again. The client is overriding the data from the server, causing subtle bugs.

@DOsinga DOsinga requested a review from zanesq February 23, 2026 19:24
Copilot AI review requested due to automatic review settings February 23, 2026 19:24
@DOsinga
Copy link
Collaborator Author

DOsinga commented Feb 23, 2026

fixes this: #6970

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a client-server synchronization bug by establishing the server as the authoritative source of truth for conversation history. The client was previously sending its local conversation state (conversation_so_far) to the server on every chat request, which could override the server's authoritative state and cause subtle bugs.

Changes:

  • Renamed conversation_so_far to override_conversation with clear documentation that it should only be used for administrative tools
  • Removed client-side usage of this field in useChatStream.ts, allowing the server to maintain conversation state authority
  • Updated OpenAPI schema, TypeScript types, and Rust backend code consistently

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
ui/desktop/src/hooks/useChatStream.ts Removed conversation_so_far parameter from chat API calls, letting server manage conversation state
ui/desktop/src/api/types.gen.ts Renamed field to override_conversation with documentation warning about its limited use case
ui/desktop/openapi.json Updated OpenAPI schema to reflect the field rename and added clear documentation
crates/goose-server/src/routes/reply.rs Renamed field in ChatRequest struct and updated test, added documentation comments
ui/desktop/package-lock.json Automatic npm dependency metadata updates (peer dependency flags)
Files not reviewed (1)
  • ui/desktop/package-lock.json: Language not supported

Copy link
Contributor

@zanesq zanesq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@jamadeo jamadeo enabled auto-merge February 26, 2026 16:07
@jamadeo jamadeo added this pull request to the merge queue Feb 26, 2026
Merged via the queue into main with commit 5477754 Feb 26, 2026
22 checks passed
@jamadeo jamadeo deleted the dont-override-the-client branch February 26, 2026 16:22
@bzqzheng
Copy link
Contributor

hey sorry for the delayed review. this looks good to me, thanks for addressing the issue!

jamadeo added a commit that referenced this pull request Feb 26, 2026
Co-authored-by: Douwe Osinga <douwe@squareup.com>
Co-authored-by: Jack Amadeo <jackamadeo@block.xyz>
tlongwell-block added a commit that referenced this pull request Feb 27, 2026
…patible

* origin/main: (70 commits)
  feat: allow goose askai bot to search goose codebase (#7508)
  Revert "Reapply "fix: prevent crashes in long-running Electron sessions""
  Reapply "fix: prevent crashes in long-running Electron sessions"
  Revert "fix: prevent crashes in long-running Electron sessions"
  fix: replace unwrap() with graceful error in scheduler execute_job (#7436)
  fix: Dictation API error message shows incorrect limit (#7423)
  fix(acp): Use ACP schema types for session/list (#7409)
  fix(desktop): make bundle and updater asset naming configurable (#7337)
  fix(openai): preserve order in Responses API history (#7500)
  Use the correct Goose emoji 🪿 instead of Swan in README.md (#7485)
  feat(ui): implement fullscreen and pip display modes for MCP Apps (#7312)
  fix: prevent crashes in long-running Electron sessions
  Disable tool pair summarization (#7481)
  fix: New Recipe Warning does not close on cancel (#7524)
  The client is not the source of truth (#7438)
  feat: support Anthropic adaptive thinking (#7356)
  copilot instructions: reword no prerelease docs (#7101)
  fix(acp): don't fail session creation when model listing is unavailable (#7484)
  feat: simplify developer extension (#7466)
  feat: add goose-powered release notes generator workflow (#7503)
  ...

# Conflicts:
#	Cargo.lock
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.

5 participants