Skip to content

chore(rust): enforce warning-free clippy#4872

Merged
senamakel merged 21 commits into
tinyhumansai:mainfrom
senamakel:chore/enforce-clippy-checks
Jul 15, 2026
Merged

chore(rust): enforce warning-free clippy#4872
senamakel merged 21 commits into
tinyhumansai:mainfrom
senamakel:chore/enforce-clippy-checks

Conversation

@senamakel

@senamakel senamakel commented Jul 15, 2026

Copy link
Copy Markdown
Member

Summary

  • Enforces warning-free Clippy for both the Rust core and Tauri shell in CI Lite and the pre-push hook.
  • Fixes the current Clippy/rustc diagnostics, including type_complexity, doc_lazy_continuation, and current-main integration warnings, without adding suppressions for those lints.
  • Removes unused Tauri CDP input and legacy Meet audio-capture implementations plus other dead code surfaced by Clippy.
  • Corrects the app-level Clippy script so it checks the Tauri manifest rather than resolving to the root crate.

Problem

  • CI ran core Clippy without denying warnings and did not lint the Tauri shell.
  • The pre-push hook performed Rust compile checks but did not enforce Clippy cleanliness.
  • Existing warnings included dead code, complex unnamed types, malformed doc continuation, and correctness/style diagnostics across both Cargo manifests.

Solution

  • Add a root rust:clippy command that runs cargo clippy ... -- -D warnings for both Cargo worlds, and use it from pre-push.
  • Run warning-denied Clippy conditionally for each changed Rust area in CI Lite, with the Tauri target and CEF caches configured.
  • Resolve diagnostics in source, introduce focused type aliases for complex model/result/row/cache types, and delete obsolete unreferenced implementations.
  • Preserve the repository's pre-existing core API-surface dead-code policy; this PR adds no new dead_code, type_complexity, or doc_lazy_continuation allowance.

Submission Checklist

If a section does not apply to this change, mark the item as N/A with a one-line reason. Do not delete items.

  • Focused regression coverage verifies turn wrap-ups reject prompt-formatted tool calls and preserve the deterministic checkpoint fallback.
  • N/A: changed executable lines are mechanical lint rewrites; CI Lite remains the authoritative diff-coverage gate.
  • N/A: no feature rows were added, removed, or renamed.
  • N/A: no feature IDs are affected.
  • No new external network dependencies introduced (mock backend used per Testing Strategy)
  • N/A: release-cut surfaces are unchanged.
  • N/A: no linked issue was supplied for this maintenance task.

Impact

  • Rust warnings now block local pushes and CI Lite for both the core and desktop shell.
  • Removed code was unreferenced, including a superseded Meet capture path. A merged-main regression fix now rejects prompt-formatted tool calls from no-tools turn wrap-ups and uses the deterministic checkpoint fallback.
  • CI may spend additional time linting the Tauri Cargo world when Tauri Rust files change; caching is configured for both targets.

Related

  • Closes: N/A — no issue supplied.
  • Follow-up PR(s)/TODOs: N/A.

AI Authored PR Metadata (required for Codex/Linear PRs)

Keep this section for AI-authored PRs. For human-only PRs, mark each field N/A.

Linear Issue

  • Key: N/A
  • URL: N/A

Commit & Branch

  • Branch: chore/enforce-clippy-checks
  • Commit SHA: 16b4d4c6d5d8935a9316106d6ba4f95b44f2fb3c

Validation Run

  • pnpm --filter openhuman-app format:check
  • pnpm typecheck
  • Focused tests: flow tool-contract regression; deferred re-embed worker regression; Slack probe diagnostic redaction; Tauri CDP snapshot parsing/request tests.; all agent_session_round24_raw_coverage_e2e tests.; direct wrap-up fallback/usage regression; raw-coverage progress-leak regression.
  • Rust fmt/check (if changed): cargo clippy -p openhuman -- -D warnings; GGML_NATIVE=OFF cargo check --no-default-features --features tokenjuice-treesitter
  • Tauri fmt/check (if changed): cargo clippy --manifest-path app/src-tauri/Cargo.toml -- -D warnings

Validation Blocked

  • command: N/A
  • error: N/A
  • impact: None

Behavior Changes

  • Intended behavior change: Rust warnings fail pre-push and CI for both Cargo manifests.
  • User-visible effect: Capped turns no longer surface ignored prompt-formatted tool calls as checkpoint text; they use the safe deterministic checkpoint.

