docs: reorganize docs — archive outdated, create brainstorming folder
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled

- Create docs/brainstorming/ with 5 discussion records (Mar 16 - Apr 7)
- Archive ~30 outdated audit reports (V5-V11) to docs/archive/old-audits/
- Archive superseded analysis docs to docs/archive/old-analysis/
- Archive completed session plans to docs/archive/old-plans/
- Archive old test reports/validations to respective archive folders
- Remove empty directories left after moves
- Keep current docs: TRUTH.md, feature docs, deployment, knowledge-base, superpowers
This commit is contained in:
iven
2026-04-07 09:54:30 +08:00
parent 8e9fc54d92
commit 2e5f63be32
101 changed files with 1829 additions and 17 deletions

View File

@@ -0,0 +1,57 @@
# ZCLAW 上线前功能审计 — 基线测试结果
> **执行日期**: 2026-04-05 | **环境**: Windows 11, PostgreSQL + SaaS + Tauri 已启动
## 自动化测试基线
### cargo test --workspace
- **状态**: ⚠️ 部分完成
- **问题**: zclaw-saas.exe 被运行中的 SaaS 后端锁定,无法重新编译
- **解决方案**: 排除 zclaw-saas 重跑,结果待补充
- **cargo check**: ✅ 通过0 error仅 warnings
### desktop vitest (174/185 passed)
- **通过**: 174
- **失败**: 10
- **跳过**: 1
- **失败原因**: 全部在 `chatStore.test.ts`,因 ChatStore 4-sub-store 重构后测试未同步更新
- **失败测试**:
- `chatStore` > `createConversation` 相关 3 个
- `chatStore` > `sendMessage` 相关 4 个
- `chatStore` > `conversations` 相关 3 个
### admin-v2 vitest (36/71 passed)
- **通过**: 36
- **失败**: 35
- **失败分布**:
- authStore.test.ts: 6/8 failed (localStorage mock 问题)
- request.test.ts: 2/7 failed (Authorization header / 401 refresh)
- accountStore.test.ts: 多个 CRUD 测试失败
- 其他页面测试: relay, usage, prompt 等
## 环境验证
| 项目 | 状态 | 备注 |
|------|------|------|
| PostgreSQL | ✅ 运行中 | Docker 容器 |
| SaaS 后端 | ✅ 运行中 | 0.0.0.0:8080 |
| Tauri 桌面端 | ✅ 运行中 | http://localhost:1420/ |
| tauri-mcp | ✅ 连接正常 | 可查询/交互 |
| LLM Provider | ✅ 可用 | glm-4-flash (GLM) |
## 已知基线缺陷(非本轮引入)
1. **desktop chatStore 测试**: ChatStore 拆分为 4 个 sub-store 后测试未更新
2. **admin authStore 测试**: jsdom 环境下 localStorage API 兼容问题
3. **admin 多页面测试**: 依赖真实 API 端点vitest 环境无法访问
## T1 Hands 测试已完成
详见 [T1-hands/REPORT.md](../T1-hands/REPORT.md)
- 通过: 11/18 执行用例
- 健康度: 58 → 68 (+10)
- 新发现 P1: 2 个 (LLM 并发 + Browser Hand)

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,44 @@
warning: G:\ZClaw_openfang\desktop\src-tauri\Cargo.toml: Found `debug_assertions` in `target.'cfg(...)'.dependencies`. This value is not supported for selecting dependencies and will not work as expected. To learn more visit https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#platform-specific-dependencies
Blocking waiting for file lock on package cache
Blocking waiting for file lock on package cache
Blocking waiting for file lock on package cache
Blocking waiting for file lock on build directory
warning: unused import: `parse_pipeline_v2_yaml`
--> desktop\src-tauri\src\pipeline_commands\discovery.rs:9:5
|
9 | parse_pipeline_v2_yaml,
| ^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default
warning: unused import: `pipeline_v2_to_info`
--> desktop\src-tauri\src\pipeline_commands\discovery.rs:19:118
|
19 | use super::helpers::{get_pipelines_directory, scan_pipelines_with_paths, scan_pipelines_full_sync, pipeline_to_info, pipeline_v2_to_info};
| ^^^^^^^^^^^^^^^^^^^
warning: field `offset` is never read
--> desktop\src-tauri\src\memory\persistent.rs:126:9
|
118 | pub struct MemorySearchQuery {
| ----------------- field in this struct
...
126 | pub offset: Option<usize>,
| ^^^^^^
|
= note: `MemorySearchQuery` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
= note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default
warning: method `delete_classroom` is never used
--> desktop\src-tauri\src\classroom_commands\persist.rs:104:18
|
21 | impl ClassroomPersistence {
| ------------------------- method in this implementation
...
104 | pub async fn delete_classroom(&self, classroom_id: &str) -> Result<(), String> {
| ^^^^^^^^^^^^^^^^
warning: `desktop` (lib) generated 4 warnings (run `cargo fix --lib -p desktop` to apply 2 suggestions)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 5m 38s
warning: the following packages contain code that will be rejected by a future version of Rust: sqlx-postgres v0.7.4
note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 2`

View File

@@ -0,0 +1,781 @@
warning: G:\ZClaw_openfang\desktop\src-tauri\Cargo.toml: Found `debug_assertions` in `target.'cfg(...)'.dependencies`. This value is not supported for selecting dependencies and will not work as expected. To learn more visit https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#platform-specific-dependencies
Compiling sqlx-core v0.7.4
Compiling sqlx-postgres v0.7.4
Compiling sqlx-sqlite v0.7.4
Compiling sqlx-macros-core v0.7.4
Compiling sqlx-macros v0.7.4
Compiling sqlx v0.7.4
Compiling tokio-rustls v0.26.4
Compiling zclaw-growth v0.1.0 (G:\ZClaw_openfang\crates\zclaw-growth)
Compiling hyper-rustls v0.27.7
Compiling reqwest v0.12.28
Compiling zclaw-memory v0.1.0 (G:\ZClaw_openfang\crates\zclaw-memory)
Compiling zclaw-runtime v0.1.0 (G:\ZClaw_openfang\crates\zclaw-runtime)
Compiling zclaw-protocols v0.1.0 (G:\ZClaw_openfang\crates\zclaw-protocols)
Compiling tauri v2.10.3
Compiling zclaw-hands v0.1.0 (G:\ZClaw_openfang\crates\zclaw-hands)
Compiling interprocess v2.4.0
Compiling image v0.24.9
Compiling zclaw-kernel v0.1.0 (G:\ZClaw_openfang\crates\zclaw-kernel)
Compiling zclaw-pipeline v0.1.0 (G:\ZClaw_openfang\crates\zclaw-pipeline)
Compiling desktop v0.1.0 (G:\ZClaw_openfang\desktop\src-tauri)
Compiling tauri-plugin-opener v2.5.3
Compiling tauri-plugin-mcp v0.1.0 (https://github.com/P3GLEG/tauri-plugin-mcp?branch=main#ac709a71)
Compiling criterion v0.5.1
warning: unused import: `parse_pipeline_v2_yaml`
--> desktop\src-tauri\src\pipeline_commands\discovery.rs:9:5
|
9 | parse_pipeline_v2_yaml,
| ^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default
warning: unused import: `pipeline_v2_to_info`
--> desktop\src-tauri\src\pipeline_commands\discovery.rs:19:118
|
19 | use super::helpers::{get_pipelines_directory, scan_pipelines_with_paths, scan_pipelines_full_sync, pipeline_to_info, pipeline_v2_to_info};
| ^^^^^^^^^^^^^^^^^^^
warning: field `offset` is never read
--> desktop\src-tauri\src\memory\persistent.rs:126:9
|
118 | pub struct MemorySearchQuery {
| ----------------- field in this struct
...
126 | pub offset: Option<usize>,
| ^^^^^^
|
= note: `MemorySearchQuery` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
= note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default
warning: method `delete_classroom` is never used
--> desktop\src-tauri\src\classroom_commands\persist.rs:104:18
|
21 | impl ClassroomPersistence {
| ------------------------- method in this implementation
...
104 | pub async fn delete_classroom(&self, classroom_id: &str) -> Result<(), String> {
| ^^^^^^^^^^^^^^^^
warning: unused import: `zclaw_growth::MemoryType`
--> desktop\src-tauri\src\summarizer_adapter.rs:114:9
|
114 | use zclaw_growth::MemoryType;
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default
warning: unused import: `parse_pipeline_v2_yaml`
--> desktop\src-tauri\src\pipeline_commands\discovery.rs:9:5
|
9 | parse_pipeline_v2_yaml,
| ^^^^^^^^^^^^^^^^^^^^^^
warning: struct `DummyDriver` is never constructed
--> desktop\src-tauri\src\intelligence\extraction_adapter.rs:279:16
|
279 | struct DummyDriver;
| ^^^^^^^^^^^
warning: method `parse_response_test` is never used
--> desktop\src-tauri\src\intelligence\extraction_adapter.rs:281:16
|
280 | impl TauriExtractionDriver {
| -------------------------- method in this implementation
281 | fn parse_response_test(
| ^^^^^^^^^^^^^^^^^^^
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
--> desktop\src-tauri\src\intelligence\extraction_adapter.rs:280:9
|
276 | fn test_parse_empty_response() {
| ------------------------------ move the `impl` block outside of this function `test_parse_empty_response`
...
280 | impl TauriExtractionDriver {
| ^^^^^---------------------
| |
| `TauriExtractionDriver` is not local
|
= note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
= note: `#[warn(non_local_definitions)]` on by default
warning: `desktop` (lib test) generated 8 warnings (3 duplicates) (run `cargo fix --lib -p desktop --tests` to apply 2 suggestions)
warning: unused import: `compile_pattern`
--> crates\zclaw-pipeline\src\intent.rs:631:26
|
631 | use crate::trigger::{compile_pattern, compile_trigger, Trigger};
| ^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default
warning: `desktop` (lib) generated 4 warnings (run `cargo fix --lib -p desktop` to apply 2 suggestions)
warning: `zclaw-pipeline` (lib test) generated 1 warning (run `cargo fix --lib -p zclaw-pipeline --tests` to apply 1 suggestion)
warning: function `test_context` is never used
--> crates\zclaw-hands\src\hands\researcher.rs:583:8
|
583 | fn test_context() -> HandContext {
| ^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default
warning: `zclaw-hands` (lib test) generated 1 warning
Finished `test` profile [unoptimized + debuginfo] target(s) in 3m 33s
warning: the following packages contain code that will be rejected by a future version of Rust: sqlx-postgres v0.7.4
note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 2`
Running unittests src\lib.rs (target\debug\deps\desktop_lib-7e14a4a33859881e.exe)
running 36 tests
test intelligence::compactor::tests::test_estimate_tokens_chinese ... ok
test intelligence::compactor::tests::test_compaction_check ... ok
test intelligence::heartbeat::tests::test_parse_time ... ok
test intelligence::extraction_adapter::tests::test_parse_no_json_array ... ok
test intelligence::extraction_adapter::tests::test_parse_empty_response ... ok
test intelligence::reflection::tests::test_analyze_patterns ... ok
test intelligence::heartbeat::tests::test_default_config ... ok
test intelligence::compactor::tests::test_estimate_tokens_english ... ok
test intelligence::extraction_adapter::tests::test_parse_valid_json_response ... ok
test intelligence::extraction_adapter::tests::test_extraction_driver_not_configured_by_default ... ok
test intelligence::reflection::tests::test_should_reflect_initial ... ok
test intelligence::validation::tests::test_optional_identifier ... ok
test intelligence::validation::tests::test_invalid_identifiers ... ok
test intelligence::validation::tests::test_sanitize_for_logging ... ok
test intelligence::validation::tests::test_string_length_validation ... ok
test intelligence::validation::tests::test_valid_identifiers ... ok
test llm::tests::test_llm_client_creation ... ok
test llm::tests::test_provider_configs ... ok
test memory::context_builder::tests::test_estimate_tokens ... ok
test memory::persistent::tests::test_generate_memory_id ... ok
test memory::extractor::tests::test_extraction_config_default ... ok
test memory::crypto::tests::test_derive_key ... ok
test memory::extractor::tests::test_uri_generation ... ok
test memory::crypto::tests::test_encrypt_decrypt ... ok
test memory::context_builder::tests::test_context_builder_config_default ... ok
test memory::context_builder::tests::test_extract_category ... ok
test summarizer_adapter::tests::test_summary_driver_configure_and_check ... ok
test viking_commands::tests::test_invalid_uri ... ok
test summarizer_adapter::tests::test_summary_driver_not_configured_by_default ... ok
test memory::crypto::tests::test_encrypt_produces_different_ciphertext ... ok
test viking_commands::tests::test_parse_uri ... ok
test intelligence::identity::tests::test_get_identity_creates_default ... ok
test intelligence::identity::tests::test_update_user_profile ... ok
test intelligence::identity::tests::test_snapshots ... ok
test intelligence::identity::tests::test_proposal_flow ... ok
test intelligence::compactor::tests::test_generate_summary ... ok
test result: ok. 36 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.02s
Running unittests src\main.rs (target\debug\deps\desktop-c3cc535c9683aa3d.exe)
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running unittests src\lib.rs (target\debug\deps\zclaw_growth-0cc62226cc107d52.exe)
running 66 tests
test extractor::tests::test_prompts_available ... ok
test injector::tests::test_injector_empty_memories ... ok
test injector::tests::test_estimate_tokens ... ok
test injector::tests::test_minimal_context ... ok
test injector::tests::test_injector_with_preferences ... ok
test injector::tests::test_inject_compact ... ok
test injector::tests::test_injector_with_all_types ... ok
test injector::tests::test_format_selection ... ok
test injector::tests::test_inject_custom ... ok
test injector::tests::test_inject_json ... ok
test retrieval::query::tests::test_cjk_detection ... ok
test extractor::tests::test_extractor_creation ... ok
test retrieval::cache::tests::test_cache_miss ... ok
test retrieval::cache::tests::test_cache_stats ... ok
test retrieval::cache::tests::test_cache_eviction ... ok
test retrieval::cache::tests::test_cache_put_and_get ... ok
test retrieval::cache::tests::test_cache_remove ... ok
test retrieval::query::tests::test_extract_keywords ... ok
test retrieval::query::tests::test_chinese_keywords ... ok
test retrieval::semantic::tests::test_cosine_similarity ... ok
test extractor::tests::test_extract_memories ... ok
test retrieval::query::tests::test_classify_intent_code ... ok
test retrieval::cache::tests::test_get_hot_entries ... ok
test retrieval::query::tests::test_classify_intent_knowledge ... ok
test retrieval::cache::tests::test_cache_clear ... ok
test retrieval::query::tests::test_classify_intent_preference ... ok
test retrieval::query::tests::test_query_expansion ... ok
test retrieval::query::tests::test_generate_search_queries ... ok
test retrieval::semantic::tests::test_tf_computation ... ok
test retrieval::semantic::tests::test_stop_words_removal ... ok
test retrieval::semantic::tests::test_tokenize ... ok
test retrieval::semantic::tests::test_index_and_score ... ok
test retrieval::semantic::tests::test_stats ... ok
test retriever::tests::test_memory_type_scope ... ok
test retriever::tests::test_retrieval_config_default ... ok
test retriever::tests::test_retriever_creation ... ok
test summarizer::tests::test_abstract_prompt ... ok
test summarizer::tests::test_clean_summary ... ok
test summarizer::tests::test_generate_summaries ... ok
test summarizer::tests::test_overview_prompt ... ok
test summarizer::tests::test_generate_summaries_handles_error ... ok
test tests::test_growth_config_default ... ok
test tests::test_memory_type_reexport ... ok
test types::tests::test_estimated_tokens ... ok
test types::tests::test_memory_entry_creation ... ok
test types::tests::test_memory_entry_touch ... ok
test tracker::tests::test_agent_metadata_serialization ... ok
test tracker::tests::test_learning_event_serialization ... ok
test types::tests::test_memory_type_display ... ok
test types::tests::test_retrieval_config_default ... ok
test types::tests::test_retrieval_config_with_budget ... ok
test types::tests::test_retrieval_result ... ok
test types::tests::test_uri_builder ... ok
test types::tests::test_uri_parser ... ok
test viking_adapter::tests::test_in_memory_storage_delete ... ok
test viking_adapter::tests::test_metadata_storage ... ok
test viking_adapter::tests::test_viking_adapter_typed_metadata ... ok
test viking_adapter::tests::test_in_memory_storage_store_and_get ... ok
test viking_adapter::tests::test_viking_level_display ... ok
test viking_adapter::tests::test_in_memory_storage_find ... ok
test storage::sqlite::tests::test_metadata_storage ... ok
test storage::sqlite::tests::test_sqlite_storage_store_and_get ... ok
test storage::sqlite::tests::test_sqlite_storage_delete ... ok
test storage::sqlite::tests::test_access_count ... ok
test storage::sqlite::tests::test_sqlite_storage_semantic_search ... ok
test storage::sqlite::tests::test_persistence ... ok
test result: ok. 66 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.07s
Running tests\integration_test.rs (target\debug\deps\integration_test-4b889886bf0ebf9e.exe)
running 9 tests
test test_prompt_injection_token_budget ... ok
test test_metadata_operations ... ok
test test_chinese_text_handling ... ok
test test_memory_deletion ... ok
test test_semantic_search_ranking ... ok
test test_find_by_prefix ... ok
test test_agent_isolation ... ok
test test_importance_and_access ... ok
test test_memory_lifecycle ... ok
test result: ok. 9 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.04s
Running unittests src\lib.rs (target\debug\deps\zclaw_hands-ddb5fe00a71de8d9.exe)
running 155 tests
test hands::browser::tests::test_browser_config ... ok
test hands::browser::tests::test_form_field_deserialize ... ok
test hands::clip::tests::test_action_check_ffmpeg ... ok
test hands::browser::tests::test_action_deserialize_screenshot ... ok
test hands::browser::tests::test_action_deserialize_type ... ok
test hands::clip::tests::test_action_info ... ok
test hands::clip::tests::test_action_invalid ... ok
test hands::browser::tests::test_action_deserialize_navigate ... ok
test hands::clip::tests::test_action_convert ... ok
test hands::clip::tests::test_action_resize ... ok
test hands::browser::tests::test_action_deserialize_click ... ok
test hands::clip::tests::test_action_thumbnail ... ok
test hands::clip::tests::test_action_concat ... ok
test hands::browser::tests::test_action_deserialize_scrape ... ok
test hands::clip::tests::test_action_trim ... ok
test hands::clip::tests::test_concat_config_deserialize ... ok
test hands::browser::tests::test_all_major_actions_roundtrip ... ok
test hands::clip::tests::test_convert_config_defaults ... ok
test hands::browser::tests::test_browser_config_needs_approval ... ok
test hands::clip::tests::test_convert_config_deserialize ... ok
test hands::browser::tests::test_browser_sequence_builder ... ok
test hands::browser::tests::test_browser_sequence_multiple_steps ... ok
test hands::clip::tests::test_default_impl ... ok
test hands::clip::tests::test_info_action_roundtrip ... ok
test hands::clip::tests::test_hand_config ... ok
test hands::clip::tests::test_resolution_custom ... ok
test hands::clip::tests::test_resolution_default ... ok
test hands::clip::tests::test_resolution_presets ... ok
test hands::clip::tests::test_needs_approval ... ok
test hands::clip::tests::test_execute_invalid_action ... ok
test hands::clip::tests::test_resolution_serialize ... ok
test hands::clip::tests::test_thumbnail_config_defaults ... ok
test hands::clip::tests::test_thumbnail_config_deserialize ... ok
test hands::clip::tests::test_trim_action_roundtrip ... ok
test hands::clip::tests::test_trim_config_deserialize ... ok
test hands::clip::tests::test_trim_config_minimal ... ok
test hands::clip::tests::test_video_format_deserialize ... ok
test hands::clip::tests::test_video_format_default ... ok
test hands::clip::tests::test_video_info_deserialize ... ok
test hands::clip::tests::test_video_format_serialize ... ok
test hands::collector::tests::test_collection_target_deserialize ... ok
test hands::collector::tests::test_collector_action_deserialize ... ok
test hands::collector::tests::test_collector_config ... ok
test hands::collector::tests::test_aggregate_action_empty_urls ... ok
test hands::collector::tests::test_extract_visible_text_empty ... ok
test hands::researcher::tests::test_action_fetch_deserialize ... ok
test hands::collector::tests::test_extract_visible_text_basic ... ok
test hands::collector::tests::test_extract_visible_text_strips_scripts ... ok
test hands::researcher::tests::test_action_invalid_rejected ... ok
test hands::collector::tests::test_extract_visible_text_strips_styles ... ok
test hands::quiz::tests::test_quiz_creation ... ok
test hands::quiz::tests::test_export_markdown ... ok
test hands::collector::tests::test_output_format_serialize ... ok
test hands::quiz::tests::test_submit_and_grade ... ok
test hands::quiz::tests::test_generate_quiz ... ok
test hands::researcher::tests::test_action_search_deserialize ... ok
test hands::researcher::tests::test_action_report_deserialize ... ok
test hands::quiz::tests::test_show_question ... ok
test hands::researcher::tests::test_config_id ... ok
test hands::researcher::tests::test_check_dependencies_ok ... ok
test hands::researcher::tests::test_extract_text_empty_body ... ok
test hands::researcher::tests::test_extract_text_basic ... ok
test hands::researcher::tests::test_extract_text_strips_scripts ... ok
test hands::researcher::tests::test_extract_text_strips_styles ... ok
test hands::researcher::tests::test_research_depth_default_is_standard ... ok
test hands::clip::tests::test_check_dependencies ... ok
test hands::researcher::tests::test_research_depth_deserialize ... ok
test hands::researcher::tests::test_research_depth_serialize ... ok
test hands::researcher::tests::test_research_query_defaults ... ok
test hands::researcher::tests::test_needs_approval_is_false ... ok
test hands::researcher::tests::test_research_report_summary_is_some_when_results ... ok
test hands::researcher::tests::test_search_engine_default_is_auto ... ok
test hands::researcher::tests::test_search_engine_serialize_roundtrip ... ok
test hands::clip::tests::test_execute_check_ffmpeg ... ok
test hands::researcher::tests::test_search_result_serialization ... ok
test hands::researcher::tests::test_url_encode_ascii ... ok
test hands::researcher::tests::test_extract_text_truncates_long_content ... ok
test hands::researcher::tests::test_url_encode_chinese ... ok
test hands::researcher::tests::test_url_encode_empty ... ok
test hands::clip::tests::test_status ... ok
test hands::researcher::tests::test_url_encode_safe_chars ... ok
test hands::researcher::tests::test_status_is_idle ... ok
test hands::slideshow::tests::test_add_slide ... ok
test hands::slideshow::tests::test_content_block_code ... ok
test hands::slideshow::tests::test_autoplay_default_interval ... ok
test hands::slideshow::tests::test_autoplay_pause_resume ... ok
test hands::slideshow::tests::test_content_block_list ... ok
test hands::slideshow::tests::test_content_block_table ... ok
test hands::slideshow::tests::test_default_impl ... ok
test hands::slideshow::tests::test_default_state ... ok
test hands::slideshow::tests::test_content_block_text ... ok
test hands::slideshow::tests::test_deserialize_autoplay ... ok
test hands::slideshow::tests::test_deserialize_goto_slide ... ok
test hands::slideshow::tests::test_deserialize_laser ... ok
test hands::slideshow::tests::test_deserialize_next_slide ... ok
test hands::slideshow::tests::test_deserialize_invalid_action ... ok
test hands::slideshow::tests::test_goto_slide_out_of_range ... ok
test hands::slideshow::tests::test_get_state ... ok
test hands::slideshow::tests::test_goto_slide_returns_content ... ok
test hands::slideshow::tests::test_hand_execute_dispatch ... ok
test hands::slideshow::tests::test_hand_execute_invalid_action ... ok
test hands::slideshow::tests::test_highlight_custom_color ... ok
test hands::slideshow::tests::test_highlight_default_color ... ok
test hands::slideshow::tests::test_needs_approval ... ok
test hands::slideshow::tests::test_laser ... ok
test hands::slideshow::tests::test_navigation ... ok
test hands::slideshow::tests::test_next_slide_at_end ... ok
test hands::slideshow::tests::test_play_animation ... ok
test hands::slideshow::tests::test_prev_slide_at_beginning ... ok
test hands::slideshow::tests::test_set_content_append ... ok
test hands::slideshow::tests::test_slideshow_creation ... ok
test hands::slideshow::tests::test_set_content_invalid_index ... ok
test hands::slideshow::tests::test_set_content ... ok
test hands::slideshow::tests::test_spotlight ... ok
test hands::slideshow::tests::test_spotlight_default_duration ... ok
test hands::speech::tests::test_speak ... ok
test hands::slideshow::tests::test_status ... ok
test hands::speech::tests::test_pause_resume ... ok
test hands::speech::tests::test_set_voice ... ok
test hands::speech::tests::test_list_voices ... ok
test hands::speech::tests::test_speech_creation ... ok
test hands::twitter::tests::test_check_credentials_action ... ok
test hands::twitter::tests::test_check_dependencies ... ok
test hands::twitter::tests::test_check_credentials_with_config ... ok
test hands::twitter::tests::test_default_impl ... ok
test hands::twitter::tests::test_delete_tweet_action ... ok
test hands::twitter::tests::test_check_credentials_without_config ... ok
test hands::twitter::tests::test_followers_action ... ok
test hands::twitter::tests::test_following_action_no_max ... ok
test hands::twitter::tests::test_get_tweet_action ... ok
test hands::twitter::tests::test_invalid_action ... ok
test hands::twitter::tests::test_get_user_action ... ok
test hands::twitter::tests::test_hand_config ... ok
test hands::twitter::tests::test_like_unlike_actions ... ok
test hands::twitter::tests::test_media_info_deserialize ... ok
test hands::twitter::tests::test_needs_approval ... ok
test hands::twitter::tests::test_retweet_unretweet_actions ... ok
test hands::twitter::tests::test_search_action_custom_max ... ok
test hands::twitter::tests::test_search_action_defaults ... ok
test hands::twitter::tests::test_search_action_roundtrip ... ok
test hands::twitter::tests::test_tweet_action_deserialize ... ok
test hands::twitter::tests::test_timeline_action_defaults ... ok
test hands::twitter::tests::test_tweet_action_roundtrip ... ok
test hands::twitter::tests::test_status ... ok
test hands::twitter::tests::test_set_and_get_credentials ... ok
test hands::twitter::tests::test_tweet_action_with_poll ... ok
test hands::twitter::tests::test_tweet_action_with_reply ... ok
test hands::twitter::tests::test_tweet_deserialize ... ok
test hands::twitter::tests::test_twitter_user_deserialize ... ok
test hands::whiteboard::tests::test_draw_shape ... ok
test hands::whiteboard::tests::test_chart ... ok
test hands::whiteboard::tests::test_undo_redo ... ok
test hands::whiteboard::tests::test_whiteboard_creation ... ok
test hands::whiteboard::tests::test_clear ... ok
test hands::whiteboard::tests::test_draw_text ... ok
test result: ok. 155 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.02s
Running unittests src\lib.rs (target\debug\deps\zclaw_kernel-2ce44e6daaebc1d9.exe)
running 48 tests
test config::tests::test_interpolate_env_vars_basic ... ok
test config::tests::test_interpolate_env_vars_missing ... ok
test config::tests::test_interpolate_env_vars_no_vars ... ok
test config::tests::test_interpolate_env_vars_multiple ... ok
test export::html::tests::test_format_duration ... ok
test export::html::tests::test_format_level ... ok
test export::html::tests::test_html_escape ... ok
test export::markdown::tests::test_capitalize_first ... ok
test export::markdown::tests::test_format_duration ... ok
test export::markdown::tests::test_slugify ... ok
test export::pptx::tests::test_pptx_format ... ok
test export::pptx::tests::test_xml_escape ... ok
test export::markdown::tests::test_markdown_export ... ok
test export::markdown::tests::test_include_notes ... ok
test export::html::tests::test_html_export ... ok
test export::tests::test_sanitize_filename ... ok
test generation::agents::tests::test_agent_role_display ... ok
test export::markdown::tests::test_include_answers ... ok
test export::markdown::tests::test_table_of_contents ... ok
test generation::agents::tests::test_default_request ... ok
test export::html::tests::test_include_notes ... ok
test generation::agents::tests::test_generate_chinese_profiles ... ok
test generation::chat::tests::test_agent_message ... ok
test generation::chat::tests::test_build_chat_prompt ... ok
test generation::agents::tests::test_generate_english_profiles ... ok
test generation::chat::tests::test_parse_chat_responses_fallback ... ok
test generation::chat::tests::test_parse_chat_responses_valid_json ... ok
test generation::chat::tests::test_user_message ... ok
test generation::tests::test_generation_stage_order ... ok
test generation::tests::test_teaching_style_default ... ok
test scheduler::tests::test_cron_field_exact ... ok
test scheduler::tests::test_cron_field_list ... ok
test generation::tests::test_scene_action_serialization ... ok
test scheduler::tests::test_cron_field_range ... ok
test scheduler::tests::test_cron_field_step ... ok
test generation::tests::test_pipeline_creation ... ok
test generation::tests::test_generate_outline ... ok
test scheduler::tests::test_cron_field_wildcard ... ok
test generation::tests::test_generate_agent_profiles ... ok
test generation::tests::test_generate_scenes ... ok
test scheduler::tests::test_should_fire_every_minute ... ok
test scheduler::tests::test_should_fire_cron_wildcard ... ok
test scheduler::tests::test_should_not_fire_cron ... ok
test skill_router::tests::test_extract_json_bare ... ok
test skill_router::tests::test_extract_json_code_block ... ok
test generation::tests::test_full_generation ... ok
test skill_router::tests::test_extract_json_with_surrounding_text ... ok
test export::pptx::tests::test_pptx_export ... ok
test result: ok. 48 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s
Running unittests src\lib.rs (target\debug\deps\zclaw_memory-909b7cff59274e48.exe)
running 25 tests
test fact::tests::test_fact_new_clamps_confidence ... ok
test fact::tests::test_fact_with_source ... ok
test fact::tests::test_is_empty_and_len ... ok
test fact::tests::test_filter_by_confidence ... ok
test fact::tests::test_deduplicate_keeps_higher_confidence ... ok
test store::tests::test_in_memory_store_creation ... ok
test store::tests::test_agent_with_empty_name ... ok
test store::tests::test_kv_recall_nonexistent ... ok
test store::tests::test_list_agents ... ok
test store::tests::test_load_nonexistent_agent ... ok
test store::tests::test_kv_store_and_recall ... ok
test store::tests::test_delete_agent ... ok
test store::tests::test_create_session ... ok
test store::tests::test_agent_with_special_characters_in_name ... ok
test store::tests::test_message_with_thinking ... ok
test store::tests::test_kv_list ... ok
test store::tests::test_append_and_get_messages ... ok
test store::tests::test_delete_nonexistent_agent_succeeds ... ok
test store::tests::test_kv_update_existing ... ok
test store::tests::test_large_message_content ... ok
test store::tests::test_message_ordering ... ok
test store::tests::test_save_agent_updates_existing ... ok
test store::tests::test_save_and_load_agent ... ok
test store::tests::test_message_with_tool_result ... ok
test store::tests::test_message_with_tool_use ... ok
test result: ok. 25 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.08s
Running unittests src\lib.rs (target\debug\deps\zclaw_pipeline-a7d8a9f8b74018ea.exe)
running 59 tests
test engine::stage::tests::test_stage_engine_creation ... ok
test parser::tests::test_parse_empty_steps ... ok
test parser::tests::test_parse_duplicate_step_ids ... ok
test parser::tests::test_parse_invalid_kind ... ok
test parser::tests::test_parse_invalid_version ... ok
test parser::tests::test_parse_valid_pipeline ... ok
test engine::context::tests::test_evaluate_condition_gt ... ok
test engine::context::tests::test_resolve_param ... ok
test engine::context::tests::test_resolve_stage_output ... ok
test engine::context::tests::test_resolve_loop_context ... ok
test executor::tests::test_evaluate_condition_bool ... ok
test engine::context::tests::test_evaluate_condition_equal ... ok
test executor::tests::test_evaluate_condition_equality ... ok
test engine::context::tests::test_resolve_mixed_string ... ok
test parser_v2::tests::test_parse_conditional_stage ... ok
test parser_v2::tests::test_parse_all_stage_types ... ok
test parser_v2::tests::test_parse_duplicate_stage_ids ... ok
test parser_v2::tests::test_parse_empty_stages ... ok
test parser_v2::tests::test_parse_invalid_kind ... ok
test parser_v2::tests::test_parse_invalid_version ... ok
test parser_v2::tests::test_parse_output_config ... ok
test presentation::analyzer::tests::test_analyze_document_fallback ... ok
test presentation::analyzer::tests::test_analyze_chart ... ok
test presentation::analyzer::tests::test_analyze_slideshow ... ok
test presentation::analyzer::tests::test_analyze_quiz ... ok
test parser_v2::tests::test_parse_parallel_stage ... ok
test presentation::analyzer::tests::test_can_render_as ... ok
test engine::context::tests::test_child_context ... ok
test parser_v2::tests::test_parse_valid_pipeline_v2 ... ok
test parser_v2::tests::test_parse_sequential_stage ... ok
test presentation::registry::tests::test_registry_defaults ... ok
test parser_v2::tests::test_try_parse_v2 ... ok
test presentation::registry::tests::test_all_available ... ok
test presentation::registry::tests::test_renderer_info ... ok
test presentation::registry::tests::test_get_export_formats ... ok
test intent::tests::test_decide_mode_form ... ok
test intent::tests::test_decide_mode_conversation ... ok
test presentation::types::tests::test_presentation_type_display ... ok
test presentation::types::tests::test_chart_data_deserialize ... ok
test intent::tests::test_route_keyword_match ... ok
test intent::tests::test_route_pattern_match ... ok
test presentation::types::tests::test_presentation_type_icon ... ok
test intent::tests::test_route_no_match ... ok
test presentation::types::tests::test_quiz_data_deserialize ... ok
test types_v2::tests::test_stage_id ... ok
test state::tests::test_extract_outputs ... ok
test state::tests::test_resolve_input ... ok
test state::tests::test_resolve_step_output ... ok
test state::tests::test_resolve_array_access ... ok
test trigger::tests::test_trigger_parser_quick_match ... ok
test types::tests::test_file_export_with_expression ... ok
test state::tests::test_resolve_loop_context ... ok
test types::tests::test_pipeline_deserialize ... ok
test trigger::tests::test_compile_pattern_wildcard ... ok
test trigger::tests::test_compile_pattern_mixed ... ok
test state::tests::test_resolve_mixed_string ... ok
test trigger::tests::test_compile_pattern_named_capture ... ok
test trigger::tests::test_trigger_param_extraction ... ok
test types_v2::tests::test_pipeline_v2_deserialize ... ok
test result: ok. 59 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.02s
Running unittests src\lib.rs (target\debug\deps\zclaw_protocols-914eb6f2e427bb85.exe)
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running unittests src\lib.rs (target\debug\deps\zclaw_runtime-7276ff690990eead.exe)
running 42 tests
test compaction::tests::test_compact_messages_under_threshold ... ok
test compaction::tests::test_estimate_messages_tokens ... ok
test compaction::tests::test_estimate_tokens_cjk ... ok
test compaction::tests::test_estimate_tokens_empty ... ok
test compaction::tests::test_extract_topic_long ... ok
test compaction::tests::test_estimate_tokens_english ... ok
test compaction::tests::test_extract_topic_sentence ... ok
test compaction::tests::test_extract_topic_short ... ok
test compaction::tests::test_compact_messages_over_threshold ... ok
test compaction::tests::test_compact_preserves_leading_system ... ok
test compaction::tests::test_generate_summary ... ok
test compaction::tests::test_maybe_compact_under_threshold ... ok
test tool::builtin::path_validator::tests::test_allows_with_explicit_allowed_paths ... ok
test tool::builtin::path_validator::tests::test_allows_with_workspace_root ... ok
test tool::builtin::path_validator::tests::test_default_deny_without_configuration ... ok
test tool::builtin::path_validator::tests::test_denies_outside_workspace ... ok
test tool::builtin::path_validator::tests::test_parse_size ... ok
test tool::builtin::path_validator::tests::test_path_traversal ... ok
test tool::builtin::path_validator::tests::test_blocked_paths ... ok
test growth::tests::test_growth_integration_creation ... ok
test growth::tests::test_disabled_growth ... ok
test growth::tests::test_process_conversation_disabled ... ok
test growth::tests::test_enhance_prompt_empty ... ok
test tool::builtin::shell_exec::tests::test_parse_command_complex ... ok
test tool::builtin::shell_exec::tests::test_parse_command_empty ... ok
test tool::builtin::shell_exec::tests::test_command_allowed ... ok
test tool::builtin::shell_exec::tests::test_parse_command_simple ... ok
test tool::builtin::shell_exec::tests::test_parse_command_with_quotes ... ok
test tool::builtin::shell_exec::tests::test_parse_command_with_single_quotes ... ok
test tool::builtin::shell_exec::tests::test_security_config_default ... ok
test tool::builtin::file_write::tests::test_write_new_file ... ok
test tool::builtin::file_write::tests::test_create_mode_fails_on_existing ... ok
test tool::builtin::path_validator::tests::test_expand_tilde ... ok
test tool::builtin::web_fetch::tests::test_validate_url_length ... ok
test tool::builtin::web_fetch::tests::test_validate_ipv6 ... ok
test tool::builtin::web_fetch::tests::test_validate_blocked_hostnames ... ok
test tool::builtin::web_fetch::tests::test_validate_cloud_metadata ... ok
test tool::builtin::web_fetch::tests::test_validate_localhost ... ok
test tool::builtin::web_fetch::tests::test_validate_scheme ... ok
test tool::builtin::web_fetch::tests::test_validate_private_ips ... ok
test tool::builtin::file_read::tests::test_read_file ... ok
test tool::builtin::file_write::tests::test_overwrite_mode ... ok
test result: ok. 42 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.02s
Running unittests src\lib.rs (target\debug\deps\zclaw_skills-9c40ca9299fa8d01.exe)
running 23 tests
test orchestration::planner::tests::test_plan_builder ... ok
test orchestration::auto_compose::tests::test_extract_types ... ok
test orchestration::executor::tests::test_node_result_success ... ok
test orchestration::types::tests::test_parse_input_ref ... ok
test orchestration::types::tests::test_parse_literal ... ok
test orchestration::types::tests::test_parse_node_output_ref ... ok
test orchestration::planner::tests::test_planner_plan ... ok
test orchestration::validation::tests::test_detect_no_cycle ... ok
test orchestration::validation::tests::test_find_end_nodes ... ok
test orchestration::validation::tests::test_find_start_nodes ... ok
test orchestration::validation::tests::test_identify_parallel_groups ... ok
test orchestration::validation::tests::test_detect_cycle ... ok
test orchestration::validation::tests::test_topological_sort ... ok
test semantic_router::tests::test_cosine_similarity ... ok
test semantic_router::tests::test_llm_fallback_invoked_when_below_threshold ... ok
test semantic_router::tests::test_no_llm_fallback_returns_best_match ... ok
test semantic_router::tests::test_no_llm_fallback_when_high_confidence ... ok
test semantic_router::tests::test_retrieve_candidates ... ok
test semantic_router::tests::test_basic_routing ... ok
test orchestration::context::tests::test_build_output ... ok
test orchestration::context::tests::test_resolve_node_output_ref ... ok
test orchestration::context::tests::test_resolve_input_ref ... ok
test orchestration::context::tests::test_evaluate_condition_equality ... ok
test result: ok. 23 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running unittests src\lib.rs (target\debug\deps\zclaw_types-0babceb0143df14c.exe)
running 57 tests
test error::tests::test_config_error_display ... ok
test error::tests::test_export_error_display ... ok
test error::tests::test_hand_error_display ... ok
test error::tests::test_invalid_input_display ... ok
test error::tests::test_loop_detected_display ... ok
test error::tests::test_mcp_error_display ... ok
test error::tests::test_internal_error_display ... ok
test error::tests::test_not_found_display ... ok
test error::tests::test_llm_error_display ... ok
test error::tests::test_permission_denied_display ... ok
test error::tests::test_rate_limited_display ... ok
test error::tests::test_tool_error_display ... ok
test hand_run::tests::test_hand_run_id_display ... ok
test error::tests::test_security_error_display ... ok
test error::tests::test_serialization_error_from_json ... ok
test error::tests::test_storage_error_display ... ok
test error::tests::test_timeout_display ... ok
test error::tests::test_result_type_err ... ok
test error::tests::test_result_type_ok ... ok
test hand_run::tests::test_hand_run_id_unique ... ok
test hand_run::tests::test_hand_run_id_from_str ... ok
test hand_run::tests::test_hand_run_serialization ... ok
test id::tests::test_agent_id_display ... ok
test hand_run::tests::test_hand_run_status_roundtrip ... ok
test id::tests::test_agent_id_default ... ok
test id::tests::test_agent_id_from_str_invalid ... ok
test id::tests::test_agent_id_from_str_valid ... ok
test id::tests::test_agent_id_new_creates_unique_ids ... ok
test id::tests::test_agent_id_serialization ... ok
test id::tests::test_run_id_display ... ok
test id::tests::test_run_id_default ... ok
test id::tests::test_run_id_new_creates_unique_ids ... ok
test id::tests::test_session_id_default ... ok
test id::tests::test_session_id_new_creates_unique_ids ... ok
test id::tests::test_skill_id_new ... ok
test id::tests::test_tool_id_display ... ok
test id::tests::test_tool_id_from_string ... ok
test id::tests::test_tool_id_from_str ... ok
test message::tests::test_content_block_image ... ok
test id::tests::test_tool_id_new ... ok
test message::tests::test_content_block_text ... ok
test message::tests::test_content_block_thinking ... ok
test message::tests::test_content_block_tool_result ... ok
test message::tests::test_content_block_tool_use ... ok
test message::tests::test_image_source_base64 ... ok
test message::tests::test_image_source_serialization ... ok
test message::tests::test_image_source_url ... ok
test message::tests::test_message_assistant_creation ... ok
test message::tests::test_message_assistant_with_thinking ... ok
test message::tests::test_message_deserialization_user ... ok
test message::tests::test_message_serialization_assistant ... ok
test message::tests::test_message_serialization_user ... ok
test message::tests::test_message_system_creation ... ok
test message::tests::test_message_tool_result_creation ... ok
test message::tests::test_message_tool_result_error ... ok
test message::tests::test_message_tool_use_creation ... ok
test message::tests::test_message_user_creation ... ok
test result: ok. 57 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests desktop_lib
running 2 tests
test desktop\src-tauri\src\intelligence\validation.rs - intelligence::validation::validate_identifier (line 112) ... ignored
test desktop\src-tauri\src\intelligence\validation.rs - intelligence::validation::validate_string_length (line 173) ... ignored
test result: ok. 0 passed; 0 failed; 2 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests zclaw_growth
running 1 test
test crates\zclaw-growth\src\lib.rs - (line 39) ... ignored
test result: ok. 0 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests zclaw_hands
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests zclaw_kernel
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests zclaw_memory
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests zclaw_pipeline
running 1 test
test crates\zclaw-pipeline\src\intent.rs - intent (line 21) ... ignored
test result: ok. 0 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests zclaw_protocols
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests zclaw_runtime
running 1 test
test crates\zclaw-runtime\src\tool\builtin\path_validator.rs - tool::builtin::path_validator (line 20) ... ignored
test result: ok. 0 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests zclaw_skills
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests zclaw_types
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

View File

@@ -0,0 +1,478 @@
[vite:react-babel] We recommend switching to `@vitejs/plugin-react-oxc` for improved performance. More information at https://vite.dev/rolldown
 RUN  v2.1.9 G:/ZClaw_openfang/desktop
stderr | tests/lib/request-helper.test.ts > request-helper > requestWithRetry > should retry on retryable status codes
[RequestHelper] Request failed (503), retrying in 11ms (attempt 1/2)
✓ tests/lib/crypto-utils.test.ts (10 tests) 69ms
stderr | tests/lib/request-helper.test.ts > request-helper > requestWithRetry > should throw after all retries exhausted
[RequestHelper] Request failed (503), retrying in 12ms (attempt 1/2)
stderr | tests/lib/request-helper.test.ts > request-helper > requestWithRetry > should throw after all retries exhausted
[RequestHelper] Request failed (503), retrying in 22ms (attempt 2/2)
stdout | tests/lib/request-helper.test.ts > request-helper > RequestManager > should cancel all requests
[RequestHelper] Cancelled request: test-1
[RequestHelper] Cancelled request: test-2
[RequestHelper] Cancelled request: test-3
✓ tests/lib/request-helper.test.ts (30 tests | 1 skipped) 101ms
stdout | tests/lib/security.test.ts > Security Utils > sanitizeJson > should return null for invalid JSON
[SecurityUtils] JSON sanitize parse failed {
error: SyntaxError: Unexpected token 'o', "not json" is not valid JSON
at JSON.parse (<anonymous>)
at Module.sanitizeJson (G:\ZClaw_openfang\desktop\src\lib\security-utils.ts:549:25)
at G:\ZClaw_openfang\desktop\tests\lib\security.test.ts:356:28
at file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/@vitest+runner@2.1.9/node_modules/@vitest/runner/dist/index.js:146:14
at file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/@vitest+runner@2.1.9/node_modules/@vitest/runner/dist/index.js:533:11
at runWithTimeout (file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/@vitest+runner@2.1.9/node_modules/@vitest/runner/dist/index.js:39:7)
at runTest (file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/@vitest+runner@2.1.9/node_modules/@vitest/runner/dist/index.js:1056:17)
 at processTicksAndRejections (node:internal/process/task_queues:104:5)
at runSuite (file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/@vitest+runner@2.1.9/node_modules/@vitest/runner/dist/index.js:1205:15)
at runSuite (file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/@vitest+runner@2.1.9/node_modules/@vitest/runner/dist/index.js:1205:15)
}
✓ tests/lib/security.test.ts (58 tests) 250ms
stderr | tests/toml-utils.test.ts > tomlUtils > parse > should throw TomlParseError on invalid TOML
[TOML] Parse error: TomlError: Invalid TOML document: incomplete key-value: cannot find end of key
2: [invalid
^
3: key = value
at parseKey (file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/smol-toml@1.6.1/node_modules/smol-toml/dist/struct.js:38:15)
at Object.parse (file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/smol-toml@1.6.1/node_modules/smol-toml/dist/parse.js:104:21)
at Object.parse (G:\ZClaw_openfang\desktop\src\lib\toml-utils.ts:61:19)
at G:\ZClaw_openfang\desktop\tests\toml-utils.test.ts:72:30
at Proxy.<anonymous> (file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/@vitest+expect@2.1.9/node_modules/@vitest/expect/dist/index.js:1530:11)
at Proxy.<anonymous> (file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/@vitest+expect@2.1.9/node_modules/@vitest/expect/dist/index.js:972:17)
at Proxy.methodWrapper (file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/chai@5.3.3/node_modules/chai/index.js:1686:25)
at G:\ZClaw_openfang\desktop\tests\toml-utils.test.ts:72:50
at file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/@vitest+runner@2.1.9/node_modules/@vitest/runner/dist/index.js:146:14
at file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/@vitest+runner@2.1.9/node_modules/@vitest/runner/dist/index.js:533:11 {
line: 2,
column: 2,
codeblock: '2: [invalid\n ^\n3: key = value\n'
}
stderr | tests/toml-utils.test.ts > tomlUtils > stringify > should throw TomlStringifyError on invalid data
[TOML] Stringify error: Error: Could not stringify the object: maximum object depth exceeded
at stringifyTable (file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/smol-toml@1.6.1/node_modules/smol-toml/dist/stringify.js:125:15)
at stringifyTable (file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/smol-toml@1.6.1/node_modules/smol-toml/dist/stringify.js:143:46)
at stringifyTable (file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/smol-toml@1.6.1/node_modules/smol-toml/dist/stringify.js:143:46)
at stringifyTable (file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/smol-toml@1.6.1/node_modules/smol-toml/dist/stringify.js:143:46)
at stringifyTable (file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/smol-toml@1.6.1/node_modules/smol-toml/dist/stringify.js:143:46)
at stringifyTable (file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/smol-toml@1.6.1/node_modules/smol-toml/dist/stringify.js:143:46)
at stringifyTable (file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/smol-toml@1.6.1/node_modules/smol-toml/dist/stringify.js:143:46)
at stringifyTable (file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/smol-toml@1.6.1/node_modules/smol-toml/dist/stringify.js:143:46)
at stringifyTable (file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/smol-toml@1.6.1/node_modules/smol-toml/dist/stringify.js:143:46)
at stringifyTable (file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/smol-toml@1.6.1/node_modules/smol-toml/dist/stringify.js:143:46)
stderr | tests/toml-utils.test.ts > tomlUtils > resolveEnvVars > should return empty string for missing env vars
[TOML] Environment variable MISSING_VAR not resolved - no envVars provided
✓ tests/toml-utils.test.ts (14 tests) 22ms
✓ tests/config-parser.test.ts (13 tests) 14ms
stderr | tests/lib/secure-storage.test.ts > secureStorage > error handling > should handle corrupted encrypted data gracefully
[SecureStorage] v2 decryption failed for key: corrupted-key
[SecureStorage] v1 decryption failed for key: corrupted-key
✓ tests/lib/secure-storage.test.ts (11 tests) 258ms
stderr | tests/store/chatStore.test.ts
[IDBStorage] Migration from localStorage failed: ReferenceError: indexedDB is not defined
at Module.openDB (file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/idb@8.0.3/node_modules/idb/build/index.js:168:21)
at getDB (G:\ZClaw_openfang\desktop\src\lib\idb-storage.ts:34:17)
at migrateFromLocalStorage (G:\ZClaw_openfang\desktop\src\lib\idb-storage.ts:56:22)
at Object.getItem (G:\ZClaw_openfang\desktop\src\lib\idb-storage.ts:98:15)
at Object.getItem (file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/zustand@5.0.12_@types+react_8b11772aea488cca440c1215797a0d95/node_modules/zustand/esm/middleware.mjs:292:33)
at file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/zustand@5.0.12_@types+react_8b11772aea488cca440c1215797a0d95/node_modules/zustand/esm/middleware.mjs:305:20
at hydrate (file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/zustand@5.0.12_@types+react_8b11772aea488cca440c1215797a0d95/node_modules/zustand/esm/middleware.mjs:388:53)
at file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/zustand@5.0.12_@types+react_8b11772aea488cca440c1215797a0d95/node_modules/zustand/esm/middleware.mjs:468:5
at createStoreImpl (file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/zustand@5.0.12_@types+react_8b11772aea488cca440c1215797a0d95/node_modules/zustand/esm/vanilla.mjs:19:32)
at createStore (file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/zustand@5.0.12_@types+react_8b11772aea488cca440c1215797a0d95/node_modules/zustand/esm/vanilla.mjs:22:53)
[IDBStorage] IndexedDB getItem failed: ReferenceError: indexedDB is not defined
at Module.openDB (file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/idb@8.0.3/node_modules/idb/build/index.js:168:21)
at getDB (G:\ZClaw_openfang\desktop\src\lib\idb-storage.ts:34:17)
at Object.getItem (G:\ZClaw_openfang\desktop\src\lib\idb-storage.ts:102:26)
 at processTicksAndRejections (node:internal/process/task_queues:104:5)
✓ tests/lib/gateway-security.test.ts (13 tests) 570ms
✓ WebSocket Security > SecurityError > should be throwable with a message 413ms
 tests/stabilization.test.ts (0 test)
stderr | tests/store/chatStore.test.ts > chatStore > setCurrentModel > should update current model
[IDBStorage] IndexedDB setItem failed: ReferenceError: indexedDB is not defined
at Module.openDB (file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/idb@8.0.3/node_modules/idb/build/index.js:168:21)
at getDB (G:\ZClaw_openfang\desktop\src\lib\idb-storage.ts:34:17)
at Object.setItem (G:\ZClaw_openfang\desktop\src\lib\idb-storage.ts:117:26)
at Object.setItem (file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/zustand@5.0.12_@types+react_8b11772aea488cca440c1215797a0d95/node_modules/zustand/esm/middleware.mjs:298:42)
at setItem (file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/zustand@5.0.12_@types+react_8b11772aea488cca440c1215797a0d95/node_modules/zustand/esm/middleware.mjs:358:20)
at file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/zustand@5.0.12_@types+react_8b11772aea488cca440c1215797a0d95/node_modules/zustand/esm/middleware.mjs:371:14
at Object.setCurrentModel (G:\ZClaw_openfang\desktop\src\store\chat\conversationStore.ts:324:39)
at setCurrentModel (G:\ZClaw_openfang\desktop\src\store\chatStore.ts:154:37)
at G:\ZClaw_openfang\desktop\tests\store\chatStore.test.ts:269:7
at file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/@vitest+runner@2.1.9/node_modules/@vitest/runner/dist/index.js:146:14
stderr | tests/store/chatStore.test.ts > chatStore > newConversation > should clear messages and reset session
[IDBStorage] IndexedDB setItem failed: ReferenceError: indexedDB is not defined
at Module.openDB (file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/idb@8.0.3/node_modules/idb/build/index.js:168:21)
at getDB (G:\ZClaw_openfang\desktop\src\lib\idb-storage.ts:34:17)
at Object.setItem (G:\ZClaw_openfang\desktop\src\lib\idb-storage.ts:117:26)
at Object.setItem (file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/zustand@5.0.12_@types+react_8b11772aea488cca440c1215797a0d95/node_modules/zustand/esm/middleware.mjs:298:42)
at setItem (file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/zustand@5.0.12_@types+react_8b11772aea488cca440c1215797a0d95/node_modules/zustand/esm/middleware.mjs:358:20)
at file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/zustand@5.0.12_@types+react_8b11772aea488cca440c1215797a0d95/node_modules/zustand/esm/middleware.mjs:371:14
at Object.newConversation (G:\ZClaw_openfang\desktop\src\store\chat\conversationStore.ts:203:5)
at newConversation (G:\ZClaw_openfang\desktop\src\store\chatStore.ts:159:37)
at G:\ZClaw_openfang\desktop\tests\store\chatStore.test.ts:289:7
at file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/@vitest+runner@2.1.9/node_modules/@vitest/runner/dist/index.js:146:14
stderr | tests/store/chatStore.test.ts > chatStore > newConversation > should save current messages to conversations before clearing
[IDBStorage] IndexedDB setItem failed: ReferenceError: indexedDB is not defined
at Module.openDB (file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/idb@8.0.3/node_modules/idb/build/index.js:168:21)
at getDB (G:\ZClaw_openfang\desktop\src\lib\idb-storage.ts:34:17)
at Object.setItem (G:\ZClaw_openfang\desktop\src\lib\idb-storage.ts:117:26)
at Object.setItem (file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/zustand@5.0.12_@types+react_8b11772aea488cca440c1215797a0d95/node_modules/zustand/esm/middleware.mjs:298:42)
at setItem (file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/zustand@5.0.12_@types+react_8b11772aea488cca440c1215797a0d95/node_modules/zustand/esm/middleware.mjs:358:20)
at file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/zustand@5.0.12_@types+react_8b11772aea488cca440c1215797a0d95/node_modules/zustand/esm/middleware.mjs:371:14
at Object.newConversation (G:\ZClaw_openfang\desktop\src\store\chat\conversationStore.ts:203:5)
at newConversation (G:\ZClaw_openfang\desktop\src\store\chatStore.ts:159:37)
at G:\ZClaw_openfang\desktop\tests\store\chatStore.test.ts:308:7
at file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/@vitest+runner@2.1.9/node_modules/@vitest/runner/dist/index.js:146:14
stderr | tests/store/chatStore.test.ts > chatStore > switchConversation > should switch to existing conversation
[IDBStorage] IndexedDB setItem failed: ReferenceError: indexedDB is not defined
at Module.openDB (file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/idb@8.0.3/node_modules/idb/build/index.js:168:21)
at getDB (G:\ZClaw_openfang\desktop\src\lib\idb-storage.ts:34:17)
at Object.setItem (G:\ZClaw_openfang\desktop\src\lib\idb-storage.ts:117:26)
at Object.setItem (file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/zustand@5.0.12_@types+react_8b11772aea488cca440c1215797a0d95/node_modules/zustand/esm/middleware.mjs:298:42)
at setItem (file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/zustand@5.0.12_@types+react_8b11772aea488cca440c1215797a0d95/node_modules/zustand/esm/middleware.mjs:358:20)
at file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/zustand@5.0.12_@types+react_8b11772aea488cca440c1215797a0d95/node_modules/zustand/esm/middleware.mjs:371:14
at Object.newConversation (G:\ZClaw_openfang\desktop\src\store\chat\conversationStore.ts:203:5)
at newConversation (G:\ZClaw_openfang\desktop\src\store\chatStore.ts:159:37)
at G:\ZClaw_openfang\desktop\tests\store\chatStore.test.ts:328:7
at file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/@vitest+runner@2.1.9/node_modules/@vitest/runner/dist/index.js:146:14
stderr | tests/store/chatStore.test.ts > chatStore > deleteConversation > should delete conversation by id
[IDBStorage] IndexedDB setItem failed: ReferenceError: indexedDB is not defined
at Module.openDB (file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/idb@8.0.3/node_modules/idb/build/index.js:168:21)
at getDB (G:\ZClaw_openfang\desktop\src\lib\idb-storage.ts:34:17)
at Object.setItem (G:\ZClaw_openfang\desktop\src\lib\idb-storage.ts:117:26)
at Object.setItem (file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/zustand@5.0.12_@types+react_8b11772aea488cca440c1215797a0d95/node_modules/zustand/esm/middleware.mjs:298:42)
at setItem (file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/zustand@5.0.12_@types+react_8b11772aea488cca440c1215797a0d95/node_modules/zustand/esm/middleware.mjs:358:20)
at file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/zustand@5.0.12_@types+react_8b11772aea488cca440c1215797a0d95/node_modules/zustand/esm/middleware.mjs:371:14
at Object.newConversation (G:\ZClaw_openfang\desktop\src\store\chat\conversationStore.ts:203:5)
at newConversation (G:\ZClaw_openfang\desktop\src\store\chatStore.ts:159:37)
at G:\ZClaw_openfang\desktop\tests\store\chatStore.test.ts:360:7
at file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/@vitest+runner@2.1.9/node_modules/@vitest/runner/dist/index.js:146:14
stderr | tests/store/chatStore.test.ts > chatStore > deleteConversation > should clear messages if deleting current conversation
[IDBStorage] IndexedDB setItem failed: ReferenceError: indexedDB is not defined
at Module.openDB (file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/idb@8.0.3/node_modules/idb/build/index.js:168:21)
at getDB (G:\ZClaw_openfang\desktop\src\lib\idb-storage.ts:34:17)
at Object.setItem (G:\ZClaw_openfang\desktop\src\lib\idb-storage.ts:117:26)
at Object.setItem (file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/zustand@5.0.12_@types+react_8b11772aea488cca440c1215797a0d95/node_modules/zustand/esm/middleware.mjs:298:42)
at setItem (file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/zustand@5.0.12_@types+react_8b11772aea488cca440c1215797a0d95/node_modules/zustand/esm/middleware.mjs:358:20)
at file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/zustand@5.0.12_@types+react_8b11772aea488cca440c1215797a0d95/node_modules/zustand/esm/middleware.mjs:371:14
at Object.deleteConversation (G:\ZClaw_openfang\desktop\src\store\chat\conversationStore.ts:244:7)
at deleteConversation (G:\ZClaw_openfang\desktop\src\store\chatStore.ts:173:30)
at G:\ZClaw_openfang\desktop\tests\store\chatStore.test.ts:397:7
at file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/@vitest+runner@2.1.9/node_modules/@vitest/runner/dist/index.js:146:14
stderr | tests/store/chatStore.test.ts > chatStore > setCurrentAgent > should update current agent
[IDBStorage] IndexedDB setItem failed: ReferenceError: indexedDB is not defined
at Module.openDB (file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/idb@8.0.3/node_modules/idb/build/index.js:168:21)
at getDB (G:\ZClaw_openfang\desktop\src\lib\idb-storage.ts:34:17)
at Object.setItem (G:\ZClaw_openfang\desktop\src\lib\idb-storage.ts:117:26)
at Object.setItem (file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/zustand@5.0.12_@types+react_8b11772aea488cca440c1215797a0d95/node_modules/zustand/esm/middleware.mjs:298:42)
at setItem (file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/zustand@5.0.12_@types+react_8b11772aea488cca440c1215797a0d95/node_modules/zustand/esm/middleware.mjs:358:20)
at file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/zustand@5.0.12_@types+react_8b11772aea488cca440c1215797a0d95/node_modules/zustand/esm/middleware.mjs:371:14
at Object.setCurrentAgent (G:\ZClaw_openfang\desktop\src\store\chat\conversationStore.ts:289:5)
at setCurrentAgent (G:\ZClaw_openfang\desktop\src\store\chatStore.ts:133:52)
at G:\ZClaw_openfang\desktop\tests\store\chatStore.test.ts:418:7
at file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/@vitest+runner@2.1.9/node_modules/@vitest/runner/dist/index.js:146:14
stderr | tests/store/chatStore.test.ts > chatStore > setCurrentAgent > should save current conversation when switching agents
[IDBStorage] IndexedDB setItem failed: ReferenceError: indexedDB is not defined
at Module.openDB (file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/idb@8.0.3/node_modules/idb/build/index.js:168:21)
at getDB (G:\ZClaw_openfang\desktop\src\lib\idb-storage.ts:34:17)
at Object.setItem (G:\ZClaw_openfang\desktop\src\lib\idb-storage.ts:117:26)
at Object.setItem (file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/zustand@5.0.12_@types+react_8b11772aea488cca440c1215797a0d95/node_modules/zustand/esm/middleware.mjs:298:42)
at setItem (file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/zustand@5.0.12_@types+react_8b11772aea488cca440c1215797a0d95/node_modules/zustand/esm/middleware.mjs:358:20)
at file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/zustand@5.0.12_@types+react_8b11772aea488cca440c1215797a0d95/node_modules/zustand/esm/middleware.mjs:371:14
at Object.setCurrentAgent (G:\ZClaw_openfang\desktop\src\store\chat\conversationStore.ts:252:7)
at setCurrentAgent (G:\ZClaw_openfang\desktop\src\store\chatStore.ts:133:52)
at G:\ZClaw_openfang\desktop\tests\store\chatStore.test.ts:444:7
at file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/@vitest+runner@2.1.9/node_modules/@vitest/runner/dist/index.js:146:14
stderr | tests/store/chatStore.test.ts > chatStore > syncAgents > should sync agents from profiles
[IDBStorage] IndexedDB setItem failed: ReferenceError: indexedDB is not defined
at Module.openDB (file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/idb@8.0.3/node_modules/idb/build/index.js:168:21)
at getDB (G:\ZClaw_openfang\desktop\src\lib\idb-storage.ts:34:17)
at Object.setItem (G:\ZClaw_openfang\desktop\src\lib\idb-storage.ts:117:26)
at Object.setItem (file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/zustand@5.0.12_@types+react_8b11772aea488cca440c1215797a0d95/node_modules/zustand/esm/middleware.mjs:298:42)
at setItem (file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/zustand@5.0.12_@types+react_8b11772aea488cca440c1215797a0d95/node_modules/zustand/esm/middleware.mjs:358:20)
at file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/zustand@5.0.12_@types+react_8b11772aea488cca440c1215797a0d95/node_modules/zustand/esm/middleware.mjs:371:14
at Object.syncAgents (G:\ZClaw_openfang\desktop\src\store\chat\conversationStore.ts:320:5)
at syncAgents (G:\ZClaw_openfang\desktop\src\store\chatStore.ts:141:37)
at G:\ZClaw_openfang\desktop\tests\store\chatStore.test.ts:455:7
at file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/@vitest+runner@2.1.9/node_modules/@vitest/runner/dist/index.js:146:14
stderr | tests/store/chatStore.test.ts > chatStore > syncAgents > should use default agent when no profiles provided
[IDBStorage] IndexedDB setItem failed: ReferenceError: indexedDB is not defined
at Module.openDB (file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/idb@8.0.3/node_modules/idb/build/index.js:168:21)
at getDB (G:\ZClaw_openfang\desktop\src\lib\idb-storage.ts:34:17)
at Object.setItem (G:\ZClaw_openfang\desktop\src\lib\idb-storage.ts:117:26)
at Object.setItem (file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/zustand@5.0.12_@types+react_8b11772aea488cca440c1215797a0d95/node_modules/zustand/esm/middleware.mjs:298:42)
at setItem (file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/zustand@5.0.12_@types+react_8b11772aea488cca440c1215797a0d95/node_modules/zustand/esm/middleware.mjs:358:20)
at file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/zustand@5.0.12_@types+react_8b11772aea488cca440c1215797a0d95/node_modules/zustand/esm/middleware.mjs:371:14
at Object.syncAgents (G:\ZClaw_openfang\desktop\src\store\chat\conversationStore.ts:320:5)
at syncAgents (G:\ZClaw_openfang\desktop\src\store\chatStore.ts:141:37)
at G:\ZClaw_openfang\desktop\tests\store\chatStore.test.ts:469:7
at file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/@vitest+runner@2.1.9/node_modules/@vitest/runner/dist/index.js:146:14
stderr | tests/store/chatStore.test.ts > chatStore > conversation persistence > should derive title from first user message
[IDBStorage] IndexedDB setItem failed: ReferenceError: indexedDB is not defined
at Module.openDB (file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/idb@8.0.3/node_modules/idb/build/index.js:168:21)
at getDB (G:\ZClaw_openfang\desktop\src\lib\idb-storage.ts:34:17)
at Object.setItem (G:\ZClaw_openfang\desktop\src\lib\idb-storage.ts:117:26)
at Object.setItem (file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/zustand@5.0.12_@types+react_8b11772aea488cca440c1215797a0d95/node_modules/zustand/esm/middleware.mjs:298:42)
at setItem (file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/zustand@5.0.12_@types+react_8b11772aea488cca440c1215797a0d95/node_modules/zustand/esm/middleware.mjs:358:20)
at file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/zustand@5.0.12_@types+react_8b11772aea488cca440c1215797a0d95/node_modules/zustand/esm/middleware.mjs:371:14
at Object.newConversation (G:\ZClaw_openfang\desktop\src\store\chat\conversationStore.ts:203:5)
at newConversation (G:\ZClaw_openfang\desktop\src\store\chatStore.ts:159:37)
at G:\ZClaw_openfang\desktop\tests\store\chatStore.test.ts:645:7
at file:///G:/ZClaw_openfang/desktop/node_modules/.pnpm/@vitest+runner@2.1.9/node_modules/@vitest/runner/dist/index.js:146:14
 tests/store/chatStore.test.ts (36 tests | 10 failed) 36ms
 × chatStore > setCurrentModel > should update current model 7ms
 → expected 'glm-5' to be 'gpt-4' // Object.is equality
 × chatStore > newConversation > should clear messages and reset session 4ms
 → expected 'old-session' to be null
 × chatStore > newConversation > should save current messages to conversations before clearing 1ms
 → expected 0 to be greater than 0
 × chatStore > switchConversation > should switch to existing conversation 1ms
 → Cannot read properties of undefined (reading 'id')
 × chatStore > deleteConversation > should delete conversation by id 1ms
 → Cannot read properties of undefined (reading 'id')
 × chatStore > deleteConversation > should clear messages if deleting current conversation 4ms
 → expected [ { id: 'msg-1', role: 'user', …(2) } ] to deeply equal []
 × chatStore > setCurrentAgent > should update current agent 2ms
 → expected { id: '1', name: 'ZCLAW', …(4) } to deeply equal { id: 'agent-2', …(5) }
 × chatStore > setCurrentAgent > should save current conversation when switching agents 1ms
 → expected [ { id: 'msg-1', role: 'user', …(2) } ] to deeply equal []
 × chatStore > syncAgents > should sync agents from profiles 2ms
 → expected [ { id: '1', name: 'ZCLAW', …(4) } ] to have a length of 2 but got 1
 × chatStore > conversation persistence > should derive title from first user message 1ms
 → Cannot read properties of undefined (reading 'title')
⎯⎯⎯⎯⎯⎯ Failed Suites 1 ⎯⎯⎯⎯⎯⎯⎯
 FAIL  tests/stabilization.test.ts [ tests/stabilization.test.ts ]
TypeError: Cannot read properties of undefined (reading 'hasHydrated')
  Object.onRehydrateStorage src/store/chatStore.ts:265:42
263| 
264|  // If conversationStore already hydrated (fast path), sync imm…
265|  if (useConversationStore.persist.hasHydrated()) {
 |  ^
266|  syncMessages();
267|  return;
  hydrate node_modules/.pnpm/zustand@5.0.12_@types+react_8b11772aea488cca440c1215797a0d95/node_modules/zustand/esm/middleware.mjs:387:94
  node_modules/.pnpm/zustand@5.0.12_@types+react_8b11772aea488cca440c1215797a0d95/node_modules/zustand/esm/middleware.mjs:468:5
  createStoreImpl node_modules/.pnpm/zustand@5.0.12_@types+react_8b11772aea488cca440c1215797a0d95/node_modules/zustand/esm/vanilla.mjs:19:32
  createStore node_modules/.pnpm/zustand@5.0.12_@types+react_8b11772aea488cca440c1215797a0d95/node_modules/zustand/esm/vanilla.mjs:22:53
  createImpl node_modules/.pnpm/zustand@5.0.12_@types+react_8b11772aea488cca440c1215797a0d95/node_modules/zustand/esm/react.mjs:15:15
  src/store/chatStore.ts:105:47
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/11]⎯
⎯⎯⎯⎯⎯⎯ Failed Tests 10 ⎯⎯⎯⎯⎯⎯⎯
 FAIL  tests/store/chatStore.test.ts > chatStore > setCurrentModel > should update current model
AssertionError: expected 'glm-5' to be 'gpt-4' // Object.is equality
Expected: "gpt-4"
Received: "glm-5"
  tests/store/chatStore.test.ts:272:34
270| 
271|  const state = useChatStore.getState();
272|  expect(state.currentModel).toBe('gpt-4');
 |  ^
273|  });
274|  });
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[2/11]⎯
 FAIL  tests/store/chatStore.test.ts > chatStore > newConversation > should clear messages and reset session
AssertionError: expected 'old-session' to be null
- Expected:
null
+ Received:
"old-session"
  tests/store/chatStore.test.ts:293:32
291|  const state = useChatStore.getState();
292|  expect(state.messages).toEqual([]);
293|  expect(state.sessionKey).toBeNull();
 |  ^
294|  expect(state.isStreaming).toBe(false);
295|  expect(state.currentConversationId).toBeNull();
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[3/11]⎯
 FAIL  tests/store/chatStore.test.ts > chatStore > newConversation > should save current messages to conversations before clearing
AssertionError: expected 0 to be greater than 0
  tests/store/chatStore.test.ts:312:42
310|  const state = useChatStore.getState();
311|  // Conversation should be saved
312|  expect(state.conversations.length).toBeGreaterThan(0);
 |  ^
313|  expect(state.conversations[0].messages[0].content).toBe('Test me…
314|  });
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[4/11]⎯
 FAIL  tests/store/chatStore.test.ts > chatStore > switchConversation > should switch to existing conversation
TypeError: Cannot read properties of undefined (reading 'id')
  tests/store/chatStore.test.ts:338:66
336|  });
337| 
338|  const firstConvId = useChatStore.getState().conversations[0].id;
 |  ^
339| 
340|  // Switch back to first conversation
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[5/11]⎯
 FAIL  tests/store/chatStore.test.ts > chatStore > deleteConversation > should delete conversation by id
TypeError: Cannot read properties of undefined (reading 'id')
  tests/store/chatStore.test.ts:362:61
360|  newConversation();
361| 
362|  const convId = useChatStore.getState().conversations[0].id;
 |  ^
363|  expect(useChatStore.getState().conversations).toHaveLength(1);
364| 
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[6/11]⎯
 FAIL  tests/store/chatStore.test.ts > chatStore > deleteConversation > should clear messages if deleting current conversation
AssertionError: expected [ { id: 'msg-1', role: 'user', …(2) } ] to deeply equal []
- Expected
+ Received
- Array []
+ Array [
+ Object {
+ "content": "Test",
+ "id": "msg-1",
+ "role": "user",
+ "timestamp": 2026-04-05T09:57:37.097Z,
+ },
+ ]
  tests/store/chatStore.test.ts:400:30
398| 
399|  const state = useChatStore.getState();
400|  expect(state.messages).toEqual([]);
 |  ^
401|  expect(state.sessionKey).toBeNull();
402|  expect(state.currentConversationId).toBeNull();
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[7/11]⎯
 FAIL  tests/store/chatStore.test.ts > chatStore > setCurrentAgent > should update current agent
AssertionError: expected { id: '1', name: 'ZCLAW', …(4) } to deeply equal { id: 'agent-2', …(5) }
- Expected
+ Received
 Object {
- "color": "bg-blue-500",
- "icon": "A",
- "id": "agent-2",
- "lastMessage": "Hello",
- "name": "New Agent",
+ "color": "bg-gradient-to-br from-orange-500 to-red-500",
+ "icon": "🦞",
+ "id": "1",
+ "lastMessage": "发送消息开始对话",
+ "name": "ZCLAW",
 "time": "",
 }
  tests/store/chatStore.test.ts:421:34
419| 
420|  const state = useChatStore.getState();
421|  expect(state.currentAgent).toEqual(newAgent);
 |  ^
422|  });
423| 
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[8/11]⎯
 FAIL  tests/store/chatStore.test.ts > chatStore > setCurrentAgent > should save current conversation when switching agents
AssertionError: expected [ { id: 'msg-1', role: 'user', …(2) } ] to deeply equal []
- Expected
+ Received
- Array []
+ Array [
+ Object {
+ "content": "Test message",
+ "id": "msg-1",
+ "role": "user",
+ "timestamp": 2026-04-05T09:57:37.103Z,
+ },
+ ]
  tests/store/chatStore.test.ts:447:48
445| 
446|  // Messages should be cleared for new agent
447|  expect(useChatStore.getState().messages).toEqual([]);
 |  ^
448|  });
449|  });
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[9/11]⎯
 FAIL  tests/store/chatStore.test.ts > chatStore > syncAgents > should sync agents from profiles
AssertionError: expected [ { id: '1', name: 'ZCLAW', …(4) } ] to have a length of 2 but got 1
- Expected
+ Received
- 2
+ 1
  tests/store/chatStore.test.ts:461:28
459| 
460|  const state = useChatStore.getState();
461|  expect(state.agents).toHaveLength(2);
 |  ^
462|  expect(state.agents[0].name).toBe('Agent One');
463|  expect(state.agents[1].name).toBe('Agent Two');
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[10/11]⎯
 FAIL  tests/store/chatStore.test.ts > chatStore > conversation persistence > should derive title from first user message
TypeError: Cannot read properties of undefined (reading 'title')
  tests/store/chatStore.test.ts:648:37
646| 
647|  const state = useChatStore.getState();
648|  expect(state.conversations[0].title).toContain('This is a long m…
 |  ^
649|  expect(state.conversations[0].title.length).toBeLessThanOrEqual(…
650|  });
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[11/11]⎯
 Test Files  2 failed | 7 passed (9)
 Tests  10 failed | 174 passed | 1 skipped (185)
 Start at  17:56:49
 Duration  47.19s (transform 1.84s, setup 57.03s, collect 16.08s, tests 1.32s, environment 222.17s, prepare 10.17s)