mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #2441] [Issue]: 11-PROV-RUNTIME-chatgpt-local-auth stale Codex tokens do not refresh #1195
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#1195
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Promansis on GitHub (Jun 6, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2441
Originally assigned to: @SpicyMarinara on GitHub.
Summary
11-PROV-RUNTIME-chatgpt-local-authparity gap: the refactor ChatGPT local auth path does not refresh stale Codex ChatGPT tokens on the same conditions as legacy.Expected behavior
ChatGPT local auth should load Codex
auth.json, refresh when the access JWT is near expiry orlast_refreshis older than the legacy refresh interval, write refreshed tokens back, and then apply the refreshed token to ChatGPT Codex requests.Actual behavior
The refactor only refreshes when
last_refreshis present but empty. A dated stale refresh timestamp or near-expiry access JWT does not trigger refresh before provider requests.Steps to reproduce
openai_chatgptconnection using local Codex ChatGPT auth.last_refresholder than the legacy refresh interval.Impact area
Environment
Logs, screenshots, or video
Static proof only. No private auth files inspected.
Legacy evidence:
packages/server/src/services/llm/openai-chatgpt-auth.ts:jwtExpiresSoonandlastRefreshIsStaletrigger refresh at lines 96-109;loadAuthImplrefreshes when either condition is true at lines 228-236; refreshed tokens are written back at lines 213-223.Refactor evidence:
src-tauri/crates/llm/src/lib.rs:openai_chatgpt_auth_is_stalereturns true only for an emptylast_refreshstring at lines 1541-1549;load_openai_chatgpt_authrefreshes only through that predicate at lines 1463-1518.Regression notes
Worked in legacy
mainper #2410 source definition for11-PROV-RUNTIME-chatgpt-local-auth.Additional context
Surface:
11-PROV-RUNTIME-chatgpt-local-auth.Tracked from #2410 Batch 13.
Acceptance criteria:
last_refreshis older than the legacy refresh interval.Template check
Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked:
@SpicyMarinara commented on GitHub (Jun 6, 2026):
Fixed in refactor with commit d0996bae.
Behavior changed:
Verification: