Enable daily bounded SBOM catch-up
Assistant: codex Assistant-Model: gpt-5.6-sol Assistant-Session: 01a028f0-a42f-7582-89a8-ebaad7343834
This commit is contained in:
parent
91ae8dc9a8
commit
c2f797f8d5
3 changed files with 79 additions and 7 deletions
|
|
@ -424,14 +424,14 @@ def test_deterministic_report_carries_t02_ingest_outcomes() -> None:
|
|||
assert "1 updated, 1 skipped" in report["summary"]
|
||||
|
||||
|
||||
def test_daily_definition_is_bounded_and_disabled() -> None:
|
||||
def test_daily_definition_is_bounded_and_enabled() -> None:
|
||||
from pathlib import Path
|
||||
|
||||
from activity_core.definition_parser import parse_file
|
||||
|
||||
definition = parse_file(Path("activity-definitions/daily-sbom-catchup.md"))
|
||||
|
||||
assert definition.enabled is False
|
||||
assert definition.enabled is True
|
||||
# No rule block: the weekly flood came from `for_each` over every stale repo.
|
||||
assert definition.rules == []
|
||||
source = definition.context_sources[0]
|
||||
|
|
@ -443,3 +443,31 @@ def test_daily_definition_is_bounded_and_disabled() -> None:
|
|||
instruction = definition.instructions[0]
|
||||
assert instruction["model"] == "deterministic"
|
||||
assert instruction["report_sinks"][0]["event_type"] == "sbom_catchup"
|
||||
|
||||
|
||||
def test_railiance_projection_enables_the_same_bounded_contract(tmp_path) -> None:
|
||||
from pathlib import Path
|
||||
|
||||
import yaml
|
||||
from activity_core.definition_parser import parse_file
|
||||
|
||||
documents = list(
|
||||
yaml.safe_load_all(Path("k8s/railiance/20-runtime.yaml").read_text())
|
||||
)
|
||||
config = next(
|
||||
item
|
||||
for item in documents
|
||||
if isinstance(item, dict)
|
||||
and item.get("kind") == "ConfigMap"
|
||||
and item.get("metadata", {}).get("name")
|
||||
== "actcore-external-activity-definitions"
|
||||
)
|
||||
projected = tmp_path / "daily-sbom-catchup.md"
|
||||
projected.write_text(config["data"]["daily-sbom-catchup.md"])
|
||||
|
||||
definition = parse_file(projected)
|
||||
|
||||
assert definition.enabled is True
|
||||
assert definition.rules == []
|
||||
source = definition.context_sources[0]
|
||||
assert source["params"] == {"limit": 3, "apply": True}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue