Skip to content
Draft
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
9 changes: 9 additions & 0 deletions apexcode/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions apexcode/Cargo.toml
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,5 +3,6 @@ members = [
"apex-policy",
"apex-task-state",
"apex-evidence",
"apex-orchestrator",
]
resolver = "3"
18 changes: 18 additions & 0 deletions apexcode/apex-evidence/src/lib.rs
Original file line numberDiff line numberDiff line change
Expand Up@@ -373,12 +373,20 @@ mod tests {

struct FixtureVerifier;

struct RejectingVerifier;

impl SourceVerifier for FixtureVerifier {
fn verify(&self, _task_id: &str, _task_revision: u64, _source_revision: &str) -> bool {
true
}
}

impl SourceVerifier for RejectingVerifier {
fn verify(&self, _task_id: &str, _task_revision: u64, _source_revision: &str) -> bool {
false
}
}

fn subject(task_id: &str, revision: u64, source: &str) -> EvidenceSubject {
EvidenceSubject::new(task_id, revision, source)
.unwrap()
Expand DownExpand Up@@ -602,6 +610,16 @@ mod tests {
);
}

#[test]
fn failed_verification_does_not_upgrade_subject() {
let subject = EvidenceSubject::new("task-a", 7, "abc123").unwrap();
assert_eq!(
subject.clone().verify_with(&RejectingVerifier),
Err(EvidenceError::VerificationFailed)
);
assert!(!subject.is_verified());
}

#[test]
fn safe_requires_security_evidence() {
let expected = subject("task-a", 7, "abc123");
Expand Down
15 changes: 15 additions & 0 deletions apexcode/apex-orchestrator/Cargo.toml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
[package]
name = "apex-orchestrator"
version = "0.1.0"
edition = "2024"
license = "Apache-2.0"
description = "Role-separated orchestration and release decisions for ApexCode"
publish = false

[lib]
path = "src/lib.rs"

[dependencies]
apex-evidence = { path = "../apex-evidence" }
apex-policy = { path = "../apex-policy" }
apex-task-state = { path = "../apex-task-state" }
Loading