Skip to content
Merged
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
34 changes: 34 additions & 0 deletions Cargo.lock

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

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ members = [
"engine/crates/fx-kernel",
"engine/crates/fx-auth",
"engine/crates/fx-loadable",
"engine/crates/fx-cloud-gpu",
"engine/crates/fx-python",
"engine/crates/fx-agent",
"engine/crates/fx-llm",
"engine/crates/fx-security",
Expand Down Expand Up @@ -121,6 +123,7 @@ fx-auth = { path = "engine/crates/fx-auth" }
fx-cli = { path = "engine/crates/fx-cli" }
fx-conversation = { path = "engine/crates/fx-conversation" }
fx-loadable = { path = "engine/crates/fx-loadable" }
fx-python = { path = "engine/crates/fx-python" }
fx-agent = { path = "engine/crates/fx-agent" }
fx-security = { path = "engine/crates/fx-security" }
fx-skills = { path = "engine/crates/fx-skills" }
Expand Down
1 change: 1 addition & 0 deletions engine/crates/fx-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ fx-kernel.workspace = true
fx-improve.workspace = true
fx-llm.workspace = true
fx-memory.workspace = true
fx-marketplace = { path = "../fx-marketplace" }
fx-ripcord = { path = "../fx-ripcord" }
fx-session.workspace = true
fx-storage.workspace = true
Expand Down
4 changes: 2 additions & 2 deletions engine/crates/fx-api/src/bundle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ mod tests {

#[test]
fn find_bundle_root_finds_nested_app() {
let path = Path::new("/Users/joe/Desktop/Fawx.app/Contents/MacOS/fawx-server");
let path = Path::new("/Applications/Fawx.app/Contents/MacOS/fawx-server");
let root = find_bundle_root(path);
assert_eq!(root, Some(PathBuf::from("/Users/joe/Desktop/Fawx.app")));
assert_eq!(root, Some(PathBuf::from("/Applications/Fawx.app")));
}

#[test]
Expand Down
16 changes: 8 additions & 8 deletions engine/crates/fx-api/src/devices.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ mod tests {
#[test]
fn create_device_returns_hashed_token() {
let mut store = DeviceStore::new();
let (raw_token, device) = store.create_device("My MacBook");
let (raw_token, device) = store.create_device("Example MacBook");

assert!(raw_token.starts_with(DEVICE_TOKEN_PREFIX));
assert_eq!(
Expand All @@ -235,18 +235,18 @@ mod tests {
#[test]
fn list_device_info_excludes_token_hash() {
let mut store = DeviceStore::new();
let _ = store.create_device("My MacBook");
let _ = store.create_device("Example MacBook");

let json = serde_json::to_value(store.list_device_info()).expect("serialize device info");

assert!(json[0].get("token_hash").is_none());
assert_eq!(json[0]["device_name"], "My MacBook");
assert_eq!(json[0]["device_name"], "Example MacBook");
}

#[test]
fn authenticate_works() {
let mut store = DeviceStore::new();
let (raw_token, device) = store.create_device("My MacBook");
let (raw_token, device) = store.create_device("Example MacBook");
store.list_devices_mut()[0].last_used_at = 0;

assert_eq!(store.authenticate(&raw_token), Some(device.id));
Expand All @@ -257,7 +257,7 @@ mod tests {
#[test]
fn revoke_invalidates_device() {
let mut store = DeviceStore::new();
let (raw_token, device) = store.create_device("My MacBook");
let (raw_token, device) = store.create_device("Example MacBook");

assert_eq!(store.revoke(&device.id), Some(device.clone()));
assert!(store.revoke(&device.id).is_none());
Expand All @@ -269,7 +269,7 @@ mod tests {
let temp = tempdir().expect("tempdir");
let path = temp.path().join("devices.json");
let mut store = DeviceStore::new();
let (raw_token, _) = store.create_device("My MacBook");
let (raw_token, _) = store.create_device("Example MacBook");

store.save(&path).expect("save device store");
let mut loaded = DeviceStore::load(&path);
Expand All @@ -286,7 +286,7 @@ mod tests {
let temp = tempdir().expect("tempdir");
let path = temp.path().join("devices.json");
let mut store = DeviceStore::new();
let _ = store.create_device("My MacBook");
let _ = store.create_device("Example MacBook");

store.save(&path).expect("save device store");
let mode = fs::metadata(&path).expect("metadata").permissions().mode() & 0o777;
Expand All @@ -302,7 +302,7 @@ mod tests {
devices: vec![DeviceToken {
id: "dev-123".to_string(),
token_hash: "hash".to_string(),
device_name: "My MacBook".to_string(),
device_name: "Example MacBook".to_string(),
created_at: 1_700_000_000_000,
last_used_at: 1_700_000_005_000,
}],
Expand Down
4 changes: 2 additions & 2 deletions engine/crates/fx-api/src/handlers/fleet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ mod tests {
let temp_dir = tempfile::TempDir::new().expect("tempdir should create");
let mut manager = FleetManager::init(temp_dir.path()).expect("fleet should initialize");
let token = manager
.add_node("node-alpha", "10.0.0.2", 8400)
.add_node("node-a", "203.0.113.10", 8400)
.expect("node should add");
TestFleet {
_temp_dir: temp_dir,
Expand All @@ -168,7 +168,7 @@ mod tests {

fn registration_request(token: &str) -> FleetRegistrationRequest {
FleetRegistrationRequest {
node_name: "node-alpha".to_string(),
node_name: "node-a".to_string(),
bearer_token: token.to_string(),
capabilities: vec!["agentic_loop".to_string(), "macos-aarch64".to_string()],
rust_version: Some("1.85.0".to_string()),
Expand Down
6 changes: 3 additions & 3 deletions engine/crates/fx-api/src/handlers/fleet_dashboard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ mod tests {
fn node_dto_serializes() {
let response = FleetNodeDto {
id: "node-1".to_string(),
name: "Node Alpha".to_string(),
name: "Worker Node A".to_string(),
status: "healthy".to_string(),
last_seen_at: 1_742_000_100,
active_tasks: 0,
Expand All @@ -373,7 +373,7 @@ mod tests {
json,
json!({
"id": "node-1",
"name": "Node Alpha",
"name": "Worker Node A",
"status": "healthy",
"last_seen_at": 1_742_000_100,
"active_tasks": 0,
Expand Down Expand Up @@ -433,7 +433,7 @@ mod tests {
fn effective_status_marks_old_busy_nodes_degraded() {
let node = NodeInfo {
node_id: "node-1".to_string(),
name: "Node Alpha".to_string(),
name: "Worker Node A".to_string(),
endpoint: "https://127.0.0.1:8400".to_string(),
auth_token: None,
capabilities: vec![NodeCapability::AgenticLoop],
Expand Down
8 changes: 4 additions & 4 deletions engine/crates/fx-api/src/handlers/git.rs
Original file line number Diff line number Diff line change
Expand Up @@ -725,15 +725,15 @@ mod tests {
hash: "abcdef123456".to_string(),
short_hash: "abcdef1".to_string(),
message: "feat: add git api".to_string(),
author: "Alice".to_string(),
author: "Example Author".to_string(),
timestamp: "2026-03-15T20:00:00Z".to_string(),
}],
};

let json = serde_json::to_value(response).unwrap();

assert_eq!(json["commits"][0]["hash"], "abcdef123456");
assert_eq!(json["commits"][0]["author"], "Alice");
assert_eq!(json["commits"][0]["author"], "Example Author");
}

#[test]
Expand Down Expand Up @@ -779,14 +779,14 @@ mod tests {
#[test]
fn parse_log_line() {
let commit = super::parse_log_line(
"abcdef123456|abcdef1|feat: support pipes | in messages|Alice|2026-03-15T20:00:00Z",
"abcdef123456|abcdef1|feat: support pipes | in messages|Example Author|2026-03-15T20:00:00Z",
)
.unwrap();

assert_eq!(commit.hash, "abcdef123456");
assert_eq!(commit.short_hash, "abcdef1");
assert_eq!(commit.message, "feat: support pipes | in messages");
assert_eq!(commit.author, "Alice");
assert_eq!(commit.author, "Example Author");
}

#[test]
Expand Down
Loading
Loading