fix(providers): retire Antigravity to a non-runnable tombstone with a Codewhale-owned clear path (PROD-002) - #5739
fix(providers): retire Antigravity to a non-runnable tombstone with a Codewhale-owned clear path (PROD-002)#5739Hmbown wants to merge 6 commits into
Conversation
…avity tombstone work Snapshot only — not yet compiled/tested end to end. Retains the prior writer's deletion of agy_credentials.rs and client/cloud_code.rs, the ProviderKind compatibility tombstone, docs/locale/web facts edits, and the provider-registry drift checker tightening. Finished in follow-up commits. Signed-off-by: CodeWhale Bot <bot@codewhale.net>
…ity-docs-20260830 Signed-off-by: CodeWhale Bot <bot@codewhale.net> # Conflicts: # docs/PROVIDERS.md
…tone
`ProviderKind::parse` is catalog-only (ALL excludes Antigravity), so the
registry alias `agy` no longer resolved anywhere: `parse_config_identity`
matched only ids/config keys before falling back to `parse`, returning
None for `agy`. That let `config set providers.agy.base_url` mint a
custom `[providers.agy]` table that serde folds back onto the legacy
slot, and left `/provider agy` / `CODEWHALE_PROVIDER=agy` on the generic
unknown-provider path instead of the tombstone message.
`parse_config_identity` now falls through to `parse_retired_alias`,
which consults aliases only for registry entries absent from ALL, so
catalog aliases keep precedence and `parse("agy")` stays None.
Tests: the legacy `[providers.agy]` spelling parses onto the tombstone
slot with no extras table; every `set_value` spelling bails with the
google + GEMINI_API_KEY message and writes nothing; the tombstone is
absent from ALL, names_hint, auth methods, and env vars.
Signed-off-by: CodeWhale Bot <bot@codewhale.net>
…ctor and /model `Config::api_provider()` never returned `ApiProvider::Antigravity`: since `ApiProvider::parse` rejects the retired identity, a persisted `provider = "antigravity"` fell through the base-URL sniff to DeepSeek, so the fail-closed branches in `DeepSeekClient::from_parts`, `deepseek_api_key_with_secret_store_mode`, and `resolve_runtime_route_for_identity` were unreachable and a legacy config would silently run as DeepSeek past `validate()`. The legacy selection (either spelling) now resolves to its own tombstone identity. `credential_state_for_provider` classifies the tombstone as Legacy so a leftover `[providers.antigravity].api_key` never reads as Saved and `/model` lists no candidate. `codewhale doctor` iterates `doctor_api_key_providers()`, which filters the retired slot out of the API Keys rows. Tests: env selection via CODEWHALE_PROVIDER, `/provider antigravity|agy`, and `provider setup` all return the tombstone naming google + GEMINI_API_KEY; with ANTIGRAVITY_API_KEY and AGY_ADC_AUTH set and a legacy api_key in the table, readiness is Legacy, the inventory has no Antigravity candidate, and no client can be constructed. Signed-off-by: CodeWhale Bot <bot@codewhale.net>
…ift guard - CHANGELOG (root + tui): Unreleased entry for the non-runnable tombstone, the scope of `codewhale auth clear --provider antigravity` (Codewhale-owned state only; never a Google/Antigravity session), and the supported `google` + GEMINI_API_KEY Gemini route. - config.example.toml: add the `[providers.google]` example so Gemini users have an example-config path. - scripts/check-provider-registry.py: also scan README.md and config.example.toml for retired identities and forbidden markers, require the `google` example table with GEMINI_API_KEY, and assert the runtime contract in source (retired-alias resolution in `parse_config_identity`, Legacy readiness for the tombstone, and the filtered doctor API Keys loop). Signed-off-by: CodeWhale Bot <bot@codewhale.net>
…ity-docs-20260830
| # Provider aliases: google, gemini, google-gemini, ai-studio | ||
| # Env var aliases: GEMINI_API_KEY, GOOGLE_API_KEY, GEMINI_BASE_URL, GOOGLE_BASE_URL | ||
| [providers.google] | ||
| # api_key = "YOUR_GEMINI_API_KEY" |
There was a problem hiding this comment.
Blocker This changed line looks like a hardcoded secret.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Claude finished @Hmbown's task in 1m 32s —— View job Claude finished reviewing PR #5739
SummaryThis is a careful, well-scoped retirement of the Antigravity provider to a non-runnable tombstone. I read the full diff against 1. Correctness / non-exhaustive matches — No issues found. All 2. Provider/model/route safety (EPIC #2608) — No violations. 3. Reuse / simplification — One minor nit: 4. Tests — Coverage is unusually thorough for a retirement PR: alias parsing ( 5. Security — Secret handling in Good choices worth calling out: the No blocking findings. CI was still in progress ( |
What (PRD §4.4 PROD-002, ratified)
Antigravity is no longer a selectable provider anywhere. What remains is a non-runnable legacy tombstone so old config still parses, plus one Codewhale-owned clear path — nothing touches the user's Google/Antigravity session.
crates/tui/src/agy_credentials.rs, incl. thestate.vscdbreader andAGY_ADC_AUTHprecedence) and the private cloud-code transport (crates/tui/src/client/cloud_code.rs, incl. the ignored live test and the/v1internalURL builder); removedWireDialect::GoogleCloudCode/RouteShape::CloudCode, theCloudCodeSystemPromptUnsupportedmessage in all 15 locale packs, and every Antigravity branch inclient.rs,role_placement.rs,turn_loop.rs.ProviderKind::Antigravitystays as a deserialize-only tombstone (serde aliasagy), removed fromProviderKind::ALL(42→41), catalog export,providers_sorted_for_display,parse_route_kind, golden route ids and the providers-export golden. Selection via CLI (--provider), TUI (/provider, picker,/model), config, env (ANTIGRAVITY_API_KEY,ANTIGRAVITY_BASE_URL/MODELremoved), and route resolution all fail closed before any I/O with one message that points Gemini users togoogle+GEMINI_API_KEY.doctorno longer reports it.codewhale auth clear --provider antigravity|agyis the only surface that accepts the identity: it clears only[providers.antigravity]/[providers.agy], fallback entries, the top-level selection, and Codewhale's own secret-store slot, with secret rollback on save failure, and scrubs the sibling.bakviatoml_edit. No external path is resolved, no env credential read, no revoke call.docs/PROVIDERS.mdgains one "Legacy Antigravity tombstone" section (clear command, no-session-alteration statement, google + GEMINI_API_KEY); antigravity rows removed from the selection list, wire/env, credential, and registry tables;docs/CONFIGURATION.mdprovider lists updated; website facts filters (web/scripts/facts-lib.mjs,web/lib/facts-drift.ts) now actually apply their EXCLUDED set.scripts/check-provider-registry.py(+272) now parsesProviderKind::ALL, asserts no legacy id is selectable/documented, thatProviderKind::parseandApiProvider::catalogderive fromALL, that the tombstone section exists exactly once with the safety copy and no login/OAuth guidance, and forbidsANTIGRAVITY_API_KEY,AGY_ADC_AUTH,cloudcode-pa,state.vscdb,[providers.antigravity]across the public docs/facts.Evidence (level 2, post-merge of main
2f200ee03)cargo test -p codewhale-config→test result: ok. 627 passed; 0 failed; 1 ignoredcargo test -p codewhale-tui --lib -- antigravity config::tests::api_provider provider_read→test result: ok. 138 passed; 0 failedcargo test -p codewhale-cli antigravity→test result: ok. 3 passed; 0 failed(incl.antigravity_clear_removes_only_codewhale_owned_legacy_state, which plants an external-session trap file and asserts it is byte-identical afterwards, and…_restores_codewhale_secret_when_config_write_fails)-D warningswith the CI allow-list clean on config/tui/cli;cargo fmt --checkclean;python3 scripts/check-provider-registry.py→ passed.Stat: 54 files changed, 1289 insertions(+), 1276 deletions(-). HEAD:
a44c68b57408288aafc1fb63df7f06e5512d4296.Unproven (deliberately)
Real TUI picker/
/model//providerrendering with a legacy config on disk (unit-level only);codewhale doctorandauth clearagainst a real user config dir (temp-dir tests only); website build/deploy and facts regeneration beyondcheck-facts; npm wrapper/packaging/release artifacts; hosted CI (this PR); the full 11.6k-test tui suite (a 138-test filtered slice ran).No provider calls were made, no user session altered, no deploy, no publish, no real credentials handled.
No-Issue: ratified PRD PROD-002 retirement (codewhale-ops PRODUCT_PRD.md §4.4); supersedes the prior writer's uncommitted work (snapshot
ef88c88cb)🤖 Generated with Claude Code
https://claude.ai/code/session_014aDEyM2a4pPZ9qqMDrP5YX