fix(evidence): bound reports and fail failed jobs
This commit is contained in:
@@ -339,7 +339,27 @@ def test_pipeline_result_dump_does_not_deepcopy_frozen_metadata():
|
||||
payload = PipelineResult(
|
||||
"succeeded", None, False, (), (), (), manifest,
|
||||
).model_dump(mode="json")
|
||||
assert payload["manifest"]["metadata"] == {"nested": {"value": ["safe"]}}
|
||||
assert payload["manifest_id"] is None
|
||||
assert "manifest" not in payload
|
||||
|
||||
|
||||
def test_pipeline_result_public_dump_is_bounded_and_excludes_evidence_content(tmp_path):
|
||||
import json
|
||||
|
||||
result = pipeline(
|
||||
tmp_path, Source([(item("one", "a"), "SENSITIVE EVIDENCE CONTENT")])
|
||||
).run()
|
||||
payload = result.model_dump(mode="json")
|
||||
encoded = json.dumps(payload)
|
||||
assert "SENSITIVE EVIDENCE CONTENT" not in encoded
|
||||
assert "documents" not in payload and "chunks" not in payload
|
||||
large = PipelineResult(
|
||||
"failed", None, False,
|
||||
tuple(f"fs:item-{index}" for index in range(1000)), (), (), result.manifest,
|
||||
).model_dump(mode="json")
|
||||
assert len(large["changed"]) == 100
|
||||
assert large["counts"]["changed"] == 1000
|
||||
assert len(json.dumps(large)) < 25_000
|
||||
|
||||
|
||||
def test_reused_corpus_root_rejects_workspace_rename_before_any_mutation(tmp_path):
|
||||
|
||||
Reference in New Issue
Block a user