Skip to content

chore: update all Rust workers to iii-sdk 0.16.0-next.2#192

Merged
guibeira merged 18 commits into
mainfrom
feat/update-rust-workers-sdk
May 27, 2026
Merged

chore: update all Rust workers to iii-sdk 0.16.0-next.2#192
guibeira merged 18 commits into
mainfrom
feat/update-rust-workers-sdk

Conversation

@guibeira

@guibeira guibeira commented May 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fleet bump from iii-sdk =0.13.0-next.1 to =0.16.0-next.2 across 10 Rust workers + adapter cleanup for two breaking changes in upstream PR iii-hq/iii#1578 and the related OtelConfig/Logger relocation.

Breaking changes adapted

  1. register_function signature. Old: iii.register_function(RegisterFunction::new_async(id, handler).description(...)). New: iii.register_function(id, RegisterFunction::new_async(handler).description(...)). Id is the first arg of register_function now; RegisterFunction::new_async takes only the handler. Every chained builder method (.description, .metadata, .request_format, .response_format) stays on RegisterFunction.
  2. Legacy register_function_with + (RegisterFunctionMessage, handler) tuple form removed. Rewrote the two remaining call sites in acp/src/handler.rs and image-resize/src/main.rs to the new builder.
  3. OtelConfig + Logger moved out of iii_sdk into iii-observability. iii_sdk no longer re-exports them. Workers that need Logger (mcp, database) keep iii-observability = "=0.16.0-next.2" as a direct dep. The rest dropped OtelConfig::default() from register_worker entirely — no OpenTelemetry export is emitted by those workers now.

Behavioral changes worth flagging

  • storage/tests/schemas.rs and database/tests/integration.rs — removed the registered_functions_carry_request_and_response_schemas guardrail tests. The 0.16 SDK no longer exposes public schema accessors on RegisterFunction; the typed-handler requirement they enforced is now enforced statically by the IntoAsyncHandler<M> trait bound on RegisterFunction::new_async.
  • 6 workers (shell, image-resize, console, coder, iii-directory, storage) no longer emit OpenTelemetry traces/metrics through the SDK. tracing::* logs are unaffected. mcp and database still pull iii-observability in for Logger and could re-enable OTel by re-adding otel: Some(OtelConfig::default()) to their register_worker call.

Test plan

All checks were run per-worker (each worker is a standalone Cargo crate, no top-level workspace). Per worker:

  • cargo build --all-targets
  • cargo test --lib --bins (or --all-targets where the worker has no integration test fixtures)
  • cargo clippy --all-targets -- -D warnings
  • cargo fmt --all -- --check

Per-worker test counts (lib): acp 27, coder 86, console 12, database 179, iii-directory 191, iii-lsp 61, image-resize 29, mcp 38, shell 141, storage 76 — all green.

Integration tests under each worker's tests/ that require a live engine, real database, sandbox infra, or env-gated providers (S3/GCS/R2/cucumber BDD/etc.) were not run here — they should be exercised through CI or manually before merge.

Commit layout

10 commits doing the SDK bump + API migration (one per worker), then 8 commits dropping OtelConfig::default() from register_worker (one per worker that used it):

chore(iii-lsp): bump iii-sdk to 0.16.0-next.2
chore(console): bump iii-sdk to 0.16.0-next.2
chore(mcp): bump iii-sdk to 0.16.0-next.2
chore(coder): bump iii-sdk to 0.16.0-next.2
chore(iii-directory): bump iii-sdk to 0.16.0-next.2
chore(shell): bump iii-sdk to 0.16.0-next.2
chore(storage): bump iii-sdk to 0.16.0-next.2
chore(database): bump iii-sdk to 0.16.0-next.2
chore(acp): bump iii-sdk to 0.16.0-next.2
chore(image-resize): bump iii-sdk to 0.16.0-next.2
chore(shell): drop OtelConfig + iii-observability dep
chore(image-resize): drop OtelConfig + iii-observability dep
chore(console): drop OtelConfig + iii-observability dep
chore(coder): drop OtelConfig + iii-observability dep
chore(iii-directory): drop OtelConfig + iii-observability dep
chore(storage): drop OtelConfig + iii-observability dep
chore(mcp): drop OtelConfig from register_worker (keep iii-observability for Logger)
chore(database): drop OtelConfig from register_worker (keep iii-observability for Logger)

