mirror of
https://github.com/tinyhumansai/openhuman.git
synced 2026-07-27 21:08:00 +00:00
## Summary - Extends `openhuman.test_reset` so E2E resets also wipe Memory Tree state via the existing `memory_tree_wipe_all` path. - Adds reset summary fields for memory-tree rows, content directories, and Composio sync-state rows so Appium logs show exactly what was cleared. - Adds a focused async unit test covering memory-tree content directory cleanup through the new reset helper. ## Problem - #1862 tracks that `openhuman.test_reset` only cleared auth/onboarding/cron state, while Memory Tree data could survive between specs in a shared Appium session. - That means memory-oriented specs can pass or fail based on chunks, wiki content, or sync cursors left by an earlier spec. ## Solution - Calls `read_rpc::wipe_all_rpc(&config)` from `test_support::rpc::reset` after cron cleanup and before config/auth clearing. - Surfaces `memory_tree_rows_deleted`, `memory_tree_dirs_removed`, and `memory_tree_sync_state_cleared` in `ResetSummary`, `reset_json`, and the controller schema. - Keeps this as a scoped #1862 slice; other domains listed in the issue can land as separate hook PRs. ## Submission Checklist - [x] Tests added or updated (happy path + at least one failure / edge case) per [Testing Strategy](../gitbooks/developing/testing-strategy.md#failure-path-requirement) — focused unit test covers Memory Tree content-dir cleanup; existing `wipe_all_rpc` owns table/sync-state failure behavior. - [x] **Diff coverage >= 80%** — new Rust test covers the new helper path; CI coverage gate is authoritative. - [x] Coverage matrix updated — N/A: E2E test-support reset plumbing, no product feature row added/removed. - [x] All affected feature IDs from the matrix are listed in the PR description under `## Related` — N/A: no feature matrix row. - [x] No new external network dependencies introduced (mock backend used per [Testing Strategy](../gitbooks/developing/testing-strategy.md#mock-policy)) - [x] Manual smoke checklist updated if this touches release-cut surfaces ([`docs/RELEASE-MANUAL-SMOKE.md`](../docs/RELEASE-MANUAL-SMOKE.md)) — N/A: test-support RPC only. - [x] Linked issue closed via `Closes #NNN` in the `## Related` section — N/A: scoped slice; references #1862 without closing the umbrella. ## Impact - E2E specs that call `resetApp(...)` now start without prior Memory Tree chunks, summary/wiki files, or sync cursors. - User runtime behavior is unchanged unless the E2E-only `openhuman.test_reset` controller is compiled/enabled. ## Related - Refs #1862 - Follow-up PR(s)/TODOs: add hook coverage for remaining #1862 domains: channels, skills, webview_accounts, threads, notifications, webhooks, cost, referral, composio. --- ## AI Authored PR Metadata (required for Codex/Linear PRs) ### Linear Issue - Key: N/A - URL: N/A ### Commit & Branch - Branch: `codex/1862-test-reset-memory-tree` - Commit SHA: `48630b40f69400d6a3c5e055e80c25486e3bba6d` ### Validation Run - [x] `pnpm --filter openhuman-app format:check` — N/A: no frontend files changed. - [x] `pnpm typecheck` — N/A: no TypeScript files changed. - [x] Focused tests: attempted `cargo test -p openhuman test_support::rpc::tests::wipe_memory_tree_removes_content_dirs_and_reports_summary --lib`. - [x] Rust fmt/check (if changed): `cargo fmt --all --check`; `git diff --check`. - [x] Tauri fmt/check (if changed): N/A: no Tauri shell files changed. ### Validation Blocked - `command:` `cargo test -p openhuman test_support::rpc::tests::wipe_memory_tree_removes_content_dirs_and_reports_summary --lib` - `error:` local Windows build fails before tests in `whisper-rs-sys` because `clang.dll` / `libclang.dll` is missing and `LIBCLANG_PATH` is unset. - `impact:` focused test did not execute locally; CI Linux/Windows runners with libclang are expected to compile and run it. ### Behavior Changes - Intended behavior change: E2E-only test reset now wipes Memory Tree state in addition to cron/auth/onboarding state. - User-visible effect: none in normal builds; E2E logs show memory-tree wipe counts. ### Parity Contract - Legacy behavior preserved: cron cleanup, auth clearing, onboarding reset, and active-user removal still run and still short-circuit on failure. - Guard/fallback/dispatch parity checks: Memory Tree wipe reuses the existing user-facing `wipe_all_rpc` implementation instead of adding a second deletion path. ### Duplicate / Superseded PR Handling - Duplicate PR(s): N/A - Canonical PR: this PR - Resolution (closed/superseded/updated): N/A <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Reset now clears memory-tree persistent data during fresh-install resets and reports rows deleted, directories removed, and sync-state entries cleared. * **Documentation** * Updated reset operation schema and outputs to include memory-tree cleanup fields. * **Tests** * Added a unit test verifying memory-tree wipe removes content directories and reports summary metrics. * **Bug Fixes** * Increased core startup readiness timeout to reduce startup failures. <!-- review_stack_entry_start --> [](https://app.coderabbit.ai/change-stack/tinyhumansai/openhuman/pull/2308?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack) <!-- review_stack_entry_end --> <!-- end of auto-generated comment: release notes by coderabbit.ai --> Co-authored-by: aqilaziz <gonzes7@gmail.com> Co-authored-by: Steven Enamakel <enamakel@tinyhumans.ai>
Tauri + React + Typescript
This template should help get you started developing with Tauri, React and Typescript in Vite.