Skip to content

Add godoc to the exported workflow.ErrInvalidInputType sentinel error#695

Open
PratikDhanave wants to merge 1 commit into
microsoft:mainfrom
PratikDhanaveFork:docs-errinvalidinputtype-godoc
Open

Add godoc to the exported workflow.ErrInvalidInputType sentinel error#695
PratikDhanave wants to merge 1 commit into
microsoft:mainfrom
PratikDhanaveFork:docs-errinvalidinputtype-godoc

Conversation

@PratikDhanave

Copy link
Copy Markdown
Contributor

What

Add a doc comment to workflow.ErrInvalidInputType, currently the only exported symbol in workflow/errors.go and the only one lacking godoc. The comment documents that the error is returned (wrapped with %w) when a message enqueued as workflow input has a type the workflow's start executor does not accept, and that callers can match it with errors.Is.

Why

ErrInvalidInputType is a sentinel meant to be matched: it is wrapped in workflow/inproc/runner.go and workflow/internal/execution/run.go, and errors.Is(err, workflow.ErrInvalidInputType) is already exercised in workflow/inproc/events_test.go. Without godoc, callers get no signal that this is a matchable sentinel or when it fires. Documenting exported sentinel errors matches the conventions used across the .NET and Python SDKs (and idiomatic Go), where such sentinels carry an explicit contract for consumers.

Testing

Docs-only change. go build ./..., go vet ./workflow/..., and go test ./workflow/... all pass; the existing errors.Is test is unchanged and still passes.

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

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 for the exported workflow.ErrInvalidInputType sentinel error so downstream callers understand when it’s returned and that it should be matched with errors.Is.

Changes:

  • Added a doc comment for workflow.ErrInvalidInputType describing the condition under which it is returned.
  • Documented that callers should match the sentinel via errors.Is.

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

@PratikDhanave
PratikDhanave force-pushed the docs-errinvalidinputtype-godoc branch from e77e775 to 97b6750 Compare July 24, 2026 02:14
@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
Add a godoc comment to the exported ErrInvalidInputType var explaining
that it is returned (wrapped) when a message enqueued as workflow input
has a type the start executor does not accept, and that callers can match
it with errors.Is.
@PratikDhanave
PratikDhanave force-pushed the docs-errinvalidinputtype-godoc branch from 97b6750 to 0ec8c1f Compare July 24, 2026 09:34
@github-actions

Copy link
Copy Markdown
Contributor

Parity Review: ✅ No Issues

This PR adds a godoc comment to the existing exported workflow.ErrInvalidInputType sentinel — a docs-only change with no modification to the exported API surface, behavior, defaults, or runtime semantics.

Scope determination: Out of scope for cross-repo parity concerns. No new or changed exported Go contracts are introduced.

Label: parity-approved is already present and remains correct. The public-api-change label is not applicable since no exported API surface was added, removed, or changed.

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 · 14.7 AIC · ⌖ 4.84 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