Skip to content

refactor(config,runtime): collapse built-in HTTP credentials into one variant (ENG-1066) - #372

Merged
lg2m merged 1 commit into
mainfrom
refactor/eng-1066-ap7b-builtin-credential
Oct 20, 2026
Merged

lg2m merged 1 commit into
mainfrom
refactor/eng-1066-ap7b-builtin-credential

Conversation

@lg2m

@lg2m lg2m commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator

Slice AP7b of the auth-providers plan (ENG-1066), after #368.

What changed

No user-visible change. The three per-provider built-in credential variants HttpCredential::{ApiKey, OpenAiCodex, XAi} collapse into one HttpCredential::Builtin { provider, api_key, profile } (ADR-0064 §4). Each provider table row now carries its credential audience and environment variables.

  • qq-config: builtin_provider(id) lookup and BuiltinProvider::stored_name(profile) (<id>/<profile>, default when unset).
  • Root: builtin_audience (the one place table audiences and qq-auth's OAuth audiences meet) and resolve_builtin_api_key in src/runtime.rs.
  • Runtime credential resolution, authenticated-provider checks, login remedies, qq doctor, model discovery and its cache probe, and the harness plan-size estimate read the row instead of spelling providers. Root non-test code no longer hard-codes "openai-codex/{}", "xai/{}" or "XAI_API_KEY".
  • Unchanged: config syntax, trust digests, stored names, messages, protocol.

Verification

  • New builtin_request_shape_identities_are_pinned: request-shape identities for all five built-ins, recorded by running the same test on unmodified origin/main; byte-identical after the change.
  • builtin_provider_patches_layer_over_their_presets still asserts stored name, variables, audience, explicit key and profile per provider.
  • New every_api_key_row_names_a_variable table invariant.
  • cargo xtask check passed; cargo xtask smoke 9/9.

Notes

  • xtask/src/legacy-sleeps.txt: 8 existing entries' line numbers shifted by the edits; no new sleeps.
  • The catalog cache-probe test's built-in fallback now uses the real openai row (nothing stored) instead of a fabricated credential pointing at a stored name.
  • ADR-0064 stays "Proposed".

… variant (ENG-1066)

HttpCredential::{ApiKey, OpenAiCodex, XAi} become HttpCredential::Builtin
{ provider, api_key, profile } (ADR-0064 §4). The runtime, catalog,
doctor and harness read the stored name, variables and audience from the
provider table row instead of spelling them per provider.

Request-shape identities of every built-in are pinned to the bytes
recorded on origin/main before the collapse.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-20T04:19:38.038001Z 9a56aee Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@lg2m

lg2m commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: 9a56aee807

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@lg2m
lg2m merged commit 321a245 into main Oct 20, 2026
6 checks passed
@lg2m
lg2m deleted the refactor/eng-1066-ap7b-builtin-credential branch October 20, 2026 04:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant