style: cargo fmt --all (round 4 ingest log feature follow-up)

Phase C4 executor 의 마지막 `fix(test): clippy + fmt fixes` commit 이
test file 부분만 fmt 적용. workspace 전체 fmt 누락 발견 → cargo fmt --all
적용. 모든 import alphabetical reorder + line wrapping 정합.

추가 untracked artifact 동시 commit:
- docs/superpowers/specs/2026-05-28-v0.20-ingest-log-spec.md (491 line, ACCEPT)
- docs/superpowers/plans/2026-05-28-v0.20-ingest-log-plan.md (616 line, ACCEPT)

workspace test: 1370 passed / 0 failed / 50 ignored, ingest_log_smoke green.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-28 04:18:40 +00:00
parent 445b096215
commit 685007789a
235 changed files with 6520 additions and 3955 deletions

View File

@@ -50,10 +50,22 @@ fn include_empty_accepts_all_files() {
};
let assets = conn.scan(&scope).unwrap();
let names: Vec<_> = assets.iter().map(|a| a.workspace_path.0.clone()).collect();
assert!(names.contains(&"a.md".to_string()), "a.md missing; got: {names:?}");
assert!(names.contains(&"b.py".to_string()), "b.py missing; got: {names:?}");
assert!(names.contains(&"c.png".to_string()), "c.png missing; got: {names:?}");
assert!(names.contains(&"d.pdf".to_string()), "d.pdf missing; got: {names:?}");
assert!(
names.contains(&"a.md".to_string()),
"a.md missing; got: {names:?}"
);
assert!(
names.contains(&"b.py".to_string()),
"b.py missing; got: {names:?}"
);
assert!(
names.contains(&"c.png".to_string()),
"c.png missing; got: {names:?}"
);
assert!(
names.contains(&"d.pdf".to_string()),
"d.pdf missing; got: {names:?}"
);
assert_eq!(names.len(), 4, "expected exactly 4 files; got: {names:?}");
}
@@ -68,8 +80,14 @@ fn include_nonempty_is_allowlist() {
};
let assets = conn.scan(&scope).unwrap();
let names: Vec<_> = assets.iter().map(|a| a.workspace_path.0.clone()).collect();
assert!(names.contains(&"a.md".to_string()), "a.md should be accepted; got: {names:?}");
assert!(names.contains(&"b.py".to_string()), "b.py should be accepted; got: {names:?}");
assert!(
names.contains(&"a.md".to_string()),
"a.md should be accepted; got: {names:?}"
);
assert!(
names.contains(&"b.py".to_string()),
"b.py should be accepted; got: {names:?}"
);
assert!(
!names.contains(&"c.png".to_string()),
"c.png must be rejected by include allowlist; got: {names:?}"
@@ -99,7 +117,10 @@ fn include_and_exclude_are_anded() {
};
let assets = conn.scan(&scope).unwrap();
let names: Vec<_> = assets.iter().map(|a| a.workspace_path.0.clone()).collect();
assert!(names.contains(&"keep.md".to_string()), "keep.md should be accepted; got: {names:?}");
assert!(
names.contains(&"keep.md".to_string()),
"keep.md should be accepted; got: {names:?}"
);
assert!(
!names.contains(&"drop.md".to_string()),
"drop.md should be excluded (matched exclude); got: {names:?}"

View File

@@ -117,8 +117,7 @@ fn tree_1_snapshot_matches_baseline() {
baseline_path().display()
)
});
let expected: Value = serde_json::from_str(&baseline_text)
.expect("baseline JSON must parse");
let expected: Value = serde_json::from_str(&baseline_text).expect("baseline JSON must parse");
if actual != expected {
let actual_pretty = serde_json::to_string_pretty(&actual).unwrap();

View File

@@ -37,8 +37,8 @@ fn symlink_cycle_does_not_loop_or_crash() {
// Symlink: root/notes → root (a → a cycle through the link `notes`).
symlink(root, root.join("notes")).unwrap();
let conn = FsSourceConnector::new(&cfg_with_root(root.to_str().unwrap()))
.expect("connector init");
let conn =
FsSourceConnector::new(&cfg_with_root(root.to_str().unwrap())).expect("connector init");
let v = conn
.scan(&SourceScope::default())
.expect("scan must return, not loop");
@@ -78,12 +78,14 @@ fn dangling_symlink_pseudo_cycle_does_not_crash() {
symlink(root.join("b"), root.join("a")).unwrap();
symlink(root.join("a"), root.join("b")).unwrap();
let conn = FsSourceConnector::new(&cfg_with_root(root.to_str().unwrap()))
.expect("connector init");
let conn =
FsSourceConnector::new(&cfg_with_root(root.to_str().unwrap())).expect("connector init");
// Even though a→b→a never resolves to a real directory (broken
// pseudo-cycle of dangling symlinks), the scan must complete and
// surface alpha.md.
let v = conn.scan(&SourceScope::default()).expect("scan must return");
let v = conn
.scan(&SourceScope::default())
.expect("scan must return");
assert!(v.iter().any(|a| a.workspace_path.0 == "alpha.md"));
}
@@ -113,13 +115,17 @@ fn two_step_directory_cycle_visited_set_breaks_loop() {
symlink("../b", root.join("a/loop")).unwrap();
symlink("../a", root.join("b/loop")).unwrap();
let conn = FsSourceConnector::new(&cfg_with_root(root.to_str().unwrap()))
.expect("connector init");
let conn =
FsSourceConnector::new(&cfg_with_root(root.to_str().unwrap())).expect("connector init");
// Run scan twice — both must terminate AND produce identical
// workspace_path lists (visited-set is deterministic per scan).
let v1 = conn.scan(&SourceScope::default()).expect("scan must return");
let v2 = conn.scan(&SourceScope::default()).expect("scan must return");
let v1 = conn
.scan(&SourceScope::default())
.expect("scan must return");
let v2 = conn
.scan(&SourceScope::default())
.expect("scan must return");
let names1: Vec<String> = v1.iter().map(|a| a.workspace_path.0.clone()).collect();
let names2: Vec<String> = v2.iter().map(|a| a.workspace_path.0.clone()).collect();
@@ -140,11 +146,13 @@ fn two_step_directory_cycle_visited_set_breaks_loop() {
// paths depend on which side of the cycle the walker descended into
// first; assert by basename to keep the check robust.
assert!(
v1.iter().any(|a| a.workspace_path.0.ends_with("inside_a.md")),
v1.iter()
.any(|a| a.workspace_path.0.ends_with("inside_a.md")),
"expected inside_a.md in scan output, got: {names1:?}"
);
assert!(
v1.iter().any(|a| a.workspace_path.0.ends_with("inside_b.md")),
v1.iter()
.any(|a| a.workspace_path.0.ends_with("inside_b.md")),
"expected inside_b.md in scan output, got: {names1:?}"
);