Repository navigation
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
CUA proof (PR #639): BLOCKED, assertions not verifiable with this kitBuild commit: 7e94241 (PR head) plus uncommitted proof-only patches (see proof-only.patch):
Commands: Observed: the log confirms
This is a proof-kit limitation (seed does not survive the failed refresh in the UI), not evidence of a PR regression. Also, the Settings > Providers Codex pane displayed a real personal account email despite the isolated config, so those screenshots were discarded. Only unit tests cover the classification/enrichment path. Screenshots kept: none (shots\ is empty). |
CUA proof (rerun): PR #639Build commit:
Data path: real fetch against a local mock ( Commands:
Observations, not asserted:
Screenshots (local, not committed), in |
Port review: Chutes quota classification and enrichment (#639, GAP-36)Reviewed the branch diff What I checked:
Result: no findings. The port matches the upstream semantics on the wire shape, the enrichment policy, the classification order and the fraction/renewal guards. All three files stay under the 1000-line cap (mod.rs 225, parse.rs 667, tests.rs 754). No dependency, locale, bridge or frontend change. One observation carried from the proof comment (not a defect): the app polls Chutes continuously while a surface is open (~5800 request pairs in ~3 minutes under the proof harness). It was not compared against the base branch, so it is unknown whether the PR affects it — worth a look before release if the polling cadence matters. |
UI proof (browser-use)Combined build of
Every surface also passed the privacy check (no email-like text, account e-mail nodes or profile paths in the DOM) and theme Validation at |
…on and enrichment
Summary
Chutes now reads quotas the way upstream's bundled
chutes.jsdoes (row #28i, commit6db17eeb, cutover "preserving" behaviors). Before, it requested onlyusers/me/subscription_usageand put the first two quota-shaped objects it found into primary/secondary in traversal order, with a fixedChutes APIlogin method.rolling,fourhour, ... /monthly,subscription,billing_period, ...), then by label (rolling|4h|4 h|4-hour|four hour|four-hour/month|billing|subscription), then by window length (240 min / >= 40320 min). Payload-keyed lanes default to 240 / 43200 minutes; other windows fill the remaining lane in order."$1,500"are accepted.users/me/quotasand thenusers/me/quota_usage/{chute_id|chuteId|id}are requested and merged (usage fields win). Everything except a 401/403 is best effort; a rejected key stays fatal.CHUTES_API_URLis HTTPS-only (existingproviders::validated_https_url) and now keeps its path and query on every request (previouslyUrl::joindropped a base path such as/proxy). Requests sendAccept: application/json.No active subscription(activefalse or a free/inactive/cancelled/expired status) orNo usage data(no windows andactiveunknown). Renewal comes from explicit subscription reset keys.Chutes usage API error: HTTP <code>; a body that is not a JSON object or array is a parse error.providers/chutes/mod.rs(provider and HTTP flow),parse.rs(payload parsing),tests.rs.Upstream reference
6db17eeb. The cutover itself is SKIP (QuickJS/JavaScriptCore engine); only the preserved behavior is ported.?ref=v0.66.0):Sources/CodexBarCore/Resources/Plugins/chutes.ts(chutesParse,chutesQuota,chutesSnapshot,fetchUsage),Sources/CodexBarCore/Providers/Chutes/ChutesSettingsReader.swift,ChutesProviderDescriptor.swift,Tests/CodexBarTests/ChutesProviderTests.swift.Ported / Deferred
Ported: everything listed above, with the upstream fixtures from
ChutesProviderTests.swift(active subscription, no-active fallback toquotas/quota_usage/0, wrappeddatalist, partial fill of rolling fromquotas, no-data snapshot, distinct equal windows, large/very large/fractional amounts, unrepresentable durations, percent 1 stays 1, normalized aliases, best-effort enrichment with 403/500, base path and query, invalid JSON, 401).Intentional differences from upstream, kept because local behavior is deliberate:
"0.25"becomes 25). Local keeps whole percents (chutes: same ambiguous 0..=1 fraction rescale heuristic as #407 (real 1% becomes 100%) #408: a real 1% must not become 100%; existing testusage_percent_half_stays_half), so0.5stays 0.5. The upstream test "fractions" case uses"25"here.SubscriptionMetadatais documented as independent of quota resets, and the monthly window already shows its own reset.UsageSnapshotrequires a primary window, so an absent 4-hour lane is an informationalNo quota reportedrow instead of the previous fake 0% quota.ProviderError::Parserenders asParse error: Chutes usage response is not valid JSONrather than upstream'sChutes usage parse error: invalid JSON.Validation
Toolchain
cargo +1.98.0, per-slug target dir.cargo +1.98.0 fmt --all: clean.cargo +1.98.0 clippy --workspace --all-targets -- -D warnings: pass.cargo +1.98.0 test -p codexbar chutes -- --test-threads=4: 37 passed, 0 failed.cargo +1.98.0 test -p codexbar provider_id -- --test-threads=4: 18 passed, 0 failed.cargo test -p codexbarand the Tauri crate tests were not run: onlyrust/src/providers/chutes/changed, no shared code.Affected areas
UI proof
Pending: coordinator will capture CUA proof on a fresh build (window placement of the 4-hour and monthly lanes, informational primary row).