исправить: закрыть ревью сквозной корреляции
CI / Rust Checks (pull_request) Successful in 8m33s
CI / UI Checks (pull_request) Successful in 5s
CI / Frontend E2E (pull_request) Successful in 6m51s
CI / Community Image Smoke (pull_request) Failing after 9m10s
CI / Deploy (pull_request) Has been skipped

This commit is contained in:
2026-07-31 02:37:45 +03:00
parent 0e8f1ca03a
commit 9a7d60593a
28 changed files with 667 additions and 98 deletions
+15
View File
@@ -42,6 +42,15 @@ pub enum PlatformApiKeyKind {
Approval,
}
impl PlatformApiKeyKind {
pub const fn secret_marker(self) -> &'static str {
match self {
Self::McpClient => "crk_",
Self::Approval => "crk_appr_",
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "snake_case")]
pub enum PlatformApiKeyScope {
@@ -123,6 +132,12 @@ mod tests {
};
use crate::ids::{AgentId, PlatformApiKeyId, UserId, WorkspaceId};
#[test]
fn api_key_kinds_own_their_secret_markers() {
assert_eq!(PlatformApiKeyKind::McpClient.secret_marker(), "crk_");
assert_eq!(PlatformApiKeyKind::Approval.secret_marker(), "crk_appr_");
}
#[test]
fn user_serializes_created_at_as_rfc3339() {
let user = User {