Skip to content

refactor(runtime): one BuiltinAuth owns built-in provider credential policy (ENG-1066) - #419

Merged
lg2m merged 1 commit into
mainfrom
refactor/eng-1066-builtin-auth
Oct 22, 2026
Merged

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

Conversation

@lg2m

@lg2m lg2m commented Oct 22, 2026

Copy link
Copy Markdown
Collaborator

One BuiltinAuth owns built-in provider credential policy (PR 3/5, ENG-1066) Replaces eight matches on BuiltinAudience with src/builtin_auth.rs. The spawn/authenticated gate now parses stored xAI and Codex OAuth logins as a request would (no refresh, no network), so an unreadable login fails up front; an explicit xAI api_key: is reported in the plan descriptor. Digest markers, audiences, XAI_API_KEY and xtask canary endpoints are pinned against the provider table. No wire or digest change. Verified: new regression tests fail before the fix; affected crates pass; fmt, lint and clippy clean; the remaining failures are the native-command set that also fails on main in this environment.

…policy (ENG-1066)

Replace the eight matches on BuiltinAudience across runtime, catalog, doctor and the auth CLI with one BuiltinAuth in src/builtin_auth.rs that answers each question once: audience, profile scoping, digest marker, secure-store cache probe, and whether a request could authenticate now.

Fixes:
- The authenticated/spawn gate now parses a stored xAI or Codex OAuth
  login as a request would (qq-auth check_xai_credential /
  check_codex_login), without refreshing it, so an unreadable login fails
  the gate instead of the first request. An expired login still passes.
- The plan descriptor reports an explicit xAI api_key reference instead of
  the profile.

Drift guards:
- Request-shape digest markers and audiences pinned per table row.
- qq-auth's XAI_API_KEY_VARIABLE checked against the xai row.
- xtask HTTP canary endpoints checked against the table (qq-config is an
  xtask dev-dependency only).
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 22, 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-22T07:01:15.496620Z 1bfb91f Manual request
🔒 Security Review ✅ Completed 2026-10-22T07:02:30.279406Z 1bfb91f 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 changed the title refactor(runtime): one BuiltinAuth owns built-in provider credential … refactor(runtime): one BuiltinAuth owns built-in provider credential policy (ENG-1066) Oct 22, 2026
@lg2m

lg2m commented Oct 22, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@lg2m

lg2m commented Oct 22, 2026

Copy link
Copy Markdown
Collaborator Author

@codex security review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: 1bfb91fbcb

ℹ️ 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".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review

Security review completed. No security issues were found in this pull request.

Reviewed commit: 1bfb91fbcb

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@lg2m
lg2m merged commit afaf26b into main Oct 22, 2026
7 checks passed
@lg2m
lg2m deleted the refactor/eng-1066-builtin-auth branch October 22, 2026 07:09
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