fix: align listRefs and getHead with panproto-xrpc wire format panproto-xrpc's NodeClient expects: - listRefs: { refs: [{ name, target }] } (we returned { ref, target }) - getHead: flat { branch } or { detached } (we wrapped in { head: { type, ref } }) This caused git-remote-cospan push to fail with "ref entry 0 missing 'name' field". Now aligned so git-remote-cospan can successfully push pre-parsed schemas to the node.
Author: Aaron Steven White
Commit
1c0f672df2047ff77ae6dc6ccebb12ecd87bf56eParent: 123ce64358
Structural diff unavailable
These commits were pushed via plain git push, so no pre-parsed
schemas are available. Install git-remote-cospan and re-push via panproto:// to
see scope-level changes, breaking change detection, and semantic diffs.
brew install panproto/tap/git-remote-cospan2 files changed +6 -7
@@ -25,16 +25,15 @@ pub async fn get_head(
2525 name: params.repo.clone(), 2626 })?; 2727 28+ // Flat format matches panproto-xrpc NodeClient expectations. 2829 let head_json = match head { 2930 panproto_core::vcs::HeadState::Branch(name) => serde_json::json!({ 30- "type": "branch", 31- "ref": name, 31+ "branch": name, 3232 }), 3333 panproto_core::vcs::HeadState::Detached(id) => serde_json::json!({ 34- "type": "detached", 35- "target": id.to_string(), 34+ "detached": id.to_string(), 3635 }), 3736 }; 3837 39- Ok(Json(serde_json::json!({ "head": head_json }))) 38+ Ok(Json(head_json)) 4039 }
@@ -25,7 +25,7 @@ pub async fn list_refs(
2525 let refs_json: Vec<serde_json::Value> = refs 2626 .into_iter() 2727 .map(|(name, id)| { 28- serde_json::json!({ "ref": name, "target": id.to_string() }) 28+ serde_json::json!({ "name": name, "target": id.to_string() }) 2929 }) 3030 .collect(); 3131 return Ok(Json(serde_json::json!({ "refs": refs_json })));
@@ -48,7 +48,7 @@ pub async fn list_refs(
4848 let Some(name) = r.name() else { continue }; 4949 let Some(oid) = r.target() else { continue }; 5050 refs_json.push(serde_json::json!({ 51- "ref": name, 51+ "name": name, 5252 "target": oid.to_string(), 5353 })); 5454 }