Repository navigation
Conversation
Owner
Author
验收结论(verifier,范围仅本单 diff)结论:通过(pass),可合并。 已复跑
diff 复核(4 文件 +97/−12)
非阻塞问题(不要求本单修)
放行是,合并由内核执行。 |
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.
改动
src/db/migrate.py:新增backfill_refreshable(conn, cipher)——对token_expires_at > 0 AND refreshable IS NULL的老库行按凭证结构解密判定一次,只把派生结果为 1(结构性不可续期)的行写回;可续期行保持 NULL(与新库写路径一致),解不开的行不写、下次启动重试。WHERE ... refreshable IS NULL自带条件,可重复执行。src/main.py:build_app在 cipher 建好、首次读凭证之前调用该回填(随启动幂等执行,不新增手工脚本)。tests/db/test_repo_token.py:老库回填用例——正例补 1、可续期行不被误标、已非 NULL 不被覆盖、坏密文不写、连续两次幂等。README.md:凭证字段说明补一句「升级时自动回填老库 refreshable」。数据变化:仅老库存量行的
credentials.refreshable由 NULL → 1(不可续期);不改 schema.sql、不新增列、不递增 SCHEMA_VERSION、不放宽派生触发器(仍只在token_expires_at IS NULL时派生)、不动 API 字段。验证
uv run ruff check src tests scripts→ 无告警uv run pytest -q --cov=src --cov-report=term --cov-fail-under=100→ 6476 passed,覆盖率 100.00%