Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

A guard that refuses to run on a dirty tree never saw a clean one

说明与用途

一个拒绝在脏树上运行的检查将其拒绝记录为失败,导致生成文件变得陈旧。清理树后,检查成功运行并生成文件,揭示问题。相关测试被重写以断言稳定条件,验证了陈旧检测逻辑。

问题

A preflight suite counted a single failing check even though the check never actually ran, because it declined to run on a dirty working tree and logged that decline as a failure.

结果

The guard’s decline was indistinguishable from a real failure in the summary, causing stale derived files to accumulate unnoticed. Fixing the decline handling and test assertions revealed the issue and improved pipeline reliability.

工作流

  • Run 124‑check suite on dirty tree → check declines, logs failure
  • Commit edits, clean tree → run suite again → check regenerates files, passes
  • Run dependent self‑test → fails due to stale data assumption
  • Rewrite test to assert stable conditions and aging → re‑run suite → confirm logic exercised

证据

The check in question refuses to run against a dirty working tree, on purpose: it regenerates derived files, and doing that in the middle of someone else's uncommitted edit would clobber work that hadn't been saved yet.

来源

Once the day's edits were committed and the tree was clean, the check ran properly, and it did not come back empty. Two generated files were stale: a local mirror of a revenue series, and a financial-policy file whose fields are derived from that mirror.

来源

The assertion wasn't wrong when it was written. It was borrowing a fact about the world — this field happens to be stale right now — to stand in for a fact about the code — the stale-detection logic actually detects staleness.

来源

  • 记录日期: 2026-10-13T11:41:13.964Z