Skip to content

[dotnet-code] Clarify completion marker feedback internals - #830

Open
Michelle Clayton (michelle-clayton-work) wants to merge 1 commit into
mainfrom
dotnet-code-loop-feedback-helpers-dfa525822118cf66
Open

[dotnet-code] Clarify completion marker feedback internals#830
Michelle Clayton (michelle-clayton-work) wants to merge 1 commit into
mainfrom
dotnet-code-loop-feedback-helpers-dfa525822118cf66

Conversation

@michelle-clayton-work

Copy link
Copy Markdown
Contributor

Summary

Extracted unexported helpers for preparing completion-marker feedback templates and formatting per-response feedback. This keeps the Go evaluator structure closer to the .NET constructor/evaluation split, where the completion marker is substituted once and the latest response placeholder is substituted during evaluation.

.NET Reference

  • dotnet/src/Microsoft.Agents.AI/Harness/Loop/CompletionMarkerLoopEvaluator.cs - separates fixed completion marker template preparation from per-evaluation last response substitution.

Public API and Behavior

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

Tests

  • go test ./agent/harness/loop

Notes

Rejected candidates from the random sample:

  • dotnet/src/Microsoft.Agents.AI.Workflows/InProcessExecution.cs / Go workflow/inproc execution entry points: Go is already structurally different due to package-level environment types and changing it would risk public API churn.
  • dotnet/src/Microsoft.Agents.AI.Workflows/Observability/Tags.cs / Go workflow observability constants: tags are already centralized in Go and no safe cleanup was apparent.
  • dotnet/src/Microsoft.Agents.AI/Skills/AgentSkillsSource.cs / Go agent/skills sources: the .NET disposable base-class shape does not translate cleanly to Go without changing source semantics or public API.

An open [dotnet-code] PR exists but its details were filtered in this environment, so this PR intentionally stays limited to loop completion-marker internals.

Generated by .NET-to-Go Code Portability Refactoring Agent · gpt55 · 62.4 AIC · ⌖ 10.5 AIC · ⊞ 23.2K ·

Closes #815

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Refactors the loop completion-marker evaluator internals by extracting unexported helpers that (1) prepare the feedback template by substituting the completion marker once at construction time and (2) format per-evaluation feedback by substituting the latest response text. This aligns the Go evaluator structure more closely with the referenced .NET constructor/evaluation split, without changing the public API or intended behavior.

Changes:

  • Replace inline completion-marker placeholder substitution in NewCompletionMarkerEvaluator with prepareCompletionMarkerFeedbackTemplate(...).
  • Replace inline per-evaluation last-response substitution in Evaluate with formatCompletionMarkerFeedback(...).

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@github-actions github-actions Bot added the parity-approved Go API consistency review found no parity issues label Aug 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Parity Review: ✅ No Issues

This PR only extracts unexported helper functions within agent/harness/loop/evaluators.go. No exported Go APIs, option types, or observable runtime behavior changed.

Scope: Internal refactor aligning Go evaluator structure with the .NET CompletionMarkerLoopEvaluator.cs constructor/evaluation split — structural alignment, not semantic divergence.

Cross-repo parity: The change mirrors the .NET pattern correctly. No Python or .NET public surfaces are affected. The public-api-change label is not warranted since no exported identifier changed.

Generated by Go API Consistency Review Agent for #830 · sonnet46 · 14.2 AIC · ⌖ 5.53 AIC · ⊞ 5.7K ·

@michelle-clayton-work

Copy link
Copy Markdown
Contributor Author

Copilot fix linter failures

Copilot AI commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Copilot fix linter failures

The failure was a transient socket hang up while downloading golangci-lint, before linting began. I reran the failed job; it now passes. No code change was needed.

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

Labels

parity-approved Go API consistency review found no parity issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[dotnet-code] Clarify completion marker feedback internals

3 participants