Parses `branch-meta.json` content into [`BranchMeta`]. This is the canonical definition of "corrupt branch metadata": anything this rejects — invalid JSON *or* valid JSON with the wrong schema — makes the runtime fall back to single-DB mode. Every consumer (loading at runtime, quarantining in the post-update health pass) must go through this one predicate so they agree on what corrupt means.
(content: &str)
| 123 | /// runtime, quarantining in the post-update health pass) must go through this |
| 124 | /// one predicate so they agree on what corrupt means. |
| 125 | pub fn parse(content: &str) -> serde_json::Result<BranchMeta> { |
| 126 | serde_json::from_str(content) |
| 127 | } |
| 128 | |
| 129 | /// Loads branch metadata from `branch-meta.json` in the project data dir. |
| 130 | /// |
no outgoing calls