fix: apply DB projection after Tangled morphism Tangled records were only getting the morphism (field rename) but not the DB projection (AT-URI decomposition into repo_did/repo_name). This caused all Tangled issues and pulls to have empty repo_did and repo_name fields, making them invisible on repo pages.

Author: Aaron Steven White
Commit 686bdf559ee2c86145f0b43595f0bf9d0081a1f7
Parent: 8a0beaa68d
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-cospan
1 file changed +11 -1
@@ -147,7 +147,17 @@ impl RecordTransformer {
147147         record: &serde_json::Value,
148148     ) -> Option<Result<serde_json::Value>> {
149149         let morphism = self.tangled_morphisms.get(tangled_nsid)?;
150-        Some(apply_morphism(morphism, record))
150+        let cospan_record = match apply_morphism(morphism, record) {
151+            Ok(r) => r,
152+            Err(e) => return Some(Err(e)),
153+        };
154+        // After morphism, apply the Cospan DB projection (AT-URI decomposition, etc.)
155+        let cospan_nsid = &morphism.cospan_nsid;
156+        if let Some(proj) = self.db_projections.get(cospan_nsid) {
157+            Some(apply_projection(&proj.schema, &proj.compiled, cospan_nsid, &cospan_record))
158+        } else {
159+            Some(Ok(cospan_record))
160+        }
151161     }
152162 }
153163 
cospan · schematic version control on atproto built on AT Protocol