()
| 757 | |
| 758 | #[test] |
| 759 | fn attestation_entry_never_a_row() { |
| 760 | // Mirror memory/mod.rs: after attesting, vault_list("memory/") contains the |
| 761 | // memory entry but no path under attestations/. |
| 762 | let (repo, _dir) = repo(); |
| 763 | store_memory(&repo, "m6", "context", &[], ":::memory\nX.\n:::"); |
| 764 | let kp = KeyPair::generate(); |
| 765 | let node = attest_with(&repo, "m6", &kp); |
| 766 | write_tracked(&repo, "m6", &node); |
| 767 | |
| 768 | let listed = repo.vault_list("memory/", None).unwrap(); |
| 769 | assert!( |
| 770 | listed.iter().all(|e| !e.path.starts_with("attestations/")), |
| 771 | "attestation entries must not appear under the memory/ prefix" |
| 772 | ); |
| 773 | assert!( |
| 774 | listed.iter().any(|e| e.path == "memory/m6.md"), |
| 775 | "the memory entry itself is listed" |
| 776 | ); |
| 777 | // And it never becomes its own row id (applying the same production |
| 778 | // filters: no attestations/, no index scaffold). |
| 779 | let ids: Vec<String> = listed |
| 780 | .iter() |
| 781 | .filter(|e| !e.path.starts_with("attestations/")) |
| 782 | .filter(|e| !is_index_scaffold(&repo, &e.path)) |
| 783 | .map(|e| bridge::memory_id(&e.path)) |
| 784 | .collect(); |
| 785 | assert_eq!(ids, vec!["m6".to_string()]); |
| 786 | } |
| 787 | } |
nothing calls this directly
no test coverage detected