#!/usr/bin/env python3
"""Canonical self-contained CARBON brand assets for generated reports."""

from carbon_schemas import OPENTEST_AI, schema_origin

REPORT_FAVICON = (
    "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E"
    "%3Crect width='256' height='256' fill='%23000000'/%3E"
    "%3Cpath fill='%23ffffff' d='M56 34h112l48 48-48 48V96l-16-16H94c-15 0-22 7-22 22v52c0 15 7 22 22 22h104v46H56c-21 0-32-11-32-32V66c0-21 11-32 32-32Z'/%3E%3C/svg%3E"
)


def schema_provenance() -> dict[str, object]:
    """Describe the public formats that CARBON test and bug artifacts extend."""
    return {
        "origin": str(OPENTEST_AI["name"]),
        "url": str(OPENTEST_AI["url"]),
        "testcase": schema_origin("testcase"),
        "bug": schema_origin("bug"),
        "boundary": "CARBON operational run, session, settings, and evidence envelopes are CARBON-native.",
    }


def schema_provenance_html() -> str:
    return (
        '<span>Test-case and bug schema origin: '
        '<a href="https://www.opentest.ai/">OpenTest.ai</a> · '
        'otai/testcase v1 · otai/bug v1. CARBON adds execution and evidence fields.</span>'
    )
