Docs/namespace nits - #2054
Conversation
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Read the namespace from the environment in every registerWorker example, and document that a trigger binding inherits the worker namespace. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughWorker documentation now passes ChangesWorker registration examples
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related issues
Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
skill-check — docs11 verified, 768 skipped.
Four for four. Nicely done. |
There was a problem hiding this comment.
Actionable comments posted: 7
🧹 Nitpick comments (1)
docs/next/using-iii/namespaces.mdx (1)
29-30: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winTrack the compose documentation follow-up.
This MDX comment adds a TODO to restore the compose section. Create a follow-up issue with the release dependency, or remove the TODO when compose support is available. I can draft the issue.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/next/using-iii/namespaces.mdx` around lines 29 - 30, Track the compose documentation follow-up represented by the TODO comment: create an issue that records restoring the compose section and its dependency on the compose release, or remove the TODO once compose support is available.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/next/creating-workers/worker-manager.mdx`:
- Around line 229-231: Align the worker client namespace in the registerWorker
call with the namespace targeted by the documented expose_functions RBAC rules,
or update those rules to explicitly target "browser". Preserve namespace
isolation and function-ID prefixing so link::create and stream::* remain
authorized.
In `@docs/next/creating-workers/worker-manager.mdx.skill.md`:
- Around line 112-115: Update the auth worker example around registerWorker to
ensure it always uses the default namespace: remove the namespace:
process.env.III_NAMESPACE option, or explicitly state that III_NAMESPACE must be
default. Keep the auth worker registration otherwise unchanged.
In `@docs/next/creating-workers/workers.mdx`:
- Around line 134-138: Clarify the namespace documentation in
docs/next/creating-workers/workers.mdx: describe namespace as an option value,
explain that server examples read it from an environment variable, and state
that browser clients pass it explicitly because they have no environment.
Regenerate docs/next/creating-workers/workers.mdx.skill.md so its corresponding
section reflects the updated source wording.
In `@docs/next/reference/engine-protocol.mdx`:
- Around line 122-124: The trigger namespace documentation incorrectly states
that omitted RegisterTrigger.namespace inherits the worker namespace. Update
docs/next/reference/engine-protocol.mdx lines 122-124 and
docs/next/using-iii/namespaces.mdx lines 166-179 to document default resolution,
typed helper behavior for Node, browser, Python, and Rust, and Go’s
RegisterTriggerNamespaced requirement; regenerate the corresponding .skill.md
files at docs/next/reference/engine-protocol.mdx.skill.md lines 120-122 and
docs/next/using-iii/namespaces.mdx.skill.md lines 164-179.
In `@docs/next/understanding-iii/namespaces.mdx.skill.md`:
- Around line 78-84: Update the namespace documentation around the listed
buffered messages to state that RegisterTriggerType is not buffered before
engine::workers::register and that trigger types are global, stored by bare ID
without a namespace. Do not describe namespace-scoped trigger-type handling or
introduce an UnregisterTriggerType message.
In `@docs/next/using-iii/functions.mdx`:
- Around line 95-100: Add trailing commas after the namespace property in both
optional action examples: docs/next/using-iii/functions.mdx lines 95-100 and
109-116. Apply the corresponding TypeScript and Python source changes in
docs/next/using-iii/functions.mdx.skill.md lines 91-97 and 105-112, then
rerender the generated file.
- Around line 168-170: Update the Use namespaces link in
docs/next/using-iii/functions.mdx#L168-L170 to use the
`#trigger-a-function-in-a-namespace` anchor instead of
`#call-a-function-in-a-namespace`, then rerender the generated guide at
docs/next/using-iii/functions.mdx.skill.md#L164-L167 so it reflects the
corrected source link.
---
Nitpick comments:
In `@docs/next/using-iii/namespaces.mdx`:
- Around line 29-30: Track the compose documentation follow-up represented by
the TODO comment: create an issue that records restoring the compose section and
its dependency on the compose release, or remove the TODO once compose support
is available.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 1aa02f59-9584-453f-af21-f5f5a496c618
📒 Files selected for processing (22)
docs/next/creating-workers/functions.mdxdocs/next/creating-workers/functions.mdx.skill.mddocs/next/creating-workers/http.mdxdocs/next/creating-workers/http.mdx.skill.mddocs/next/creating-workers/queues.mdxdocs/next/creating-workers/queues.mdx.skill.mddocs/next/creating-workers/triggers.mdxdocs/next/creating-workers/triggers.mdx.skill.mddocs/next/creating-workers/worker-manager.mdxdocs/next/creating-workers/worker-manager.mdx.skill.mddocs/next/creating-workers/workers.mdxdocs/next/creating-workers/workers.mdx.skill.mddocs/next/reference/engine-protocol.mdxdocs/next/reference/engine-protocol.mdx.skill.mddocs/next/understanding-iii/namespaces.mdxdocs/next/understanding-iii/namespaces.mdx.skill.mddocs/next/using-iii/functions.mdxdocs/next/using-iii/functions.mdx.skill.mddocs/next/using-iii/namespaces.mdxdocs/next/using-iii/namespaces.mdx.skill.mddocs/next/using-iii/triggers.mdxdocs/next/using-iii/triggers.mdx.skill.md
Comment out the managed-workers compose section until compose ships. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Scope the browser listener's expose_functions rules to the browser namespace, keep the auth worker in default because auth_function_id resolves there, add the trailing commas the optional action lines need, and point the namespace link at the renamed section. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Take the target branch's namespace prose for the invocation-resolution and trigger-binding sections, then re-render the docs skill artifacts. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Reading `III_NAMESPACE` in every example made the option look mandatory at initialization. Name the namespace directly, and say once, on the worker page, that an absent option is the same as passing the environment variable, because the SDK reads it itself. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Namespace documentation follow-ups on top of
feat/namespare, all indocs/next/.iii triggersupports--namespaceTwo pages claimed the CLI had no namespace flag and told readers to use an SDK instead. The flag is documented in
next/cli-reference/index.mdx, so those notes now sayiii triggerreachesdefaultunless you pass--namespace <NS>.using-iii/namespaces.mdxgained a CLI tab in Trigger a function in a namespace, first in the tab order to matchfunctions.mdxandconfiguration.mdx.The worker namespace is visible at the call site
Every
registerWorker/register_workerexample innext/set no namespace, andcreating-workers/workers.mdxkept the option commented out. Each example now reads the namespace from the environment, so the multi-tenant mechanism is visible where a reader copies from:process.env.III_NAMESPACE,os.environ.get("III_NAMESPACE"), andstd::env::var("III_NAMESPACE").ok().Pages touched:
creating-workers/workers.mdx,creating-workers/functions.mdx,creating-workers/triggers.mdx,creating-workers/http.mdx,creating-workers/queues.mdx,creating-workers/worker-manager.mdx,using-iii/functions.mdx,using-iii/triggers.mdx.The browser client in
worker-manager.mdxhard-codesnamespace: "browser", since the browser SDK has no process environment to read.Trigger bindings inherit the worker namespace
The docs described a trigger binding as independent of the worker: a binding with no
namespacefield targeteddefault, and only the typed helpers fromregisterTriggerTypefilled it in. The next release has the SDKs resolve the field from the worker namespace, so a binding reaches its own worker's functions with no extra field.using-iii/namespaces.mdxPoint a trigger at a namespaced function now states the inheritance, and its example setsnamespaceto reach a function in another namespace, which is the only case that still needs the field. TheregisterTriggerTypenote is gone, as the typed helpers are no longer a special case.worker.trigger()only, which is still explicit per call.reference/engine-protocol.mdxRegisterTrigger: the wire default staysdefaultfor an absent field, with the SDKs described as filling it from the worker namespace.Rust import fix
RegisterTriggerInputis not exported at the crate root.sdk/packages/rust/iii/src/lib.rscarries acompile_faildoctest provinguse iii_sdk::RegisterTriggerInputdoes not build; the canonical path isiii_sdk::protocol::RegisterTriggerInput. Five imports inusing-iii/triggers.mdxused the root path and now useprotocol.Checks
iii-skill-render --writere-run on every changed page;iii-skill-check verify-renderedreports no drift for them. Seven othernext/artifacts were already stale before this branch and are untouched.🤖 Generated with Claude Code
Summary by CodeRabbit
III_NAMESPACE.