feat(retirement): route SBOM scans through repo-manager
All checks were successful
CI Smoke / host-smoke (push) Successful in 1s
CI Smoke / container-smoke (push) Successful in 2s
Build and Publish Multi-Context Image / build-and-push (push) Successful in 25s

Assistant: codex
Assistant-Model: gpt-5.6-sol
Assistant-Session: 01a023c0-a0a3-7c03-b395-5a0d2757214d
This commit is contained in:
tegwick 2026-08-21 23:15:34 +02:00
parent b9d9ffed5f
commit 81861d816b
3 changed files with 70 additions and 22 deletions

View file

@ -93,3 +93,23 @@ def test_rm_update_register_entry_builds_shared_spine_command(monkeypatch):
assert seen["args"][0:2] == ["register", "put"]
assert "technical-debt" in seen["args"]
assert '{"severity":"high"}' in seen["args"]
def test_rm_scan_sbom_builds_derived_snapshot_command(monkeypatch):
seen = {}
def fake_run(args, *, timeout=120):
seen["args"] = args
return (
0,
'{"schema":"repo-manager.sbom-snapshot.v1","ok":true,"entry_count":3}',
"",
)
monkeypatch.setattr(adapter, "run_rmgr", fake_run)
result = adapter.rm_scan_sbom(repo_path="/repos/demo", repo_slug="demo")
assert result["ok"] is True
assert result["schema"] == "repo-manager.sbom-snapshot.v1"
assert result["exit_code"] == 0
assert seen["args"] == ["sbom", "scan", "--path", "/repos/demo", "--slug", "demo"]