chore: rename artifact worker to spec-to-worker#12
Conversation
📝 WalkthroughWalkthroughThis PR comprehensively renames the artifact-worker crate to spec-to-worker across project configuration, public API types, worker registration, conversion logic, MCP protocol handling, and documentation. The conversion entrypoint and virtual worker registration flow remain functionally similar but now use spec-oriented naming, error types, and metadata structures. ChangesWorker Identity and Type System Rename
Conversion Registration and Logic
Protocol and Transport Handling
Documentation and Tests
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/lib.rs (1)
221-223: ⚡ Quick winUse the function ID constant in registration to avoid drift.
SPEC_TO_WORKER_FUNCTION_IDSis already the source of truth, but registration still hardcodes the ID literal.Proposed diff
vec![iii.register_function( RegisterFunction::new( - "spec-to-worker::convert", + SPEC_TO_WORKER_FUNCTION_IDS[0], move |input: ConvertSpecToWorkerInput| { convert_spec_to_worker_for_iii(&convert_iii, input) }, )🤖 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 `@src/lib.rs` around lines 221 - 223, The registration currently hardcodes the function ID string "spec-to-worker::convert"; replace that literal with the central constant SPEC_TO_WORKER_FUNCTION_IDS (or the appropriate entry within that constant if it is a map/struct) when calling RegisterFunction::new so the registration uses the canonical ID; update the RegisterFunction::new invocation that creates the closure (the one taking ConvertSpecToWorkerInput) to reference SPEC_TO_WORKER_FUNCTION_IDS instead of the hardcoded string.
🤖 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.
Nitpick comments:
In `@src/lib.rs`:
- Around line 221-223: The registration currently hardcodes the function ID
string "spec-to-worker::convert"; replace that literal with the central constant
SPEC_TO_WORKER_FUNCTION_IDS (or the appropriate entry within that constant if it
is a map/struct) when calling RegisterFunction::new so the registration uses the
canonical ID; update the RegisterFunction::new invocation that creates the
closure (the one taking ConvertSpecToWorkerInput) to reference
SPEC_TO_WORKER_FUNCTION_IDS instead of the hardcoded string.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 59fa04e4-7e71-4eb5-adb9-0f3b55292dac
⛔ Files ignored due to path filters (1)
Cargo.lockis excluded by!**/*.lock
📒 Files selected for processing (7)
Cargo.tomlREADME.mddocs/research-note.mdiii.worker.yamlsrc/bin/spec-to-worker.rssrc/lib.rstests/rust_core.rs
Summary
Validation
cargo fmt --all -- --checkcargo testcargo clippy --all-targets --all-features -- -D warningscargo run --bin spec-to-worker -- --helpgit diff --checkartifact,Artifact, orARTIFACTmatches outside ignoredtarget/and localupstream/E2E With Current Engine PR
Using a generic local fixture, not Context7-specific code:
generic_openapi::getechoandgeneric_openapi::createpetiii triggergeneric_mcp_http::search_docsandgeneric_mcp_http::read_doctools/callcontent throughiii triggergeneric_mcp_stdio::stdio_searchandgeneric_mcp_stdio::stdio_readtools/callcontent throughiii triggerengine::workers::listshowedgeneric-openapi-worker,generic-mcp-http-worker, andgeneric-mcp-stdio-workeras normal engine-runtime worker groupsvirtual_worker,virtual:*,metadata.iii, orisolation: "virtual"spec-to-workerworker and the test fixture server; no generated worker processes were startedNotes
The paired iii engine PR is iii-hq/iii#1635. That PR provides the internal routing needed for generated sources while callers and other workers see ordinary worker/function shapes.