test_check_ok_integrity.py python
28 lines 827 B
Raw
sha256:0e9549ec7b463911bc08b7d586dc320b1ac9b1f5c943ee7e3865dcc6cb0f6f83 chore(governance): sync handover+roadmap to 84db8c8 (drift:… Human 2 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:6abcf1fa82a7a621ccbc945f19acdba5bc0db54569599404a1452fb4a096a199 fix(ISR): default require_independent_second_reviewer to require Human minor 2 days ago