Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
8334c9f
test: drop verified worthless tests across crates
asto18089 Oct 12, 2026
b8925b0
test: restore reserved scaffolding and seams
asto18089 Oct 12, 2026
bc54777
test: restore remaining reserved seams and pins
asto18089 Oct 12, 2026
fc798b8
docs: clean worthless-test sweep residue
asto18089 Oct 12, 2026
6694d6c
chore(tui): fix test-target clippy lints
asto18089 Oct 12, 2026
6b60254
test: restore reservation-class residue
asto18089 Oct 12, 2026
9f9359f
test: restore provider-reported context seam
asto18089 Oct 12, 2026
a3f1fac
test: restore misclassified regression pins
asto18089 Oct 12, 2026
a634d90
test: finish C2 cascade edges the sweep left behind
asto18089 Oct 12, 2026
b2207cb
docs(tui): fix stale cucumber runner count in harness header
asto18089 Oct 12, 2026
4fb1c85
test: restore pins misclassified as worthless
asto18089 Oct 13, 2026
7058b69
test: restore network_policy and stale-job reservation seams
asto18089 Oct 13, 2026
afff681
test: apply sweep classes to round-5 leftovers
asto18089 Oct 13, 2026
7bae0ff
test: pin saturated backoff and replay-diverged wire spelling
asto18089 Oct 13, 2026
fe7113f
docs: correct integration row in tests README
asto18089 Oct 13, 2026
267c80d
test: restore live-subject pins found by the fresh review
asto18089 Oct 13, 2026
c22b3ec
test: drop the twin replay-replay tautology
asto18089 Oct 13, 2026
2db56a5
docs: fix fresh-review residue
asto18089 Oct 13, 2026
0f63212
Merge branch 'pinvou3-clean' into test-cleanup-sweep
asto18089 Oct 13, 2026
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
155 changes: 0 additions & 155 deletions crates/agent/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,6 @@ use std::fmt;
use codewhale_config::{ProviderKind, opencode_go_chat_model_id};
use serde::{Deserialize, Serialize};

/// High-level model family used for shared identity affordances across clients.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
pub enum ModelFamily {
DeepSeek,
Anthropic,
OpenAI,
Google,
Meta,
Mistral,
Qwen,
Grok,
Cohere,
GptOss,
Inferencer,
}

/// Metadata for a single model entry in the registry.
///
/// Each model has a canonical `id` used by the provider, a list of `aliases`
Expand Down Expand Up @@ -1635,61 +1619,6 @@ fn normalize(value: &str) -> String {
value.trim().to_ascii_lowercase()
}

#[must_use]
/// Classify a model identifier by its underlying model family.
pub fn model_family(model_id: &str) -> ModelFamily {
let normalized = normalize(model_id);
if normalized.is_empty() {
return ModelFamily::Inferencer;
}

if normalized.contains("deepseek") {
return ModelFamily::DeepSeek;
}
if normalized.contains("claude") || normalized.contains("anthropic") {
return ModelFamily::Anthropic;
}
if normalized.contains("gpt-oss") || normalized.contains("gpt_oss") {
return ModelFamily::GptOss;
}
if normalized.starts_with("gpt-")
|| normalized.contains("/gpt-")
|| normalized.contains("openai/")
{
return ModelFamily::OpenAI;
}
if normalized.contains("gemini")
|| normalized.contains("gemma")
|| normalized.contains("google/")
{
return ModelFamily::Google;
}
if normalized.contains("llama")
|| normalized.contains("muse-spark")
|| normalized.contains("meta-")
|| normalized.contains("meta/")
{
return ModelFamily::Meta;
}
if normalized.contains("mistral")
|| normalized.contains("mixtral")
|| normalized.contains("codestral")
{
return ModelFamily::Mistral;
}
if normalized.contains("qwen") {
return ModelFamily::Qwen;
}
if normalized.contains("grok") {
return ModelFamily::Grok;
}
if normalized.contains("cohere") || normalized.contains("command-r") {
return ModelFamily::Cohere;
}

ModelFamily::Inferencer
}

