Skip to content

Fix Factory session recovery and usage fetch#792

Merged
ratulsarna merged 7 commits intomainfrom
codex/pr-324-factory-session
Apr 25, 2026
Merged

Fix Factory session recovery and usage fetch#792
ratulsarna merged 7 commits intomainfrom
codex/pr-324-factory-session

Conversation

@ratulsarna
Copy link
Copy Markdown
Collaborator

@ratulsarna ratulsarna commented Apr 25, 2026

Summary

  • preserve stored Factory bearer/refresh tokens when clearing stale cached cookie headers
  • keep Factory fallback attempts lazy so a stale cookie cache does not erase valid recovered credentials
  • update Droid/Factory usage fetching to use the current GET usage endpoint instead of the old POST request
  • add coverage for stale cached header recovery and the Factory usage request method/query

Supersedes #324. Originally contributed by @JosephDoUrden there; thank you for finding and fixing the stale Factory session case.

Test plan

  • swift test --filter FactoryStatusProbeFetchTests
  • pnpm check
  • ./Scripts/compile_and_run.sh
  • CodexBar.app/Contents/Helpers/CodexBarCLI usage --provider factory --source auto --format json --pretty

@ratulsarna ratulsarna marked this pull request as ready for review April 25, 2026 09:41
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b13e88b81d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread Sources/CodexBarCore/Providers/Factory/FactoryStatusProbe.swift Outdated
@ratulsarna
Copy link
Copy Markdown
Collaborator Author

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 05fe50b751

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread Sources/CodexBarCore/Providers/Factory/FactoryStatusProbe.swift Outdated
@ratulsarna ratulsarna force-pushed the codex/pr-324-factory-session branch from 05fe50b to 80855f2 Compare April 25, 2026 10:37
@ratulsarna
Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ratulsarna ratulsarna changed the title Clear stale Factory session store Fix Factory session recovery and usage fetch Apr 25, 2026
@ratulsarna
Copy link
Copy Markdown
Collaborator Author

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bd3cd8ad40

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread Sources/CodexBarCore/Providers/Factory/FactoryStatusProbe.swift Outdated
@ratulsarna
Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ratulsarna ratulsarna merged commit af56fb3 into main Apr 25, 2026
4 checks passed
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.

2 participants