feat: migrate workers to namespace-aware iii-sdk 0.22 prereleases - #604
feat: migrate workers to namespace-aware iii-sdk 0.22 prereleases#604guibeira wants to merge 76 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization 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:
✨ 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 — worker0 verified, 55 skipped (no docs/).
Four for four. Nicely done. |
b62355b to
8b60e96
Compare
Non-builtin cross-worker trigger calls (e.g. router::/harness::/approval::/session::/context::/shell::/workflow:: and this worker's own functions) issued a TriggerRequest with no namespace, so a worker running in a namespace called those targets in default and missed them. Route each to the worker's namespace via iii.namespace() (None => engine default). Builtin targets (state::/stream::/queue::/pubsub::/configuration::/cron::/http::/engine::/...) intentionally stay in default.
…espace Non-builtin cross-worker trigger calls (e.g. router::/harness::/approval::/session::/context::/shell::/workflow:: and this worker's own functions) issued a TriggerRequest with no namespace, so a worker running in a namespace called those targets in default and missed them. Route each to the worker's namespace via iii.namespace() (None => engine default). Builtin targets (state::/stream::/queue::/pubsub::/configuration::/cron::/http::/engine::/...) intentionally stay in default.
Non-builtin cross-worker trigger calls (e.g. router::/harness::/approval::/session::/context::/shell::/workflow:: and this worker's own functions) issued a TriggerRequest with no namespace, so a worker running in a namespace called those targets in default and missed them. Route each to the worker's namespace via iii.namespace() (None => engine default). Builtin targets (state::/stream::/queue::/pubsub::/configuration::/cron::/http::/engine::/...) intentionally stay in default.
Non-builtin cross-worker trigger calls (e.g. router::/harness::/approval::/session::/context::/shell::/workflow:: and this worker's own functions) issued a TriggerRequest with no namespace, so a worker running in a namespace called those targets in default and missed them. Route each to the worker's namespace via iii.namespace() (None => engine default). Builtin targets (state::/stream::/queue::/pubsub::/configuration::/cron::/http::/engine::/...) intentionally stay in default.
Non-builtin cross-worker trigger calls (e.g. router::/harness::/approval::/session::/context::/shell::/workflow:: and this worker's own functions) issued a TriggerRequest with no namespace, so a worker running in a namespace called those targets in default and missed them. Route each to the worker's namespace via iii.namespace() (None => engine default). Builtin targets (state::/stream::/queue::/pubsub::/configuration::/cron::/http::/engine::/...) intentionally stay in default.
Non-builtin cross-worker trigger calls (e.g. router::/harness::/approval::/session::/context::/shell::/workflow:: and this worker's own functions) issued a TriggerRequest with no namespace, so a worker running in a namespace called those targets in default and missed them. Route each to the worker's namespace via iii.namespace() (None => engine default). Builtin targets (state::/stream::/queue::/pubsub::/configuration::/cron::/http::/engine::/...) intentionally stay in default.
Dynamic subscriber/hook/notify targets carry a runtime function_id that can be either a builtin (e.g. state::set) or another worker's function. Route these to the worker's namespace ONLY when the target is NOT a builtin prefix; builtins keep default routing so a builtin subscribed to an event still resolves. Literal cross-worker targets are unchanged.
Dynamic subscriber/hook/notify targets carry a runtime function_id that can be either a builtin (e.g. state::set) or another worker's function. Route these to the worker's namespace ONLY when the target is NOT a builtin prefix; builtins keep default routing so a builtin subscribed to an event still resolves. Literal cross-worker targets are unchanged.
Dynamic subscriber/hook/notify targets carry a runtime function_id that can be either a builtin (e.g. state::set) or another worker's function. Route these to the worker's namespace ONLY when the target is NOT a builtin prefix; builtins keep default routing so a builtin subscribed to an event still resolves. Literal cross-worker targets are unchanged.
Dynamic subscriber/hook/notify targets carry a runtime function_id that can be either a builtin (e.g. state::set) or another worker's function. Route these to the worker's namespace ONLY when the target is NOT a builtin prefix; builtins keep default routing so a builtin subscribed to an event still resolves. Literal cross-worker targets are unchanged.
Dynamic subscriber/hook/notify targets carry a runtime function_id that can be either a builtin (e.g. state::set) or another worker's function. Route these to the worker's namespace ONLY when the target is NOT a builtin prefix; builtins keep default routing so a builtin subscribed to an event still resolves. Literal cross-worker targets are unchanged.
…heck Dynamic subscriber/hook/notify targets carry a runtime function_id that can be either a builtin (e.g. state::set) or another worker's function. Route these to the worker's namespace ONLY when the target is NOT a builtin prefix; builtins keep default routing so a builtin subscribed to an event still resolves. Literal cross-worker targets are unchanged.
…heck Dynamic subscriber/hook/notify targets carry a runtime function_id that can be either a builtin (e.g. state::set) or another worker's function. Route these to the worker's namespace ONLY when the target is NOT a builtin prefix; builtins keep default routing so a builtin subscribed to an event still resolves. Literal cross-worker targets are unchanged.
Picks up the namespace review fixes shipped in the 0.22.0-alpha.3 SDK release. Build-verified against the published crates.
Picks up the namespace review fixes shipped in the 0.22.0-alpha.3 SDK release. Build-verified against the published crates.
Picks up the namespace review fixes in the 0.22.0-alpha.3 SDK release.
Picks up the namespace review fixes in the 0.22.0-alpha.3 SDK release.
Picks up the namespace review fixes in the 0.22.0-alpha.3 SDK release.
1a711ff to
b255e85
Compare
A worker hardcodes its configuration id, which turns that id into a global scarce name. Two instances of one worker share a single entry: the second overwrites the first, and every write wakes both, because the id each watches is the id being written. Two `state` workers cannot hold different settings, and two `http` workers cannot bind different ports. `III_CONFIG_NAME` names the entry a supervisor resolved for this instance, so the id it reads is the one it was given rather than the one it was compiled with. The built-in name remains the default, and an empty or blank value falls back to it, so a worker started by hand — or by a supervisor that does not set it — behaves exactly as before. Nothing here changes what is read, only where it is read from. The format strings that interpolated the id take it as a named argument. A positional one would have shifted the other placeholders in every macro that had more than one.
Summary
Migrates the workers to the namespace-aware iii-sdk
0.22.0prerelease line. Most workers use0.22.0-alpha.3; compatibility-sensitive crates that were already pinned to0.22.0-alpha.2remain on that version. A worker running withIII_NAMESPACEregisters its functions and routes cross-worker calls in that namespace, while engine builtins continue to usedefault. Without a namespace, existing behavior is unchanged.The branch also incorporates the latest
mainchanges and migrates the workers added since the previous integration.What changed
SDK upgrade
iii-helpersdependencies to the compatible0.22.0-alpha.2/0.22.0-alpha.3pins.claude-code,opencode, andpiworkers toiii-sdk@0.22.0-alpha.3.computer,pdf,editor,eval,sandbox-code-runner,provider-claude-code, andprovider-deepseekdependency graphs with the SDK version used by their shared crates.Namespace adoption
state::,stream::,queue::,pubsub::,configuration::,cron::,http::,engine::,sandbox::,log::,secret::,kv::, andiii::) remain indefault.Main integration
mainrelease, console UI, provider, computer, PDF, sandbox runner, and durable trigger-binding changes.harness::reactimplementation deleted onmain.Validation
cargo test --manifest-path harness/Cargo.toml --lib --locked— 305 tests passed.cargo check --lockedfor the conflicted crates and every worker linked to the shared console UI crate.cargo check --lockedforprovider-claude-codeandprovider-deepseekafter aligning them withllm-router.cargo fmt --checkfor the Rust crates adapted during the integration.Notes
0.21.xpins are limited to the harness test-support crates and the isolatedworkers-devlocal orchestrator.