Skip to content

Docs/namespace nits - #2054

Merged
anthonyiscoding merged 10 commits into
feat/namesparefrom
docs/namespace-nits
Aug 12, 2026
Merged

Docs/namespace nits#2054
anthonyiscoding merged 10 commits into
feat/namesparefrom
docs/namespace-nits

Conversation

@anthonyiscoding

@anthonyiscoding anthonyiscoding commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Namespace documentation follow-ups on top of feat/namespare, all in docs/next/.

iii trigger supports --namespace

Two 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 say iii trigger reaches default unless you pass --namespace <NS>. using-iii/namespaces.mdx gained a CLI tab in Trigger a function in a namespace, first in the tab order to match functions.mdx and configuration.mdx.

The worker namespace is visible at the call site

Every registerWorker / register_worker example in next/ set no namespace, and creating-workers/workers.mdx kept 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"), and std::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.mdx hard-codes namespace: "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 namespace field targeted default, and only the typed helpers from registerTriggerType filled 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.mdx Point a trigger at a namespaced function now states the inheritance, and its example sets namespace to reach a function in another namespace, which is the only case that still needs the field. The registerTriggerType note is gone, as the typed helpers are no longer a special case.
  • The warning under Set a worker namespace now covers worker.trigger() only, which is still explicit per call.
  • reference/engine-protocol.mdx RegisterTrigger: the wire default stays default for an absent field, with the SDKs described as filling it from the worker namespace.

Rust import fix

RegisterTriggerInput is not exported at the crate root. sdk/packages/rust/iii/src/lib.rs carries a compile_fail doctest proving use iii_sdk::RegisterTriggerInput does not build; the canonical path is iii_sdk::protocol::RegisterTriggerInput. Five imports in using-iii/triggers.mdx used the root path and now use protocol.

Checks

  • iii-skill-render --write re-run on every changed page; iii-skill-check verify-rendered reports no drift for them. Seven other next/ artifacts were already stale before this branch and are untouched.
  • Prettier reports the same 33 files before and after these changes, so no new formatting drift.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Updated worker examples across Node.js, Python, and Rust to support optional namespace configuration through III_NAMESPACE.
    • Clarified namespace defaults, routing, isolation, trigger behavior, registration, and cross-namespace usage.
    • Added namespace targeting guidance for function invocations, trigger bindings, browser clients, and CLI commands.
    • Expanded RBAC and engine protocol documentation, including namespace-scoped rules and registration behavior.
    • Refreshed examples, links, formatting, and Rust import guidance throughout the documentation.

anthonyiscoding and others added 4 commits August 11, 2026 11:43
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>
@vercel

vercel Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
iii-website Skipped Skipped Aug 12, 2026 9:32pm

Request Review

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: b2632baf-4897-4c24-8a55-ae0066a57804

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Worker documentation now passes III_NAMESPACE through Node, Python, and Rust initialization examples. Namespace references describe defaults, routing, registration conflicts, trigger targeting, RBAC rules, and CLI selection.

Changes

Worker registration examples

Layer / File(s) Summary
Worker registration examples
docs/next/creating-workers/functions.mdx, docs/next/creating-workers/functions.mdx.skill.md, docs/next/creating-workers/http.mdx, docs/next/creating-workers/http.mdx.skill.md, docs/next/creating-workers/queues.mdx, docs/next/creating-workers/queues.mdx.skill.md, docs/next/creating-workers/triggers.mdx, docs/next/creating-workers/triggers.mdx.skill.md, docs/next/creating-workers/workers.mdx, docs/next/creating-workers/workers.mdx.skill.md
Examples pass III_NAMESPACE through SDK initialization options. Unset values use the documented default namespace.
Worker manager and RBAC examples
docs/next/creating-workers/worker-manager.mdx, docs/next/creating-workers/worker-manager.mdx.skill.md
Auth workers propagate III_NAMESPACE. Browser clients select browser. RBAC examples support namespace-scoped rules.
Function and trigger usage guides
docs/next/using-iii/functions.mdx, docs/next/using-iii/functions.mdx.skill.md, docs/next/using-iii/triggers.mdx, docs/next/using-iii/triggers.mdx.skill.md
Trigger examples use explicit namespaces. CLI guidance documents --namespace <NS>. Rust examples use the updated protocol import path.
Namespace and protocol reference
docs/next/reference/engine-protocol.mdx, docs/next/reference/engine-protocol.mdx.skill.md, docs/next/understanding-iii/namespaces.mdx, docs/next/understanding-iii/namespaces.mdx.skill.md, docs/next/using-iii/namespaces.mdx, docs/next/using-iii/namespaces.mdx.skill.md
Reference pages document namespace routing, defaults, registration timing, conflicts, ownership, trigger targeting, bindings, and reserved IDs.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related issues

  • iii-hq/skills#10 — Updates cross-language SDK and worker-registration documentation examples.

