Skip to content

Include archived Codex sessions in usage reports#663

Open
gt-zhangshihao03 wants to merge 1 commit into
getagentseal:mainfrom
gt-zhangshihao03:fix/codex-archived-sessions
Open

Include archived Codex sessions in usage reports#663
gt-zhangshihao03 wants to merge 1 commit into
getagentseal:mainfrom
gt-zhangshihao03:fix/codex-archived-sessions

Conversation

@gt-zhangshihao03

Copy link
Copy Markdown

Summary

  • scan Codex archived_sessions alongside date-partitioned active sessions
  • share validation and project attribution between active and archived rollout files
  • add an archived-only regression test and document both storage paths

Fixes #662

Testing

  • npm test -- --run tests/providers/codex.test.ts (22 passed)
  • npx tsc --noEmit
  • npm test -- --run (1674 passed; one unrelated cli-status-menubar test exceeded its 5s timeout under parallel load)
  • reran the timed-out test in isolation: passed in 3.03s

@ozymandiashh

Copy link
Copy Markdown
Collaborator

Thanks for this, @gt-zhangshihao03 — clean fix and the right approach.

It had picked up a merge conflict with main after #656 landed, so I rebased it onto current main (resolving a small README provider-table conflict) and opened #667, which supersedes this PR. Your commit authorship is preserved on the rebased branch.

On review we confirmed there's no double-counting if a session were ever present in both sessions/ and archived_sessions/ (parsing dedups on a content-based key shared across all sources), and that the new regression test genuinely covers the archived-only home (fresh temp dir with only archived_sessions/, so it exercises the readdir(sessionsDir).catch(() => []) fall-through). We'll merge from #667.

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.

Codex usage disappears after archiving a session

2 participants