Update cli-tooling to use the new telemetry approach in iii monorepo (PR# 1390)#12
Conversation
…f self-managed toml Replace the scaffolder's own telemetry.toml identity and machine-id hashing with a read of the engine-managed ~/.iii/telemetry.yaml. Drop user_id from events (device_id only), send a telemetry_failed fallback when the yaml is missing, and swap toml/sha2 deps for serde_yaml/tempfile.
WorkerModule is mandatory but omitted from the template config, causing it to be auto-injected with config: None. This bypasses serde defaults and uses Rust's Default (empty host, port 0), which panics on TcpListener::bind.
📝 WalkthroughWalkthroughThe PR migrates telemetry identity storage and event handling from TOML ( Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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.
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 `@crates/scaffolder-core/src/telemetry.rs`:
- Around line 368-380: The test mutates HOME globally which is unsafe for
parallel tests; annotate the test containing the tempfile HOME manipulation and
the send_amplitude_to call with #[serial_test::serial] (and add the serial_test
crate if missing) so it runs sequentially, and remove the unsafe global HOME
mutation by scoping it to that single serial test (leave telemetry_yaml_path()
unchanged). This ensures the test that calls send_amplitude_to and depends on
telemetry_yaml_path() won't race with other tokio::test cases.
🪄 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: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 8b55dba3-3f7c-4a54-90fe-3b7f58c87091
⛔ Files ignored due to path filters (3)
Cargo.lockis excluded by!**/*.locktemplates/iii/quickstart.zipis excluded by!**/*.ziptemplates/motia/quickstart.zipis excluded by!**/*.zip
📒 Files selected for processing (4)
Cargo.tomlcrates/scaffolder-core/Cargo.tomlcrates/scaffolder-core/src/telemetry.rstemplates/iii/default-iii-config.yaml
Summary by CodeRabbit
New Features
Improvements
Chores
Related to/requires: iii-hq/iii#1390