gstack-codex-probe returns cached MODEL_OK after the codex binary or env-var auth changed
- Dominant language
- TypeScript
- Stars
- 133k
- Forks
- 19.9k
- Avg merge
- 18h 46m
- Merged PRs (30d)
- 26
Description
\`bin/gstack-codex-probe\` caches \`MODEL_OK\` for one hour, keyed on a signature built only from the mtimes of \`config.toml\` and \`auth.json\` (line 77), and returns \`MODEL_OK (cached)\` whenever the signature matches inside the window (line 87).
Input that passes while broken: within the hour, swap the \`codex\` on PATH for a different version (or remove it), or change, rotate, or let expire a \`CODEX_API_KEY\` / \`OPENAI_API_KEY\` supplied through the environment. Neither file's mtime moves, so the signature still matches and the probe reports OK for a round trip that can no longer succeed.
Fix: fold the resolved codex path and \`codex --version\` output, plus an auth-source fingerprint (hash of the active env-var key, or the file mtime when file auth is in use), into \`_sig\`.
Same class as #2742 (closed).
Contributor guide
Research direction
Start at bin/gstack-codex-probe, especially _sig around line 77 and the cached-result check around line 87. Trace how the codex path, version output, and active authentication source are available, then exercise the probe after changing the binary, version, environment key, and file-auth mtime. Done means those changes invalidate the cached MODEL_OK result while unchanged inputs still use the cache.
Written by the indexing model from the issue text.
Assessment
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 75/100