fix(codex-local): address Greptile review comments

- Widen warning message to cover both configured API key and host auth
  shadowing scenarios ("configured or host credentials take precedence")
- Re-export auth-precedence symbols from server index.ts so downstream
  imports from @paperclipai/adapter-codex-local/server resolve correctly
- Update constant stability test to match updated warning text

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
Harold Kim (Git Expert)andPaperclip committed 2026-07-09 04:46:50 +00:00
1 parent 5489d91a35
commit 18d4163494
3 files changed
+11 -2

No files matched your search

@@ -100,7 +100,7 @@ describe("resolveCodexAuthPrecedence", () => {
describe("constants", () => {
it("warning message is stable and human-readable", () => {
expect(CODEX_SANDBOX_AUTH_PRECEDENCE_WARNING).toBe(
"snapshot login present but host credentials take precedence",
"snapshot login present but configured or host credentials take precedence",
);
});
@@ -1,5 +1,5 @@
export const CODEX_SANDBOX_AUTH_PRECEDENCE_WARNING =
"snapshot login present but host credentials take precedence";
"snapshot login present but configured or host credentials take precedence";
export const CODEX_SANDBOX_AUTH_PRECEDENCE_WARNING_LOG_LINE =
`[paperclip] Warning: ${CODEX_SANDBOX_AUTH_PRECEDENCE_WARNING}.\n`;
export const CODEX_SANDBOX_AUTH_EXISTS_COMMAND =
@@ -1,4 +1,13 @@
export { execute, ensureCodexSkillsInjected } from "./execute.js";
export {
resolveCodexAuthPrecedence,
CODEX_SANDBOX_AUTH_PRECEDENCE_WARNING,
CODEX_SANDBOX_AUTH_PRECEDENCE_WARNING_LOG_LINE,
CODEX_SANDBOX_AUTH_EXISTS_COMMAND,
type CodexAuthPrecedenceInput,
type CodexAuthPrecedenceResolution,
type CodexAuthPrecedenceWinner,
} from "./auth-precedence.js";
export {
reconcileManagedCodexHome,
isManagedCodexHomePath,