Skip to content

refactor: rename identity.WithCaller to identity.NewContext - #10

Merged
ajbeck merged 1 commit into
claude/api-e2-sentinel-namesfrom
claude/api-e3-identity-newcontext
Sep 27, 2026
Merged

ajbeck merged 1 commit into
claude/api-e2-sentinel-namesfrom
claude/api-e3-identity-newcontext

Conversation

@ajbeck

@ajbeck ajbeck commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Implements E3. Renames identity.WithCaller to identity.NewContext, pairing it with FromContext as in the Go blog's context convention. The signature, conflict detection and nil-context handling are unchanged. Every call site, the runnable example (now ExampleNewContext) and the guides are updated, and decision 0012 gets a dated note.

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

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: the function name changes.

Pair the context installer with FromContext, following the Go blog's NewContext/FromContext convention. Every other With function in the module is a functional option. The signature, conflict detection and nil-context handling are unchanged.

BREAKING CHANGE: identity.WithCaller is now identity.NewContext.
@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!: rename identity.WithCaller to identity.NewContext refactor: rename identity.WithCaller to identity.NewContext Sep 27, 2026
@ajbeck
ajbeck merged commit 759865f 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