Skip to content

Fix Gmail effect truth and settlement (#173, #174) - #231

Merged
George-RD merged 1 commit into
mainfrom
George-RD/dev-effect-truth
Aug 21, 2026
Merged

Fix Gmail effect truth and settlement (#173, #174)#231
George-RD merged 1 commit into
mainfrom
George-RD/dev-effect-truth

Conversation

@George-RD

@George-RD George-RD commented Aug 20, 2026

Copy link
Copy Markdown
Owner

What

  • Classify Gmail drafts.create HTTP 429 and 5xx responses as DeliveryUnknown, retaining the retry fence and scoped reservation.
  • Classify pre-effect ConnectorUnavailable admission rejections as RefusedPreEffect at both Gmail read and write admission boundaries; remove the unreachable post-write arm.
  • Add provider-boundary, pending-fence, scoped-reservation, and failure-class regression coverage. Update the confirmed-failure fixture from HTTP 500 to definite HTTP 400.

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

  • Focused Effect Truth regressions: 8 passed
  • 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.sh passed all gates.
Next session: read connector_breaker.rs::map_write_error, approval_draft.rs::create_approved_draft, and the local implementation-notes.md first.

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.

Written for commit a2054a7. Summary will update on new commits.

Review in cubic

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@George-RD, you've reached your PR review limit, so we couldn't start this review.

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 @coderabbitai review or push new commits to the PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 26d621f7-963e-46dc-b286-3a68bcac7e28

📥 Commits

Reviewing files that changed from the base of the PR and between 98255e6 and a2054a7.

📒 Files selected for processing (7)
  • crates/openspine-kernel/src/api/connector_breaker.rs
  • crates/openspine-kernel/src/api/scoped_admission.rs
  • crates/openspine-kernel/src/api/scoped_admission_effect_truth_tests.rs
  • crates/openspine-kernel/src/api/scoped_admission_outcome_tests.rs
  • crates/openspine-kernel/src/pipeline/approval_draft.rs
  • crates/openspine-kernel/src/pipeline/tests/approval_draft_admission_tests.rs
  • crates/openspine-kernel/src/pipeline/tests/approval_draft_reconcile_tests.rs

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.

@George-RD
George-RD merged commit 92f8373 into main Aug 21, 2026
3 checks passed
@George-RD
George-RD deleted the George-RD/dev-effect-truth branch August 21, 2026 02:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant