style: cargo fmt --all(合并期整合修复)
Guards / 依赖许可与来源(cargo-deny) (push) Canceled after 0s
Guards / 文件行数 ≤400 守门 (push) Canceled after 0s
Guards / unsafe 落点守门(集合必须恰好一个文件) (push) Canceled after 0s
Guards / design 零第三方依赖守门 (push) Canceled after 0s
Guards / presenter 零 UI 守门 (push) Canceled after 0s
Guards / core 零 UI 守门 (push) Canceled after 0s
Dev Guards / 架构与合规守门(同 main 口径) (push) Canceled after 0s
Dev Guards / fmt (rustfmt --check) (push) Canceled after 0s
Dev Guards / clippy (ubuntu) (push) Canceled after 0s
Guards / 依赖许可与来源(cargo-deny) (push) Canceled after 0s
Guards / 文件行数 ≤400 守门 (push) Canceled after 0s
Guards / unsafe 落点守门(集合必须恰好一个文件) (push) Canceled after 0s
Guards / design 零第三方依赖守门 (push) Canceled after 0s
Guards / presenter 零 UI 守门 (push) Canceled after 0s
Guards / core 零 UI 守门 (push) Canceled after 0s
Dev Guards / 架构与合规守门(同 main 口径) (push) Canceled after 0s
Dev Guards / fmt (rustfmt --check) (push) Canceled after 0s
Dev Guards / clippy (ubuntu) (push) Canceled after 0s
M187/M188 并入后全仓 fmt --check 为红(CI 的 fmt job 会红)。 本次仅 cargo fmt --all 的换行/缩进变化,无语义改动; cargo fmt --check 与 cargo check 均已复验为绿。
This commit is contained in:
1 parent
edd12b38ab
commit
44a0c87a11
7 files changed
+33
-15
No files matched your search
@@ -127,7 +127,11 @@ fn legacy_sessions_are_still_listed_and_openable() {
|
||||
let env = HostEnv::at_root(&root);
|
||||
let legacy_game = env.legacy_sessions_root().join("game");
|
||||
std::fs::create_dir_all(&legacy_game).expect("建旧家目录");
|
||||
let entry = sample_entry("old-session", "old-session.jsonl", "2026-11-01T10:00:00.000Z");
|
||||
let entry = sample_entry(
|
||||
"old-session",
|
||||
"old-session.jsonl",
|
||||
"2026-11-01T10:00:00.000Z",
|
||||
);
|
||||
session_index::append(
|
||||
&session_index::index_path(&env.legacy_sessions_root()),
|
||||
&entry,
|
||||
@@ -144,7 +148,10 @@ fn legacy_sessions_are_still_listed_and_openable() {
|
||||
listed.iter().any(|session| session.id == "old-session"),
|
||||
"旧家的会话没有出现在列表里:{listed:?}"
|
||||
);
|
||||
assert_eq!(event_path(&env, &entry), legacy_game.join("old-session.jsonl"));
|
||||
assert_eq!(
|
||||
event_path(&env, &entry),
|
||||
legacy_game.join("old-session.jsonl")
|
||||
);
|
||||
let (lines, _) = open(&env, "old-session");
|
||||
assert!(
|
||||
lines.iter().any(|line| line.text.contains("旧会话这一行")),
|
||||
@@ -196,8 +203,11 @@ fn the_new_root_wins_when_both_indexes_know_the_same_id() {
|
||||
let legacy_game = env.legacy_sessions_root().join("game");
|
||||
std::fs::create_dir_all(&legacy_game).expect("建旧家目录");
|
||||
let old = sample_entry("same", "same.jsonl", "2026-10-01T00:00:00.000Z");
|
||||
session_index::append(&session_index::index_path(&env.legacy_sessions_root()), &old)
|
||||
.expect("写旧索引");
|
||||
session_index::append(
|
||||
&session_index::index_path(&env.legacy_sessions_root()),
|
||||
&old,
|
||||
)
|
||||
.expect("写旧索引");
|
||||
std::fs::write(
|
||||
legacy_game.join("same.jsonl"),
|
||||
"{\"kind\":\"stdout\",\"payload\":{\"line\":\"旧\"}}\n",
|
||||
@@ -235,7 +245,10 @@ fn the_location_receipt_names_both_roots_and_the_policy() {
|
||||
std::fs::write(legacy_game.join("a.jsonl"), "{}\n").expect("写旧文件");
|
||||
|
||||
let path = note_location(&env).expect("记录应当写得出来");
|
||||
assert_eq!(path, env.logs_dir().join(super::location::SESSION_LOCATION_FILE));
|
||||
assert_eq!(
|
||||
path,
|
||||
env.logs_dir().join(super::location::SESSION_LOCATION_FILE)
|
||||
);
|
||||
let value: serde_json::Value =
|
||||
serde_json::from_slice(&std::fs::read(&path).expect("读记录")).expect("记录是 JSON");
|
||||
assert_eq!(value["policy"], "read-only-compat");
|
||||
|
||||
Reference in new issue
Block a user