Summary by CodeRabbit

  • Chores
    • Updated SDK dependencies to the latest version across all services.
    • Refactored internal function registration patterns and error handling.
    • Simplified telemetry configuration for worker initialization.

Review Change Stack

@vercel

vercel Bot commented May 27, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
workers Ready Ready Preview, Comment May 27, 2026 1:00am

Request Review

@coderabbitai

coderabbitai Bot commented May 27, 2026

Copy link
Copy Markdown

Caution

Review failed

Pull request was closed or merged during review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5e7ded31-5817-4030-8f94-0550125140f4

📥 Commits

Reviewing files that changed from the base of the PR and between cfab9a1 and 29ecbf4.

⛔ Files ignored due to path filters (10)
  • acp/Cargo.lock is excluded by !**/*.lock
  • coder/Cargo.lock is excluded by !**/*.lock
  • console/Cargo.lock is excluded by !**/*.lock
  • database/Cargo.lock is excluded by !**/*.lock
  • iii-directory/Cargo.lock is excluded by !**/*.lock
  • iii-lsp/Cargo.lock is excluded by !**/*.lock
  • image-resize/Cargo.lock is excluded by !**/*.lock
  • mcp/Cargo.lock is excluded by !**/*.lock
  • shell/Cargo.lock is excluded by !**/*.lock
  • storage/Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (41)
  • acp/Cargo.toml
  • acp/src/handler.rs
  • coder/Cargo.toml
  • coder/src/functions/mod.rs
  • coder/src/main.rs
  • console/Cargo.toml
  • console/src/functions/mod.rs
  • console/src/main.rs
  • database/Cargo.toml
  • database/src/handlers/begin_transaction.rs
  • database/src/handlers/commit_transaction.rs
  • database/src/handlers/execute.rs
  • database/src/handlers/mod.rs
  • database/src/handlers/prepare.rs
  • database/src/handlers/query.rs
  • database/src/handlers/rollback_transaction.rs
  • database/src/handlers/run_statement.rs
  • database/src/handlers/transaction.rs
  • database/src/handlers/transaction_execute.rs
  • database/src/main.rs
  • database/src/transaction.rs
  • database/tests/integration.rs
  • iii-directory/Cargo.toml
  • iii-directory/src/functions/directory.rs
  • iii-directory/src/functions/download.rs
  • iii-directory/src/functions/prompts.rs
  • iii-directory/src/functions/registry.rs
  • iii-directory/src/functions/skills.rs
  • iii-directory/src/main.rs
  • iii-lsp/Cargo.toml
  • image-resize/Cargo.toml
  • image-resize/src/main.rs
  • mcp/Cargo.toml
  • mcp/src/functions/mod.rs
  • mcp/src/main.rs
  • shell/Cargo.toml
  • shell/src/main.rs
  • storage/Cargo.toml
  • storage/src/handlers/mod.rs
  • storage/src/main.rs
  • storage/tests/schemas.rs

📝 Walkthrough

Walkthrough

This PR upgrades the iii-sdk dependency from 0.13.0-next.1 to 0.16.0-next.2 across all worker crates and refactors function registration, worker initialization, and logging to align with the new SDK API.

Changes

iii-sdk 0.16.0 Upgrade and API Migration

Layer / File(s) Summary
SDK dependency version updates
acp/Cargo.toml, coder/Cargo.toml, console/Cargo.toml, database/Cargo.toml, iii-directory/Cargo.toml, iii-lsp/Cargo.toml, image-resize/Cargo.toml, mcp/Cargo.toml, shell/Cargo.toml, storage/Cargo.toml
All Cargo.toml files pin iii-sdk from 0.13.0-next.1 to 0.16.0-next.2, and database/mcp crates also update iii-observability to 0.16.0-next.2.
Worker initialization refactor (OTel removal)
coder/src/main.rs, console/src/main.rs, database/src/main.rs, iii-directory/src/main.rs, image-resize/src/main.rs, mcp/src/main.rs, shell/src/main.rs, storage/src/main.rs
Remove OtelConfig import and the explicit otel: Some(OtelConfig::default()) field from InitOptions structs across all worker main.rs files, relying on InitOptions::default() for telemetry configuration.
Logger module split to iii_observability
database/src/handlers/mod.rs, database/src/handlers/begin_transaction.rs, database/src/handlers/commit_transaction.rs, database/src/handlers/execute.rs, database/src/handlers/prepare.rs, database/src/handlers/query.rs, database/src/handlers/rollback_transaction.rs, database/src/handlers/run_statement.rs, database/src/handlers/transaction.rs, database/src/handlers/transaction_execute.rs, database/src/main.rs, database/tests/integration.rs, mcp/src/functions/mod.rs
Migrate Logger imports from iii_sdk::Logger to iii_observability::Logger across database handler test fixtures, transaction module, and MCP worker function registration.
Function registration API refactor
acp/src/handler.rs, coder/src/functions/mod.rs, console/src/functions/mod.rs, database/src/main.rs, iii-directory/src/functions/directory.rs, iii-directory/src/functions/download.rs, iii-directory/src/functions/prompts.rs, iii-directory/src/functions/registry.rs, iii-directory/src/functions/skills.rs, image-resize/src/main.rs, mcp/src/functions/mod.rs, storage/src/handlers/mod.rs
Refactor function registration from RegisterFunction::new_async(name, closure) to iii.register_function(name, RegisterFunction::new_async(closure)) pattern, removing RegisterFunctionMessage usage and updating imports.
Explicit IIIError error mapping in handlers
coder/src/functions/mod.rs, database/src/main.rs, shell/src/main.rs, storage/src/handlers/mod.rs
Add .map_err(IIIError::from) conversions to all registered handler closures to uniformly convert underlying handler errors to IIIError.
Test infrastructure updates
storage/tests/schemas.rs
Remove schema regression test that validated registered function JSON schemas, eliminating the registered_functions_carry_request_and_response_schemas test and its supporting logic.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • iii-hq/workers#63: Both PRs touch acp/src/handler.rs around ACP session/event handling—main PR refactors the agent::events stream subscriber registration (iii-sdk RegisterFunction wiring), while the retrieved PR introduces the ACP handler with per-connection event subscription/session lifecycle logic.
  • iii-hq/workers#169: Both PRs touch the database worker's function/trigger registration wiring in database/src/main.rs—the main PR refactors the iii.register_function/RegisterFunction::new_async registration style and adds explicit IIIError mapping, while the retrieved PR simultaneously renames the registered function/trigger identifiers from iii-database::... to database::....
  • iii-hq/workers#133: Main PR's refactor of iii-directory function registration wiring for directory::skills::* (including directory::skills::index) and registry proxy endpoints overlaps with retrieved PR #133's implementation of directory::skills::index and registry worker list/info operations in the same iii-directory/src/functions/skills.rs / iii-directory/src/functions/registry.rs areas.

Suggested reviewers

  • sergiofilhowz
  • ytallo

Poem

🐰 A hare hops through the SDK,
From point-thirteen to next-sixteen's way,
Loggers hop to observability's tree,
Registrations find their place so neat,
Error mapping blooms for all to greet! 🌿

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 38.78% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: updating all Rust workers to iii-sdk version 0.16.0-next.2, which is the primary objective of this pull request.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/update-rust-workers-sdk

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 and usage tips.

@github-actions

Copy link
Copy Markdown
Contributor

skill-check — worker

1 verified, 12 skipped (no docs/).

1 error, 1 warning across the verified workers.

File Approximate line Severity Violation
shell/docs/leaves/kill.md ~7 error [Terminology.SlopMarketing] Avoid marketing/anthropomorphic phrasing 'Reaping'. Use concrete, technical language. (error)
shell/docs/leaves/read.md ~11 warning [Terminology.Hedges] Weak intensifier/hedge 'actually' adds emphasis, not information. Cut it or state the claim directly. (warning)

@guibeira guibeira marked this pull request as ready for review May 27, 2026 11:24
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