MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / change_schema

Function change_schema

libatomic/src/daemon/sandbox_wire.rs:315–321  ·  view source on GitHub ↗

Envelope hint only. Core decoding still authenticates CODECS and the hash. Historical payloads keep the legacy label; they are never upgraded here.

(bytes: &[u8])

Source from the content-addressed store, hash-verified

313/// Envelope hint only. Core decoding still authenticates CODECS and the hash.
314/// Historical payloads keep the legacy label; they are never upgraded here.
315fn change_schema(bytes: &[u8]) -> &'static str {
316 if change_file_header(bytes).is_ok_and(|header| header.version == FIELD_CODEC_FORMAT_VERSION) {
317 CHANGE_SCHEMA
318 } else {
319 LEGACY_CHANGE_SCHEMA
320 }
321}
322
323fn change_file_header(bytes: &[u8]) -> Result<FileHeader, String> {
324 let header = bytes

Callers 2

change_bytesFunction · 0.85
change_bundleFunction · 0.85

Calls 1

change_file_headerFunction · 0.85

Tested by

no test coverage detected