feat: harden work-record and SBOM client contracts
Assistant: codex Assistant-Model: gpt-5.6-sol Assistant-Session: 01a023c0-a0a3-7c03-b395-5a0d2757214d
This commit is contained in:
parent
2577379e36
commit
84952c5212
16 changed files with 605 additions and 30 deletions
|
|
@ -120,6 +120,39 @@ status: open
|
|||
assert missing["decisions"] == ["DEMO-DEC-0001"]
|
||||
|
||||
|
||||
def test_missing_scan_includes_lowercase_top_level_record_files(tmp_path: Path) -> None:
|
||||
repo = _fixture(tmp_path)
|
||||
(repo / "intakes.md").write_text(
|
||||
"""# Intakes
|
||||
|
||||
```yaml
|
||||
id: DEMO-IN-0002
|
||||
kind: intake
|
||||
title: Standalone intake
|
||||
status: open
|
||||
```
|
||||
""",
|
||||
encoding="utf-8",
|
||||
)
|
||||
(repo / "decisions.md").write_text(
|
||||
"""# Decisions
|
||||
|
||||
```yaml
|
||||
id: DEMO-DEC-0002
|
||||
kind: decision
|
||||
title: Standalone decision
|
||||
status: accepted
|
||||
```
|
||||
""",
|
||||
encoding="utf-8",
|
||||
)
|
||||
|
||||
missing = rr._missing_identifiers(repo)
|
||||
|
||||
assert missing["intakes"] == ["DEMO-IN-0002"]
|
||||
assert missing["decisions"] == ["DEMO-DEC-0002"]
|
||||
|
||||
|
||||
def test_scopes_registrar_env_and_commits_assigned_ids(tmp_path: Path, monkeypatch) -> None:
|
||||
repo = _fixture(tmp_path)
|
||||
monkeypatch.setattr(rr, "_check_primary", lambda _api: ({"status": "ok", "db": "connected"}, None))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue