Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/spec_identity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -921,6 +921,7 @@ mod tests {
use crate::spec_source::{SpecPaths, SpecSource};
use serde_json::json;
use std::fs;
#[cfg(unix)]
use std::os::unix::fs as unix_fs;
use std::path::{Path, PathBuf};
use std::process::Command;
Expand Down Expand Up @@ -1589,6 +1590,7 @@ mod tests {
}

#[test]
#[cfg(unix)]
fn rejects_symlink_artifacts_that_leave_direct_mode_root() {
let dir = tempdir().unwrap();
let skill_root = dir.path().join("skill/open-prose");
Expand Down Expand Up @@ -1664,6 +1666,7 @@ mod tests {
}

#[test]
#[cfg(unix)]
fn rejects_symlinked_artifact_directories_that_leave_direct_mode_root() {
let dir = tempdir().unwrap();
let skill_root = dir.path().join("skill/open-prose");
Expand Down
14 changes: 13 additions & 1 deletion tests/adapter_tests.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
use serde_json::{Value, json};
use serde_json::Value;
#[cfg(unix)]
use serde_json::json;
#[cfg(unix)]
use std::fs;
#[cfg(unix)]
use std::os::unix::fs::PermissionsExt;
#[cfg(unix)]
use std::path::Path;
use std::process::Command;
#[cfg(unix)]
use std::sync::{Mutex, MutexGuard};
#[cfg(unix)]
use tempfile::tempdir;

/// The host-mediated dogfood tests each install a fake host binary (`codex`,
Expand All @@ -15,8 +22,10 @@ use tempfile::tempdir;
/// 1`, "unexpected service:"). They are serialized through this mutex so each
/// host-mediated proof gets a clean, uncontended environment. Regression guard
/// for that flake.
#[cfg(unix)]
static HOST_MEDIATED_DOGFOOD: Mutex<()> = Mutex::new(());

#[cfg(unix)]
fn host_mediated_dogfood_guard() -> MutexGuard<'static, ()> {
HOST_MEDIATED_DOGFOOD
.lock()
Expand Down Expand Up @@ -117,6 +126,7 @@ fn adapter_dogfood_requires_manifest_and_program() {
}

#[test]
#[cfg(unix)]
fn adapter_dogfood_uses_phase_specific_system_append_files() {
let dir = tempdir().unwrap();
let bin_dir = dir.path().join("bin");
Expand Down Expand Up @@ -259,6 +269,7 @@ esac
}

#[test]
#[cfg(unix)]
fn adapter_dogfood_supports_codex_host_mediated_path() {
let _guard = host_mediated_dogfood_guard();
let dir = tempdir().unwrap();
Expand Down Expand Up @@ -519,6 +530,7 @@ EOF
}

#[test]
#[cfg(unix)]
fn adapter_dogfood_supports_hermes_host_mediated_path() {
let _guard = host_mediated_dogfood_guard();
let dir = tempdir().unwrap();
Expand Down
3 changes: 3 additions & 0 deletions tests/spec_identity_tests.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use openprose_lint::spec_identity::artifact_digest;
use serde_json::{Value, json};
use std::fs;
#[cfg(unix)]
use std::os::unix::fs as unix_fs;
use std::path::{Path, PathBuf};
use std::process::Command;
Expand Down Expand Up @@ -301,6 +302,7 @@ fn specs_verify_named_openprose_uses_registry_identity_without_manifest() {
}

#[test]
#[cfg(unix)]
fn specs_verify_rejects_symlinked_artifact_directories() {
let dir = tempdir().unwrap();
let skill_root = dir.path().join("skill/open-prose");
Expand Down Expand Up @@ -364,6 +366,7 @@ fn specs_verify_rejects_symlinked_artifact_directories() {
}

#[test]
#[cfg(unix)]
fn specs_verify_rejects_package_bundle_symlinked_artifact_directories() {
let dir = tempdir().unwrap();
let package_root = dir.path().join("node_modules/@openprose/reactor");
Expand Down