Repository navigation
Conversation
Owner
Author
验收结论:放行(pass)
|
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.
改动
CredentialRepository:list_all/expiring_tokens改为纯读——派生 token 三列只用于本次响应,读路径不再发任何 UPDATE;派生异常只记 WARNING 并退化为「未知」,不让 GET 500。CredentialRepository.backfill_token_columns():一次性幂等回填(只处理token_expires_at IS NULL的行),返回补齐行数。src/main.py:lifespan 起后台任务跑回填(asyncio.to_thread,不阻塞启动、失败只记 WARNING 等下次启动重试),完成写一条汇总审计credential.token_backfill(含filled与elapsed_ms);关机时取消未完成的回填任务。src/audit/actions.py:注册新审计动作与中文标签。set_trace_callback断言无 UPDATE/INSERT)、只读连接下读接口字段完整、回填幂等且与改造前派生结果逐条相等、回填写失败只记 WARNING、审计事件断言、写库失败时GET /api/credentials仍 200。表结构未变(不改 schema.sql /
_MIGRATION_COLUMNS,SCHEMA_VERSION不动),无新增对外端点。验证