Skip to content

.NET: fix: filter filesystem checkpoint index by session#5945

Open
he-yufeng wants to merge 1 commit into
microsoft:mainfrom
he-yufeng:fix/checkpoint-index-session-filter
Open

.NET: fix: filter filesystem checkpoint index by session#5945
he-yufeng wants to merge 1 commit into
microsoft:mainfrom
he-yufeng:fix/checkpoint-index-session-filter

Conversation

@he-yufeng
Copy link
Copy Markdown
Contributor

Fixes #5942.

FileSystemJsonCheckpointStore.RetrieveIndexAsync(sessionId) was returning the whole in-memory checkpoint index. This keeps the method scoped to the requested session, matching the parameter and the file layout.

Validation:

  • dotnet build .\src\Microsoft.Agents.AI.Workflows -f net10.0 --no-restore --tl:off
  • dotnet run --project .\tests\Microsoft.Agents.AI.Workflows.UnitTests -f net10.0 -- --filter-class Microsoft.Agents.AI.Workflows.UnitTests.FileSystemJsonCheckpointStoreTests
  • dotnet run --project .\tests\Microsoft.Agents.AI.Workflows.UnitTests -f net10.0
  • dotnet format .\agent-framework-dotnet.slnx --include .\src\Microsoft.Agents.AI.Workflows\Checkpointing\FileSystemJsonCheckpointStore.cs .\tests\Microsoft.Agents.AI.Workflows.UnitTests\FileSystemJsonCheckpointStoreTests.cs --verify-no-changes --no-restore --verbosity minimal
  • git diff --check

Copilot AI review requested due to automatic review settings May 19, 2026 03:53
@moonbox3 moonbox3 added .NET workflows Related to Workflows in agent-framework labels May 19, 2026
@github-actions github-actions Bot changed the title fix: filter filesystem checkpoint index by session .NET: fix: filter filesystem checkpoint index by session May 19, 2026
Copy link
Copy Markdown
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 filesystem checkpoint index retrieval so FileSystemJsonCheckpointStore.RetrieveIndexAsync(sessionId) returns checkpoints scoped to the requested session.

Changes:

  • Filters the filesystem checkpoint index by CheckpointInfo.SessionId.
  • Adds a unit test covering multi-session index filtering.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
dotnet/src/Microsoft.Agents.AI.Workflows/Checkpointing/FileSystemJsonCheckpointStore.cs Adds session filtering to filesystem checkpoint index retrieval.
dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/FileSystemJsonCheckpointStoreTests.cs Adds coverage verifying indexes exclude checkpoints from other sessions.

this.CheckDisposed();

return new(this.CheckpointIndex);
return new(this.CheckpointIndex.Where(checkpoint => checkpoint.SessionId == sessionId).ToList());
@he-yufeng he-yufeng force-pushed the fix/checkpoint-index-session-filter branch from 4c02ca4 to 6d71f99 Compare May 20, 2026 05:23
@he-yufeng
Copy link
Copy Markdown
Contributor Author

Refreshed on current main. Local validation: Workflows build passed, FileSystemJsonCheckpointStore targeted tests passed (7 passed), full Workflows unit test project passed, dotnet format --verify-no-changes passed, and git diff --check passed. Note: an initial parallel build/test run hit a local Windows VBCSCompiler file lock; after dotnet build-server shutdown, the sequential rerun passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

.NET workflows Related to Workflows in agent-framework

Projects

None yet

Development

Successfully merging this pull request may close these issues.

.NET: [Bug]: FileSystemJsonCheckPointStore for Agent Workflow , RetrieveIndexAsync() returns all checkpoint entries instead of filtering by SessionId

3 participants