Skip to content

fix(auth-cache): invalidate legacy image auth snapshots#2323

Open
RYMH wants to merge 1 commit intoWei-Shaw:mainfrom
RYMH:fix/auth-cache-image-fields
Open

fix(auth-cache): invalidate legacy image auth snapshots#2323
RYMH wants to merge 1 commit intoWei-Shaw:mainfrom
RYMH:fix/auth-cache-image-fields

Conversation

@RYMH
Copy link
Copy Markdown

@RYMH RYMH commented May 9, 2026

Summary

  • bump the auth snapshot version so legacy cache entries missing image generation fields are reloaded from the database
  • extend auth cache regression coverage to assert image permission and rate fields survive snapshot round-trip
  • verify version-mismatched cache snapshots fall back to the repository path instead of reusing stale auth data

Test plan

  • go test ./internal/service -tags unit -run 'TestAPIKeyService_(SnapshotRoundTrip_PreservesMessagesDispatchModelConfig|GetByKey_IgnoresLegacyAuthCacheSnapshotWithoutMessagesDispatchConfig)' -count=1

Bump the auth snapshot version so cached API keys serialized before image generation fields were added are reloaded from the database, and extend auth cache tests to cover the image permission and rate fields.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 9, 2026

All contributors have signed the CLA. ✅
Posted by the CLA Assistant Lite bot.

@RYMH
Copy link
Copy Markdown
Author

RYMH commented May 9, 2026

I have read the CLA Document and I hereby sign the CLA

github-actions Bot added a commit that referenced this pull request May 9, 2026
@RYMH
Copy link
Copy Markdown
Author

RYMH commented May 9, 2026

老大,AI帮忙改的,你看一下。第一次提交不是很会。提交也是ai弄的()

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