Skip to content

Add godoc to the Invoking/Invoked ContextProvider methods on harness todo/agentmode providers and shelltool.EnvironmentProvider#754

Open
PratikDhanave wants to merge 2 commits into
microsoft:mainfrom
PratikDhanaveFork:docs-contextprovider-passthrough-godoc
Open

Add godoc to the Invoking/Invoked ContextProvider methods on harness todo/agentmode providers and shelltool.EnvironmentProvider#754
PratikDhanave wants to merge 2 commits into
microsoft:mainfrom
PratikDhanaveFork:docs-contextprovider-passthrough-godoc

Conversation

@PratikDhanave

Copy link
Copy Markdown
Contributor

What

Add one-line doc comments to the Invoking and Invoked methods on todo.Provider, agentmode.Provider, and shelltool.EnvironmentProvider. These six methods are undocumented pass-throughs that delegate to the wrapped context provider.

Why

Each of these three types satisfies agent.ContextProvider (defined in agent/context.go as interface { Invoking; Invoked }, whose interface methods are both documented). The Invoking/Invoked methods are exactly the interface-satisfying surface, yet they carried no godoc while their neighboring exported methods did — GetAllItems on todo.Provider, and CurrentSnapshot/Refresh on shelltool.EnvironmentProvider. This closes that documentation gap so the full exported surface of each provider is documented. Parity note: the .NET/Python AIContextProvider surface documents its Invoking/Invoked equivalents, so documenting the Go port's interface methods keeps cross-SDK alignment.

Tested

  • go build ./..., go vet, and go test pass for the three changed packages.
  • go doc ./agent/harness/todo Provider.Invoking (and the agentmode/shelltool equivalents) confirm the comments render.

Docs-only; no behavior change.

Copilot AI review requested due to automatic review settings July 24, 2026 04:23
@PratikDhanave
PratikDhanave requested a review from a team as a code owner July 24, 2026 04:23

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

Adds missing GoDoc comments to the Invoking/Invoked agent.ContextProvider interface methods on three provider wrappers, to ensure the full exported surface is documented and consistent with adjacent exported methods.

Changes:

  • Documented Invoking pass-through methods on todo.Provider, agentmode.Provider, and shelltool.EnvironmentProvider.
  • Documented Invoked pass-through methods on the same three providers.
  • Kept changes docs-only (no behavioral modifications).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
tool/shelltool/environment.go Adds GoDoc to EnvironmentProvider.Invoking/Invoked wrapper methods.
agent/harness/todo/todo.go Adds GoDoc to todo.Provider.Invoking/Invoked wrapper methods.
agent/harness/agentmode/agentmode.go Adds GoDoc to agentmode.Provider.Invoking/Invoked wrapper methods.

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

Comment thread tool/shelltool/environment.go Outdated
return p.provider.Invoking(ctx, invoking)
}

// Invoked implements agent.ContextProvider by delegating to the wrapped provider, persisting post-invocation state.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good catch — fixed in 969a3ad: the doc now states the wrapped provider has no Store, so Invoked is a no-op on success.

Comment thread agent/harness/todo/todo.go Outdated
return p.provider.Invoking(ctx, invoking)
}

// Invoked implements agent.ContextProvider by delegating to the wrapped provider, persisting post-invocation state.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good catch — fixed in 969a3ad: the doc now states the wrapped provider has no Store, so Invoked is a no-op on success.

Comment thread agent/harness/agentmode/agentmode.go Outdated
return p.provider.Invoking(ctx, invoking)
}

// Invoked implements agent.ContextProvider by delegating to the wrapped provider, persisting post-invocation state.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good catch — fixed in 969a3ad: the doc now states the wrapped provider has no Store, so Invoked is a no-op on success.

@github-actions

This comment has been minimized.

@github-actions github-actions Bot added the parity-approved Go API consistency review found no parity issues label Jul 24, 2026
…iders

The Invoking and Invoked methods on todo.Provider, agentmode.Provider,
and shelltool.EnvironmentProvider satisfy the agent.ContextProvider
interface but lacked doc comments, while their neighboring exported
methods (GetAllItems, CurrentSnapshot, Refresh) were documented. Add a
one-line godoc to each so the interface-satisfying surface is fully
documented, matching the documented ContextProvider interface methods.
@PratikDhanave
PratikDhanave force-pushed the docs-contextprovider-passthrough-godoc branch from 969a3ad to 22fce0a Compare July 24, 2026 09:29
@github-actions

Copy link
Copy Markdown
Contributor

Parity Review: No Issues Found

This PR adds documentation comments to the Invoking and Invoked pass-through methods on todo.Provider, agentmode.Provider, and shelltool.EnvironmentProvider. It is docs-only with no exported API additions, removals, or behavior changes.

Scope: Out of scope for public API label — no exported Go API surface was added or changed, only godoc was added to existing methods.

Parity: The PR description correctly notes that .NET/Python AIContextProvider equivalents document their Invoking/Invoked counterparts. This change closes a documentation gap and keeps cross-SDK alignment, consistent with upstream expectations.

✅ No cross-repo consistency issues found. The parity-approved label correctly reflects the status of this PR.

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • awmgmcpg

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "awmgmcpg"

See Network Configuration for more information.

Generated by Go API Consistency Review Agent · 13.1 AIC · ⌖ 5.54 AIC · ⊞ 5.9K ·

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.

2 participants