Skip to content

Port upstream CodexBar 0.56.4 [review] - #438

Merged
Finesssee merged 23 commits into
mainfrom
review/upstream-0.56.4
Sep 8, 2026
Merged

Port upstream CodexBar 0.56.4 [review]#438
Finesssee merged 23 commits into
mainfrom
review/upstream-0.56.4

Conversation

@Finesssee

@Finesssee Finesssee commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

Review status

Review only. Do not merge until explicit approval.

Stacked version-only review delta.

This review branch was rebuilt from current main as a clean stack. Its tree was verified byte-for-byte identical to the already-validated local port tip for 0.56.4, so rebuilding the ancestry did not change implementation content.

Stack

  • Head: $(System.Collections.Hashtable.head)
  • Base: $(System.Collections.Hashtable.base)
  • Next version PR, if any, stacks on this branch.

Validation evidence

Porting work was reviewed with local Codex CLI gpt-5.6-luna:max workers and Thermo-style structural checks. The final 0.56.7 stack is clean and passes:

  • Rust cargo fmt --check
  • git diff --check
  • cargo metadata
  • Frontend: 57 files / 328 tests
  • TypeScript sc --noEmit
  • Vite production build
  • Locale parity: 825 keys
  • Interaction guard: 9/9

Native Rust test/check execution on the local Windows host is blocked before project linking because the host resolves the wrong GNU/Unix link.exe; this is an environment validation limitation, not a proven semantic porting defect.

Merge policy

Please review this PR and the full stack first. Do not merge yet.

Summary by CodeRabbit

  • New Features

    • Added support for selecting and preserving workspace-specific Codex accounts across sign-in and refreshes.
    • Improved Codex usage scanning for growing session files and incomplete records, reducing missed usage.
    • Improved Antigravity history recovery and timestamp handling.
    • Added live forecast text behavior that stays within the metrics panel.
  • Bug Fixes

    • Improved Claude browser authentication and Cloudflare challenge handling while preserving valid usage data during transient failures.
    • Prevented stale account snapshots from appearing after workspace changes.
  • Documentation

    • Documented AWS Bedrock monitoring, refresh behavior, and budget display settings.

@coderabbitai

coderabbitai Bot commented Sep 7, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 80fb451a-0dae-4969-866a-4995e60481f0

📥 Commits

Reviewing files that changed from the base of the PR and between e880ea9 and 896c2c4.

📒 Files selected for processing (27)
  • apps/desktop-tauri/src-tauri/src/commands/codex_accounts.rs
  • apps/desktop-tauri/src-tauri/src/commands/providers.rs
  • apps/desktop-tauri/src-tauri/src/commands/tests.rs
  • apps/desktop-tauri/src/components/MenuCard.test.tsx
  • apps/desktop-tauri/src/styles.css
  • docs/PROVIDERS.md
  • rust/src/codex_accounts/account_manager.rs
  • rust/src/codex_accounts/api.rs
  • rust/src/codex_accounts/models.rs
  • rust/src/core/cost_cache_budget.rs
  • rust/src/core/jsonl_scanner.rs
  • rust/src/core/jsonl_scanner/codex.rs
  • rust/src/core/jsonl_scanner/codex/helpers.rs
  • rust/src/core/jsonl_scanner/tests.rs
  • rust/src/core/provider.rs
  • rust/src/cost_scanner/codex.rs
  • rust/src/cost_scanner/codex/logical_target.rs
  • rust/src/cost_scanner/tests.rs
  • rust/src/providers/antigravity/local_proto.rs
  • rust/src/providers/antigravity/local_sqlite.rs
  • rust/src/providers/antigravity/local_sqlite_synthetic_tests.rs
  • rust/src/providers/antigravity/local_step_resolver.rs
  • rust/src/providers/antigravity/mod.rs
  • rust/src/providers/claude/cloudflare_tests.rs
  • rust/src/providers/claude/mod.rs
  • rust/src/providers/claude/web_api.rs
  • rust/src/providers/fixtures/claude/cloudflare-challenge.html

📝 Walkthrough

Walkthrough

Changes

The PR adds workspace-aware Codex account and snapshot handling, bounded Codex JSONL scanning, provider-specific refresh policies, Claude Cloudflare handling, Antigravity timestamp recovery, forecast truncation styles, and AWS Bedrock monitoring documentation.

Codex workspace accounts

Layer / File(s) Summary
Workspace identity and account lifecycle
rust/src/codex_accounts/models.rs, rust/src/codex_accounts/account_manager.rs
Accounts preserve explicit workspace selections and use effective workspace identifiers during account matching, authentication, discovery, and switching.
Workspace-scoped snapshot fetching
rust/src/codex_accounts/api.rs
Snapshot requests accept a workspace identifier and use it for request headers and returned snapshot identity.
Current-account snapshot persistence
apps/desktop-tauri/src-tauri/src/commands/codex_accounts.rs
Commands filter snapshots by account ownership and persist results only when the account lane remains current.

