test_check_ok_integrity.py python
28 lines 827 B
Raw
sha256:8461d44b77376fbf06fa7c3e085d309e3010fd8d5886d63c63e69ce118811ad4 docs: record AFF-b feature-tip SHAs after AFF-b-ISR commit. Human 3 days ago
1 """Data-integrity — reuse must not clobber an existing side-check body."""
2
3 from __future__ import annotations
4
5 from datetime import date
6 from pathlib import Path
7
8 from tools.check_ok.scaffold import scaffold_side_check
9
10
11 def test_reuse_preserves_operator_edits(tmp_path: Path) -> None:
12 first = scaffold_side_check(
13 tmp_path,
14 topic="preserve",
15 scope="original scope",
16 today=date(2026, 7, 17),
17 )
18 marker = "OPERATOR-EDIT-MARKER"
19 first.path.write_text(first.path.read_text(encoding="utf-8") + f"\n{marker}\n", encoding="utf-8")
20
21 second = scaffold_side_check(
22 tmp_path,
23 topic="preserve",
24 scope="should not overwrite",
25 today=date(2026, 7, 17),
26 )
27 assert second.created is False
28 assert marker in second.path.read_text(encoding="utf-8")
File History 1 commit
sha256:8461d44b77376fbf06fa7c3e085d309e3010fd8d5886d63c63e69ce118811ad4 docs: record AFF-b feature-tip SHAs after AFF-b-ISR commit. Human 3 days ago