Skip to content

Fix backend chat recovery version domain - #3070

Closed
AbigailDeng wants to merge 2 commits into
feature/integratefrom
fix/2026-07-30_chat-history-recovery-backend-version-domain
Closed

Fix backend chat recovery version domain#3070
AbigailDeng wants to merge 2 commits into
feature/integratefrom
fix/2026-07-30_chat-history-recovery-backend-version-domain

Conversation

@AbigailDeng

Copy link
Copy Markdown
Contributor

Problem

Create recovery reads stateVersion from the ChatTurnHistoryDeliveryGAgent recovery resource. The Workflow Application copied that delivery-resource version into WorkflowChatContext.StateVersion, whose SSE contract represents a ChatConversationGAgent watermark. Distinct actor version domains could therefore be conflated.

Backend solution

  • Preserve the delivery version on the recovery read model for recovery-resource freshness.
  • Do not copy that version into recovered WorkflowChatContext; recovered creates use the context default 0 until Conversation detail exposes its authoritative watermark.
  • Add a regression using delivery version 4 and expected Conversation context version 0.
  • Document the recovery-response and SSE version-domain contracts.

Scope

This PR contains only backend implementation, backend tests, and canonical contract documentation. It has no frontend files. The independently effective frontend hardening is tracked in #3067.

Validation

  • /Users/abigaildeng/.dotnet/dotnet test test/Aevatar.Workflow.Application.Tests/Aevatar.Workflow.Application.Tests.csproj --nologo --no-restore (457 passed)
  • bash tools/ci/test_stability_guards.sh
  • bash tools/ci/projection_state_version_guard.sh
  • bash tools/docs/lint.sh (83 files, 0 errors)

@AbigailDeng
AbigailDeng force-pushed the fix/2026-07-30_chat-history-recovery-backend-version-domain branch from e78289b to 82cecbe Compare July 30, 2026 09:34
@AbigailDeng
AbigailDeng changed the base branch from dev to feature/integrate July 30, 2026 09:34
@Abigail940404

Copy link
Copy Markdown

Closing per scope decision: the user-facing History save was not confirmed bug is caused by the frontend treating create recovery/context versions as Conversation watermarks. Frontend PR #3067 is independently effective against the existing backend contract, so this backend change is not required for the fix and should not block the frontend release.

1 similar comment
@AbigailDeng

Copy link
Copy Markdown
Contributor Author

Closing per scope decision: the user-facing History save was not confirmed bug is caused by the frontend treating create recovery/context versions as Conversation watermarks. Frontend PR #3067 is independently effective against the existing backend contract, so this backend change is not required for the fix and should not block the frontend release.

@AbigailDeng AbigailDeng closed this Aug 4, 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.

2 participants