fix(responses): resolve project only when creating a conversation (ENG-1028) - #246
Open
tino097 wants to merge 1 commit into
Open
Conversation
…G-1028) An existing conversation already pins its project via conversation.project_id, but handle() resolved the client-sent project name eagerly — after a project rename, the stale name held by the renderer 404ed every later turn of the task. Resolve the name only on the conversation-creation paths; unknown names there still 404. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
No PR environment for this pull requestAdd the Updated on every push to this PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the server half of ENG-1028: after a project rename, chat turns failed with
Project not found: <name>.ResponsesHandler.handle()resolved the client-sent project name eagerly on every request — but the renderer holds that name in long-lived state, so after a rename the wire carries a stale name. For an existing conversation the name is redundant (the conversation already pins its project viaconversation.project_id), yet the eager resolve hard-404ed every later turn of the task.Server-side rename itself was verified correct (service- and API-level, local + org modes) — the 404 was purely the eager resolution of a redundant stale name.
Changes
_resolve_project_idis now called only at the threecreate_conversationsites; turns on existing conversations never depend on the client-held name.tests/test_responses_project_rename.py: rename→resolve pin, existing-conversation-with-stale-name survives (red before this fix), unknown-name-on-create still 404s, new chat in a renamed project resolves the new name.Tests
uv run pytest tests/test_responses_project_rename.py— 4 passedtest_comments_layer.py::test_serve_injects_only_with_flag) — verified pre-existing on the staging baseline (fails with this change stashed).Companion renderer PR (mindsdb/cowork): sends the rename-proof
project_idand re-anchorsselectedProjecton rename. Independently safe to merge; server side first is preferred.🤖 Generated with Claude Code