Skip to content

docs: scope the chat memory durability claim to stored history - #74

Open
CasperGN wants to merge 2 commits into
mainfrom
feat/java-ai-make-the-crash-proof-chat-memory-claim-pre
Open

CasperGN wants to merge 2 commits into
mainfrom
feat/java-ai-make-the-crash-proof-chat-memory-claim-pre

Conversation

@CasperGN

Copy link
Copy Markdown
Contributor

What changed

The docs said more about chat-memory durability than the code delivers. This narrows the claim to what is stored. The durable workflow wraps only the terminal model call (DurableAdvisor). The chat-memory advisor sits outside it and saves in the calling app after the workflow returns. So stored history is persisted in the Dapr state store, but a memory save cut off by a crash is not replayed by the workflow.

  • README and module docs: every claim that implied conversations or memory survive crashes is reworded to describe only the stored history.
  • ConcurrentConversationModificationException javadoc: says the memory save runs outside the workflow and describes both retry paths. With a reused, caller-supplied instance id, the retry attaches to the completed workflow and returns the recorded answer without re-running the LLM call. With no supplied id, the retry runs a fresh workflow. Either way, the memory save on retry happens in the app again. This matches the instance-id table in the README.

Calls made

  • Left the DurableMemoryConcierge system prompt ("a durable memory of the conversation") alone. It is text the model receives at runtime, not a claim to users, and changing it would change behaviour.
  • Left the registry metadata (AgentRecordFactory, AgentMetadataSchema) alone. It makes no claim about memory durability.

Testing

Docs and javadoc only. Maven could not run here: the sandbox blocks ~/.m2 and has no network access to Maven Central. Instead I checked the edited javadoc lines by hand against the Checkstyle LineLength limit (120); the longest is 102. Compile, tests, SpotBugs and PMD were not run, so CI's mvn -B clean install should confirm.

🤖 Generated with Claude Code

Review passes

  • Pass 1: 1 finding(s), fixed. Docs scoping is complete and accurate except one javadoc wrongly saying a retry always runs a fresh workflow, which is false for reused caller-supplied ids.
  • Pass 2: clean. Docs-only rewording scopes durability to stored history and says the save is outside the workflow everywhere; no claim of a crash-proof turn remains.

Spec check

  • requirement 1: met (README.md:55,210-212,472-480,497,732-733; DaprStateChatMemoryRepository.java:15-20; DaprChatMemoryAutoConfiguration.java:24-25; starter README.md:99-100; travel-planner README.md:198-200; pom.xml:15)
  • requirement 2: met (the diff only touches .md files, javadoc/comments, application-memory.properties comments and the pom )
  • requirement 3: met (grep for crash-proof/durable memory/surviv shows no unscoped memory claim left; registry code (AgentRecordFactory) has none; pom.xml:15 updated)
  • requirement 4: met (README.md:475 'History that has been saved is durable'; DaprStateChatMemoryRepository.java:17)
  • requirement 5: met (README.md:476 'not yet part of the workflow'; DaprChatMemoryAutoConfiguration.java:24; DurableMemoryConcierge.java:20-21; application-memory.properties:3)
  • requirement 6: met (README.md:210-212 and ConcurrentConversationModificationException.java:9-13 now state the save runs outside the workflow; no remaining crash-proof claim)
  • requirement 7: met (git diff touches no executable statements; DurableMemoryConcierge.java:28 prompt string deliberately unchanged)

Checked against the issue as of: issue text hash 6db953f78811, latest comment no comments.

Checks re-run by the worker

  • test: not configured
  • lint: not configured

🤖 Generated with Claude Code

CasperGN and others added 2 commits November 10, 2026 21:48
Stored conversation history is durable, but the save after a turn runs
in the calling app after the workflow returns, not inside the workflow.
A crash between the two loses the turn from memory, and a retry stores
the user message twice. Say so wherever the docs, javadoc and the memory
module's POM description describe chat memory as durable.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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