Is this `memory/…` entry the vault's index scaffold rather than a real canonical memory? The default `memory/MEMORY.md` installed by `init_vault` carries frontmatter `{"name":"MEMORY","type":"index"}` — it has no `uid`/`memoryKind` and is not attestable, so it must not appear as a row in the canonical, attestation-aware list. Detection reads the entry's declared `type == "index"` frontmatter (fail
(repo: &Repository, path: &str)
| 356 | /// `type == "index"` frontmatter (fail-open: a read error is treated as "not an |
| 357 | /// index" so a genuine memory is never silently hidden). |
| 358 | fn is_index_scaffold(repo: &Repository, path: &str) -> bool { |
| 359 | let Ok(Some(entry)) = repo.vault_retrieve(path) else { |
| 360 | return false; |
| 361 | }; |
| 362 | serde_json::from_str::<serde_json::Value>(&entry.frontmatter_json) |
| 363 | .ok() |
| 364 | .and_then(|v| v.get("type").and_then(|t| t.as_str()).map(str::to_owned)) |
| 365 | .as_deref() |
| 366 | == Some("index") |
| 367 | } |
| 368 | |
| 369 | #[cfg(test)] |
| 370 | mod tests { |