Skip to content

fix: stabilize retrieval status reachability pbt - #193

Merged
z2z23n0 merged 1 commit into
mainfrom
fix/pbt-stale-retrieval-status
Jun 18, 2026
Merged

fix: stabilize retrieval status reachability pbt#193
z2z23n0 merged 1 commit into
mainfrom
fix/pbt-stale-retrieval-status

Conversation

@z2z23n0

@z2z23n0 z2z23n0 commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

Mainline Intent

Intent: int_3c69f7bc
Status: proposed
Title: 稳定 retrieval status reachability PBT

What changed

把 TestPropertyClassifyRetrievalStatusAllBranchesReachable 从依赖 rapid 随机抽中四个状态,改为先用显式 witness 验证 current、superseded、abandoned、stale 都真实可达,再保留 rapid 随机输入检查 classifier 只返回合法 retrieval status。

Why

最新 PR 合并后的 Full PBT 在 main push 上失败,因为 CI 使用 -rapid.checks=20 时随机样本没有命中 stale 分支,导致测试把概率未命中误判成分支不可达。显式 witness 能保留 branch reachability 的回归价值,同时消除低样本下的 flake。

Decisions

  • 如何修复 Full PBT 的 stale 分支不可达失败: 用四个显式 witness 锁定 retrieval status 的可达性,并让 rapid 继续做随机合法性探索 (失败根因是测试依赖随机输入覆盖存在性条件,而不是 classifyRetrievalStatus 的 stale 行为不可达;显式 witness 比调大随机次数更稳定,也更直接表达测试意图。)
    • Rejected: 只提高 rapid.checks 或依赖特定随机种子

Subsystems: engine, context-retrieval, property-tests

@z2z23n0
z2z23n0 merged commit d39b158 into main Jun 18, 2026
9 checks passed
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