Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (8)
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe changes update Codex model normalization and JSONL parsing. They also adjust OpenCodex numeric conversion and add parser-version checks to parse-cache cursors. ChangesCodex model pricing
Codex JSONL scanning
OpenCodex numeric conversion
OpenCodex parse-cache versioning
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to The parsing, pricing-alias, numeric-boundary, and cache-version changes have no established merge-blocking issue. Mergeable subject to normal checks. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The changes tighten usage validation and require older cached results to be recalculated. No new security issue was identified in the reviewed paths, but broader exposure and failure scenarios were not fully verified. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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. Comment |
Summary
Re-lands three upstream v0.57.0 ports that were merged on 2026-09-13 only into stacked port branches and never reached
main(#488 intoport/upstream-0.57.0; #489 and #490 into the #488/#489 head branches).git cherryagainstmain@7695471bstill reported all four patches as missing.turn_contextrecords, and bareusagelines stay candidates even when the model name containsturn_context.2^64boundary is rejected before theu64cast, while the exact JSON integeru64::MAXis still accepted. The parse cursor getsparser_version: 1, and a missing or mismatched version forces one full reparse.CACHE_SCHEMA_VERSIONstays 2.gpt-reserve(trimmed,openai/-qualified) normalizes togpt-5.6-lunapricing.The original commits are cherry-picked with
-x. One extra commit adapts the re-landed scanner tests tomain's(CodexUsageRecord, i64)record tuples. There are no other changes.Upstream reference
2188c90a638c3e8039d1969f75d891c06d80d58b(v0.57.0, JSONL records with legal whitespace).b1e27d266a8e1a0db991be7cf40526f12e6a4e1d(fix: reject unrepresentable numeric usage safely steipete/CodexBar#3486, reject unrepresentable numeric usage).57ddfdbf70f2de23c1b5bd8fdb3c660944a22b4a(reserve telemetry pricing alias).v0.70.0:Sources/CodexBarCore/Vendored/CostUsage/CostUsagePricing.swiftlines 493-495 mapgpt-reservetogpt-5.6-luna(tag-pinned GET).Ported / Deferred
openai/prefix match case-insensitively. Upstream compares the exact lowercase strings. Codex logs are lowercase, so results are the same for real input.Validation
The original PRs could not run tests (linker environment at the time). They now pass on this branch, run in the worker worktree on Rust 1.98.0:
cargo +1.98.0 fmt --all --checkcargo +1.98.0 clippy --workspace --all-targets -- -D warningsrecords[i].fieldagainst main's tuples); fixed in195063e8cargo +1.98.0 test -p codexbarcargo +1.98.0 test -p codexbar-desktop-tauri -- --skip bootstrap_payload_exposes_every_provider_variantThe skipped desktop test is the non-hermetic #684 test, which reads the real
%APPDATA%\CodexBar\settings.jsononmain. It is fixed separately by #711 and fails onmainwithout this change too.Affected areas
rust/src/core/jsonl_scanner/codex/helpers.rs,codex/parser.rs,jsonl_scanner/tests.rsrust/src/spend_contract/opencodex.rs,spend_contract/opencodex/cache.rsrust/src/core/cost_pricing.rs,cost_pricing_tests.rsIntegration note: #682 (
port/micro-0.68.0-nous-opencodex-ledger) also editsopencodex/cache.rs(it bumpsCACHE_SCHEMA_VERSIONto 3). The two changes touch different lines.UI proof
Not applicable. This is backend parsing and pricing only, with no UI surface changes.
Summary by CodeRabbit