chore(rust): enforce warning-free clippy#4872
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThe PR strengthens Clippy enforcement, simplifies Tauri CDP and Meet audio surfaces, refactors scanner and core Rust code, improves Slack probe error handling, and updates unit and end-to-end test synchronization and fixtures. ChangesRust quality and Tauri surfaces
Estimated code review effort: 4 (Complex) | ~60 minutes Possibly related PRs
Suggested labels: Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 10f406908c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Actionable comments posted: 6
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
src/openhuman/voice/server.rs (1)
537-551: 🎯 Functional Correctness | 🔴 Critical | ⚡ Quick winFix the stale
server_cancelreference on macOS.
_server_cancelis the only binding in scope here, so the macOSfnpath still fails to resolveserver_cancel.Suggested fix
- return start_globe_hotkey_listener(mode, server_cancel); + return start_globe_hotkey_listener(mode, _server_cancel);🤖 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/openhuman/voice/server.rs` around lines 537 - 551, Update the macOS “fn” branch in start_hotkey_listener to pass the in-scope _server_cancel parameter to start_globe_hotkey_listener instead of the unresolved server_cancel reference.app/src-tauri/src/cdp/snapshot.rs (1)
58-75: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick winAdd diagnostics around snapshot capture.
This changed flow performs an external CDP call and decodes its response, but has no grep-friendly entry, completion, or decode-error diagnostics. Log operation boundaries and failures without dumping DOM contents or PII. As per coding guidelines, changed Rust flows must include verbose diagnostics.
🤖 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 `@app/src-tauri/src/cdp/snapshot.rs` around lines 58 - 75, Add verbose, grep-friendly diagnostics in Snapshot::capture marking snapshot capture start, CDP call completion, decode success, and failures; include only safe metadata such as the session identifier or operation name, never raw DOM contents or PII. Preserve the existing Result behavior and error propagation while instrumenting both the cdp.call and serde_json::from_value stages.Source: Coding guidelines
🧹 Nitpick comments (2)
Cargo.toml (1)
370-382: 📐 Maintainability & Code Quality | 🔵 Trivial | 🏗️ Heavy liftScope Clippy baselines to the affected items.
This crate-wide suppression list allows new occurrences of
result_large_err,should_implement_trait,too_many_arguments,field_reassign_with_default, and other lints to bypass the warning-denied gate. Clippy recommends fixing complexity findings or allowing intentional exceptions specifically and locally; scope these exceptions to the existing offenders and document their rationale. (doc.rust-lang.org)🤖 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 `@Cargo.toml` around lines 370 - 382, Replace the crate-wide entries in [lints.clippy] for result_large_err, should_implement_trait, too_many_arguments, field_reassign_with_default, and the other intentional exceptions with item-level lint allowances on the existing offending functions, types, or modules. Keep each allowance limited to the affected symbol and add a brief rationale documenting why it is intentional, while preserving -D warnings for new occurrences.src/openhuman/agent_orchestration/background_delivery.rs (1)
151-171: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick winLog headless batches before dropping them.
When
batch_thread_idisNone, this branch silently discards the drained batch. Add an explicitelselog containing the session and batch count, without logging result contents, so operators can distinguish delivery from intentional headless drops.Suggested change
if let (Some(thread_id), Some(notice)) = ( background_completions::batch_thread_id(&batch), background_completions::build_batched_notice(&batch), ) { // existing delivery logic + } else { + log::warn!( + "[background_delivery] dropped headless batch session={session} count={}", + batch.len() + ); }As per coding guidelines, changed Rust flows must include verbose, grep-friendly diagnostics for branches, state transitions, external calls, retries/timeouts, and errors.
🤖 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/openhuman/agent_orchestration/background_delivery.rs` around lines 151 - 171, The background delivery branch silently drops headless batches when batch_thread_id is None. Add an else branch alongside the existing Some(thread_id), Some(notice) handling that logs the session and batch count at an appropriate level, without including result contents, before the batch is dropped.Source: Coding guidelines
🤖 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.
Inline comments:
In `@app/src-tauri/src/cdp/snapshot.rs`:
- Around line 58-70: Add targeted regression tests around Snapshot::capture and
its merge/children parsing logic, covering multi-document node-index offsetting,
correct child adjacency construction, and snapshots without layout data. Stub
the CDP call where practical and assert the request includes includeDOMRects:
false, while preserving the existing capture behavior.
In `@app/src-tauri/src/meet_video/frame_bus.rs`:
- Around line 194-200: Update the initial-frame send failure branch in the
writer task to emit a verbose, grep-friendly diagnostic before returning.
Preserve the existing early-return behavior after the
`sink.send(Message::Binary(...))` failure, and include sufficient context to
identify the initial WebSocket frame send and peer/transport failure.
In `@app/src-tauri/src/ptt_overlay.rs`:
- Around line 26-27: Remove the #[allow(unused_mut)] annotation and keep the
initial builder binding immutable in the overlay window setup. In the macOS-only
workspace-options block, shadow the builder with the updated value so the
existing configuration remains unchanged without suppressing the unused_mut
warning.
In `@Cargo.toml`:
- Line 378: Remove the manual_checked_ops lint configuration from the Cargo.toml
lints baseline, or update the pinned Rust toolchain image to a version that
supports it. Ensure cargo clippy -D warnings no longer reports an unknown-lint
warning while preserving the remaining lint settings.
In `@src/bin/slack_backfill.rs`:
- Around line 323-327: Update the provider-call classification around Outcome
and the err handling so non-rate-limit failures retain a bounded, sanitized
error summary for the later status log while preserving unit variants for
counting. Keep rate-limit handling unchanged and avoid secrets or full PII. Add
a regression test covering the changed probe behavior and verifying the
diagnostic is retained.
In `@src/openhuman/tinyagents/mod.rs`:
- Around line 1173-1185: Move the TurnChatModel, TierRoutes, BuiltTurnModels
aliases and the build_turn_models_crate implementation into a dedicated
submodule. Keep src/openhuman/tinyagents/mod.rs export-focused by retaining only
the relevant module declarations and re-exports, preserving the existing
visibility and public API.
---
Outside diff comments:
In `@app/src-tauri/src/cdp/snapshot.rs`:
- Around line 58-75: Add verbose, grep-friendly diagnostics in Snapshot::capture
marking snapshot capture start, CDP call completion, decode success, and
failures; include only safe metadata such as the session identifier or operation
name, never raw DOM contents or PII. Preserve the existing Result behavior and
error propagation while instrumenting both the cdp.call and
serde_json::from_value stages.
In `@src/openhuman/voice/server.rs`:
- Around line 537-551: Update the macOS “fn” branch in start_hotkey_listener to
pass the in-scope _server_cancel parameter to start_globe_hotkey_listener
instead of the unresolved server_cancel reference.
---
Nitpick comments:
In `@Cargo.toml`:
- Around line 370-382: Replace the crate-wide entries in [lints.clippy] for
result_large_err, should_implement_trait, too_many_arguments,
field_reassign_with_default, and the other intentional exceptions with
item-level lint allowances on the existing offending functions, types, or
modules. Keep each allowance limited to the affected symbol and add a brief
rationale documenting why it is intentional, while preserving -D warnings for
new occurrences.
In `@src/openhuman/agent_orchestration/background_delivery.rs`:
- Around line 151-171: The background delivery branch silently drops headless
batches when batch_thread_id is None. Add an else branch alongside the existing
Some(thread_id), Some(notice) handling that logs the session and batch count at
an appropriate level, without including result contents, before the batch is
dropped.
🪄 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: 9277cb5a-28dc-45f0-b0f6-d792459cdac7
📒 Files selected for processing (92)
.github/workflows/ci-lite.yml.husky/pre-pushCargo.tomlapp/package.jsonapp/src-tauri/Cargo.tomlapp/src-tauri/src/cdp/input.rsapp/src-tauri/src/cdp/mod.rsapp/src-tauri/src/cdp/session.rsapp/src-tauri/src/cdp/snapshot.rsapp/src-tauri/src/cdp/target.rsapp/src-tauri/src/claude_code.rsapp/src-tauri/src/deep_link_ipc.rsapp/src-tauri/src/imessage_scanner/mod.rsapp/src-tauri/src/lib.rsapp/src-tauri/src/meet_audio/caption_listener.rsapp/src-tauri/src/meet_audio/listen_capture.rsapp/src-tauri/src/meet_audio/mod.rsapp/src-tauri/src/meet_audio/speak_pump.rsapp/src-tauri/src/meet_call/mod.rsapp/src-tauri/src/meet_scanner/mod.rsapp/src-tauri/src/meet_video/frame_bus.rsapp/src-tauri/src/ptt_hotkeys.rsapp/src-tauri/src/ptt_overlay.rsapp/src-tauri/src/screen_capture/mod.rsapp/src-tauri/src/slack_scanner/extract.rsapp/src-tauri/src/slack_scanner/idb.rsapp/src-tauri/src/telegram_scanner/extract.rsapp/src-tauri/src/telegram_scanner/idb.rsapp/src-tauri/src/wechat_scanner/dom_snapshot.rsapp/src-tauri/src/whatsapp_scanner/idb.rsapp/src-tauri/src/whatsapp_scanner/mod.rspackage.jsonsrc/bin/memory_tree_init_smoke.rssrc/bin/slack_backfill.rssrc/core/cli.rssrc/openhuman/accessibility/automate.rssrc/openhuman/agent/harness/archivist/recap.rssrc/openhuman/agent/harness/session/builder/factory.rssrc/openhuman/agent/harness/tool_filter.rssrc/openhuman/agent/progress_tracing.rssrc/openhuman/agent/schemas.rssrc/openhuman/agent_meetings/summary.rssrc/openhuman/agent_memory/tools.rssrc/openhuman/agent_orchestration/background_delivery.rssrc/openhuman/agent_orchestration/running_subagents.rssrc/openhuman/agent_orchestration/spawn_parallel_graph.rssrc/openhuman/artifacts/store.rssrc/openhuman/channels/proactive.rssrc/openhuman/composio/tools/direct.rssrc/openhuman/credentials/profiles.rssrc/openhuman/cron/tools/add.rssrc/openhuman/cwd_jail/linux.rssrc/openhuman/embeddings/ollama_adapter.rssrc/openhuman/file_state/ops.rssrc/openhuman/flows/ops.rssrc/openhuman/inference/local/mod.rssrc/openhuman/inference/local/ollama.rssrc/openhuman/inference/provider/claude_code/driver.rssrc/openhuman/inference/provider/factory.rssrc/openhuman/learning/reflection.rssrc/openhuman/learning/stability_detector.rssrc/openhuman/mcp_registry/connections.rssrc/openhuman/mcp_registry/registries/mcp_official.rssrc/openhuman/mcp_server/write_dispatch.rssrc/openhuman/meet_agent/brain/speech.rssrc/openhuman/meet_agent/session.rssrc/openhuman/meet_agent/store.rssrc/openhuman/memory/read_rpc/types.rssrc/openhuman/memory_tools/capture.rssrc/openhuman/memory_tree/tree/factory.rssrc/openhuman/memory_tree/tree/registry.rssrc/openhuman/people/store.rssrc/openhuman/runtime_python/bootstrap.rssrc/openhuman/security/pii/rules.rssrc/openhuman/skills/registry.rssrc/openhuman/socket/medulla/mod.rssrc/openhuman/subconscious_triggers/runtime.rssrc/openhuman/tinyagents/mod.rssrc/openhuman/tinyagents/observability.rssrc/openhuman/tinyagents/replay/mod.rssrc/openhuman/tinycortex/embeddings.rssrc/openhuman/tinycortex/sync.rssrc/openhuman/tinyflows/caps.rssrc/openhuman/tinyplace/manifest.rssrc/openhuman/todos/graph_shadow.rssrc/openhuman/tools/impl/filesystem/glob_search.rssrc/openhuman/tools/impl/network/polymarket.rssrc/openhuman/tools/impl/system/schedule.rssrc/openhuman/voice/server.rssrc/openhuman/wallet/chains/btc.rssrc/openhuman/webview_accounts/ops.rssrc/openhuman/webview_apis/client.rs
💤 Files with no reviewable changes (11)
- app/src-tauri/src/cdp/input.rs
- app/src-tauri/src/cdp/target.rs
- src/openhuman/agent/schemas.rs
- app/src-tauri/src/meet_audio/listen_capture.rs
- src/openhuman/tinyplace/manifest.rs
- app/src-tauri/src/wechat_scanner/dom_snapshot.rs
- app/src-tauri/src/imessage_scanner/mod.rs
- src/openhuman/meet_agent/brain/speech.rs
- app/src-tauri/src/ptt_hotkeys.rs
- src/openhuman/flows/ops.rs
- src/core/cli.rs
…nalytics-tracking # Conflicts: # app/src/components/flows/FlowListRow.tsx # app/src/pages/FlowCanvasPage.tsx
…king' into chore/enforce-clippy-checks
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/openhuman/flows/ops_tests.rs (1)
2003-2011: 🩺 Stability & Availability | 🟡 Minor | ⚡ Quick winUse an isolated catalog-cache key for this test.
This test seeds the process-global
LIVE_CATALOG_CACHEunder"slack", while sibling tests also use that key. Parallel test execution can replace the fixture and make this assertion depend on test order. Use a unique fictional toolkit/slug or serialize access to the cache.🤖 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/openhuman/flows/ops_tests.rs` around lines 2003 - 2011, Update validate_tool_contracts_rejects_a_hallucinated_slug to avoid the shared "slack" LIVE_CATALOG_CACHE key by using a unique fictional toolkit and corresponding slug throughout its seeded contract, graph configuration, and validation expectations; preserve the test’s hallucinated-slug rejection behavior.Source: Learnings
🤖 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.
Inline comments:
In `@src/openhuman/flows/schemas.rs`:
- Around line 1072-1087: Add the optional strict input to the rollback and
draft_promote controller schemas, then invoke ops::strict_gate before each
operation persists its graph, matching the existing create/update flow. Update
the corresponding rollback and draft_promote handlers and ops methods to
propagate the strict value so both writes enforce strict validation.
---
Outside diff comments:
In `@src/openhuman/flows/ops_tests.rs`:
- Around line 2003-2011: Update
validate_tool_contracts_rejects_a_hallucinated_slug to avoid the shared "slack"
LIVE_CATALOG_CACHE key by using a unique fictional toolkit and corresponding
slug throughout its seeded contract, graph configuration, and validation
expectations; preserve the test’s hallucinated-slug rejection behavior.
🪄 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: 3f4e1d11-3c26-40f5-8abb-9222d531eda7
📒 Files selected for processing (60)
Cargo.tomlapp/src-tauri/src/cdp/snapshot.rsapp/src-tauri/src/discord_scanner/mod_tests.rsapp/src-tauri/src/lib.rsapp/src-tauri/src/meet_video/frame_bus.rsapp/src-tauri/src/ptt_overlay.rsapp/src/components/flows/canvas/__tests__/EditableFlowCanvas.validation.test.tsxsrc/bin/slack_backfill.rssrc/openhuman/accessibility/mod.rssrc/openhuman/accessibility/permissions_tests.rssrc/openhuman/agent/harness/archivist/mod.rssrc/openhuman/agent/harness/harness_gap_tests.rssrc/openhuman/agent/harness/session/builder/factory.rssrc/openhuman/agent/harness/session/transcript_tests.rssrc/openhuman/agent/harness/session/turn_tests.rssrc/openhuman/agent/harness/subagent_runner/ops/mod.rssrc/openhuman/agent/harness/tests.rssrc/openhuman/agent_orchestration/background_delivery.rssrc/openhuman/agent_registry/agents/loader.rssrc/openhuman/agentbox/store_tests.rssrc/openhuman/audio_toolkit/ops.rssrc/openhuman/config/ops/mod.rssrc/openhuman/config/schema/load/mod.rssrc/openhuman/config/schema/load_tests.rssrc/openhuman/config/schemas/mod.rssrc/openhuman/cwd_jail/linux.rssrc/openhuman/desktop_companion/pipeline_tests.rssrc/openhuman/desktop_companion/session_tests.rssrc/openhuman/devices/rpc.rssrc/openhuman/devices/store.rssrc/openhuman/flows/ops.rssrc/openhuman/flows/ops_tests.rssrc/openhuman/flows/schemas.rssrc/openhuman/inference/local/install.rssrc/openhuman/inference/provider/factory_tests.rssrc/openhuman/learning/extract/heuristics.rssrc/openhuman/meet_agent/brain/llm.rssrc/openhuman/memory/ops/learn.rssrc/openhuman/memory_queue/worker.rssrc/openhuman/memory_store/chunks/connection.rssrc/openhuman/memory_store/chunks/embeddings.rssrc/openhuman/memory_tree/tree/rpc.rssrc/openhuman/skills/e2e_plumbing_tests.rssrc/openhuman/skills/e2e_run_tests.rssrc/openhuman/skills/ops_tests.rssrc/openhuman/test_support/introspect.rssrc/openhuman/tinyagents/mod.rssrc/openhuman/tinyagents/model.rssrc/openhuman/tinyagents/payload_summarizer.rssrc/openhuman/tinyagents/retriever.rssrc/openhuman/tinyagents/tests.rssrc/openhuman/tinyflows/caps.rssrc/openhuman/voice/factory/tests.rssrc/openhuman/voice/schemas/mod.rssrc/openhuman/voice/server.rssrc/openhuman/x402/x402_tests.rstests/json_rpc_e2e.rstests/keyring_secretstore_e2e.rstests/subconscious_conversation_e2e.rstests/transcript_search_e2e.rs
💤 Files with no reviewable changes (16)
- src/openhuman/memory/ops/learn.rs
- src/openhuman/desktop_companion/pipeline_tests.rs
- src/openhuman/memory_store/chunks/connection.rs
- src/openhuman/agent/harness/archivist/mod.rs
- src/openhuman/skills/e2e_run_tests.rs
- src/openhuman/skills/e2e_plumbing_tests.rs
- src/openhuman/desktop_companion/session_tests.rs
- src/openhuman/tinyagents/tests.rs
- app/src-tauri/src/discord_scanner/mod_tests.rs
- src/openhuman/memory_store/chunks/embeddings.rs
- src/openhuman/config/schema/load/mod.rs
- src/openhuman/inference/local/install.rs
- Cargo.toml
- src/openhuman/learning/extract/heuristics.rs
- src/openhuman/accessibility/mod.rs
- src/openhuman/skills/ops_tests.rs
🚧 Files skipped from review as they are similar to previous changes (10)
- src/openhuman/voice/server.rs
- src/openhuman/cwd_jail/linux.rs
- src/openhuman/agent/harness/session/builder/factory.rs
- app/src-tauri/src/meet_video/frame_bus.rs
- src/openhuman/flows/ops.rs
- src/openhuman/agent_orchestration/background_delivery.rs
- src/openhuman/tinyflows/caps.rs
- src/bin/slack_backfill.rs
- src/openhuman/tinyagents/mod.rs
- app/src-tauri/src/cdp/snapshot.rs
There was a problem hiding this comment.
Caution
Inline review comments failed to post. This is likely due to GitHub's internal server error or limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/openhuman/flows/ops_tests.rs (1)
2003-2011: 🩺 Stability & Availability | 🟡 Minor | ⚡ Quick winUse an isolated catalog-cache key for this test.
This test seeds the process-global
LIVE_CATALOG_CACHEunder"slack", while sibling tests also use that key. Parallel test execution can replace the fixture and make this assertion depend on test order. Use a unique fictional toolkit/slug or serialize access to the cache.🤖 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/openhuman/flows/ops_tests.rs` around lines 2003 - 2011, Update validate_tool_contracts_rejects_a_hallucinated_slug to avoid the shared "slack" LIVE_CATALOG_CACHE key by using a unique fictional toolkit and corresponding slug throughout its seeded contract, graph configuration, and validation expectations; preserve the test’s hallucinated-slug rejection behavior.Source: Learnings
🤖 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.
Inline comments:
In `@src/openhuman/flows/schemas.rs`:
- Around line 1072-1087: Add the optional strict input to the rollback and
draft_promote controller schemas, then invoke ops::strict_gate before each
operation persists its graph, matching the existing create/update flow. Update
the corresponding rollback and draft_promote handlers and ops methods to
propagate the strict value so both writes enforce strict validation.
---
Outside diff comments:
In `@src/openhuman/flows/ops_tests.rs`:
- Around line 2003-2011: Update
validate_tool_contracts_rejects_a_hallucinated_slug to avoid the shared "slack"
LIVE_CATALOG_CACHE key by using a unique fictional toolkit and corresponding
slug throughout its seeded contract, graph configuration, and validation
expectations; preserve the test’s hallucinated-slug rejection behavior.
🪄 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: 3f4e1d11-3c26-40f5-8abb-9222d531eda7
📒 Files selected for processing (60)
Cargo.tomlapp/src-tauri/src/cdp/snapshot.rsapp/src-tauri/src/discord_scanner/mod_tests.rsapp/src-tauri/src/lib.rsapp/src-tauri/src/meet_video/frame_bus.rsapp/src-tauri/src/ptt_overlay.rsapp/src/components/flows/canvas/__tests__/EditableFlowCanvas.validation.test.tsxsrc/bin/slack_backfill.rssrc/openhuman/accessibility/mod.rssrc/openhuman/accessibility/permissions_tests.rssrc/openhuman/agent/harness/archivist/mod.rssrc/openhuman/agent/harness/harness_gap_tests.rssrc/openhuman/agent/harness/session/builder/factory.rssrc/openhuman/agent/harness/session/transcript_tests.rssrc/openhuman/agent/harness/session/turn_tests.rssrc/openhuman/agent/harness/subagent_runner/ops/mod.rssrc/openhuman/agent/harness/tests.rssrc/openhuman/agent_orchestration/background_delivery.rssrc/openhuman/agent_registry/agents/loader.rssrc/openhuman/agentbox/store_tests.rssrc/openhuman/audio_toolkit/ops.rssrc/openhuman/config/ops/mod.rssrc/openhuman/config/schema/load/mod.rssrc/openhuman/config/schema/load_tests.rssrc/openhuman/config/schemas/mod.rssrc/openhuman/cwd_jail/linux.rssrc/openhuman/desktop_companion/pipeline_tests.rssrc/openhuman/desktop_companion/session_tests.rssrc/openhuman/devices/rpc.rssrc/openhuman/devices/store.rssrc/openhuman/flows/ops.rssrc/openhuman/flows/ops_tests.rssrc/openhuman/flows/schemas.rssrc/openhuman/inference/local/install.rssrc/openhuman/inference/provider/factory_tests.rssrc/openhuman/learning/extract/heuristics.rssrc/openhuman/meet_agent/brain/llm.rssrc/openhuman/memory/ops/learn.rssrc/openhuman/memory_queue/worker.rssrc/openhuman/memory_store/chunks/connection.rssrc/openhuman/memory_store/chunks/embeddings.rssrc/openhuman/memory_tree/tree/rpc.rssrc/openhuman/skills/e2e_plumbing_tests.rssrc/openhuman/skills/e2e_run_tests.rssrc/openhuman/skills/ops_tests.rssrc/openhuman/test_support/introspect.rssrc/openhuman/tinyagents/mod.rssrc/openhuman/tinyagents/model.rssrc/openhuman/tinyagents/payload_summarizer.rssrc/openhuman/tinyagents/retriever.rssrc/openhuman/tinyagents/tests.rssrc/openhuman/tinyflows/caps.rssrc/openhuman/voice/factory/tests.rssrc/openhuman/voice/schemas/mod.rssrc/openhuman/voice/server.rssrc/openhuman/x402/x402_tests.rstests/json_rpc_e2e.rstests/keyring_secretstore_e2e.rstests/subconscious_conversation_e2e.rstests/transcript_search_e2e.rs
💤 Files with no reviewable changes (16)
- src/openhuman/memory/ops/learn.rs
- src/openhuman/desktop_companion/pipeline_tests.rs
- src/openhuman/memory_store/chunks/connection.rs
- src/openhuman/agent/harness/archivist/mod.rs
- src/openhuman/skills/e2e_run_tests.rs
- src/openhuman/skills/e2e_plumbing_tests.rs
- src/openhuman/desktop_companion/session_tests.rs
- src/openhuman/tinyagents/tests.rs
- app/src-tauri/src/discord_scanner/mod_tests.rs
- src/openhuman/memory_store/chunks/embeddings.rs
- src/openhuman/config/schema/load/mod.rs
- src/openhuman/inference/local/install.rs
- Cargo.toml
- src/openhuman/learning/extract/heuristics.rs
- src/openhuman/accessibility/mod.rs
- src/openhuman/skills/ops_tests.rs
🚧 Files skipped from review as they are similar to previous changes (10)
- src/openhuman/voice/server.rs
- src/openhuman/cwd_jail/linux.rs
- src/openhuman/agent/harness/session/builder/factory.rs
- app/src-tauri/src/meet_video/frame_bus.rs
- src/openhuman/flows/ops.rs
- src/openhuman/agent_orchestration/background_delivery.rs
- src/openhuman/tinyflows/caps.rs
- src/bin/slack_backfill.rs
- src/openhuman/tinyagents/mod.rs
- app/src-tauri/src/cdp/snapshot.rs
🛑 Comments failed to post (1)
src/openhuman/flows/schemas.rs (1)
1072-1087: 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift
Enforce strict gating for rollback and draft promotion.
strict_input()is wired into create/update and those handlers callops::strict_gate, but rollback anddraft_promoteexpose nostrictparameter and never run the gate. These paths can therefore persist graphs without the same hard checks. Add the optional input and apply the gate before both writes, or thread strict mode through the ops layer.Also applies to: 1182-1192, 1564-1577, 1649-1655
🤖 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/openhuman/flows/schemas.rs` around lines 1072 - 1087, Add the optional strict input to the rollback and draft_promote controller schemas, then invoke ops::strict_gate before each operation persists its graph, matching the existing create/update flow. Update the corresponding rollback and draft_promote handlers and ops methods to propagate the strict value so both writes enforce strict validation.
…y-checks # Conflicts: # app/src/components/flows/canvas/__tests__/EditableFlowCanvas.validation.test.tsx # src/openhuman/agent_registry/agents/loader.rs
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 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.
Inline comments:
In `@src/openhuman/agent/harness/session/turn/session_io.rs`:
- Around line 172-187: Add a grep-friendly tracing::debug! message in the
successful validation branch of the checkpoint handling in the session flow,
after parse_response confirms prompt_tool_calls is empty. Log the validation
outcome and relevant non-sensitive state, but never include checkpoint contents;
preserve the existing warning and deterministic fallback for detected tool
calls.
- Around line 172-187: Update the checkpoint handling in the session turn flow
so checkpoint text is buffered and not sent through on_progress until after
parse_response validates it. Preserve the existing deterministic fallback for
non-empty prompt_tool_calls, and only emit the buffered checkpoint when
validation succeeds; do not rely on returning an empty summary to retract
already-streamed text.
- Around line 172-187: Add a regression test in the existing session turn tests
covering a non-empty checkpoint parsed by the tool dispatcher into
prompt-formatted tool calls. Assert that this path returns an empty summary and
preserves the expected usage, alongside the existing empty-summary fallback and
usage-folding 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: 84932ef7-5b4e-4554-8a32-2d5c9146b1f6
📒 Files selected for processing (1)
src/openhuman/agent/harness/session/turn/session_io.rs
…y-checks # Conflicts: # tests/raw_coverage/agent_session_round24_raw_coverage_e2e.rs
…y-checks # Conflicts: # app/src/lib/i18n/ru.ts
Summary
type_complexity,doc_lazy_continuation, and current-main integration warnings, without adding suppressions for those lints.Problem
Solution
rust:clippycommand that runscargo clippy ... -- -D warningsfor both Cargo worlds, and use it from pre-push.dead_code,type_complexity, ordoc_lazy_continuationallowance.Submission Checklist
Impact
Related
AI Authored PR Metadata (required for Codex/Linear PRs)
Linear Issue
Commit & Branch
chore/enforce-clippy-checks16b4d4c6d5d8935a9316106d6ba4f95b44f2fb3cValidation Run
pnpm --filter openhuman-app format:checkpnpm typecheckagent_session_round24_raw_coverage_e2etests.; direct wrap-up fallback/usage regression; raw-coverage progress-leak regression.cargo clippy -p openhuman -- -D warnings;GGML_NATIVE=OFF cargo check --no-default-features --features tokenjuice-treesittercargo clippy --manifest-path app/src-tauri/Cargo.toml -- -D warningsValidation Blocked
command:N/Aerror:N/Aimpact:NoneBehavior Changes
Parity Contract
Duplicate / Superseded PR Handling
Summary by CodeRabbit