)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"ea024532fafb5ccfd5128bbbf9514de6ec269fd0","unresolved":true,"context_lines":[{"line_number":4,"context_line":"Commit:     sinavir \u003ctvix@sinavir.fr\u003e"},{"line_number":5,"context_line":"CommitDate: 2024-09-23 13:27:59 +0200"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"fix(nar_bridge): Don\u0027t check if root node has a name in nar generation"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Nar-bridge tried to parse the name of the protobuf node encoded in the"},{"line_number":10,"context_line":"URL into a PathComponent but this name was empty, leading to an error"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"850d8847_1fa60d65","line":7,"updated":"2024-09-23 11:56:41.000000000","message":"fix(tvix/nar-bridge):","commit_id":"a9be785c9281b96c9bb2cf5f29fb5e4783e59ae0"},{"author":{"_account_id":1000128,"name":"sinavir","email":"tvix@sinavir.fr","username":"sinavir"},"change_message_id":"05eb233325b5bec3451c9a1f769e99769d0d394a","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     sinavir \u003ctvix@sinavir.fr\u003e"},{"line_number":5,"context_line":"CommitDate: 2024-09-23 13:27:59 +0200"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"fix(nar_bridge): Don\u0027t check if root node has a name in nar generation"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Nar-bridge tried to parse the name of the protobuf node encoded in the"},{"line_number":10,"context_line":"URL into a PathComponent but this name was empty, leading to an error"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"949fa22e_97c64ed5","line":7,"in_reply_to":"850d8847_1fa60d65","updated":"2024-09-23 16:29:09.000000000","message":"Done","commit_id":"a9be785c9281b96c9bb2cf5f29fb5e4783e59ae0"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"1331e6fcb777deb5b644b925bc0a0d18499a387e","unresolved":true,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Nar-bridge tried to parse the name of the protobuf node encoded in the"},{"line_number":10,"context_line":"URL into a PathComponent but this name was empty, leading to an error"},{"line_number":11,"context_line":"when the user tried to retrieve the nar file. This commit removes this"},{"line_number":12,"context_line":"useless step and fixes the errors caused by it"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I2996cdd2e0107133e502748947298f512f1cc521"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"e15cc119_04350bf2","line":11,"updated":"2024-09-23 12:02:40.000000000","message":"This was an oversight from the conversion to stricter types (some of the CLs in the serious containing cl/12217).\n\nWe need a version converting a protobuf without a name to our stricter types, but an empty PathComponent cannot be constructed.\n\nSo we need a `into_name_and_node()` version that returns the name as Bytes, not PathComponent.","commit_id":"a9be785c9281b96c9bb2cf5f29fb5e4783e59ae0"},{"author":{"_account_id":1000128,"name":"sinavir","email":"tvix@sinavir.fr","username":"sinavir"},"change_message_id":"05eb233325b5bec3451c9a1f769e99769d0d394a","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Nar-bridge tried to parse the name of the protobuf node encoded in the"},{"line_number":10,"context_line":"URL into a PathComponent but this name was empty, leading to an error"},{"line_number":11,"context_line":"when the user tried to retrieve the nar file. This commit removes this"},{"line_number":12,"context_line":"useless step and fixes the errors caused by it"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I2996cdd2e0107133e502748947298f512f1cc521"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"c75707a4_35656eb4","line":11,"in_reply_to":"e15cc119_04350bf2","updated":"2024-09-23 16:29:09.000000000","message":"Done","commit_id":"a9be785c9281b96c9bb2cf5f29fb5e4783e59ae0"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":1000128,"name":"sinavir","email":"tvix@sinavir.fr","username":"sinavir"},"change_message_id":"0995903cd802ed71c4f65f9fbd8ecebffa1a280e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"55e11aee_b33658f2","updated":"2024-09-23 11:37:59.000000000","message":"I hope the code meets the standards. I don\u0027t really know also who to add as a reviewer. I apologize if I missed people or I wrongly pinged people.","commit_id":"a9be785c9281b96c9bb2cf5f29fb5e4783e59ae0"}],"tvix/castore/src/errors.rs":[{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"7b626b5dd1cf35c9e69f7a0beea51b3c8eda6e10","unresolved":true,"context_lines":[{"line_number":46,"context_line":"    DuplicateName(PathComponent),"},{"line_number":47,"context_line":"    /// Node failed validation"},{"line_number":48,"context_line":"    #[error(\"invalid node with name {}: {:?}\", .0, .1.to_string())]"},{"line_number":49,"context_line":"    InvalidNode(String, ValidateNodeError),"},{"line_number":50,"context_line":"    #[error(\"Total size exceeds u64::MAX\")]"},{"line_number":51,"context_line":"    SizeOverflow,"},{"line_number":52,"context_line":"    /// Invalid name encountered"}],"source_content_type":"text/x-rustsrc","patch_set":1,"id":"c0640601_e565a0e4","line":49,"updated":"2024-09-23 11:54:16.000000000","message":"```suggestion\n    InvalidNode(bytes::Bytes, ValidateNodeError),\n```\n\n(see below)","commit_id":"a9be785c9281b96c9bb2cf5f29fb5e4783e59ae0"},{"author":{"_account_id":1000128,"name":"sinavir","email":"tvix@sinavir.fr","username":"sinavir"},"change_message_id":"05eb233325b5bec3451c9a1f769e99769d0d394a","unresolved":false,"context_lines":[{"line_number":46,"context_line":"    DuplicateName(PathComponent),"},{"line_number":47,"context_line":"    /// Node failed validation"},{"line_number":48,"context_line":"    #[error(\"invalid node with name {}: {:?}\", .0, .1.to_string())]"},{"line_number":49,"context_line":"    InvalidNode(String, ValidateNodeError),"},{"line_number":50,"context_line":"    #[error(\"Total size exceeds u64::MAX\")]"},{"line_number":51,"context_line":"    SizeOverflow,"},{"line_number":52,"context_line":"    /// Invalid name encountered"}],"source_content_type":"text/x-rustsrc","patch_set":1,"id":"e6ae5c63_e14e88eb","line":49,"in_reply_to":"c0640601_e565a0e4","updated":"2024-09-23 16:29:09.000000000","message":"Done","commit_id":"a9be785c9281b96c9bb2cf5f29fb5e4783e59ae0"}],"tvix/castore/src/proto/mod.rs":[{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"7b626b5dd1cf35c9e69f7a0beea51b3c8eda6e10","unresolved":true,"context_lines":[{"line_number":209,"context_line":"        ))"},{"line_number":210,"context_line":"    }"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"    fn into_unvalidated_name_and_node(self) -\u003e Result\u003c(bytes::Bytes, crate::Node), DirectoryError\u003e {"},{"line_number":213,"context_line":"        match self.node.ok_or_else(|| DirectoryError::NoNodeSet)? {"},{"line_number":214,"context_line":"            node::Node::Directory(n) \u003d\u003e {"},{"line_number":215,"context_line":"                let digest \u003d B3Digest::try_from(n.digest).map_err(|e| {"}],"source_content_type":"text/x-rustsrc","patch_set":1,"id":"632b30e4_92bf662e","line":212,"updated":"2024-09-23 11:54:16.000000000","message":"The function name alone doesn\u0027t clarify that only the name is not validated, but the node is.\n\nPlease add a docstring, similar to the one above, but mention that caveat.","commit_id":"a9be785c9281b96c9bb2cf5f29fb5e4783e59ae0"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"1331e6fcb777deb5b644b925bc0a0d18499a387e","unresolved":true,"context_lines":[{"line_number":209,"context_line":"        ))"},{"line_number":210,"context_line":"    }"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"    fn into_unvalidated_name_and_node(self) -\u003e Result\u003c(bytes::Bytes, crate::Node), DirectoryError\u003e {"},{"line_number":213,"context_line":"        match self.node.ok_or_else(|| DirectoryError::NoNodeSet)? {"},{"line_number":214,"context_line":"            node::Node::Directory(n) \u003d\u003e {"},{"line_number":215,"context_line":"                let digest \u003d B3Digest::try_from(n.digest).map_err(|e| {"}],"source_content_type":"text/x-rustsrc","patch_set":1,"id":"7cad581b_f4b5c340","line":212,"in_reply_to":"632b30e4_92bf662e","updated":"2024-09-23 12:02:40.000000000","message":"Maybe into_name_bytes_and_node()?","commit_id":"a9be785c9281b96c9bb2cf5f29fb5e4783e59ae0"},{"author":{"_account_id":1000128,"name":"sinavir","email":"tvix@sinavir.fr","username":"sinavir"},"change_message_id":"05eb233325b5bec3451c9a1f769e99769d0d394a","unresolved":false,"context_lines":[{"line_number":209,"context_line":"        ))"},{"line_number":210,"context_line":"    }"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"    fn into_unvalidated_name_and_node(self) -\u003e Result\u003c(bytes::Bytes, crate::Node), DirectoryError\u003e {"},{"line_number":213,"context_line":"        match self.node.ok_or_else(|| DirectoryError::NoNodeSet)? {"},{"line_number":214,"context_line":"            node::Node::Directory(n) \u003d\u003e {"},{"line_number":215,"context_line":"                let digest \u003d B3Digest::try_from(n.digest).map_err(|e| {"}],"source_content_type":"text/x-rustsrc","patch_set":1,"id":"883b9f96_f31f24be","line":212,"in_reply_to":"7cad581b_f4b5c340","updated":"2024-09-23 16:29:09.000000000","message":"Done","commit_id":"a9be785c9281b96c9bb2cf5f29fb5e4783e59ae0"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"7b626b5dd1cf35c9e69f7a0beea51b3c8eda6e10","unresolved":true,"context_lines":[{"line_number":213,"context_line":"        match self.node.ok_or_else(|| DirectoryError::NoNodeSet)? {"},{"line_number":214,"context_line":"            node::Node::Directory(n) \u003d\u003e {"},{"line_number":215,"context_line":"                let digest \u003d B3Digest::try_from(n.digest).map_err(|e| {"},{"line_number":216,"context_line":"                    DirectoryError::InvalidNode(n.name.as_bstr().to_string(), e.into())"},{"line_number":217,"context_line":"                })?;"},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"                let node \u003d crate::Node::Directory {"}],"source_content_type":"text/x-rustsrc","patch_set":1,"id":"99d53bcb_6fe60d9c","line":216,"updated":"2024-09-23 11:54:16.000000000","message":"You use the BStr `to_string()` method, which replaces invalid unicode with replacement characters, and then store that String in the error type.\n\nIt\u0027s probably cleaner to store just the `bytes::Bytes` in the error type, and do a `.0.as_bstr()` in the error `#[error(…)]` macro. It allows us to get back the real bytes.","commit_id":"a9be785c9281b96c9bb2cf5f29fb5e4783e59ae0"},{"author":{"_account_id":1000128,"name":"sinavir","email":"tvix@sinavir.fr","username":"sinavir"},"change_message_id":"05eb233325b5bec3451c9a1f769e99769d0d394a","unresolved":false,"context_lines":[{"line_number":213,"context_line":"        match self.node.ok_or_else(|| DirectoryError::NoNodeSet)? {"},{"line_number":214,"context_line":"            node::Node::Directory(n) \u003d\u003e {"},{"line_number":215,"context_line":"                let digest \u003d B3Digest::try_from(n.digest).map_err(|e| {"},{"line_number":216,"context_line":"                    DirectoryError::InvalidNode(n.name.as_bstr().to_string(), e.into())"},{"line_number":217,"context_line":"                })?;"},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"                let node \u003d crate::Node::Directory {"}],"source_content_type":"text/x-rustsrc","patch_set":1,"id":"6cc8b446_4764bd32","line":216,"in_reply_to":"99d53bcb_6fe60d9c","updated":"2024-09-23 16:29:09.000000000","message":"Done","commit_id":"a9be785c9281b96c9bb2cf5f29fb5e4783e59ae0"}],"tvix/nar-bridge/src/nar.rs":[{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"7b626b5dd1cf35c9e69f7a0beea51b3c8eda6e10","unresolved":true,"context_lines":[{"line_number":57,"context_line":"        StatusCode::BAD_REQUEST"},{"line_number":58,"context_line":"    })?;"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    if !root_name.as_ref().is_empty() {"},{"line_number":61,"context_line":"        warn!(\"root node has name, which it shouldn\u0027t\");"},{"line_number":62,"context_line":"        return Err(StatusCode::BAD_REQUEST);"},{"line_number":63,"context_line":"    }"}],"source_content_type":"text/x-rustsrc","patch_set":1,"id":"92066d15_d7c03a8e","side":"PARENT","line":60,"updated":"2024-09-23 11:54:16.000000000","message":"I don\u0027t think we should drop the check.\n\nWe don\u0027t want to handle URLs where the name field is not empty / unset, and rejecting that here ensures there\u0027s only one URL generating this content.\n\nIf we would allow the name field to be not empty, someone could craft new URLs and bust caches.","commit_id":"6f028165f2c710578ad3941eb303e1bc9f8a8c0b"},{"author":{"_account_id":1000128,"name":"sinavir","email":"tvix@sinavir.fr","username":"sinavir"},"change_message_id":"05eb233325b5bec3451c9a1f769e99769d0d394a","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        StatusCode::BAD_REQUEST"},{"line_number":58,"context_line":"    })?;"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    if !root_name.as_ref().is_empty() {"},{"line_number":61,"context_line":"        warn!(\"root node has name, which it shouldn\u0027t\");"},{"line_number":62,"context_line":"        return Err(StatusCode::BAD_REQUEST);"},{"line_number":63,"context_line":"    }"}],"source_content_type":"text/x-rustsrc","patch_set":1,"id":"7c827b97_42dbbfd0","side":"PARENT","line":60,"in_reply_to":"92066d15_d7c03a8e","updated":"2024-09-23 16:29:09.000000000","message":"Done","commit_id":"6f028165f2c710578ad3941eb303e1bc9f8a8c0b"}]}
