Skip to content

Add typed rate-limit domain evidence contract - #684

Closed
GraciousGazelles wants to merge 7 commits into
mainfrom
feature/rate-limit-domain-contract-w12698
Closed

GraciousGazelles wants to merge 7 commits into
mainfrom
feature/rate-limit-domain-contract-w12698

Conversation

@GraciousGazelles

Copy link
Copy Markdown
Collaborator

Summary

Add a small, side-effect-free typed contract for retaining provider-reported rate-limit evidence.

The contract:

  • keeps caller-supplied request facts separate from provider observations;
  • represents shared, independent, and unknown domains without inferring equivalence from model or thread identity; and
  • keeps admission dormant until the required provider facts are explicitly present.

No provider I/O or production admission path is changed in this pull request. Consumer wiring is intentionally a separate follow-up.

Validation

  • git diff --check
  • cargo fmt --manifest-path codex-rs/Cargo.toml --all -- --check
  • Hosted validation: run 33280974082, candidate-bound success for 374adb59336f1907acbb3956f30ac44564ad2c63\n\nBase: main at 097c362e349d029c29539d7c38ad01e8a6c67b63\nHead: feature/rate-limit-domain-contract-w12698 at 374adb59336f1907acbb3956f30ac44564ad2c63

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ✅ Completed 2026-08-30T00:09:56.665997Z 374adb5 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new rate_limit_domain module to define structures and logic for reasoning about rate-limit domains, including RateLimitDomainScope, LocalRequestFacts, ProviderObservedFacts, and RateLimitEvidence, along with associated unit tests. The feedback suggests optimizing performance on the request hot path by replacing String fields with std::sync::Arc<str> to prevent multiple heap allocations when cloning these immutable structures.

@GraciousGazelles
GraciousGazelles force-pushed the feature/rate-limit-domain-contract-w12698 branch from 4fa752e to d2d954b Compare August 30, 2026 04:33
@GraciousGazelles

Copy link
Copy Markdown
Collaborator Author

Superseded by #688, which replays this provider rate-limit domain evidence work onto the current main baseline and includes the follow-up constructor-boundary and scope-coherence fixes. Closing this predecessor so there is one active landing candidate.

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