Repository navigation
Add guided admin key setup and verification - #387
Conversation
Castiron custom codeEvaluated main: ✅ No new custom-code files detected. 5 mixed files remain; 0 existing customizations changed. Compared 5 existing customizations unchanged
A changed generated baseline means this report cannot reliably identify which handwritten lines changed. Inspect the custom-code diffDownload the exact patch produced by this run (requires repository access): gh run download 38111156735 --repo openai/openai-cli \
--name castiron-custom-code-38111156735-1 --dir /tmp/castiron-custom-code-38111156735-1
git apply --stat /tmp/castiron-custom-code-38111156735-1/custom-code.patch
cat /tmp/castiron-custom-code-38111156735-1/custom-code.patchOr reproduce it from an SDK checkout containing the vendored reporter: git fetch --no-tags origin 193ee5b56e304723fa1995ff96aa711c876b45ef 3e37745b9a87a44898f5676ff3d3143366be16e3
python3 scripts/castiron/custom_code_report.py report \
--base 193ee5b56e304723fa1995ff96aa711c876b45ef \
--head 3e37745b9a87a44898f5676ff3d3143366be16e3 --fetch --require-head-hash --public \
--out /tmp/castiron-custom-code-3e37745b9a87
cat /tmp/castiron-custom-code-3e37745b9a87/custom-code.patchThis is the current full custom patch for mixed files, not an attribution of only the handwritten lines changed by this PR. |
|
@codex review Please review commit |
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ce129ba366
ℹ️ 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".
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
|
@codex review Please review the functional correction in It addresses the three findings from |
…min-setup-public-20261008
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
…min-setup-public-20261008 # Conflicts: # pkg/custom/help.go
|
@codex review Please review code and security for Help-aligned head This local merge preserves the reviewed Admin correction from |
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3c60f6970a
ℹ️ 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".
…min-setup-public-20261008 # Conflicts: # pkg/custom/local_errors.go
…min-setup-public-20261008
…min-setup-public-20261008
…min-setup-public-20261008
jbeckwith-oai
left a comment
There was a problem hiding this comment.
Reviewed credential precedence and validation order, cloned admin routes, endpoint/mTLS preservation, hidden input, cancellation, verification, and error presentation. No blocking findings; the previously reported issues appear addressed.
On the exact head, focused TestAdmin and public TestMainAdmin tests, go vet ./..., and changed-file gofmt checks pass. A temporary credential-acceptance mutation was caught by the tests, and the restored tests passed. Hosted checks pass. Native Windows behavior was reviewed statically, not executed; no live API calls were made.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8487ddf7f9
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8db6894b9e
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bfb7309212
ℹ️ 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".
Admin commands currently fail without explaining that they need an admin key.
This adds clear guidance and
openai setup admin, which hides key entry and verifies access automatically.What changes
--quietfor verification progress while retaining the prompt, result, and errors.Commands
Interactive setup requires terminal stdin, stdout, and stderr, with text output.
Debug logging and structured output stop before prompting.
The destination follows
--base-urlorOPENAI_BASE_URL.HTTPS is required except for loopback servers.
The entered key replaces Authorization; other configured headers and mTLS remain active.
An empty project list also verifies access successfully.
Code
pkg/customowns credential checks, setup orchestration, hidden input, and safe errors.The Windows factory uses a console-record reader with cancellable waits and joined cleanup.
macOS and Linux retain the existing reader with platform input cleanup.
The parser, signal handling, and verification request remain shared.
Canonical metadata survives command cloning.
Request setup checks credentials after required-input validation and before file expansion.
No new package, dependency, generated-command change, main.go change, or budget increase is included.
Tested
Candidate 3e37745 is based on main 193ee5b, including the merged Output, Files, and SDK updates.
Fresh local checks passed 816 focused product-test entries. Two unsupported-only tests skip on supported builds.
Go vet and Windows main-test compilation passed. Compilation does not establish native Windows execution.
Local validation used Go 1.26.9 on macOS arm64, synthetic keys, and loopback endpoints.
The current run includes all seven public terminal cases and all 21 native Mac key-reader scenarios.
It covers quiet behavior, cancellation, complete/partial startup input, and final queued-input cleanup.
Reader comparisons normalize Darwin PENDIN; queue checks separately require empty pending input.
Fresh shared error-path simulations cover output setup and restoration failures with no returned key.
Both restore exact native Mac terminal settings, preserve privacy, and reap their children without forced cleanup.
These simulations do not inject native Windows API failures.
Three new Windows regressions start with output processing disabled: success, cancellation, and marked multiline rejection.
They check active modes, native screen controls, and exact mode restoration.
Fresh native Windows CI passed all three cases, within 38 sessions and 37 distinct reader checks.
It recorded 42 reader-phase frames and exact output-mode restoration.
Paste markers are injected; these cases do not verify clipboard framing.
At 2baa586, separate error-presentation checks passed 85 entries; module verification and the standalone build passed.
That standalone binary passed 14 setup cases and three startup-input scenarios.
The old runtime fails both startup regressions while preserving five controls.
The simulated startup-flush failure returned no key, created no reader, displayed no prompt, and restored terminal settings.
Its negative control failed when startup flushing was removed.
The private startup/failure probes used exact terminal comparisons after FIONREAD, without masking.
The current change preserves startup/final input cleanup. Its non-Windows output helper changes no modes.
The queue guarantee covers bytes pending when cleanup runs, not later arrivals.
At bfb7309, the unchanged unsupported-entry paths passed 91 fallback-simulation entries and three native Mac rejection cases.
Copied manual recovery ran through bash and zsh with quoted executable paths.
That simulation does not establish native BSD execution.
FreeBSD, OpenBSD, and Windows amd64 CLI compilation passed at 2baa586.
Independent reviews cover all recorded findings and the current-main composition.
Current-head CI passed, including the full Linux suite and artifact validation.
Help, CodeQL, nine vulnerability targets, and the custom-code gate also passed.
The automated review completed without additional findings. All ten review threads are resolved after verification.
Merged through the normal queue after queue CI passed.
No workflow, scanner, generated-command, or budget gate changed. Setup saves no credentials.
Native Windows quiet-mode behavior, Windows Terminal application behavior, and live API verification remain untested.
Demo
Actual binaries on macOS arm64, comparing main d32b3ae with ce129ba.
The recording uses a synthetic key and loopback API. No live key is created.
The follow-up preserves this setup output; its validation and cancellation corrections have separate regression coverage.
Before:
After:
Recording recipe · Synthetic fixture
BEGIN_COMMIT_OVERRIDE
feat(admin): add guided admin-key setup and access verification (#387)
END_COMMIT_OVERRIDE