Skip to content

Fix OnMessageDeliveryStarting godoc: hooks stop on first error - #1152

Open
PratikDhanave (PratikDhanave) wants to merge 1 commit into
microsoft:mainfrom
PratikDhanaveFork:fix/godoc-ondeliverystarting-stops-on-error
Open

PratikDhanave (PratikDhanave) wants to merge 1 commit into
microsoft:mainfrom
PratikDhanaveFork:fix/godoc-ondeliverystarting-stops-on-error

Conversation

@PratikDhanave

Copy link
Copy Markdown
Contributor

The comment says OnMessageDeliveryStarting "invokes all configured OnMessageDeliveryStarting hooks," but the composed hook is built by extendContextHook, which runs the first hook and, on its error, returns immediately without running the second. This contrasts with OnMessageDeliveryFinished (built by extendFinishedHook), whose doc correctly says "All hooks are run." Clarify the short-circuit behavior. Comment-only fix.

Composed OnMessageDeliveryStarting hooks are chained by extendContextHook,
which returns immediately when the first hook errors without running the
second. The doc said it "invokes all" hooks; unlike OnMessageDeliveryFinished
(extendFinishedHook), it does not. Clarify the short-circuit behavior.
Copilot AI lite review requested due to automatic review settings September 22, 2026 03:13
@github-actions github-actions Bot added area:workflow Changes files in the workflow area size:small At most 30 changed lines across at most 2 files labels Sep 22, 2026

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.

Copilot review overview

🟢 Approval recommended

The comment-only change accurately matches the existing hook composition behavior.

Review effort: Lite
Findings: None

What changed in this PR

Clarifies that OnMessageDeliveryStarting hooks execute in order and stop when the first hook returns an error.

Changes:

  • Updated the method godoc to accurately describe short-circuit behavior.
File Description
workflow/​executor.go Corrects OnMessageDeliveryStarting documentation.

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

@github-actions

Copy link
Copy Markdown
Contributor

Scope: internal-only (documentation/comment fix)
Changed Go contract: None — only the godoc comment on Executor.OnMessageDeliveryStarting in workflow/executor.go was edited to correctly describe existing short-circuit-on-error behavior. No exported signature, type, default, or runtime behavior changed.
Upstream evidence reviewed: Not applicable — comment-only correction with no behavioral or API change to compare against .NET (dotnet/src/Microsoft.Agents.AI.Workflows/) or Python (python/packages/core/agent_framework/).
Result: out of scope

This PR only clarifies wording in an existing godoc comment; it does not add, remove, or change any public API or observable runtime behavior, so no cross-repo parity review is warranted.

Generated by Go API Consistency Review Agent · copilot · auto · 12.7 AIC · ⌖ 5.8 AIC · ⊞ 9.2K ·

@github-actions github-actions Bot added the kind:docs Changes documentation or comments label Sep 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:workflow Changes files in the workflow area kind:docs Changes documentation or comments size:small At most 30 changed lines across at most 2 files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants