Remove unconsumed comments from STRA-8 diff
Linux / verify (pull_request) Successful in 2m7s
Linux / changed-scope-coverage (pull_request) Skipped
Linux / keyless-cuda (pull_request) Skipped
Linux / hosted-cuda-package (pull_request) Skipped
Linux / linux-cli-container (pull_request) Successful in 1m30s
Linux / linux-static-cli (pull_request) Successful in 5m26s
Linux / release-cli (pull_request) Skipped
Linux / verify (pull_request) Successful in 2m7s
Linux / changed-scope-coverage (pull_request) Skipped
Linux / keyless-cuda (pull_request) Skipped
Linux / hosted-cuda-package (pull_request) Skipped
Linux / linux-cli-container (pull_request) Successful in 1m30s
Linux / linux-static-cli (pull_request) Successful in 5m26s
Linux / release-cli (pull_request) Skipped
This commit is contained in:
@@ -607,9 +607,7 @@ fn verified_replacements(
|
||||
.iter()
|
||||
.find(|record| record.name == source.name)
|
||||
.ok_or("overlay KAR tensor absent from provenance")?;
|
||||
// `verify_with_sources` rejects duplicate archive names before this loop.
|
||||
replacements.insert(source.name.clone(), index);
|
||||
// Strict sidecar JSON parsing rejects non-finite and out-of-range f64 values.
|
||||
if record.derived_offset != source.offset
|
||||
|| record.f32_sha256 != hex::encode(source.digest)
|
||||
|| record.section_bytes != source.section_bytes
|
||||
|
||||
@@ -302,7 +302,6 @@ fn validate_private_archive_parent_with(
|
||||
) -> Result<(), String> {
|
||||
for directory in parent.ancestors().collect::<Vec<_>>().into_iter().rev() {
|
||||
let metadata = metadata(directory).map_err(|error| error.to_string())?;
|
||||
// The caller passes a canonicalized parent, so every ancestor is a directory.
|
||||
if !archive_parent_owner_allowed(metadata.uid(), uid) {
|
||||
return Err("KAR parent is not owned by the service or root".into());
|
||||
}
|
||||
|
||||
@@ -1537,7 +1537,6 @@ fn validate_single_source_levels(levels: u8) -> Result<(), String> {
|
||||
|
||||
fn load_single_source_index(path: &Path) -> Result<gguf::TensorIndex, String> {
|
||||
let index = gguf::tensor_index(path).map_err(|error| error.to_string())?;
|
||||
// `tensor_index` rejects zero-tensor GGUFs before returning an index.
|
||||
if index.summary.file_size > MAX_SOURCE_BYTES || index.tensors.len() > MAX_TENSORS {
|
||||
return Err("F32 preview exceeds its source or tensor-count limit".into());
|
||||
}
|
||||
@@ -3172,7 +3171,16 @@ mod tests {
|
||||
tensors: vec![sharded_identity_for(tensor, &raw, &[1.25])],
|
||||
};
|
||||
let pipe = fixture.directory.join("nonseekable-sharded.pipe");
|
||||
assert!(read_sharded_weights(&identity, &index, tensor, &mut open_fifo(&pipe), 0).is_err());
|
||||
assert!(
|
||||
read_sharded_weights(
|
||||
&identity,
|
||||
&index,
|
||||
tensor,
|
||||
&mut open_private_fixture_fifo(&pipe),
|
||||
0
|
||||
)
|
||||
.is_err()
|
||||
);
|
||||
fs::remove_file(pipe).unwrap();
|
||||
}
|
||||
|
||||
@@ -3206,25 +3214,35 @@ mod tests {
|
||||
prepared: Vec::new(),
|
||||
};
|
||||
let pipe = fixture.directory.join("nonseekable-single.pipe");
|
||||
assert!(prepare_single_tensor(request, &mut open_fifo(&pipe), &mut progress).is_err());
|
||||
assert!(
|
||||
prepare_single_tensor(
|
||||
request,
|
||||
&mut open_private_fixture_fifo(&pipe),
|
||||
&mut progress
|
||||
)
|
||||
.is_err()
|
||||
);
|
||||
fs::remove_file(pipe).unwrap();
|
||||
}
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
fn open_fifo(path: &Path) -> File {
|
||||
fn open_private_fixture_fifo(private_fifo_path: &Path) -> File {
|
||||
use std::os::unix::ffi::OsStrExt;
|
||||
|
||||
let name = std::ffi::CString::new(path.as_os_str().as_bytes()).unwrap();
|
||||
// SAFETY: `name` is NUL-terminated and points to this test's private FIFO path.
|
||||
assert_eq!(unsafe { libc::mkfifo(name.as_ptr(), 0o600) }, 0);
|
||||
let writer_path = path.to_path_buf();
|
||||
let private_fifo_name =
|
||||
std::ffi::CString::new(private_fifo_path.as_os_str().as_bytes()).unwrap();
|
||||
assert_eq!(
|
||||
unsafe { libc::mkfifo(private_fifo_name.as_ptr(), 0o600) },
|
||||
0
|
||||
);
|
||||
let writer_path = private_fifo_path.to_path_buf();
|
||||
let writer = std::thread::spawn(move || {
|
||||
fs::OpenOptions::new()
|
||||
.write(true)
|
||||
.open(writer_path)
|
||||
.unwrap()
|
||||
});
|
||||
let reader = File::open(path).unwrap();
|
||||
let reader = File::open(private_fifo_path).unwrap();
|
||||
drop(writer.join().unwrap());
|
||||
reader
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user