Fix Gmail effect truth and settlement (#173, #174) - #231
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Review limit reached
Next review available in: 46 minutes Limit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?Wait for the limit to reset, then comment An organization admin can change what happens after included review limits in Billing. How do review limits work?CodeRabbit enforces per-developer PR review limits within each organization. For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (7)
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 |
What
drafts.createHTTP 429 and 5xx responses asDeliveryUnknown, retaining the retry fence and scoped reservation.ConnectorUnavailableadmission rejections asRefusedPreEffectat both Gmail read and write admission boundaries; remove the unreachable post-write arm.Why
A 429/5xx response does not prove a draft was not created; clearing its fence can permit a duplicate unattended write. Conversely, breaker admission rejection polls no provider future, so retaining reviewed budget records an effect that provably never happened.
Verification
cargo test -p openspine-kernel: 1,119 passed./scripts/check.sh: passed (fmt, clippy, workspace tests, file sizes, claims, ceremony, 45 strict OpenSpec specs)Implementation notes — five-line summary
Deviations: 2 — fixed both pre-effect ConnectorUnavailable arms and split the #174 proof across the executor and existing settlement seam.
Most likely revisit: add a deterministic concurrency harness only if the write-admission race itself must be reproduced; current contract coverage is complete.
Edge cases: shared gmail breaker blocks scope resolution before reservation, and the stale 500 confirmed-failure fixture had to become 400.
Verification: 8 focused regressions passed, 1,119 kernel tests passed, and
./scripts/check.shpassed all gates.Next session: read
connector_breaker.rs::map_write_error,approval_draft.rs::create_approved_draft, and the localimplementation-notes.mdfirst.Closes #173, closes #174
Summary by cubic
Preserves effect truth and settlement for Gmail draft creation. Previously, HTTP 429/5xx were treated as confirmed failures that cleared fences and reservations; now they are DeliveryUnknown, and pre-effect connector rejections are RefusedPreEffect to reflect that no provider future was polled.
drafts.create: HTTP 429 and 5xx now map to DeliveryUnknown and retain the pending fence and scoped reservation; definite 4xx (except 429) remain confirmed failures. Updates map_write_error and adjusts tests to use 400 for confirmed-failure fixtures. Addresses Gmail 5xx on drafts.create is classified as a confirmed failure, clearing the retry fence and releasing reviewed budget #173.ConnectorUnavailableas RefusedPreEffect at both read and write admission points; remove the unreachable post-write arm. No pending-write fence is recorded in this path. Addresses Provably pre-effect ConnectorUnavailable rejection permanently retains the scoped standing-rule reservation #174.Written for commit a2054a7. Summary will update on new commits.