mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
Remove repo_url from skill invocation analytics events (#44586)
## What changed Remove `repo_url` from `SkillInvocationEventParams` and stop including it in `skill_invocation` payloads. Update the analytics test fixtures and expected serialized payload to match. GitOrigin-RevId: 06762143fb861a31298fbd8ab737b9b969edfc89
This commit is contained in:
1 parent
d1696652a2
commit
818f1cca8c
4 files changed
+3
-7
No files matched your search
@@ -4442,7 +4442,6 @@ async fn reducer_ingests_skill_invoked_fact() {
|
|||||||
"skill_scope": "user",
|
"skill_scope": "user",
|
||||||
"plugin_id": null,
|
"plugin_id": null,
|
||||||
"remote_plugin_id": null,
|
"remote_plugin_id": null,
|
||||||
"repo_url": null,
|
|
||||||
"thread_id": "thread-1",
|
"thread_id": "thread-1",
|
||||||
"turn_id": "turn-1",
|
"turn_id": "turn-1",
|
||||||
"invoke_type": "explicit",
|
"invoke_type": "explicit",
|
||||||
|
|||||||
@@ -146,7 +146,6 @@ fn sample_skill_track_event(thread_id: &str, plugin_id: Option<&str>) -> TrackEv
|
|||||||
skill_scope: None,
|
skill_scope: None,
|
||||||
plugin_id: plugin_id.map(str::to_string),
|
plugin_id: plugin_id.map(str::to_string),
|
||||||
remote_plugin_id: None,
|
remote_plugin_id: None,
|
||||||
repo_url: None,
|
|
||||||
thread_id: Some(thread_id.to_string()),
|
thread_id: Some(thread_id.to_string()),
|
||||||
turn_id: Some("turn-1".to_string()),
|
turn_id: Some("turn-1".to_string()),
|
||||||
invoke_type: Some(InvocationType::Explicit),
|
invoke_type: Some(InvocationType::Explicit),
|
||||||
|
|||||||
@@ -209,7 +209,6 @@ pub(crate) struct SkillInvocationEventParams {
|
|||||||
pub(crate) skill_scope: Option<String>,
|
pub(crate) skill_scope: Option<String>,
|
||||||
pub(crate) plugin_id: Option<String>,
|
pub(crate) plugin_id: Option<String>,
|
||||||
pub(crate) remote_plugin_id: Option<String>,
|
pub(crate) remote_plugin_id: Option<String>,
|
||||||
pub(crate) repo_url: Option<String>,
|
|
||||||
pub(crate) thread_id: Option<String>,
|
pub(crate) thread_id: Option<String>,
|
||||||
pub(crate) turn_id: Option<String>,
|
pub(crate) turn_id: Option<String>,
|
||||||
pub(crate) invoke_type: Option<InvocationType>,
|
pub(crate) invoke_type: Option<InvocationType>,
|
||||||
|
|||||||
@@ -1283,7 +1283,7 @@ impl AnalyticsReducer {
|
|||||||
invocations,
|
invocations,
|
||||||
} = input;
|
} = input;
|
||||||
for invocation in invocations {
|
for invocation in invocations {
|
||||||
let (skill_id, repo_url, skill_scope) = match invocation.location {
|
let (skill_id, skill_scope) = match invocation.location {
|
||||||
SkillInvocationLocation::Host { path, scope } => {
|
SkillInvocationLocation::Host { path, scope } => {
|
||||||
let skill_scope = match scope {
|
let skill_scope = match scope {
|
||||||
SkillScope::User => "user",
|
SkillScope::User => "user",
|
||||||
@@ -1305,7 +1305,7 @@ impl AnalyticsReducer {
|
|||||||
path.as_path(),
|
path.as_path(),
|
||||||
invocation.skill_name.as_str(),
|
invocation.skill_name.as_str(),
|
||||||
);
|
);
|
||||||
(skill_id, repo_url, Some(skill_scope.to_string()))
|
(skill_id, Some(skill_scope.to_string()))
|
||||||
}
|
}
|
||||||
SkillInvocationLocation::Resource {
|
SkillInvocationLocation::Resource {
|
||||||
id,
|
id,
|
||||||
@@ -1328,7 +1328,7 @@ impl AnalyticsReducer {
|
|||||||
SkillScope::Admin => "admin",
|
SkillScope::Admin => "admin",
|
||||||
})
|
})
|
||||||
.map(str::to_owned);
|
.map(str::to_owned);
|
||||||
(skill_id, None, skill_scope)
|
(skill_id, skill_scope)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
out.push(TrackEventRequest::SkillInvocation(
|
out.push(TrackEventRequest::SkillInvocation(
|
||||||
@@ -1342,7 +1342,6 @@ impl AnalyticsReducer {
|
|||||||
invoke_type: Some(invocation.invocation_type),
|
invoke_type: Some(invocation.invocation_type),
|
||||||
model_slug: Some(tracking.model_slug.clone()),
|
model_slug: Some(tracking.model_slug.clone()),
|
||||||
product_client_id: Some(tracking.product_client_id.clone()),
|
product_client_id: Some(tracking.product_client_id.clone()),
|
||||||
repo_url: repo_url.map(String::from),
|
|
||||||
skill_scope,
|
skill_scope,
|
||||||
plugin_id: invocation.plugin_id,
|
plugin_id: invocation.plugin_id,
|
||||||
remote_plugin_id: invocation.remote_plugin_id,
|
remote_plugin_id: invocation.remote_plugin_id,
|
||||||
|
|||||||
Reference in new issue
Block a user