Parity Contract

  • Legacy behavior preserved: Yes; lint rewrites are behavior-preserving and deleted implementations were unreferenced/superseded.
  • Guard/fallback/dispatch parity checks: Default core, Tauri, and voice-disabled core configurations compile cleanly.

Duplicate / Superseded PR Handling

  • Duplicate PR(s): None found.
  • Canonical PR: This PR.
  • Resolution (closed/superseded/updated): N/A.

Summary by CodeRabbit

  • Improvements
    • Meet listening migrated to a streamlined captions-first audio path.
    • CDP snapshot capture is lighter by removing rect/layout capture and simplifying how documents merge into the node tree.
    • Scanner parsing/matching and listing outputs are more consistent (newest-first ordering).
    • Memory summarization and stability/confidence calculations handle edge cases more reliably.
  • Localization
    • Updated the Russian Copilot disclaimer wording.
  • Quality
    • Strengthened Rust clippy/linting gates and CI caching; pre-push now runs clippy checks.

@senamakel
senamakel requested a review from a team July 15, 2026 02:13
@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It 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 reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The 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.

Changes

Rust quality and Tauri surfaces

Layer / File(s) Summary
Clippy workflow and local enforcement
.github/workflows/ci-lite.yml, .husky/pre-push, Cargo.toml, package.json, app/package.json, app/src-tauri/Cargo.toml
CI and local checks run Clippy with warnings denied, cache Tauri artifacts and CEF data, and configure lint baselines and manifest targets.
Tauri CDP and Meet audio surfaces
app/src-tauri/src/cdp/*, app/src-tauri/src/meet_audio/*, app/src-tauri/src/lib.rs, app/src-tauri/src/ptt_*
CDP exports and target data are narrowed, DOM rectangle capture is removed, and Meet audio state drops legacy capture and request identifiers.
Scanner parsing and payload cleanup
app/src-tauri/src/*_scanner/*
Scanner traversal, serialized-value mapping, DOM payloads, and identifier parsing are refactored.
Core types, visibility, and runtime helpers
src/core/*, src/openhuman/**
Internal aliases, visibility, sorting, clamping, option handling, storage types, and runtime helpers are simplified.
Slack probe error handling
src/bin/slack_backfill.rs
Probe outcomes use unit variants, while failures are logged as bounded, sanitized summaries.
Validation and test synchronization
src/openhuman/**/*tests*, tests/*
Test fixtures, JSON-RPC extraction, request IDs, async locks, and definition-derived assertions are updated.

Estimated code review effort: 4 (Complex) | ~60 minutes

Possibly related PRs

Suggested labels: rust-core

Suggested reviewers: m3ga-mind, oxoxdev

Poem

A rabbit sees Clippy hop,
CDP rectangles gently stop.
Async locks now guard the den,
Clean scanners parse again.
Rusty paths grow neat and bright—
Bunny thumps: “Review looks right!”

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: enforcing warning-free Clippy checks across Rust code.

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot added rust-core Core Rust runtime in src/: CLI, core_server, shared infrastructure. working A PR that is being worked on by the team. labels Jul 15, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread app/src-tauri/src/lib.rs
Comment thread app/src-tauri/src/lib.rs

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 win

Fix the stale server_cancel reference on macOS.

_server_cancel is the only binding in scope here, so the macOS fn path still fails to resolve server_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 win

Add 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 lift

Scope 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 win

Log headless batches before dropping them.

When batch_thread_id is None, this branch silently discards the drained batch. Add an explicit else log 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

📥 Commits

Reviewing files that changed from the base of the PR and between 972105c and 10f4069.

📒 Files selected for processing (92)
  • .github/workflows/ci-lite.yml
  • .husky/pre-push
  • Cargo.toml
  • app/package.json
  • app/src-tauri/Cargo.toml
  • app/src-tauri/src/cdp/input.rs
  • app/src-tauri/src/cdp/mod.rs
  • app/src-tauri/src/cdp/session.rs
  • app/src-tauri/src/cdp/snapshot.rs
  • app/src-tauri/src/cdp/target.rs
  • app/src-tauri/src/claude_code.rs
  • app/src-tauri/src/deep_link_ipc.rs
  • app/src-tauri/src/imessage_scanner/mod.rs
  • app/src-tauri/src/lib.rs
  • app/src-tauri/src/meet_audio/caption_listener.rs
  • app/src-tauri/src/meet_audio/listen_capture.rs
  • app/src-tauri/src/meet_audio/mod.rs
  • app/src-tauri/src/meet_audio/speak_pump.rs
  • app/src-tauri/src/meet_call/mod.rs
  • app/src-tauri/src/meet_scanner/mod.rs
  • app/src-tauri/src/meet_video/frame_bus.rs
  • app/src-tauri/src/ptt_hotkeys.rs
  • app/src-tauri/src/ptt_overlay.rs
  • app/src-tauri/src/screen_capture/mod.rs
  • app/src-tauri/src/slack_scanner/extract.rs
  • app/src-tauri/src/slack_scanner/idb.rs
  • app/src-tauri/src/telegram_scanner/extract.rs
  • app/src-tauri/src/telegram_scanner/idb.rs
  • app/src-tauri/src/wechat_scanner/dom_snapshot.rs
  • app/src-tauri/src/whatsapp_scanner/idb.rs
  • app/src-tauri/src/whatsapp_scanner/mod.rs
  • package.json
  • src/bin/memory_tree_init_smoke.rs
  • src/bin/slack_backfill.rs
  • src/core/cli.rs
  • src/openhuman/accessibility/automate.rs
  • src/openhuman/agent/harness/archivist/recap.rs
  • src/openhuman/agent/harness/session/builder/factory.rs
  • src/openhuman/agent/harness/tool_filter.rs
  • src/openhuman/agent/progress_tracing.rs
  • src/openhuman/agent/schemas.rs
  • src/openhuman/agent_meetings/summary.rs
  • src/openhuman/agent_memory/tools.rs
  • src/openhuman/agent_orchestration/background_delivery.rs
  • src/openhuman/agent_orchestration/running_subagents.rs
  • src/openhuman/agent_orchestration/spawn_parallel_graph.rs
  • src/openhuman/artifacts/store.rs
  • src/openhuman/channels/proactive.rs
  • src/openhuman/composio/tools/direct.rs
  • src/openhuman/credentials/profiles.rs
  • src/openhuman/cron/tools/add.rs
  • src/openhuman/cwd_jail/linux.rs
  • src/openhuman/embeddings/ollama_adapter.rs
  • src/openhuman/file_state/ops.rs
  • src/openhuman/flows/ops.rs
  • src/openhuman/inference/local/mod.rs
  • src/openhuman/inference/local/ollama.rs
  • src/openhuman/inference/provider/claude_code/driver.rs
  • src/openhuman/inference/provider/factory.rs
  • src/openhuman/learning/reflection.rs
  • src/openhuman/learning/stability_detector.rs
  • src/openhuman/mcp_registry/connections.rs
  • src/openhuman/mcp_registry/registries/mcp_official.rs
  • src/openhuman/mcp_server/write_dispatch.rs
  • src/openhuman/meet_agent/brain/speech.rs
  • src/openhuman/meet_agent/session.rs
  • src/openhuman/meet_agent/store.rs
  • src/openhuman/memory/read_rpc/types.rs
  • src/openhuman/memory_tools/capture.rs
  • src/openhuman/memory_tree/tree/factory.rs
  • src/openhuman/memory_tree/tree/registry.rs
  • src/openhuman/people/store.rs
  • src/openhuman/runtime_python/bootstrap.rs
  • src/openhuman/security/pii/rules.rs
  • src/openhuman/skills/registry.rs
  • src/openhuman/socket/medulla/mod.rs
  • src/openhuman/subconscious_triggers/runtime.rs
  • src/openhuman/tinyagents/mod.rs
  • src/openhuman/tinyagents/observability.rs
  • src/openhuman/tinyagents/replay/mod.rs
  • src/openhuman/tinycortex/embeddings.rs
  • src/openhuman/tinycortex/sync.rs
  • src/openhuman/tinyflows/caps.rs
  • src/openhuman/tinyplace/manifest.rs
  • src/openhuman/todos/graph_shadow.rs
  • src/openhuman/tools/impl/filesystem/glob_search.rs
  • src/openhuman/tools/impl/network/polymarket.rs
  • src/openhuman/tools/impl/system/schedule.rs
  • src/openhuman/voice/server.rs
  • src/openhuman/wallet/chains/btc.rs
  • src/openhuman/webview_accounts/ops.rs
  • src/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

Comment thread app/src-tauri/src/cdp/snapshot.rs Outdated
Comment thread app/src-tauri/src/meet_video/frame_bus.rs
Comment thread app/src-tauri/src/ptt_overlay.rs Outdated
Comment thread Cargo.toml Outdated
Comment thread src/bin/slack_backfill.rs
Comment thread src/openhuman/tinyagents/mod.rs Outdated
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jul 15, 2026
@coderabbitai coderabbitai Bot removed the working A PR that is being worked on by the team. label Jul 15, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 win

Use an isolated catalog-cache key for this test.

This test seeds the process-global LIVE_CATALOG_CACHE under "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

📥 Commits

Reviewing files that changed from the base of the PR and between 10f4069 and 57fbf9b.

📒 Files selected for processing (60)
  • Cargo.toml
  • app/src-tauri/src/cdp/snapshot.rs
  • app/src-tauri/src/discord_scanner/mod_tests.rs
  • app/src-tauri/src/lib.rs
  • app/src-tauri/src/meet_video/frame_bus.rs
  • app/src-tauri/src/ptt_overlay.rs
  • app/src/components/flows/canvas/__tests__/EditableFlowCanvas.validation.test.tsx
  • src/bin/slack_backfill.rs
  • src/openhuman/accessibility/mod.rs
  • src/openhuman/accessibility/permissions_tests.rs
  • src/openhuman/agent/harness/archivist/mod.rs
  • src/openhuman/agent/harness/harness_gap_tests.rs
  • src/openhuman/agent/harness/session/builder/factory.rs
  • src/openhuman/agent/harness/session/transcript_tests.rs
  • src/openhuman/agent/harness/session/turn_tests.rs
  • src/openhuman/agent/harness/subagent_runner/ops/mod.rs
  • src/openhuman/agent/harness/tests.rs
  • src/openhuman/agent_orchestration/background_delivery.rs
  • src/openhuman/agent_registry/agents/loader.rs
  • src/openhuman/agentbox/store_tests.rs
  • src/openhuman/audio_toolkit/ops.rs
  • src/openhuman/config/ops/mod.rs
  • src/openhuman/config/schema/load/mod.rs
  • src/openhuman/config/schema/load_tests.rs
  • src/openhuman/config/schemas/mod.rs
  • src/openhuman/cwd_jail/linux.rs
  • src/openhuman/desktop_companion/pipeline_tests.rs
  • src/openhuman/desktop_companion/session_tests.rs
  • src/openhuman/devices/rpc.rs
  • src/openhuman/devices/store.rs
  • src/openhuman/flows/ops.rs
  • src/openhuman/flows/ops_tests.rs
  • src/openhuman/flows/schemas.rs
  • src/openhuman/inference/local/install.rs
  • src/openhuman/inference/provider/factory_tests.rs
  • src/openhuman/learning/extract/heuristics.rs
  • src/openhuman/meet_agent/brain/llm.rs
  • src/openhuman/memory/ops/learn.rs
  • src/openhuman/memory_queue/worker.rs
  • src/openhuman/memory_store/chunks/connection.rs
  • src/openhuman/memory_store/chunks/embeddings.rs
  • src/openhuman/memory_tree/tree/rpc.rs
  • src/openhuman/skills/e2e_plumbing_tests.rs
  • src/openhuman/skills/e2e_run_tests.rs
  • src/openhuman/skills/ops_tests.rs
  • src/openhuman/test_support/introspect.rs
  • src/openhuman/tinyagents/mod.rs
  • src/openhuman/tinyagents/model.rs
  • src/openhuman/tinyagents/payload_summarizer.rs
  • src/openhuman/tinyagents/retriever.rs
  • src/openhuman/tinyagents/tests.rs
  • src/openhuman/tinyflows/caps.rs
  • src/openhuman/voice/factory/tests.rs
  • src/openhuman/voice/schemas/mod.rs
  • src/openhuman/voice/server.rs
  • src/openhuman/x402/x402_tests.rs
  • tests/json_rpc_e2e.rs
  • tests/keyring_secretstore_e2e.rs
  • tests/subconscious_conversation_e2e.rs
  • tests/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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 win

Use an isolated catalog-cache key for this test.

This test seeds the process-global LIVE_CATALOG_CACHE under "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

📥 Commits

Reviewing files that changed from the base of the PR and between 10f4069 and 57fbf9b.

📒 Files selected for processing (60)
  • Cargo.toml
  • app/src-tauri/src/cdp/snapshot.rs
  • app/src-tauri/src/discord_scanner/mod_tests.rs
  • app/src-tauri/src/lib.rs
  • app/src-tauri/src/meet_video/frame_bus.rs
  • app/src-tauri/src/ptt_overlay.rs
  • app/src/components/flows/canvas/__tests__/EditableFlowCanvas.validation.test.tsx
  • src/bin/slack_backfill.rs
  • src/openhuman/accessibility/mod.rs
  • src/openhuman/accessibility/permissions_tests.rs
  • src/openhuman/agent/harness/archivist/mod.rs
  • src/openhuman/agent/harness/harness_gap_tests.rs
  • src/openhuman/agent/harness/session/builder/factory.rs
  • src/openhuman/agent/harness/session/transcript_tests.rs
  • src/openhuman/agent/harness/session/turn_tests.rs
  • src/openhuman/agent/harness/subagent_runner/ops/mod.rs
  • src/openhuman/agent/harness/tests.rs
  • src/openhuman/agent_orchestration/background_delivery.rs
  • src/openhuman/agent_registry/agents/loader.rs
  • src/openhuman/agentbox/store_tests.rs
  • src/openhuman/audio_toolkit/ops.rs
  • src/openhuman/config/ops/mod.rs
  • src/openhuman/config/schema/load/mod.rs
  • src/openhuman/config/schema/load_tests.rs
  • src/openhuman/config/schemas/mod.rs
  • src/openhuman/cwd_jail/linux.rs
  • src/openhuman/desktop_companion/pipeline_tests.rs
  • src/openhuman/desktop_companion/session_tests.rs
  • src/openhuman/devices/rpc.rs
  • src/openhuman/devices/store.rs
  • src/openhuman/flows/ops.rs
  • src/openhuman/flows/ops_tests.rs
  • src/openhuman/flows/schemas.rs
  • src/openhuman/inference/local/install.rs
  • src/openhuman/inference/provider/factory_tests.rs
  • src/openhuman/learning/extract/heuristics.rs
  • src/openhuman/meet_agent/brain/llm.rs
  • src/openhuman/memory/ops/learn.rs
  • src/openhuman/memory_queue/worker.rs
  • src/openhuman/memory_store/chunks/connection.rs
  • src/openhuman/memory_store/chunks/embeddings.rs
  • src/openhuman/memory_tree/tree/rpc.rs
  • src/openhuman/skills/e2e_plumbing_tests.rs
  • src/openhuman/skills/e2e_run_tests.rs
  • src/openhuman/skills/ops_tests.rs
  • src/openhuman/test_support/introspect.rs
  • src/openhuman/tinyagents/mod.rs
  • src/openhuman/tinyagents/model.rs
  • src/openhuman/tinyagents/payload_summarizer.rs
  • src/openhuman/tinyagents/retriever.rs
  • src/openhuman/tinyagents/tests.rs
  • src/openhuman/tinyflows/caps.rs
  • src/openhuman/voice/factory/tests.rs
  • src/openhuman/voice/schemas/mod.rs
  • src/openhuman/voice/server.rs
  • src/openhuman/x402/x402_tests.rs
  • tests/json_rpc_e2e.rs
  • tests/keyring_secretstore_e2e.rs
  • tests/subconscious_conversation_e2e.rs
  • tests/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 call ops::strict_gate, but rollback and draft_promote expose no strict parameter 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
@coderabbitai coderabbitai Bot added working A PR that is being worked on by the team. and removed rust-core Core Rust runtime in src/: CLI, core_server, shared infrastructure. labels Jul 15, 2026
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jul 15, 2026
@coderabbitai coderabbitai Bot added the rust-core Core Rust runtime in src/: CLI, core_server, shared infrastructure. label Jul 15, 2026
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jul 15, 2026
@coderabbitai coderabbitai Bot removed the working A PR that is being worked on by the team. label Jul 15, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 1cdaf43 and cd600d7.

📒 Files selected for processing (1)
  • src/openhuman/agent/harness/session/turn/session_io.rs

Comment thread src/openhuman/agent/harness/session/turn/session_io.rs
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jul 15, 2026
…y-checks

# Conflicts:
#	tests/raw_coverage/agent_session_round24_raw_coverage_e2e.rs
…y-checks

# Conflicts:
#	app/src/lib/i18n/ru.ts
@senamakel
senamakel merged commit d320c43 into tinyhumansai:main Jul 15, 2026
18 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rust-core Core Rust runtime in src/: CLI, core_server, shared infrastructure.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant