Skip to content

PatchBody

Source code in docs_src/capo_continuum/types/patch_body.py
class PatchBody(TypedDict, closed=True):
    patch: "capo_continuum.types.issue_artifact_content.IssueArtifactContent"
    """The patch exactly as stored, unmodified. Control Plane accepted it only as a text unified diff, so `git apply` applies it."""
    format: NotRequired["capo_continuum.types.patch_format.PatchFormat"]
    """The patch's wire format, read from the patch itself, which determines how to apply it. Absent when the patch starts with neither a git mailbox header nor a `diff --git` header."""
    repository_name: NotRequired[
        "capo_continuum.types.build_repository_name.BuildRepositoryName"
    ]
    """The repository the patch applies to, as named in the source snapshot it was generated against."""
    patch_sha256: "capo_continuum.types.artifact_sha256.ArtifactSha256"
    """SHA-256 of the patch's UTF-8 bytes in lowercase hex, computed by Control Plane when it stored the patch. Lets a caller confirm the patch it applies is byte-for-byte the one that was reviewed. Computed over the patch bytes, so it is verifiable against `patch` without trusting this value."""
    size_bytes: "int"
    """Size of the patch in UTF-8 bytes, the unit the digest is computed over."""
    delivery: NotRequired["capo_continuum.types.patch_delivery.PatchDelivery"]
    """Delivery of the patch to the customer's bucket or repository. Absent when the artifact has no delivery destination."""

delivery instance-attribute

delivery: NotRequired[PatchDelivery]

Delivery of the patch to the customer's bucket or repository. Absent when the artifact has no delivery destination.

format instance-attribute

format: NotRequired[PatchFormat]

The patch's wire format, read from the patch itself, which determines how to apply it. Absent when the patch starts with neither a git mailbox header nor a diff --git header.

patch instance-attribute

The patch exactly as stored, unmodified. Control Plane accepted it only as a text unified diff, so git apply applies it.

patch_sha256 instance-attribute

patch_sha256: ArtifactSha256

SHA-256 of the patch's UTF-8 bytes in lowercase hex, computed by Control Plane when it stored the patch. Lets a caller confirm the patch it applies is byte-for-byte the one that was reviewed. Computed over the patch bytes, so it is verifiable against patch without trusting this value.

repository_name instance-attribute

repository_name: NotRequired[BuildRepositoryName]

The repository the patch applies to, as named in the source snapshot it was generated against.

size_bytes instance-attribute

size_bytes: int

Size of the patch in UTF-8 bytes, the unit the digest is computed over.