Skip to content

Document that DurableObjectId::name is passed through to the object#1031

Open
lukevalenta wants to merge 1 commit into
cloudflare:mainfrom
lukevalenta:lvalenta/document-do-id-name
Open

Document that DurableObjectId::name is passed through to the object#1031
lukevalenta wants to merge 1 commit into
cloudflare:mainfrom
lukevalenta:lvalenta/document-do-id-name

Conversation

@lukevalenta

Copy link
Copy Markdown
Contributor

ctx.id.name is now available inside a Durable Object addressed by name, including in the constructor and alarm handlers, since the runtime passes the name through (cloudflare/workerd#2240).

Update the ObjectId::name docs to reflect this and defer to the Durable Object ID developer docs for the full list of cases where name is None.

Add test coverage that reads state.id().name() in the Durable Object constructor to confirm the name is available before any request is handled.

`ctx.id.name` is now available inside a Durable Object addressed by name,
including in the constructor and alarm handlers, since the runtime passes
the name through (cloudflare/workerd#2240).

Update the `ObjectId::name` docs to reflect this and defer to the Durable
Object ID developer docs for the full list of cases where `name` is
`None`.

Add test coverage that reads `state.id().name()` in the Durable Object
constructor to confirm the name is available before any request is
handled.
@codspeed-hq

codspeed-hq Bot commented Jul 15, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

✅ 2 untouched benchmarks


Comparing lukevalenta:lvalenta/document-do-id-name (668e0e9) with main (5f2d6c9)

Open in CodSpeed

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.

2 participants