Skip to content

Normalize codex auth secret filenames to .json#285

Merged
graysurf merged 1 commit intomainfrom
feat/codex-auth-json-secret-normalization
Mar 2, 2026
Merged

Normalize codex auth secret filenames to .json#285
graysurf merged 1 commit intomainfrom
feat/codex-auth-json-secret-normalization

Conversation

@graysurf
Copy link
Collaborator

@graysurf graysurf commented Mar 2, 2026

Normalize codex auth secret filenames to .json

Summary

Normalize codex-cli auth secret filename handling so save/remove/use apply one consistent rule: secret files are .json, users may pass names with or without suffix, and existing .json inputs are preserved without double-appending.

Changes

  • Added shared auth helpers to validate secret targets and normalize secret names to .json in one place.
  • Updated auth save, auth remove, and auth use to use shared validation/normalization behavior.
  • Updated CLI usage/help strings and crates/codex-cli/README.md examples to reflect name|name.json behavior.
  • Added/updated auth tests to cover suffix auto-append, no double-append, and backslash path rejection.

Testing

  • ./.agents/skills/nils-cli-verify-required-checks/scripts/nils-cli-verify-required-checks.sh (pass)
  • cargo llvm-cov nextest --profile ci --workspace --lcov --output-path target/coverage/lcov.info --fail-under-lines 85 (pass)
  • scripts/ci/coverage-summary.sh target/coverage/lcov.info (pass, total line coverage 86.58%)

Risk / Notes

  • This intentionally does not include migration for legacy non-.json filenames; users can re-login/re-save and manually clean old files.

- Normalize auth save/remove/use secret names with a shared .json helper.
- Reject backslash path segments consistently across auth secret targets.
- Update auth CLI docs and tests for extension auto-append behavior.
@github-actions
Copy link

github-actions bot commented Mar 2, 2026

Coverage

Total line coverage: 86.54% (59644/68917 lines hit).

@graysurf graysurf marked this pull request as ready for review March 2, 2026 23:11
@graysurf graysurf merged commit fd80f3b into main Mar 2, 2026
6 checks passed
@graysurf graysurf deleted the feat/codex-auth-json-secret-normalization branch March 2, 2026 23:11
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