Skip to content

refactor: type InvocationError operation and resource names - #11

Merged
ajbeck merged 1 commit into
claude/api-e3-identity-newcontextfrom
claude/api-e4-invocation-error-types
Sep 27, 2026
Merged

ajbeck merged 1 commit into
claude/api-e3-identity-newcontextfrom
claude/api-e4-invocation-error-types

Conversation

@ajbeck

@ajbeck ajbeck commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Implements E4. Adds edge.Operation and edge.Resource string types, with constants for every documented invocation stage and adapter limit. InvocationError.Operation and Limit return them, and internal call sites use the constants. Error text and values are unchanged.

Part of decision 0026, approved by the owner; stacked on #10.

Validation

gofmt, go vet ./..., go mod verify, go test -race ./..., sh scripts/check-consumer.sh, Linux arm64/amd64 builds and git diff --check all pass locally on Go 1.27.1.

Breaking (minor): comparisons with untyped string literals still compile; assigning the results to string variables needs a conversion.

Add the Operation and Resource string types with exported constants for every documented invocation stage and adapter limit. InvocationError.Operation and Limit now return them, so callers compare against checked constants instead of copying literals from prose. Internal call sites use the same constants. Error text and values are unchanged.

BREAKING CHANGE: InvocationError.Operation returns edge.Operation and InvocationError.Limit returns edge.Resource. Comparisons with untyped string literals still compile; code that assigns the results to string variables needs a conversion.
@ajbeck
ajbeck added this pull request to stack #7 September 27, 2026 14:36
@ajbeck
ajbeck marked this pull request as ready for review September 27, 2026 15:05
@ajbeck ajbeck changed the title refactor!: type InvocationError operation and resource names refactor: type InvocationError operation and resource names Sep 27, 2026
@ajbeck
ajbeck merged commit 0ccca75 into main Sep 27, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant