Skip to content

fix(memory): preserve diff type exports in slim builds - #5488

Merged
senamakel merged 45 commits into
tinyhumansai:mainfrom
senamakel:openhuman-upstream-followup
Aug 11, 2026
Merged

fix(memory): preserve diff type exports in slim builds#5488
senamakel merged 45 commits into
tinyhumansai:mainfrom
senamakel:openhuman-upstream-followup

Conversation

@senamakel

@senamakel senamakel commented Aug 10, 2026

Copy link
Copy Markdown
Member

Summary

  • merge the current upstream main into the follow-up branch
  • restore the memory-diff type shim required when memory-git is disabled
  • gate the diff tool re-export with the same feature
  • repair feature-off contract tests so the removed memory_diff RPC namespace and tool are not advertised

Kernel dependency-floor justification

The flows profile intentionally gains three always-on packages: tinymemory, tinymemory-api, and tinymemory-tinycortex. They own engine-neutral driver admission and mandatory memory capabilities required by a second engine; tinydocs and tinywallet remain behind their documents and web3 feature gates. The measured floor is 305 packages, 282 names, and 2 native builds.

Verification

  • cargo test --manifest-path Cargo.toml --no-default-features --lib -- core::all:: core::cli:: core::jsonrpc:: core::legacy_aliases:: core::runtime:: agent::registry::agents::loader:: memory::people::address_book::tests:: openhuman::platform::socket::event_handlers:: tools::schemas:: tools::ops::tests::
  • cargo test --manifest-path Cargo.toml --features memory-git --lib -- core::all::tests::every_capability_family_is_accounted_for_in_the_rpc_surface core::all::tests::memory_families_registered_when_capabilities_advertised core::all::tests::sole_capability_for_namespace_reports_a_single_family_namespace core::cli::tests::default_build_leaves_the_generic_namespace_path_unchanged openhuman::tools::ops::tests::memory_capability_table_names_are_real openhuman::tools::ops::tests::memory_tools_all_present_with_no_ambient_context openhuman::tools::ops::tests::memory_tools_all_present_under_the_embedded_driver
  • scripts/check-kernel-floor.sh --verbose

Follow-up to merged #5475.

Summary by CodeRabbit

  • New Features
    • Webhook operations are now supported through the application’s backend integration.
    • Explicitly configured agent models now take precedence over automatically suggested models.
    • Memory-diff types remain available independently, while memory-diff tools appear only when enabled.
  • Bug Fixes
    • Updated navigation redirects for Channels and Agent World.
    • Improved workflow reliability by restarting failed sessions and cleaning up stale drivers.
    • Corrected feature-specific capability and namespace reporting.

senamakel and others added 3 commits August 10, 2026 19:13
Replaced the re-export of diff types from the external `tinycortex` crate with a direct re-export from the newly added local `types` module, and made the `MemoryDiffTool` re-export conditional on the `memory-git` feature. This decouples the public API from the external dependency and prepares for future type customizations.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
The `MemoryDiffTool` re-export is moved before the `types` block so that feature-gated items appear together at the top of the public section, and the testnet address validation test line is collapsed onto a single line for consistency with the project's formatting style.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: eb24566e-d156-4ad9-b71d-9e7a6eb9f6eb

📥 Commits

Reviewing files that changed from the base of the PR and between 95345c3 and 732f4c6.

📒 Files selected for processing (29)
  • .github/workflows/ci-full.yml
  • .github/workflows/ci-lite.yml
  • .github/workflows/e2e.yml
  • .github/workflows/pr-quality.yml
  • app/scripts/e2e-run-all-flows.sh
  • app/scripts/e2e-run-session.sh
  • app/scripts/e2e-web-build.sh
  • app/src/pages/__tests__/FlowCanvasPage.test.tsx
  • app/test/e2e/helpers/shared-flows.ts
  • app/test/e2e/specs/auth-access-control.spec.ts
  • app/test/e2e/specs/coding-session-memory.spec.ts
  • app/test/e2e/specs/harness-composio-tool-flow.spec.ts
  • app/test/e2e/specs/navigation.spec.ts
  • app/test/e2e/specs/onboarding-modes.spec.ts
  • app/test/e2e/specs/webhooks-tunnel-flow.spec.ts
  • app/test/wdio.conf.ts
  • scripts/ci/rust-coverage-changed.sh
  • scripts/kernel-floor.limits
  • scripts/test-rust-e2e.sh
  • src/api/rest.rs
  • src/api/rest_tests.rs
  • src/core/all_tests.rs
  • src/core/cli_tests.rs
  • src/openhuman/agent/harness/session/builder/factory.rs
  • src/openhuman/cron/scheduler_tests.rs
  • src/openhuman/memory/diff/mod.rs
  • src/openhuman/memory/diff/types.rs
  • src/openhuman/tools/ops_tests.rs
  • tests/json_rpc_e2e.rs

