Reachability Receipts: Prove an Agent Patch's Green Build Came From Tests That Touched It
说明与用途
receipt格式记录哪些测试覆盖了更改的行,防止将易失性测试用作绿色构建的证据。
问题
A green build can be reported even when no test actually exercised the patched lines, allowing flaky tests to be frozen and falsely used as evidence.
结果
The receipt format explicitly records which tests touched the patched lines, preventing flaky tests from being used as evidence for a green build.
工作流
- Derive changed line ranges with
git diff -U0and count hunks - Collect per-test line hits using
coverage.pywithdynamic_context=test_functionand--show-contexts - Convert coverage JSON to JSONL format for the receipt
- Run the receipt script to intersect changed lines with test hits and check against the freeze set
证据
A green build is a fact about your test suite, not about the patch.
Everything else is bookkeeping. The verdict comes from intersecting the first two, then asking the third whether that intersection is trustworthy.
- 记录日期: 2026-10-15T11:41:53.375Z