mirror of
https://github.com/instructkr/claw-code.git
synced 2026-04-13 03:24:49 +08:00
Remove the deprecated Claude subscription login path and restore a green Rust workspace
ROADMAP #37 was still open even though several earlier backlog items were already closed. This change removes the local login/logout surface, stops startup auth resolution from treating saved OAuth credentials as a supported path, and updates diagnostics/help to point users at ANTHROPIC_API_KEY or ANTHROPIC_AUTH_TOKEN only. While proving the change with the user-requested workspace gates, clippy surfaced additional pre-existing warning failures across the Rust workspace. Those were cleaned up in-place so the required `cargo fmt`, `cargo clippy --workspace --all-targets -- -D warnings`, and `cargo test --workspace` sequence now passes end to end. Constraint: User explicitly required full-workspace fmt/clippy/test before commit/push Constraint: Existing dirty leader worktree had to be stashed before attempted OMX team worktree launch Rejected: Keep login/logout but hide them from help | left unsupported auth flow and saved OAuth fallback intact Rejected: Stop after ROADMAP #37 targeted tests | did not satisfy required full-workspace verification gate Confidence: medium Scope-risk: moderate Reversibility: clean Directive: Do not reintroduce saved OAuth as a silent Anthropic startup fallback without an explicit supported auth policy Tested: cargo fmt --all --check; cargo clippy --workspace --all-targets -- -D warnings; cargo test --workspace Not-tested: Remote push effects beyond origin/main update
This commit is contained in:
@@ -3771,10 +3771,7 @@ impl ProviderRuntimeClient {
|
||||
allowed_tools: BTreeSet<String>,
|
||||
fallback_config: &ProviderFallbackConfig,
|
||||
) -> Result<Self, String> {
|
||||
let primary_model = fallback_config
|
||||
.primary()
|
||||
.map(str::to_string)
|
||||
.unwrap_or(model);
|
||||
let primary_model = fallback_config.primary().map_or(model, str::to_string);
|
||||
let primary = build_provider_entry(&primary_model)?;
|
||||
let mut chain = vec![primary];
|
||||
for fallback_model in fallback_config.fallbacks() {
|
||||
@@ -3852,17 +3849,15 @@ impl ApiClient for ProviderRuntimeClient {
|
||||
entry.model
|
||||
);
|
||||
last_error = Some(error);
|
||||
continue;
|
||||
}
|
||||
Err(error) => return Err(RuntimeError::new(error.to_string())),
|
||||
}
|
||||
}
|
||||
|
||||
Err(RuntimeError::new(
|
||||
last_error
|
||||
.map(|error| error.to_string())
|
||||
.unwrap_or_else(|| String::from("provider chain exhausted with no attempts")),
|
||||
))
|
||||
Err(RuntimeError::new(last_error.map_or_else(
|
||||
|| String::from("provider chain exhausted with no attempts"),
|
||||
|error| error.to_string(),
|
||||
)))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user