{"record":{"id":"f78a4330c1561647","repo":"GitoxideLabs/gitoxide","slug":"name-retrieval-configured","errorCode":null,"errorMessage":"name retrieval configured","messagePattern":"name retrieval configured","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"info","filePath":"gix-ref/src/store/file/overlay_iter.rs","lineNumber":179,"sourceCode":"                    let res = packed_iter.next().expect(\"peeked value exists\");\n                    Some(self.convert_packed(res))\n                }\n                (Some((_, kind)), None) | (Some((Err(_), kind)), Some(_)) => {\n                    let res = self.loose_iter(kind).next().expect(\"prior peek\");\n                    Some(self.convert_loose(res))\n                }\n                (Some((Ok((_, loose_name)), kind)), Some(Ok(packed))) => match loose_name.as_ref().cmp(packed.name) {\n                    Ordering::Less => {\n                        let res = self.loose_iter(kind).next().expect(\"prior peek\");\n                        Some(self.convert_loose(res))\n                    }\n                    Ordering::Equal => {\n                        drop(packed_iter.next());\n                        let res = self.loose_iter(kind).next().expect(\"prior peek\");\n                        Some(self.convert_loose(res))\n                    }\n                    Ordering::Greater => {\n                        let res = packed_iter.next().expect(\"name retrieval configured\");\n                        Some(self.convert_packed(res))\n                    }\n                },\n            },\n            None => match peek_loose(&mut self.iter_git_dir, self.iter_common_dir.as_mut()) {\n                None => None,\n                Some((_, kind)) => self.loose_iter(kind).next().map(|res| self.convert_loose(res)),\n            },\n        }\n    }\n}\n\nimpl<'repo> Platform<'repo> {\n    /// Return an iterator over all references, loose or packed, sorted by their name.\n    ///\n    /// Errors are returned similarly to what would happen when loose and packed refs were iterated by themselves.\n    pub fn all<'p>(&'p self) -> std::io::Result<LooseThenPacked<'p, 'repo>> {\n        self.store.iter_packed(self.packed.as_ref().map(|b| &***b))","sourceCodeStart":161,"sourceCodeEnd":197,"githubUrl":"https://github.com/GitoxideLabs/gitoxide/blob/e73179060badf27222d790981fac3f84c1830a7e/gix-ref/src/store/file/overlay_iter.rs#L161-L197","documentation":"Same `OverlayIter::next` merge logic for packed entries: `expect(\"name retrieval configured\")` fires when a packed entry that was peeked as `Some` cannot be retrieved by `next()`. In this arm it runs when a loose entry exists alongside a peeked packed entry and the packed name sorts greater. Peek/next disagreement on the packed iterator is the only cause.","triggerScenarios":"Mixed loose+packed iteration where the peeked packed reference cannot be consumed — concurrent `packed-refs` modification or an iterator implementation bug.","commonSituations":"Essentially unreachable for single-threaded use on a static repository; seen only with concurrent ref database mutation or library bugs.","solutions":["Retry the iteration after external ref mutations settle","Prevent concurrent pack/gc operations during reads (or use file locking)","Verify `packed-refs` is well-formed (`git pack-refs --all` regenerates it)","If it persists, file a gix-ref bug with the repository state"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"// Retry loop around collection with a fresh iterator per attempt\nfor attempt in 0..3 { match catch_unwind(|| fresh_iter().collect::<Vec<_>>()) { Ok(v) => return v, Err(_) => continue } }","preventionTips":["Treat packed-refs as immutable during a read pass","Serialize readers/writers with repository-level locking","Avoid mixing loose-ref updates and packed-refs rewrites concurrently","Escalate reproducible cases to gix-ref maintainers"],"tags":["rust","panic","gix-ref","packed-refs","iterator"],"backgroundTag":"internal-invariant-violation","analyzedSha":"e73179060badf27222d790981fac3f84c1830a7e","analyzedAt":"2026-09-08T11:26:50.865Z","contentChangedAt":"2026-09-08T11:26:50.865Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}