fix(test): 修复 save_system_persists_project_setting_rows 与 workspace resource settings 不一致 - #414
Merged
su-fen merged 1 commit intoAug 9, 2026
Conversation
…pace resource settings PR Stack-Cairn#317 added SYSTEM_WORKSPACE_RESOURCE_SETTINGS_KEY writes to save_system but the row_count expectation and keys list in this test were never updated. The test only passes when settings tests actually run, which upstream CI (chat_history/ssh_local_forward/shell_runner/mcp subsets) never does.
StackCairn
marked this pull request as draft
August 9, 2026 15:03
Contributor
|
PR governance checks failed.
Fix the items above — pushing new commits or editing the PR body will re-run the checks. |
su-fen
approved these changes
Aug 9, 2026
su-fen
marked this pull request as ready for review
August 9, 2026 15:15
StackCairn
marked this pull request as draft
August 9, 2026 15:15
su-fen
marked this pull request as ready for review
August 9, 2026 15:15
qwenode
pushed a commit
to qwenode/LiveAgent
that referenced
this pull request
Aug 10, 2026
…pace resource settings (Stack-Cairn#414) PR Stack-Cairn#317 added SYSTEM_WORKSPACE_RESOURCE_SETTINGS_KEY writes to save_system but the row_count expectation and keys list in this test were never updated. The test only passes when settings tests actually run, which upstream CI (chat_history/ssh_local_forward/shell_runner/mcp subsets) never does. Co-authored-by: thirsty5034 <thirsty5034@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
save_system_persists_project_setting_rows测试在运行时必然失败。PR #317(feat(workspace): configure Skills and MCP per workspace)为
save_system新增了SYSTEM_WORKSPACE_RESOURCE_SETTINGS_KEY的无条件写入(写入行数 9 → 10),但该测试的期望值未同步更新:assert_eq!(row_count, 9)仍期望 9 行(实际 10 行)SYSTEM_WORKSPACE_RESOURCE_SETTINGS_KEY测试中
row_count断言在最前面,一旦执行会立即 panic。为什么 CI 一直没发现
该测试是 settings 模块的普通
#[test],没有#[ignore]或条件跳过。但 Tauri Rust Check 只运行四个过滤子集(chat_history/ssh_local_forward/shell_runner/integration_commands::mcp),加上cargo check --tests(仅编译不运行),settings 模块的测试从未被 CI 执行。该问题是由 fork 侧的全量
cargo test --lib运行暴露的。修复
row_count期望 9 → 10SYSTEM_WORKSPACE_PROJECTS_KEY后追加SYSTEM_WORKSPACE_RESOURCE_SETTINGS_KEY(保持 ASC 排序)验证
修复后的测试在 fork 的全量
cargo test --lib中通过。