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