fix(profiles): authenticate ClawHub Codex judge - #44
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 15, 2026, 12:03 AM ET / 04:03 UTC. ClawSweeper reviewWhat this changesThe PR maps an operator-supplied OpenAI API key to the Codex CLI credential name for the built-in ClawHub judge profiles while preserving an explicit Codex key. Merge readinessKeep open: current main still passes both credential names into the ClawHub judge sandbox but invokes Codex without the needed alias, while this focused PR repairs that gap without changing explicit Codex-key precedence. Priority: P2 Review scores
Verification
How this fits togetherClawScan resolves a profile into scanner and external judge commands, then forwards only allowlisted environment names into the Docker sandbox. The ClawHub profiles run Codex as the judge and store its result in the scan artifact. flowchart LR
A[Operator credentials] --> B[ClawHub profile]
B --> C[Profile resolver]
C --> D[Sandbox environment allowlist]
D --> E[Codex judge command]
E --> F[Judge result artifact]
Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Complete the pending CI checks and merge the profile-local alias so existing OPENAI_API_KEY-only ClawHub judge setups authenticate without changing the public CLI. Do we have a high-confidence way to reproduce the issue? Yes, at source level: current main forwards OPENAI_API_KEY to the judge sandbox but does not translate it before the Codex command; the shell fallback and precedence behavior were directly checked with marker values. Is this the best way to solve the issue? Yes: the profile-local guard repairs the credential mismatch at the command boundary, preserves explicit CODEX_API_KEY behavior, and adds no public configuration surface. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 04401337b3ad. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Closeout proof for the two review checklist items:
|
Summary
clawhubandclawhub-aigCodex judges when operators provide onlyOPENAI_API_KEYCODEX_API_KEYRoot cause
ClawScan allowlisted both credential names but launched
codex execwithout translatingOPENAI_API_KEY. Codex CLI 0.142.3 readsCODEX_API_KEYfor non-interactive exec authentication, so a valid OpenAI key reached the sandbox but was not attached to judge requests.Validation
go test ./internal/profiles -count=1go vet ./....agents/skills/autoreview/scripts/autoreview --mode local(clean)CODEX_API_KEYgo test -count=1 ./...also ran locally. Unrelated existing macOS temp-path assertions fail on/varversus/private/varininternal/installpolicyandinternal/runner; Linux CI is the required full-suite gate before merge.