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
12 changes: 7 additions & 5 deletions Cargo.lock

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

12 changes: 7 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ async-trait = "0.1"
axum = "0.8"
base64 = "0.22"
ed25519-dalek = "2.1"
edgezero-adapter-axum = { git = "https://github.com/stackpop/edgezero.git", branch = "main", package = "edgezero-adapter-axum", default-features = false }
edgezero-adapter-cloudflare = { git = "https://github.com/stackpop/edgezero.git", branch = "main", package = "edgezero-adapter-cloudflare", default-features = false }
edgezero-adapter-fastly = { git = "https://github.com/stackpop/edgezero.git", branch = "main", package = "edgezero-adapter-fastly", default-features = false }
edgezero-cli = { git = "https://github.com/stackpop/edgezero.git", branch = "main", package = "edgezero-cli" }
edgezero-core = { git = "https://github.com/stackpop/edgezero.git", branch = "main", package = "edgezero-core" }
edgezero-adapter-axum = { git = "https://github.com/stackpop/edgezero.git", branch = "feature/configureable-axum-host", package = "edgezero-adapter-axum", default-features = false }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔧 edgezero deps pinned to unmerged feature branch

All five edgezero-* dependencies point at branch = "feature/configureable-axum-host" instead of main. Merging this PR puts mocktioneer on an unmerged edgezero feature branch — if that branch is rebased, force-pushed, or deleted, CI breaks.

Suggested fix: either (a) merge the edgezero feature branch to main first and repoint these deps, or (b) split the dep bump into its own PR. If the feature branch is genuinely needed for this PR's functionality, document why in the PR description.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Acknowledged. The edgezero feature/configureable-axum-host branch (PR stackpop/edgezero#231) needs to be merged to main first. Once that lands, we'll repoint all five deps to main. Leaving this unresolved until that happens.

edgezero-adapter-cloudflare = { git = "https://github.com/stackpop/edgezero.git", branch = "feature/configureable-axum-host", package = "edgezero-adapter-cloudflare", default-features = false }
edgezero-adapter-fastly = { git = "https://github.com/stackpop/edgezero.git", branch = "feature/configureable-axum-host", package = "edgezero-adapter-fastly", default-features = false }
edgezero-cli = { git = "https://github.com/stackpop/edgezero.git", branch = "feature/configureable-axum-host", package = "edgezero-cli" }
edgezero-core = { git = "https://github.com/stackpop/edgezero.git", branch = "feature/configureable-axum-host", package = "edgezero-core" }
fastly = "0.11.9"
futures = { version = "0.3", features = ["std", "executor"] }
futures-util = "0.3.31"
Expand All @@ -36,7 +36,9 @@ phf = { version = "0.11", features = ["macros"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
serde_repr = "0.1"
sha2 = "0.10"
simple_logger = "5"
subtle = "2"
thiserror = "1.0"
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
toml = "1.0"
Expand Down
2 changes: 2 additions & 0 deletions crates/mocktioneer-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ phf = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
serde_repr = { workspace = true }
sha2 = { workspace = true }
subtle = { workspace = true }
thiserror = { workspace = true }
toml = { workspace = true }
url = { workspace = true }
Expand Down
3 changes: 2 additions & 1 deletion crates/mocktioneer-core/src/auction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use crate::aps::{ApsBidRequest, ApsBidResponse, ApsContextual, ApsSlotResponse};
use crate::openrtb::{
Bid as OpenrtbBid, Imp as OpenrtbImp, MediaType, OpenRTBRequest, OpenRTBResponse, SeatBid,
};
use crate::render::{iframe_html, CreativeMetadata, SignatureStatus};
use crate::render::{extract_ec_info, iframe_html, CreativeMetadata, SignatureStatus};
use phf::phf_map;
use serde_json::json;
use uuid::Uuid;
Expand Down Expand Up @@ -181,6 +181,7 @@ pub fn build_openrtb_response(
// Build metadata with sanitized response
let metadata = CreativeMetadata {
signature: signature_status,
edge_cookie: extract_ec_info(req),
request: req,
response: sanitized_response,
};
Expand Down
3 changes: 2 additions & 1 deletion crates/mocktioneer-core/src/mediation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//! and selects winners based on price (highest price wins).

use crate::openrtb::{Bid as OpenRTBBid, Imp, MediaType, OpenRTBRequest, OpenRTBResponse, SeatBid};
use crate::render::{CreativeMetadata, SignatureStatus};
use crate::render::{extract_ec_info, CreativeMetadata, SignatureStatus};
use serde::{Deserialize, Serialize};
use std::cmp::Ordering;
use std::collections::HashMap;
Expand Down Expand Up @@ -204,6 +204,7 @@ fn build_openrtb_response(
signature: SignatureStatus::NotPresent {
reason: "Mediation response".to_string(),
},
edge_cookie: extract_ec_info(&ortb_request),
request: &ortb_request,
response: None,
};
Expand Down
28 changes: 28 additions & 0 deletions crates/mocktioneer-core/src/openrtb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,31 @@ pub struct Geo {
pub ext: Option<serde_json::Value>,
}

/// OpenRTB 2.6 Extended Identifier (EID) — a user identity from an external source.
#[derive(Debug, Default, Clone, Serialize, Deserialize)]
pub struct Eid {
/// Identity source domain (e.g., "liveramp.com", "uidapi.com").
pub source: String,
/// One or more UIDs from this source.
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub uids: Vec<EidUid>,
#[serde(skip_serializing_if = "Option::is_none")]
pub ext: Option<serde_json::Value>,
}

/// A single UID within an EID entry.
#[derive(Debug, Default, Clone, Serialize, Deserialize)]
pub struct EidUid {
/// The identifier value.
pub id: String,
/// Agent type — see OpenRTB 2.6 `atype` enum.
/// 3 = partner-defined (typical for EC-derived IDs).
#[serde(skip_serializing_if = "Option::is_none")]
pub atype: Option<u8>,
#[serde(skip_serializing_if = "Option::is_none")]
pub ext: Option<serde_json::Value>,
}

#[derive(Debug, Default, Clone, Serialize, Deserialize)]
pub struct User {
#[serde(skip_serializing_if = "Option::is_none")]
Expand All @@ -432,6 +457,9 @@ pub struct User {
pub geo: Option<Geo>,
#[serde(skip_serializing_if = "Option::is_none")]
pub consent: Option<String>,
/// OpenRTB 2.6 Extended Identifiers — synced partner IDs from the identity graph.
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub eids: Vec<Eid>,
#[serde(skip_serializing_if = "Option::is_none")]
pub ext: Option<serde_json::Value>,
}
Expand Down
Loading
Loading