()
| 554 | |
| 555 | #[test] |
| 556 | fn attestation_entry_never_a_row() { |
| 557 | // Mirror memory/mod.rs: after attesting, vault_list("memory/") contains the |
| 558 | // memory entry but no path under attestations/. |
| 559 | let (repo, _dir) = repo(); |
| 560 | store_memory(&repo, "m6", "context", &[], ":::memory\nX.\n:::"); |
| 561 | let kp = KeyPair::generate(); |
| 562 | let node = attest_with(&repo, "m6", &kp); |
| 563 | write_tracked(&repo, "m6", &node); |
| 564 | |
| 565 | let listed = repo.vault_list("memory/", None).unwrap(); |
| 566 | assert!( |
| 567 | listed.iter().all(|e| !e.path.starts_with("attestations/")), |
| 568 | "attestation entries must not appear under the memory/ prefix" |
| 569 | ); |
| 570 | assert!( |
| 571 | listed.iter().any(|e| e.path == "memory/m6.md"), |
| 572 | "the memory entry itself is listed" |
| 573 | ); |
| 574 | // And it never becomes its own row id (applying the same production |
| 575 | // filters: no attestations/, no index scaffold). |
| 576 | let ids: Vec<String> = listed |
| 577 | .iter() |
| 578 | .filter(|e| !e.path.starts_with("attestations/")) |
| 579 | .filter(|e| !is_index_scaffold(&repo, &e.path)) |
| 580 | .map(|e| bridge::memory_id(&e.path)) |
| 581 | .collect(); |
| 582 | assert_eq!(ids, vec!["m6".to_string()]); |
| 583 | } |
| 584 | } |
nothing calls this directly
no test coverage detected