Repository navigation
fix: a quota save no longer fails a login renewal that already saved its token - #417
Merged
Merged
Conversation
Known-account validation publishes only credential proof, so compare its captured refresh-error reset without rejecting unrelated quota marker changes. Preserve current quota metadata and all credential, binding and first-identity reset checks. The two known-validation quota-drift refusal cases intentionally change contract: they encoded the overbroad fence that caused after-persist failures. They now require current reset state to survive proof publication; malformed marker schemas, refresh-error resets and first-identity drift remain refused. Controlled Core regression is red first; restoring the old fence also reddens OC1, OC2 and Pi checks. Direct catalogue replay catches the named mutant with refresh-reset companion green. Scoped Core tests: 236 pass; host regressions: 3 pass; all three packages typecheck. Original Prime unchanged, 30 fresh-process runs: 28 pass and 2 existing-deadline timeouts, no saved-refresh refusal. Full breadth retained unrelated journal timeout and vault-routing assertion failure; no rerun-until-green or deadline changes.
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.
A local login renewal could report failure after its new token was already saved. The renewal captures reset markers before the token exchange and checks them again when it records that the new token is valid. A quota poll completing in between (quota saves run in the background since 2.1.0) moved the quota marker, so recording the validation was refused and the renewal returned
failed. What users saw: OpenCode 1 kept a 401 instead of resending, OpenCode 2 gave up its 401 retry, and Pi ended the stream with an error. The saved token was never lost, and nothing was disabled; the next request revalidated it.Recording validation for a known account only replaces credential proof and never writes quota state, so it now checks only the refresh-error reset marker (a user's reset during the exchange still refuses it). First-identity publication keeps checking every marker, because it also discards metadata not yet confirmed to belong to the account. Exact credential, version and account-binding checks are unchanged.
Red-first: a Core regression holds the real quota writer and releases it inside the refresh provider; the same interleaving on OpenCode 1, OpenCode 2 and Pi now serves the saved successor with one exchange; a refresh-error reset still refuses. Mutation row
known-validation-ignores-quota-only-marker-driftCAUGHT. The original Prime rotation test is unchanged.Summary by cubic
A login renewal no longer reports failure after its new token was already saved. A quota poll completing during the exchange (quota saves run in the background since 2.1.0) moved a reset marker, so recording the validation was refused and the renewal returned
failed— OpenCode 1 kept a 401 instead of resending, OpenCode 2 gave up its 401 retry, and Pi ended the stream with an error. The saved token was never lost.What changed
Written for commit 3bfaa25. Summary will update on new commits.