Possibly related PRs

  • iii-hq/iii#1664 — Updates the same creating-workers documentation area.
  • iii-hq/iii#1984 — Introduces the namespace propagation and routing behavior documented here.

Suggested reviewers: guibeira

Poem

A rabbit hops through namespaces bright,
With III_NAMESPACE tucked in tight.
Node, Python, Rust align,
Triggers route by clear design.
Browser joins its named space—
Docs now keep the paths in place.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title identifies namespace documentation changes but uses the vague term "nits" and does not clearly summarize the broader scope. Use a specific title such as "Clarify namespace handling in documentation".
✅ Passed checks (4 passed)
Check name Status Explanation
Description check ✅ Passed The description clearly explains the changes, motivation, affected pages, validation results, and relevant implementation notes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/namespace-nits

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

skill-check — docs

11 verified, 768 skipped.

Layer Result
structure
vale
ai
render

Four for four. Nicely done.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 7

🧹 Nitpick comments (1)
docs/next/using-iii/namespaces.mdx (1)

29-30: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Track 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

📥 Commits

Reviewing files that changed from the base of the PR and between e320781 and 810ddb7.

📒 Files selected for processing (22)
  • docs/next/creating-workers/functions.mdx
  • docs/next/creating-workers/functions.mdx.skill.md
  • docs/next/creating-workers/http.mdx
  • docs/next/creating-workers/http.mdx.skill.md
  • docs/next/creating-workers/queues.mdx
  • docs/next/creating-workers/queues.mdx.skill.md
  • docs/next/creating-workers/triggers.mdx
  • docs/next/creating-workers/triggers.mdx.skill.md
  • docs/next/creating-workers/worker-manager.mdx
  • docs/next/creating-workers/worker-manager.mdx.skill.md
  • docs/next/creating-workers/workers.mdx
  • docs/next/creating-workers/workers.mdx.skill.md
  • docs/next/reference/engine-protocol.mdx
  • docs/next/reference/engine-protocol.mdx.skill.md
  • docs/next/understanding-iii/namespaces.mdx
  • docs/next/understanding-iii/namespaces.mdx.skill.md
  • docs/next/using-iii/functions.mdx
  • docs/next/using-iii/functions.mdx.skill.md
  • docs/next/using-iii/namespaces.mdx
  • docs/next/using-iii/namespaces.mdx.skill.md
  • docs/next/using-iii/triggers.mdx
  • docs/next/using-iii/triggers.mdx.skill.md

Comment thread docs/next/creating-workers/worker-manager.mdx
Comment thread docs/next/creating-workers/worker-manager.mdx.skill.md
Comment thread docs/next/creating-workers/workers.mdx Outdated
Comment thread docs/next/reference/engine-protocol.mdx
Comment thread docs/next/understanding-iii/namespaces.mdx.skill.md
Comment thread docs/next/using-iii/functions.mdx
Comment thread docs/next/using-iii/functions.mdx Outdated
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>
Comment thread docs/next/creating-workers/functions.mdx Outdated
anthonyiscoding and others added 2 commits August 12, 2026 15:54
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>
@anthonyiscoding
anthonyiscoding merged commit 9763718 into feat/namespare Aug 12, 2026
7 checks passed
@anthonyiscoding
anthonyiscoding deleted the docs/namespace-nits branch August 12, 2026 22:01
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