Skip to content

[dotnet-code] Consolidate todo remaining item filtering#533

Open
michelle-clayton-work wants to merge 1 commit into
mainfrom
dotnet-code-todo-remaining-helper-5ebe744e4e4ab38c
Open

[dotnet-code] Consolidate todo remaining item filtering#533
michelle-clayton-work wants to merge 1 commit into
mainfrom
dotnet-code-todo-remaining-helper-5ebe744e4e4ab38c

Conversation

@michelle-clayton-work

Copy link
Copy Markdown
Contributor

Summary

Consolidates the todo provider's incomplete-item filtering into a single unexported helper used by both GetRemainingItems and the todos_get_remaining tool. This keeps the Go internals closer to the .NET TodoProvider shape, where remaining todos are computed consistently with the same Where(t => !t.IsComplete).ToList() query pattern.

.NET Reference

  • dotnet/src/Microsoft.Agents.AI/Harness/Todo/TodoProvider.cs - GetRemainingTodosAsync and the todos_get_remaining tool both return incomplete todo items using the same filtering expression.
  • dotnet/tests/Microsoft.Agents.AI.UnitTests/Harness/Todo/TodoProviderTests.cs - sampled tests covering remaining todo behavior.

Public API and Behavior

No public Go API changed. No intentional behavior change was made.

Tests

  • go test ./agent/harness/todo

Notes

Rejected sampled candidates:

  • dotnet/src/Microsoft.Agents.AI.Workflows/Execution/IRunEventStream.cs versus workflow/internal/execution/eventstream.go: corresponding Go event stream logic is concurrency-sensitive, so helper extraction there was riskier for a nightly portability cleanup.
  • dotnet/src/Microsoft.Agents.AI.Workflows/Checkpointing/DirectEdgeInfo.cs versus workflow/internal/checkpoint/info.go and workflow/info.go: Go checkpoint and edge matching already have focused tests and no obvious tiny structural cleanup from this sample.
  • dotnet/src/Microsoft.Agents.AI/AnonymousDelegatingAIAgent.cs versus agent/agent.go: no small equivalent internal delegate-agent cleanup was found without touching broader agent construction behavior.

Open [dotnet-code] PR checks via the GitHub read tool returned HTTP 503 during this run, including candidate-specific todo searches, so this PR was kept narrowly scoped to reduce overlap risk.

Generated by .NET-to-Go Code Portability Refactoring Agent · 414.8 AIC · ⌖ 44.2 AIC · ⊞ 20.8K ·

Closes #514

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Consolidates remaining/incomplete todo filtering into a single unexported helper so both the Go Provider.GetRemainingItems method and the todos_get_remaining tool compute “remaining” items consistently (matching the .NET provider’s shared filtering shape).

Changes:

  • Replaced duplicated “incomplete items” filtering loops with a shared remainingItems([]Item) []Item helper.
  • Updated both GetRemainingItems and the todos_get_remaining tool implementation to use the helper.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions

Copy link
Copy Markdown
Contributor

API Consistency Review — No Issues Found

This PR extracts a private remainingItems helper to consolidate duplicate filtering logic in agent/harness/todo/todo.go. No exported Go APIs, public types, option shapes, or observable runtime behavior were changed.

Scope: Out of scope for cross-repo parity review — internal refactor only.

The PR description correctly notes alignment with the .NET TodoProvider filtering pattern; the Go change preserves that semantic equivalence without diverging from the upstream .NET or Python implementations.

No action required.

Generated by Go API Consistency Review Agent for issue #533 · 28 AIC · ⌖ 11.8 AIC · ⊞ 26.8K ·

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.

[dotnet-code] Consolidate todo remaining item filtering

2 participants