📝 Walkthrough

Walkthrough

The PR aligns memory-diff feature gating, forwards product Cargo features through CI and E2E builds, limits desktop E2E to supported platforms, improves Linux Tauri-driver retries and cleanup, and updates application and Rust integration tests.

Changes

Runtime and validation updates

Layer / File(s) Summary
Memory-diff public types and feature gating
src/openhuman/memory/diff/*, src/openhuman/tools/ops_tests.rs, src/core/*_tests.rs
The public diff types remain available without memory-git. The diff tool, capabilities, namespaces, and registry entries are gated by memory-git.
Product features and coverage execution
scripts/test-rust-e2e.sh, app/scripts/e2e-web-build.sh, scripts/ci/*, .github/workflows/ci-lite.yml, scripts/kernel-floor.limits
Cargo commands use the canonical product feature set. JSON-RPC coverage runs serially. Tauri coverage uses isolated LLVM profiles and validates profile output.
Linux Tauri E2E execution reliability
app/scripts/e2e-run-all-flows.sh, app/scripts/e2e-run-session.sh, app/test/wdio.conf.ts, .github/workflows/ci-full.yml, .github/workflows/e2e.yml
Linux specs retry after restarting the session lifecycle. Cleanup terminates tauri-driver descendants. macOS and Windows runs are disabled by default.
E2E routes, sessions, and tunnel flows
app/test/e2e/helpers/*, app/test/e2e/specs/*, src/api/rest.rs, src/api/rest_tests.rs
Redirects, authentication setup, fresh chat threads, onboarding setup, and tunnel expectations match current application behavior. Webhook paths are no longer blocked by the REST client.
Application behavior and Rust test alignment
app/src/pages/__tests__/*, src/openhuman/agent/*, src/openhuman/cron/*, tests/json_rpc_e2e.rs
Flow-save assertions verify retry state. Explicit model overrides take precedence. JSON-RPC tests use isolated workspaces and user sessions. The Meet lifecycle test uses the agent-sized stack.

Estimated code review effort: 3 (Moderate) | ~30 minutes

Possibly related PRs

Suggested labels: bug, rust-core, memory, priority: p1

Suggested reviewers: al629176

Poem

A rabbit checks the feature gate,
Then hops through tests that execute straight.
Tauri drivers stop and restart,
Fresh threads keep each flow apart.
“Green builds!” thumps my little heart.


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.

senamakel and others added 26 commits August 10, 2026 19:46
The Rust E2E runner now sources the product feature set from the canonical CI script and passes it via `--features` to every `cargo test` call. Several test suites require product gates such as `voice` or `memory-git` to compile and run correctly; without these features the runner would fail before any test could execute.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
The full desktop E2E suite now runs only on Linux because macOS and Windows require native drivers following the Wry migration, and the old CEF/Appium path causes every shard to fail before a spec starts. The reusable workflow inputs for macOS and Windows default to false and their descriptions note the dependency on native driver support.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Removed redundant auth bootstrap and deep link bypass calls from the test's before hook, as resetApp now handles the complete auth and onboarding flow. The removed calls were racing with resetApp's asynchronous post-login redirect, causing flaky failures where the Chat surface would overwrite the intended Sources route.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
…e/specs/auth-access-control.spe

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
…ec.ts

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
…ec.ts

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
…openhuman/tools/ops_tests.rs

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Adds a test to verify that the memory_diff tool is not advertised when the `memory-git` feature is compiled out, ensuring the tool correctly hides its implementation under the feature gate.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
The coverage script now passes `--no-clean` to cargo-llvm-cov so that raw profile data accumulated from earlier test binaries is not discarded before the final merge step. Without this flag, each scoped invocation cleans the profile directory, leaving the report command with nothing to combine when integration gates are used.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
The test `every_capability_family_is_accounted_for_in_the_rpc_surface` now conditionally returns `true` or `false` for the `Diff` capability depending on whether the `memory-git` feature is enabled, ensuring the test correctly reflects the availability of the Diff capability in the RPC surface.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
The `--no-clean` flag was removed from the cargo-llvm-cov invocation because the workspace is now cleaned once before the entire coverage run, making the flag unnecessary. Each subsequent invocation no longer needs to retain raw profiles from previous runs.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
…oor.limits

The change adds a new history entry documenting the introduction of the tinymemory engine-neutral memory layer, which brings three packages and three names as always-on dependencies for the flows host profile. This ensures driver admission and mandatory memory capability families remain available to a second engine, while tinydocs and tinywallet stay gated behind their respective features.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
The CI workflow's test filters were updated to include the new config migration tests for retiring local whisper STT, replacing the previous inference local module reference that no longer exists.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Clear the Tauri coverage target directory before running cargo-llvm-cov to prevent stale non-instrumented binaries from producing empty .profraw files. Also run the json_rpc_e2e integration test with a single thread to avoid race conditions from lingering background agent tasks.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Export the LLVM_PROFILE_FILE environment variable before running cargo llvm-cov for the Tauri shell job to ensure raw profiles are written to the correct target directory. This prevents a mismatch between where llvm-cov 0.8.7 expects profiles and where the instrumented binary writes them, which previously caused coverage data to be lost and test runs to report nothing to merge.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Product Hunt returns 403 errors for requests from GitHub-hosted runners, so the translated README badge destination cannot be reliably checked as an external link. This change adds an exclusion rule to prevent false failures in the link validation workflow.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
The comment explaining why Product Hunt is excluded from link checks was placed outside the lychee arguments block, making it easy to overlook during maintenance. Moving it inside the args section keeps the rationale directly next to the exclusion rule it documents.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Move spec retry logic from WDIO's specFileRetries into the shell orchestrator so that a failed test on Linux gets a completely new tauri-driver and app instance. The previous approach retried within the same WebDriver session, which could not recover from a hung POST /session request and merely added another two-minute timeout. The shell loop now runs each spec up to twice, restarting the driver and app between attempts, and logs the retry to stderr for observability.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
The onboarding-modes end-to-end test now passes `clearAuthSession: true` when resetting the app state. Without this option, a prior local app-session profile could remain in place and redirect straight to the Custom wizard, bypassing the runtime-choice page that the test needs to exercise for the Cloud onboarding path.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Move the `onboarding_completed=false` flag from before authentication to after the auth bootstrap completes, because the auth bootstrap refreshes the renderer snapshot and would otherwise overwrite the flag, causing the runtime-choice route to incorrectly bounce to chat instead of the onboarding wizard.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
The e2e web build script previously compiled the core binary using only the contributor feature set, which omits product domains such as voice, web3, documents and crash reporting. Since the web test suite exercises the shipped desktop surface, the build now passes the same explicit product features that the Tauri shell and product CI lanes use, ensuring the test environment matches production behaviour.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
The CI workflow for Tauri coverage was missing the `--no-clean` flag, which caused the instrumented build to be discarded after each run. Adding this flag preserves the compiled artifacts, preventing unnecessary rebuilds and reducing the risk of timeouts or memory exhaustion during the coverage step.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
The LLVM profile file path was changed from using GITHUB_WORKSPACE to PWD because container jobs mount the checkout at a different path than the host workspace variable, causing instrumented test processes to fail when trying to create raw profile files.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
…g to llvm-cov target

The CI job for Tauri shell coverage was failing on hosted container runners because LLVM's profile writer could not create raw profiles on the workspace bind mount. Raw profiles are now written to the container's local temporary directory first, then moved into llvm-cov's target directory before generating the final report.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
senamakel and others added 16 commits August 11, 2026 07:56
The `--no-clean` flag was removed from the `cargo llvm-cov` command in the CI workflow to ensure a clean build environment for code coverage runs, preventing potential issues from stale build artifacts.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Refactor the `json_rpc_meet_agent_session_lifecycle` test to use the common `run_json_rpc_e2e_on_agent_stack` helper instead of being a standalone tokio test, ensuring consistent test setup and teardown across the e2e suite.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
The backend OAuth client no longer needs to block webhook routes locally because the SDK's generated route gate already rejects those requests. The test is updated to only verify admin route exclusions.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Two end-to-end tests that previously unset the `OPENHUMAN_WORKSPACE` environment variable now explicitly set it to the fixture's user directory. This prevents a race condition where a prior test's server, still winding down, could leave its own temporary workspace as the process-wide active-user marker, causing the config resolver to select a stale model profile.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
… in two tests

Two end-to-end tests were pinning the workspace to a specific user fixture via OPENHUMAN_WORKSPACE, but the same effect is now achieved by unsetting the variable and letting the config resolver fall back to the HOME-derived default, removing the need for the fixture path and the associated explanatory comments.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
…tests

Two end-to-end tests that previously unset the OPENHUMAN_WORKSPACE variable now set it to a dedicated user fixture under the test home directory. This prevents a race condition where a lingering active-user marker from a previous test could cause the router to pick the wrong workspace.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
The two end-to-end tests for routing and custom provider scenarios were both using the generic "e2e-user" identifier, which could cause test interference when run in parallel. Each test now uses a unique user name that reflects its purpose, making the tests independent and the logs easier to interpret.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
The master model hint is now only computed when `config.default_model` is absent, preventing an unnecessary hint from being generated when a default model is already configured. This avoids overriding the explicit default with a hint derived from the target definition.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Reformatted the `master_model_hint` computation to use a single chain of `.then()` and `.flatten()` calls instead of a nested closure with an outer `.flatten()`. This improves readability without changing any behavior. Also reformatted long method chains in the test file for consistency.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
The webhook tunnel flow test now expects backend tunnel CRUD to be exposed through OpenHuman, reflecting a policy change that makes the surface available. The scheduler test assertion is updated so that an explicit profile model selection overrides the built-in agent hint, matching the corrected behaviour.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
…s in proposal save failure test

Replace the canvas node count assertion that was subject to race conditions from remount timing with direct assertions on the updateFlow mock. The test now verifies that the proposed graph is handed to the save function before being rethrown, which is the actual contract that keeps the proposal available for retry, rather than depending on the rendered node count which can settle asynchronously.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
The profile directory path was changed from a fallback that could use `RUNNER_TEMP` to a fixed `/tmp` path, because the workspace bind mount in hosted container jobs can silently fail LLVM's profile writer when using the temporary directory.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
The lcov-tauri.info file was added to the repository as an untracked file, likely to include code coverage data for the Tauri application.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
…ile (`lcov-tauri.info`). This i

chore: remove lcov-tauri.info coverage file
Remove the generated lcov coverage report file that was tracked in the
repository. This file is an artifact of test coverage collection and
should not be version controlled as it is regenerated on each test run.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
…followup

# Conflicts:
#	scripts/kernel-floor.limits
#	src/openhuman/memory/diff/mod.rs
@senamakel
senamakel marked this pull request as ready for review August 11, 2026 08:35
@senamakel
senamakel requested a review from a team August 11, 2026 08:35
@senamakel
senamakel merged commit 4748cdd into tinyhumansai:main Aug 11, 2026
17 of 19 checks passed
@coderabbitai coderabbitai Bot added bug memory Memory store, memory tree, recall, summarization, and embeddings in src/openhuman/memory/. priority: p1 Next. Wrong behaviour a user will hit, or a security weakness behind a condition. rust-core Core Rust runtime in src/: CLI, core_server, shared infrastructure. labels Aug 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug memory Memory store, memory tree, recall, summarization, and embeddings in src/openhuman/memory/. priority: p1 Next. Wrong behaviour a user will hit, or a security weakness behind a condition. 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