fix(project-rules): qualify ad-hoc record identifiers
Assistant: codex Assistant-Model: gpt-5.6-sol Assistant-Session: 01a02b22-9638-76d2-bbff-b7ea1770b118
This commit is contained in:
parent
fae2816199
commit
284e28112d
6 changed files with 83 additions and 15 deletions
36
tests/test_validate_repo_adr.py
Normal file
36
tests/test_validate_repo_adr.py
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from scripts.validate_repo_adr import Report, _check_workplan_file
|
||||
|
||||
|
||||
def test_repository_qualified_ad_hoc_id_matches_daily_filename(tmp_path) -> None:
|
||||
workplans = tmp_path / "workplans"
|
||||
workplans.mkdir()
|
||||
path = workplans / "ADHOC-2026-08-23.md"
|
||||
path.write_text(
|
||||
"""---
|
||||
id: ACTIVITY-WP-ADHOC-2026-08-23
|
||||
type: workplan
|
||||
title: Daily repair
|
||||
domain: infotech
|
||||
status: finished
|
||||
owner: codex
|
||||
created: "2026-08-23"
|
||||
---
|
||||
|
||||
## Repair
|
||||
|
||||
```task
|
||||
id: ACTIVITY-WP-ADHOC-2026-08-23-T01
|
||||
status: done
|
||||
priority: low
|
||||
```
|
||||
""",
|
||||
encoding="utf-8",
|
||||
)
|
||||
report = Report(repo_path=str(tmp_path))
|
||||
|
||||
_check_workplan_file(path, report)
|
||||
|
||||
assert not report.failures
|
||||
assert not [finding for finding in report.warnings if finding.check == "filename-id-prefix"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue