feat: audit incomplete historical session repairs - #1912
Open
Rat0323 wants to merge 2 commits into
Open
Conversation
Rat0323
marked this pull request as ready for review
August 20, 2026 09:14
Rat0323
force-pushed
the
fix/historical-session-repair-audit
branch
from
August 20, 2026 09:30
b1ebcf3 to
edda4a3
Compare
BigPizzaV3
previously requested changes
Aug 20, 2026
BigPizzaV3
left a comment
Owner
There was a problem hiding this comment.
当前审计不是 fail-open。 在正式同步前直接 ,而备份扫描中的 /递归错误会向上传播。只要 下存在不可读目录、损坏目录项或循环符号链接,原本可正常执行的 provider sync 就会被只读审计阻断,这与 PR 声明的“damaged backups 不阻塞同步”不一致。建议审计失败时记录诊断并返回默认审计结果,同时递归扫描不要跟随符号链接,并补一个不可读/不可遍历备份不影响同步的回归测试。
BigPizzaV3
requested changes
Aug 20, 2026
BigPizzaV3
left a comment
Owner
There was a problem hiding this comment.
当前审计不是 fail-open。run_provider_sync_with_target 在正式同步前直接传播 audit_provider_sync_state 错误,而备份扫描中的 read_dir 或递归错误会向上传播。只要 backups_state/provider-sync 下存在不可读目录、损坏目录项或循环符号链接,原本可正常执行的 provider sync 就会被只读审计阻断,这与 PR 声明的 damaged backups 不阻塞同步不一致。建议审计失败时记录诊断并返回默认审计结果,同时递归扫描不要跟随符号链接,并补一个不可读或不可遍历备份不影响同步的回归测试。
Rat0323
force-pushed
the
fix/historical-session-repair-audit
branch
from
August 20, 2026 14:29
edda4a3 to
e8e69ce
Compare
Contributor
Author
|
已按 review 意见更新到
验证结果:
请重新审查更新后的 PR。 |
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
Adds a read-only audit layer to historical session provider sync. It identifies catalog-only sessions and reports whether a current rollout or historical provider-sync database is available, without reconstructing missing canonical sessions.
Scope
This PR intentionally does not recreate missing
state_5.sqliterows or guess provider identity; that higher-risk recovery work should be reviewed separately.Verification
cargo test -p codex-plus-data --test provider_sync(40 passed)cargo check -p codex-plus-launcher -p codex-plus-managergit diff --check