docs: fix config wording, Rust SDK signature, add --timeout-ms#1369
docs: fix config wording, Rust SDK signature, add --timeout-ms#1369
Conversation
…10.0 - Update Workers description to remove 'no config files' claim since iii does use iii-config.yaml for engine configuration. The intent was that adding new functions doesn't require config changes (workers self-register), so reworded to 'No service registry needed'. - Bump docs.json version from 0.9.0 to 0.10.0 to match current release.
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughBumps docs version to 0.10.0, tweaks homepage wording, updates Rust SDK Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
- Update register_function signature in sdk-rust.mdx to show the actual v0.10.0 generic IntoFunctionRegistration API instead of the old 2-arg form. Lead example with RegisterFunction::new() builder pattern. - Add --timeout-ms flag to trigger-functions-from-cli.mdx flag table and error handling table (added in v0.10.0 via PR #1340).
5dc8222 to
e8f9f73
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/how-to/trigger-from-cli.mdx`:
- Line 28: Update the docs table entry for the CLI flag to reflect that the
--payload flag is not required when a default is provided: change "Required:
Yes" to "Required: No" (or add a clarifying note) to match the engine
declaration #[arg(long, default_value = "{}")] and the behavior of the --payload
flag; reference the --payload flag name and the #[arg(long, default_value =
"{}")] attribute so reviewers can locate and verify the change.
🪄 Autofix (Beta)
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
Run ID: b23cd57f-8d1a-43fa-9a97-03e6dc0df44a
📒 Files selected for processing (25)
docs/advanced/adapters.mdxdocs/api-reference/node.mdxdocs/api-reference/python.mdxdocs/api-reference/rust.mdxdocs/architecture/modules.mdxdocs/architecture/queues.mdxdocs/architecture/trigger-types.mdxdocs/console/index.mdxdocs/docs.jsondocs/how-to/define-request-response-formats.mdxdocs/how-to/react-to-state-changes.mdxdocs/how-to/trigger-actions.mdxdocs/how-to/trigger-from-cli.mdxdocs/how-to/use-channels.mdxdocs/how-to/use-cron.mdxdocs/how-to/use-dead-letter-queues.mdxdocs/how-to/use-functions-and-triggers.mdxdocs/how-to/use-queues.mdxdocs/how-to/use-state.mdxdocs/how-to/use-streams.mdxdocs/modules/queue.mdxdocs/modules/state.mdxengine/install.shframeworks/motia/MIGRATION_GUIDE.mdframeworks/motia/docs/content/docs/getting-started/migration-guide.mdx
✅ Files skipped from review due to trivial changes (16)
- docs/advanced/adapters.mdx
- docs/console/index.mdx
- docs/how-to/use-state.mdx
- frameworks/motia/docs/content/docs/getting-started/migration-guide.mdx
- engine/install.sh
- docs/how-to/react-to-state-changes.mdx
- docs/how-to/trigger-actions.mdx
- docs/architecture/trigger-types.mdx
- docs/architecture/modules.mdx
- docs/how-to/use-functions-and-triggers.mdx
- docs/how-to/use-channels.mdx
- frameworks/motia/MIGRATION_GUIDE.md
- docs/how-to/define-request-response-formats.mdx
- docs/modules/queue.mdx
- docs/how-to/use-queues.mdx
- docs/architecture/queues.mdx
🚧 Files skipped from review as they are similar to previous changes (1)
- docs/docs.json
| @@ -25,9 +25,10 @@ iii trigger \ | |||
| | Flag | Required | Default | Description | | |||
| |------|----------|---------|-------------| | |||
| | `--function-id` | Yes | — | The ID of the function to invoke (e.g. `iii::queue::redrive`, `orders::process`) | | |||
| | `--payload` | Yes | — | A JSON string passed as the function's input | | |||
| | `--payload` | Yes | `{}` | A JSON string passed as the function's input | | |||
There was a problem hiding this comment.
Inconsistency: "Required: Yes" conflicts with having a default value.
The --payload flag is marked as "Required: Yes" but also shows a default of {}. Per the engine code (#[arg(long, default_value = "{}")]), clap treats arguments with default_value as optional—users can omit them and the default applies. Consider changing "Required" to "No" for accuracy, or clarify the intent (e.g., "always used, defaults to {}").
Proposed fix
-| `--payload` | Yes | `{}` | A JSON string passed as the function's input |
+| `--payload` | No | `{}` | A JSON string passed as the function's input |📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| | `--payload` | Yes | `{}` | A JSON string passed as the function's input | | |
| | `--payload` | No | `{}` | A JSON string passed as the function's input | |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs/how-to/trigger-from-cli.mdx` at line 28, Update the docs table entry for
the CLI flag to reflect that the --payload flag is not required when a default
is provided: change "Required: Yes" to "Required: No" (or add a clarifying note)
to match the engine declaration #[arg(long, default_value = "{}")] and the
behavior of the --payload flag; reference the --payload flag name and the
#[arg(long, default_value = "{}")] attribute so reviewers can locate and verify
the change.
There was a problem hiding this comment.
🧹 Nitpick comments (2)
docs/how-to/trigger-functions-from-cli.mdx (1)
25-31: Inconsistent "Required" column for--payload.Line 28 marks
--payloadas "Required: Yes" while also showing a default of{}. Other flags with defaults (--address,--port,--timeout-ms) are correctly marked "Required: No". Since the CLI will accept the command without--payload(using the default{}), consider changing this to "No" for consistency.Suggested fix
| Flag | Required | Default | Description | |------|----------|---------|-------------| | `--function-id` | Yes | — | The ID of the function to invoke (e.g. `iii::queue::redrive`, `orders::process`) | -| `--payload` | Yes | `{}` | A JSON string passed as the function's input | +| `--payload` | No | `{}` | A JSON string passed as the function's input | | `--address` | No | `localhost` | The hostname or IP of the engine | | `--port` | No | `49134` | The engine's WebSocket port | | `--timeout-ms` | No | `30000` | Max time in milliseconds to wait for the invocation result |🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/how-to/trigger-functions-from-cli.mdx` around lines 25 - 31, Update the flags table so the `--payload` row correctly reflects that it is optional: change the "Required" value for the `--payload` flag from "Yes" to "No" (since a default `{}` is provided). Edit the table entry for `--payload` in the flags table (the row containing `--payload`, Default `{}`, Description "A JSON string passed as the function's input") so it matches the other flags with defaults and shows "Required: No".docs/api-reference/sdk-rust.mdx (1)
138-138: Remove unusediii_fnimport.The
iii_fnimport is not used in this example code block. Keeping it may confuse readers about wheniii_fnis needed.Suggested fix
-use iii_sdk::{register_worker, InitOptions, RegisterFunction, RegisterFunctionMessage, iii_fn}; +use iii_sdk::{register_worker, InitOptions, RegisterFunction, RegisterFunctionMessage};🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/api-reference/sdk-rust.mdx` at line 138, The import list in the example includes an unused symbol iii_fn; remove iii_fn from the use statement (the line containing use iii_sdk::{register_worker, InitOptions, RegisterFunction, RegisterFunctionMessage, iii_fn};) so the example only imports register_worker, InitOptions, RegisterFunction, and RegisterFunctionMessage; then verify the snippet compiles or runs cargo check to ensure there are no remaining unused imports.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@docs/api-reference/sdk-rust.mdx`:
- Line 138: The import list in the example includes an unused symbol iii_fn;
remove iii_fn from the use statement (the line containing use
iii_sdk::{register_worker, InitOptions, RegisterFunction,
RegisterFunctionMessage, iii_fn};) so the example only imports register_worker,
InitOptions, RegisterFunction, and RegisterFunctionMessage; then verify the
snippet compiles or runs cargo check to ensure there are no remaining unused
imports.
In `@docs/how-to/trigger-functions-from-cli.mdx`:
- Around line 25-31: Update the flags table so the `--payload` row correctly
reflects that it is optional: change the "Required" value for the `--payload`
flag from "Yes" to "No" (since a default `{}` is provided). Edit the table entry
for `--payload` in the flags table (the row containing `--payload`, Default
`{}`, Description "A JSON string passed as the function's input") so it matches
the other flags with defaults and shows "Required: No".
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: a2376937-f6ff-43db-808d-da0c24935087
📒 Files selected for processing (2)
docs/api-reference/sdk-rust.mdxdocs/how-to/trigger-functions-from-cli.mdx
| @@ -115,30 +115,27 @@ iii.register( | |||
|
|
|||
There was a problem hiding this comment.
this file is auto generated from code
There was a problem hiding this comment.
Oh, Should I drop the fix then?
Summary
Fixes docs issues found during v0.10.0 DX audit.
1. Fix misleading "no config files" wording (
docs/index.mdx)The landing page said "No service registry, and no config files" but iii uses
iii-config.yaml. Reworded to "No service registry needed" — preserves the accurate point about worker self-registration without the false claim about config.2. Fix Rust SDK reference signature (
docs/api-reference/sdk-rust.mdx)The
register_functionsection showed the old 2-arg signature:Updated to match the actual v0.10.0 generic API:
Lead example now uses the preferred
RegisterFunction::new()builder. Tuple form kept as alternative.3. Add
--timeout-msto CLI trigger docs (docs/how-to/trigger-functions-from-cli.mdx)The
--timeout-msflag (added in v0.10.0 via #1340) was undocumented. Added to the flag table and error handling table.4. Bump docs.json version
0.9.0→0.10.0Test plan
--timeout-msappears in flag table at/how-to/trigger-functions-from-cli/api-reference/sdk-rustshows new signatureSummary by CodeRabbit
Documentation
New Features
Chores