Add godoc to the Invoking/Invoked ContextProvider methods on harness todo/agentmode providers and shelltool.EnvironmentProvider#754
Conversation
There was a problem hiding this comment.
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
Invokingpass-through methods ontodo.Provider,agentmode.Provider, andshelltool.EnvironmentProvider. - Documented
Invokedpass-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.
| return p.provider.Invoking(ctx, invoking) | ||
| } | ||
|
|
||
| // Invoked implements agent.ContextProvider by delegating to the wrapped provider, persisting post-invocation state. |
There was a problem hiding this comment.
Good catch — fixed in 969a3ad: the doc now states the wrapped provider has no Store, so Invoked is a no-op on success.
| return p.provider.Invoking(ctx, invoking) | ||
| } | ||
|
|
||
| // Invoked implements agent.ContextProvider by delegating to the wrapped provider, persisting post-invocation state. |
There was a problem hiding this comment.
Good catch — fixed in 969a3ad: the doc now states the wrapped provider has no Store, so Invoked is a no-op on success.
| return p.provider.Invoking(ctx, invoking) | ||
| } | ||
|
|
||
| // Invoked implements agent.ContextProvider by delegating to the wrapped provider, persisting post-invocation state. |
There was a problem hiding this comment.
Good catch — fixed in 969a3ad: the doc now states the wrapped provider has no Store, so Invoked is a no-op on success.
This comment has been minimized.
This comment has been minimized.
…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.
969a3ad to
22fce0a
Compare
Parity Review: No Issues FoundThis PR adds documentation comments to the 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 ✅ No cross-repo consistency issues found. The Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"See Network Configuration for more information.
|
What
Add one-line doc comments to the
InvokingandInvokedmethods ontodo.Provider,agentmode.Provider, andshelltool.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 inagent/context.goasinterface { Invoking; Invoked }, whose interface methods are both documented). TheInvoking/Invokedmethods are exactly the interface-satisfying surface, yet they carried no godoc while their neighboring exported methods did —GetAllItemsontodo.Provider, andCurrentSnapshot/Refreshonshelltool.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, andgo testpass 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.