fn model_matches(model: &ModelInfo, requested: &str) -> bool {
let requested = normalize(requested);
normalize(&model.id) == requested
Expand Down Expand Up @@ -2104,29 +2033,6 @@ mod tests {
}
}

/// The bare `k3` id belongs to the Kimi Code coding-plan endpoint and
/// `kimi-k3` to the direct platform endpoint. Neither may be laundered
/// into the other's id by alias expansion.
#[test]
fn moonshot_k3_ids_are_never_rewritten_into_each_other() {
let registry = ModelRegistry::default();

assert_eq!(
registry
.resolve_ok(Some("kimi-k3"), Some(ProviderKind::Moonshot))
.resolved
.id,
"kimi-k3"
);
assert_eq!(
registry
.resolve_ok(Some("k3"), Some(ProviderKind::Moonshot))
.resolved
.id,
"k3"
);
}

/// A provider-scoped question must never be answered with another
/// vendor's model. `kimi-k3` also exists in the OpenCode Go catalog;
/// before this fix that entry answered `--provider moonshot` requests.
Expand Down Expand Up @@ -2483,7 +2389,6 @@ mod tests {
assert_eq!(alias.resolved.provider, ProviderKind::Meta);
assert_eq!(alias.resolved.id, "muse-spark-1.2");
assert!(!alias.used_fallback);
assert_eq!(model_family("muse-spark-1.2"), ModelFamily::Meta);
}

#[test]
Expand All @@ -2499,16 +2404,6 @@ mod tests {
}
}

#[test]
fn grok_ids_stay_in_grok_family() {
assert_eq!(model_family("grok-4.6"), ModelFamily::Grok);
assert_eq!(model_family("grok-4.5"), ModelFamily::Grok);
assert_eq!(
model_family("grok-4.20-0309-non-reasoning"),
ModelFamily::Grok
);
}

#[test]
fn stepfun_and_minimax_direct_models_resolve_when_provider_hinted() {
let registry = ModelRegistry::default();
Expand Down Expand Up @@ -2774,54 +2669,4 @@ mod tests {
assert_eq!(resolved.resolved.provider, ProviderKind::Deepseek);
assert_eq!(resolved.resolved.id, "deepseek-v4-flash");
}

#[test]
fn model_family_classifies_known_model_ids() {
assert_eq!(model_family("deepseek-v4-pro"), ModelFamily::DeepSeek);
assert_eq!(model_family("openai/gpt-5.4"), ModelFamily::OpenAI);
assert_eq!(
model_family("anthropic/claude-opus-4-7"),
ModelFamily::Anthropic
);
assert_eq!(
model_family("meta-llama/llama-3.3-70b-instruct"),
ModelFamily::Meta
);
assert_eq!(model_family("Qwen/Qwen3-Coder"), ModelFamily::Qwen);
}

#[test]
fn model_family_uses_underlying_model_for_router_ids() {
assert_eq!(
model_family("groq/llama-3.3-70b-versatile"),
ModelFamily::Meta
);
assert_eq!(
model_family("openrouter/openai/gpt-5.4"),
ModelFamily::OpenAI
);
assert_eq!(
model_family("fireworks/accounts/fireworks/models/deepseek-v4-pro"),
ModelFamily::DeepSeek
);
}

#[test]
fn model_family_covers_prominent_google_and_mistral_model_names() {
assert_eq!(model_family("google/gemma-3-27b-it"), ModelFamily::Google);
assert_eq!(
model_family("mistralai/mixtral-8x22b"),
ModelFamily::Mistral
);
assert_eq!(model_family("codestral-latest"), ModelFamily::Mistral);
}

#[test]
fn model_family_falls_back_to_inferencer_for_unknown_models() {
assert_eq!(
model_family("custom-gateway/my-private-model"),
ModelFamily::Inferencer
);
assert_eq!(model_family(""), ModelFamily::Inferencer);
}
}
23 changes: 0 additions & 23 deletions crates/app-server/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4634,29 +4634,6 @@ mod tests {
);
}

// ── cors_layer ─────────────────────────────────────────────────────

