generated from coulomb/repo-seed
Add report fragments and export manifest
This commit is contained in:
26
extensions/sdk-fixture/reports/sdk_fixture_summary.py
Normal file
26
extensions/sdk-fixture/reports/sdk_fixture_summary.py
Normal file
@@ -0,0 +1,26 @@
|
||||
"""Report fragment for the SDK fixture extension."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
def build_fragment(context: dict) -> dict:
|
||||
evidence_count = len(context["evidence"])
|
||||
finding_count = len(context["findings"])
|
||||
source_lock = context["source_lock"]
|
||||
markdown = "\n".join(
|
||||
[
|
||||
"### SDK Fixture Summary",
|
||||
"",
|
||||
f"- evidence items: {evidence_count}",
|
||||
f"- findings: {finding_count}",
|
||||
f"- source lock: {source_lock.get('id')}",
|
||||
]
|
||||
)
|
||||
return {
|
||||
"markdown": markdown,
|
||||
"structured": {
|
||||
"evidence_count": evidence_count,
|
||||
"finding_count": finding_count,
|
||||
"source_lock_ref": source_lock.get("id"),
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user