fix(ci): stabilize cross-platform workflow checks

This commit is contained in:
zhefox
2026-07-29 21:55:43 +08:00
parent 37df5b93b1
commit f8000012f7
40 changed files with 251 additions and 139 deletions
@@ -541,10 +541,11 @@ fn build_configured_claude_count_tokens_url(
.map(str::trim)
.filter(|value| !value.is_empty());
let path = path?;
let path = path
.starts_with('/')
.then(|| path.to_string())
.unwrap_or_else(|| format!("/{path}"));
let path = if path.starts_with('/') {
path.to_string()
} else {
format!("/{path}")
};
build_passthrough_path_url(
&transport.endpoint.base_url,
path.as_str(),
@@ -1018,7 +1018,7 @@ mod tests {
.expect("headers should build")
};
assert!(
build_headers(compat_behavior, None).get("x-app").is_none(),
!build_headers(compat_behavior, None).contains_key("x-app"),
"compatibility profile must not impersonate the Claude Code transport"
);
assert_eq!(
@@ -1029,12 +1029,11 @@ mod tests {
"Claude Code transport headers must survive a transparent body profile"
);
assert!(
build_headers(
!build_headers(
native_behavior,
Some(aether_ai_formats::ApiOperation::ClaudeCountTokens),
)
.get("anthropic-beta")
.is_none(),
.contains_key("anthropic-beta"),
"native transparent token counting must not inject compatibility betas"
);
assert!(