#[test]
fn cors_layer_includes_default_origins() {
let layer = cors_layer(&[]);
// Just verify it doesn't panic and creates successfully
let _ = layer;
}

#[test]
fn cors_layer_adds_extra_origins() {
let extras = vec!["https://example.com".to_string()];
let layer = cors_layer(&extras);
let _ = layer;
}

#[test]
fn cors_layer_skips_empty_origins() {
let extras = vec!["".to_string(), " ".to_string()];
let layer = cors_layer(&extras);
let _ = layer;
}

// ── JsonRpc helpers ────────────────────────────────────────────────

#[test]
Expand Down
10 changes: 0 additions & 10 deletions crates/cli/src/update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3256,16 +3256,6 @@ E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855 *codewhale-win
assert!(ensure_supported_release_target("android", "aarch64").is_ok());
}

#[test]
fn android_release_assets_never_select_linux_arm64() {
// Sanity: the stem formatter must never produce a linux-* stem for android.
let stem = release_asset_stem_for_prefix("codewhale", "android", "aarch64");
assert!(
!stem.contains("linux"),
"android stem must not contain linux: {stem}"
);
}

#[test]
fn mirror_release_uses_base_url_and_platform_assets() {
let release = release_from_mirror_base_url(
Expand Down
2 changes: 1 addition & 1 deletion crates/config/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ pub use provider_templates::{
CEREBRAS_TEMPLATE_ID, COMMAND_CODE_TEMPLATE_ID, GROQ_API_KEY_ENV, GROQ_BASE_URL,
GROQ_DEFAULT_MODEL, GROQ_TEMPLATE_ID, ProviderSetupApply, ProviderSetupTemplate,
SENSENOVA_API_KEY_ENV, SENSENOVA_BASE_URL, SENSENOVA_DEFAULT_MODEL, SENSENOVA_TEMPLATE_ID,
compatible_provider_setup_templates, provider_setup_template, provider_setup_templates,
provider_setup_template, provider_setup_templates,
};
pub use settings_schema::{
SETTINGS_SCHEMA, SettingDef, SettingKind, SettingOption, SettingUi, schema_groups, schema_rows,
Expand Down
25 changes: 8 additions & 17 deletions crates/config/src/provider_templates.rs
Original file line number Diff line number Diff line change
Expand Up @@ -303,12 +303,6 @@ pub fn provider_setup_templates() -> &'static [ProviderSetupTemplate] {
TEMPLATES
}

/// Templates that persist as named OpenAI-compatible tables.
pub fn compatible_provider_setup_templates() -> impl Iterator<Item = &'static ProviderSetupTemplate>
{
TEMPLATES.iter().filter(|template| template.is_compatible())
}

/// Look up a template by id, documented alias, or first-class provider id.
#[must_use]
pub fn provider_setup_template(id: &str) -> Option<&'static ProviderSetupTemplate> {
Expand Down Expand Up @@ -385,17 +379,6 @@ mod tests {
}
}

#[test]
fn compatible_template_ids_do_not_shadow_built_ins() {
for template in compatible_provider_setup_templates() {
assert!(
ProviderKind::parse(template.id).is_none(),
"compatible template '{}' shadows ProviderKind",
template.id
);
}
}

#[test]
fn first_class_templates_reuse_registry_facts() {
let zen = provider_setup_template("opencode-zen").expect("zen");
Expand Down Expand Up @@ -431,6 +414,14 @@ mod tests {
assert_eq!(sense.picker_models(), vec![SENSENOVA_DEFAULT_MODEL]);
assert!(sense.docs_url().is_none());
assert!(sense.credential_url().is_none());
// Re-pointed from compatible_template_ids_do_not_shadow_built_ins:
// this template id is the one the surviving hosted-host enumeration
// does not cover, and it must never shadow a ProviderKind built-in.
assert!(
ProviderKind::parse(SENSENOVA_TEMPLATE_ID).is_none(),
"compatible template '{}' shadows ProviderKind",
SENSENOVA_TEMPLATE_ID
);
}

#[test]
Expand Down
Loading
Loading