[codex] Make automatic reset reconciliation fail closed - #40
Draft
0thernet wants to merge 3 commits into
Draft
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This change adds a durable, fail-closed reconciliation policy around automatic weekly Codex rate-limit resets.
reconciliation_requiredbefore recovery, connection, polling, or notifications can dispatch a reset.Why
The existing automatic reset path could observe live usage immediately after a schema migration without first establishing whether that account and weekly window were safe to automate. A migrated profile near its limit with an available credit therefore needed an explicit durable reconciliation boundary before any reset preparation, recovery, or provider effect.
The risk also spans restarts and identity changes. In-memory suppression would not survive a crash, and treating an old prepared or ambiguous attempt as current could redispatch an effect under the wrong identity or window. The policy is persisted transactionally and checked at the sole automatic-reset dispatch seam before any effect authority is obtained.
Validation
git diff --checkpassed for both the corrective commit and the complete PR diff.Delivery guards
maina5b36405bd52f99596e6187b7810f9b3c7e7d1de7eaa0643f18cdec95f55d6c9c4dfc6943b72e89a4303f3692ab3f910ee5ca9e2cd339d4