Bounded Codex scanning

Layer / File(s) Summary
Logical scan target contracts and bounded reader
rust/src/core/jsonl_scanner.rs, rust/src/core/jsonl_scanner/codex/helpers.rs
Scan state stores logical target sizes. The bounded reader reports incomplete lines at the target boundary.
Target-bounded JSONL parsing
rust/src/core/jsonl_scanner/codex.rs, rust/src/core/jsonl_scanner/tests.rs
The parser freezes scan targets, commits complete records, and resumes incomplete tails.
Logical target cache orchestration
rust/src/cost_scanner/codex.rs, rust/src/cost_scanner/codex/logical_target.rs
Cache validation, pending-path ordering, identity checks, tail detection, and target persistence support resumed scans.
Bounded scan validation and fixtures
rust/src/cost_scanner/tests.rs, rust/src/core/cost_cache_budget.rs, rust/src/core/jsonl_scanner/tests.rs
Tests cover growing files, retained tails, completion, and updated cache fixtures.

Provider refresh and Claude web handling

Layer / File(s) Summary
Provider refresh policy contract
rust/src/core/provider.rs
Providers define cookie ownership and last-good snapshot failure policies.
Provider context and transient failure handling
apps/desktop-tauri/src-tauri/src/commands/providers.rs
Context construction reuses provider instances and applies provider-selected failure policies.
Claude cookie cache and HTTP classification
rust/src/providers/claude/mod.rs, rust/src/providers/claude/web_api.rs
Claude caches browser cookies and classifies authentication and Cloudflare responses.
Provider behavior tests
apps/desktop-tauri/src-tauri/src/commands/tests.rs, rust/src/providers/claude/cloudflare_tests.rs, rust/src/providers/fixtures/claude/cloudflare-challenge.html
Tests cover cookie deferral, Cloudflare detection, preserved snapshots, and recovery guidance.

Antigravity timestamp recovery

Layer / File(s) Summary
Step metadata parsing and timestamp resolution
rust/src/providers/antigravity/local_proto.rs, rust/src/providers/antigravity/local_step_resolver.rs, rust/src/providers/antigravity/mod.rs
Parsed turns expose step UUIDs, and step metadata resolves validated timestamps by occurrence.
Two-phase SQLite history scan
rust/src/providers/antigravity/local_sqlite.rs
Generation rows without timestamps are recovered from the steps table when schema and evidence are valid.
Synthetic SQLite scan coverage
rust/src/providers/antigravity/local_sqlite_synthetic_tests.rs
Synthetic tests cover recovery, ordering, missing data, malformed metadata, duplicates, and conflicts.

Desktop forecast layout

Layer / File(s) Summary
Forecast truncation layout
apps/desktop-tauri/src/styles.css, apps/desktop-tauri/src/components/MenuCard.test.tsx
Forecast percentages can shrink and truncate within metric rows. Tests verify the rendered structure and CSS rules.

AWS Bedrock documentation

Layer / File(s) Summary
Bedrock monitoring documentation
docs/PROVIDERS.md
The documentation describes Bedrock monitoring, request charges, refresh behavior, and budget display semantics.

Estimated code review effort: 5 (Critical) | ~120 minutes

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch review/upstream-0.56.4

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Finesssee
Finesssee force-pushed the review/upstream-0.56.4 branch from 1017154 to ff0ec22 Compare September 7, 2026 12:05
@Finesssee
Finesssee force-pushed the review/upstream-0.56.3 branch from 62f2d40 to 701750b Compare September 7, 2026 12:05
@Finesssee

Copy link
Copy Markdown
Collaborator Author

Thermo-nuclear review: REQUEST CHANGES

  1. High - Claude-specific recovery policy is embedded in the shared provider shell. apps/desktop-tauri/src-tauri/src/commands/providers.rs::build_fetch_context adds id == ProviderId::Claude to defer browser lookup, while preserve_last_good_transient_failure and is_claude_cloudflare_challenge add another Claude-only branch and even string-match the provider's Cloudflare message from the shared cache path. This is exactly the cross-provider branching the repo rules prohibit. Code-judo: let the Claude provider own cookie-cache/browser recovery and return a typed failure/recovery disposition; the shared shell should act on that generic disposition, not on ProviderId::Claude or provider error text.

  2. High - required CUA proof is absent. The release changes visible MenuCard/styles and account/provider behavior. No fresh Windows CUA/equivalent proof is attached in the PR body/comments.

1k check: no newly crossed production 1,000-line threshold in this PR.

@Finesssee
Finesssee changed the base branch from review/upstream-0.56.3 to main September 8, 2026 07:00
@Finesssee
Finesssee merged commit 9bc7ece into main Sep 8, 2026
2 of 3 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.

1 participant