[dotnet-code] Consolidate todo remaining item filtering#533
[dotnet-code] Consolidate todo remaining item filtering#533michelle-clayton-work wants to merge 1 commit into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
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) []Itemhelper. - Updated both
GetRemainingItemsand thetodos_get_remainingtool implementation to use the helper.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
API Consistency Review — No Issues FoundThis PR extracts a private Scope: Out of scope for cross-repo parity review — internal refactor only. The PR description correctly notes alignment with the No action required.
|
Summary
Consolidates the todo provider's incomplete-item filtering into a single unexported helper used by both
GetRemainingItemsand thetodos_get_remainingtool. This keeps the Go internals closer to the .NET TodoProvider shape, where remaining todos are computed consistently with the sameWhere(t => !t.IsComplete).ToList()query pattern..NET Reference
dotnet/src/Microsoft.Agents.AI/Harness/Todo/TodoProvider.cs-GetRemainingTodosAsyncand thetodos_get_remainingtool 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/todoNotes
Rejected sampled candidates:
dotnet/src/Microsoft.Agents.AI.Workflows/Execution/IRunEventStream.csversusworkflow/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.csversusworkflow/internal/checkpoint/info.goandworkflow/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.csversusagent/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.Closes #514