
# Govern Source to Runtime

Governs the path from a selected change through publication to the result actually reached by its recipients.

A change can be correct in a repository while a service still uses its previous version. This method reconstructs the actual connection and carries the entrusted effect through to observation.

You can also use it without administering a server: distinguish a prepared document, its distributed file and the copy a recipient actually encounters. Included tools evaluate supplied data without performing publication.

## The corrected calendar is not yet the public calendar

An association publishes a calendar from a Git archive. Corrected opening hours have been shared, but the page still shows the old ones.

Find which revision feeds the page, whether its controller acquired it and what visitors receive. Restarting a guessed service might change nothing.

## Adapt the release to your environment

Preserve the relationship between the selected change, delivered identity, means applying the effect and final observation. Repositories, people, controllers, destinations and recovery mechanisms vary.

Bring the assignment, previous and proposed versions, project instructions and available observations. In chat you can form a verifiable plan; with suitable access, the method accompanies effects already entrusted to you.

## Reach the source and those responsible for the release

Identify the work being changed, authoritative source, release decision owner and owner of the service or distributed document. Technical access allows observation or transport; it does not replace those responsibilities. Preserve concurrent work and distinguish your delta from pre-existing changes.


## Reconstruct the path actually consumed

Connect local revision, remote reference, any artifact, active checkout or service and public destination. Reach the actual controller: one branch may trigger a webhook while another is only a proposal. A nearby template, plausible path or active service does not establish which content is served.


## Prepare a change with its own identity and recovery

Qualify the diff, immutable version and dependencies. Execute candidate code in an environment unable to control the live service or read unnecessary credentials. Identify a previous version and recovery path independent of the component being changed. Include migrations and data where returning to previous files is insufficient.


## Carry only the effect actually entrusted

Source sharing, public promotion and activation have different consequences. Use the current mandate and contract to identify effects already included; request a decision only when a material choice remains the person’s. Do not fragment an already selected release into confirmations of routine mechanics. A new target or revision can change the effect.


## Activate through means proportionate to the consequence

For a service, a narrow activator independent of candidate code can consume validated data and apply allowed operations. Do not run newly received tests, hooks or modules with administrative privileges. Restart only what the contract requires. A static change may require no restart; the current topology determines that.


## Verify what actually reaches the recipient

Read back active identity, converged health and pertinent behavior. Compare exact hashes where bytes are served unchanged; for transformed HTML check content and behavior produced by the transformation. A dependent check failing after activation must follow the same recovery path and verify its result. Technical verification does not replace the person’s judgment of actual use.


## Continue from the result actually observed

Retain previous and active versions, completed checks, any recovery, unknowns and useful continuation with the release owner. Before resuming an interrupted attempt, observe what already happened. A contradiction reopens its dependent passage while preserving still-valid evidence and work. Return reusable corrections to the method without duplicating registers.

## Continue through the actual project

Keep the relationship between selected effect, revision actually reached, recovery and the next useful observation.

Return the difference to the controller or method that must change, leaving product state and data with their owners.

## Operating knowledge

Read OPERATING_GUIDE.md and EXAMPLES.md. With no file access, use the complete START_CHAT_EN.txt. The method composes with complementary project competences; actual tools, persistence and authorized effects belong to the receiving environment.


# Govern Source to Runtime — practical operating knowledge

## Credentials remain with the node owning their policy

Use your environment’s authorized adapter, with noninteractive authentication where required. Never print, embed in source or relay a local token to another host, including encoded forms. An immutable artifact or bundle can carry a revision without its credential when that transfer is entrusted. Access failure does not authorize another account.


## Effective configuration can differ from the neighboring file

A server may include an independent copy rather than the expected template. Read the configuration actually consumed, file type and bytes. A canonical path alone does not establish a symlink. Preserve module and dependency resolution in isolated checks: a wrong test prefix can falsely attribute a failure to the candidate.


## Health has its own timing and forms

After restart, await convergence within a short deadline and retain the last observation. Connection refusal during startup is not definitive failure. A successful oneshot may return to inactive: retain its result, exit code and terminal check rather than claiming continuous activity. A manual check preserves the actual user and group.


## A new identity does not erase every earlier proof

Reuse evidence only for an applicable relation with its original identity. Refresh revisions, concurrency, artifact, controller and destination where they could change the effect. A changed method or controller reopens pertinent dependencies; a local contradiction need not restart everything. Configured instructions do not replace the last installation actually confirmed.


## Declared support and executed proof are different facts

Technical minimum, declared platforms and exercised matrix are distinct. Check dependency attribution against its owner’s tag and commit, including annotated tags. A rebuilt archive changes identity: reread the current result before immutable release. A small file diff alone does not determine the compatibility meaning of a change.


## Recovery follows all changed effects

Returning to a commit need not restore data, notifications or external services. Qualify restoration or compensation with their owners. Keep the previous version independent; forced shared-history rewriting is no substitute for recovery. Final cleanup concerns only identified, verified files belonging to that attempt.


## Included tools read data rather than certify the world

scripts/reduce_release_state.py reduces supplied observations to a next action; scripts/validate_effect_request.py checks coherence, identities, services, recovery and effect selection against included schemas. Read TOOLS.md for examples and commands. A ready result is relative to supplied evidence: neither tool contacts accounts, publishes, restarts or grants permission.


## Automation belongs to a qualified transition

One successful procedure does not govern every server automatically. Automation needs a narrow contract, idempotency, privilege separation, terminal observation and recovery exercised in the relevant environment. Branches, diffs, logs and publication artifacts can expose information too: transfer reusable knowledge while retaining private topology and credentials.

## Publication learns from its actual path

The method and deterministic validators are available; the kit does not provide universal automatic deployment. Each environment owns its executors, access and policy.

An observed result can teach a reusable relation. A later non-identical use shows where that learning continues and where the method needs refinement.


# Worked examples

Illustrative cases. Conditions, decisions and continuation are supplied to teach the method; these are not reports of customer results.

## The corrected calendar is not yet the public calendar

The association sees the commit containing new opening hours and asks to publish them. The AI reads the contract and discovers that the webhook follows another branch: the shared commit is not publication. It reviews the diff, preserves other contributions and identifies a recoverable previous revision. The mandate includes the public page, so it prepares and carries the promotion specified by the project. The static controller updates files without restarting the membership service. Readback compares opening hours on the actual served page and exact bytes of the immutable asset, retaining identity and result. If the controller fails to acquire the revision, the method follows that passage instead of restarting unrelated services. This is an illustrative case, not a claimed customer deployment.


## A published analysis model is not yet the model used by the service

A research group publishes its new model package. Its service retains the previous version because the contract separates distribution from activation. The AI does not call the package already active: it prepares isolated unprivileged validation, pinned dependencies, previous-version identity and a pertinent synthetic-request check. Selection of the exact activation remains with the contract’s responsible person. Once selected, the release can change only the affected service and verify convergence within its deadline. A failing request follows recovery and retains what was restored. The case separates model identity, service effect and scientific quality; technical success does not imply improved accuracy.


## A maintenance PDF changes during export

A cooperative updates a maintenance guide. The corrected source is exported with a new license notice: PDF bytes change even when the technical argument stays the same. The AI compares the content revision, observes the rendered document and records the exact uploaded PDF’s digest. After publication it anonymously downloads the accessible copy and compares identity, also checking that the page link reaches that file. A local-file check or reserved identifier would not establish distribution. The method preserves historical editions and the rights choice for selected files. Making a version available and maintenance staff actually reading it remain different facts.


# Read-only release tools

The kit includes the source method's deterministic reducer and evidence-request validator. They read JSON supplied by you. They do not inspect repositories or accounts, prove that supplied statements are true, approve effects, publish, restart services or repair a release.

## Run the supplied fictional examples

From the complete skill folder, with Python 3.10 or newer:

```text
python scripts/reduce_release_state.py --self-test
python scripts/validate_effect_request.py --self-test
python scripts/reduce_release_state.py examples/release-context.sample.json
python scripts/validate_effect_request.py examples/effect-request.sample.json
```

The reducer's example represents source already promoted, a different active runtime and no runtime authority. It returns await_runtime_gate rather than performing activation. The request example is synthetic and uses placeholder revisions and evidence: its ready result checks coherence of that fixture, never permission to use those values on a real system. Preserve it as a demonstration and create your own data from actual sources.

## Supply evidence for your own effect

Read references/release-context.schema.json for observed lifecycle facts and references/effect-request.schema.json for an exact effect request. Keep target, source revision, service allowlist, credential locality, previous release and completed checks bound to their actual evidence. The request validator emits ready, needs_operator_decision or blocked. Any changed request produces a different digest. Its dnd.effect-request.v1 identifier preserves the tool's source protocol; it does not require the source workspace.

The tools use Python's standard library. If jsonschema is installed, the request tool additionally checks the included JSON schema; its own shape and semantic checks also run without that optional dependency. Both self-tests exercise positive and stop conditions without network or service control. Read references/capability-manifest.json for the source's candidate automation maturity. A coherent fixture is not qualification of your controller, host or recovery.


## Included tool sources

### scripts/reduce_release_state.py

```python
#!/usr/bin/env python3
"""Reduce observed release facts to one next legal action without side effects."""

from __future__ import annotations

import argparse
import json
import sys
from pathlib import Path
from typing import Any


REQUIRED = {
    "source_owner_known": bool,
    "release_owner_known": bool,
    "production_consumer_known": bool,
    "remote_verified_authenticated": bool,
    "source_diff_reviewed": bool,
    "validation_passed": bool,
    "push_effect": str,
    "source_publication_authorized": bool,
    "runtime_activation_authorized": bool,
    "validator_executes_candidate_code_as_privileged": bool,
    "runtime_drift": bool,
    "rollback_proved": bool,
    "live_identity_verified": bool,
    "human_acceptance_verified": bool,
}

PUSH_EFFECTS = {"local_source", "source_remote_only", "production_bound_push"}


def validate_context(context: dict[str, Any]) -> None:
    missing = sorted(set(REQUIRED) - set(context))
    if missing:
        raise ValueError("missing required fields: " + ", ".join(missing))
    for field, expected in REQUIRED.items():
        if not isinstance(context[field], expected):
            raise ValueError(f"{field} must be {expected.__name__}")
    if context["push_effect"] not in PUSH_EFFECTS:
        raise ValueError("push_effect must be one of: " + ", ".join(sorted(PUSH_EFFECTS)))
    for optional in ("production_source_matches_candidate", "runtime_matches_production_source"):
        if optional in context and context[optional] is not None and not isinstance(context[optional], bool):
            raise ValueError(f"{optional} must be boolean or null")


def decision(classification: str, next_action: str, gate: str | None, reason: str) -> dict[str, Any]:
    return {
        "classification": classification,
        "next_legal_action": next_action,
        "effect_gate": gate,
        "reason": reason,
        "side_effect_performed": False,
    }


def reduce_state(context: dict[str, Any]) -> dict[str, Any]:
    validate_context(context)

    if context["validator_executes_candidate_code_as_privileged"]:
        return decision(
            "stop_security",
            "separate unprivileged validation from the fixed privileged activator",
            None,
            "candidate-controlled code would execute with elevated privilege",
        )

    remote_identity_required = context["push_effect"] != "local_source"
    if (
        not context["source_owner_known"]
        or not context["release_owner_known"]
        or not context["production_consumer_known"]
        or (remote_identity_required and not context["remote_verified_authenticated"])
    ):
        return decision(
            "observe_only",
            "resolve owners, production consumer and any applicable authenticated remote identity",
            None,
            "the source-to-runtime graph is incomplete",
        )

    if context["runtime_drift"]:
        return decision(
            "stop_drift",
            "preserve drift evidence and reconcile the accepted change in source before runtime mutation",
            None,
            "runtime differs from its owning source",
        )

    if not context["source_diff_reviewed"] or not context["validation_passed"]:
        return decision(
            "prepare_source",
            "review the exact source boundary and complete least-privileged validation",
            None,
            "the candidate is not yet a validated source movement",
        )

    if context["push_effect"] != "local_source" and not context["source_publication_authorized"]:
        return decision(
            "await_source_gate",
            "request authorization for the exact source publication effect",
            context["push_effect"],
            "validated local source does not grant remote publication",
        )

    production_matches = context.get("production_source_matches_candidate")
    if context["push_effect"] != "local_source" and production_matches is not True:
        return decision(
            "publish_source",
            "perform only the authorized source movement and verify the resulting remote revision",
            context["push_effect"],
            "the production source does not yet identify the validated candidate",
        )

    runtime_matches = context.get("runtime_matches_production_source")
    if runtime_matches is not True:
        if not context["rollback_proved"]:
            return decision(
                "stop_recovery",
                "prove an independent previous-release restore path",
                None,
                "runtime activation lacks an independent rollback proof",
            )
        if not context["runtime_activation_authorized"]:
            return decision(
                "await_runtime_gate",
                "request authorization for the exact runtime activation",
                "runtime_activation",
                "source publication and runtime activation are distinct effects",
            )
        return decision(
            "activate_runtime",
            "activate the immutable validated release through the fixed activator and verify rollback readiness",
            "runtime_activation",
            "production source is selected but runtime identity has not advanced",
        )

    if not context["live_identity_verified"]:
        return decision(
            "verify_terminal",
            "verify service, ingress and destination behavior against the exact runtime identity",
            None,
            "matching source and runtime do not prove the live destination",
        )

    if not context["human_acceptance_verified"]:
        return decision(
            "await_acceptance",
            "obtain human acceptance tied to the verified live identity",
            None,
            "technical reconciliation is not operator acceptance",
        )

    return decision(
        "complete",
        "write terminal receipts and assess one bounded learning delta",
        None,
        "source, runtime, live behavior and acceptance are reconciled",
    )


def _base_case() -> dict[str, Any]:
    return {
        "source_owner_known": True,
        "release_owner_known": True,
        "production_consumer_known": True,
        "remote_verified_authenticated": True,
        "source_diff_reviewed": True,
        "validation_passed": True,
        "push_effect": "production_bound_push",
        "source_publication_authorized": False,
        "runtime_activation_authorized": False,
        "validator_executes_candidate_code_as_privileged": False,
        "runtime_drift": False,
        "rollback_proved": True,
        "production_source_matches_candidate": False,
        "runtime_matches_production_source": False,
        "live_identity_verified": False,
        "human_acceptance_verified": False,
    }


def self_test() -> None:
    cases: list[tuple[dict[str, Any], str]] = []
    case = _base_case()
    cases.append((case, "await_source_gate"))

    case = _base_case()
    case["validator_executes_candidate_code_as_privileged"] = True
    cases.append((case, "stop_security"))

    case = _base_case()
    case["runtime_drift"] = True
    cases.append((case, "stop_drift"))

    case = _base_case()
    case.update(
        source_publication_authorized=True,
        production_source_matches_candidate=True,
        runtime_matches_production_source=False,
    )
    cases.append((case, "await_runtime_gate"))

    case = _base_case()
    case.update(
        source_publication_authorized=True,
        runtime_activation_authorized=True,
        production_source_matches_candidate=True,
        runtime_matches_production_source=True,
        live_identity_verified=True,
        human_acceptance_verified=True,
    )
    cases.append((case, "complete"))

    case = _base_case()
    case.update(
        remote_verified_authenticated=False,
        push_effect="local_source",
        source_publication_authorized=False,
        runtime_activation_authorized=True,
        production_source_matches_candidate=None,
        runtime_matches_production_source=True,
        live_identity_verified=True,
        human_acceptance_verified=True,
    )
    cases.append((case, "complete"))

    for index, (candidate, expected) in enumerate(cases, start=1):
        actual = reduce_state(candidate)["classification"]
        if actual != expected:
            raise AssertionError(f"case {index}: expected {expected}, got {actual}")


def main() -> int:
    parser = argparse.ArgumentParser(description=__doc__)
    parser.add_argument("context", nargs="?", type=Path)
    parser.add_argument("--self-test", action="store_true")
    args = parser.parse_args()

    if args.self_test:
        self_test()
        print(json.dumps({"self_test": "passed", "cases": 6}, sort_keys=True))
        return 0
    if args.context is None:
        parser.error("context is required unless --self-test is used")

    try:
        context = json.loads(args.context.read_text(encoding="utf-8"))
        if not isinstance(context, dict):
            raise ValueError("context root must be an object")
        print(json.dumps(reduce_state(context), indent=2, sort_keys=True))
    except (OSError, json.JSONDecodeError, ValueError) as exc:
        print(json.dumps({"error": str(exc)}, sort_keys=True), file=sys.stderr)
        return 2
    return 0


if __name__ == "__main__":
    raise SystemExit(main())
```

### scripts/validate_effect_request.py

```python
#!/usr/bin/env python3
"""Validate an evidence-bound source/runtime effect request without side effects."""

from __future__ import annotations

import argparse
import hashlib
import json
import sys
from datetime import datetime
from pathlib import Path
from typing import Any


SCHEMA_ID = "dnd.effect-request.v1"
DECISION_SCHEMA_ID = "dnd.effect-request-decision.v1"
REVISION_LENGTH = 40
EFFECT_CONTRACTS = {
    "source_push": (True, False, False),
    "production_bound_push": (True, False, True),
    "runtime_activation": (False, True, True),
    "combined_release": (True, True, True),
}
REQUIRED_TERMINAL_CHECKS = {
    "checkout_revision",
    "service_health",
    "public_identity",
    "destination_behavior",
}
SCHEMA_PATH = Path(__file__).resolve().parents[1] / "references" / "effect-request.schema.json"


def _is_revision(value: Any) -> bool:
    return (
        isinstance(value, str)
        and len(value) == REVISION_LENGTH
        and all(character in "0123456789abcdefABCDEF" for character in value)
    )


def _nonempty_string(value: Any) -> bool:
    return isinstance(value, str) and bool(value.strip())


def _read_schema_validate(request: dict[str, Any]) -> None:
    try:
        import jsonschema  # type: ignore
    except ImportError:
        return
    schema = json.loads(SCHEMA_PATH.read_text(encoding="utf-8"))
    jsonschema.validate(request, schema)


def _shape_validate(request: dict[str, Any]) -> None:
    if request.get("schema") != SCHEMA_ID:
        raise ValueError(f"schema must be {SCHEMA_ID}")
    required = {
        "request_id",
        "created_at",
        "effect",
        "operator_selection",
        "source",
        "validation",
        "runtime",
        "security",
        "receipt",
    }
    missing = sorted(required - set(request))
    if missing:
        raise ValueError("missing required fields: " + ", ".join(missing))
    if not _nonempty_string(request["request_id"]):
        raise ValueError("request_id must be a non-empty string")
    try:
        datetime.fromisoformat(str(request["created_at"]).replace("Z", "+00:00"))
    except ValueError as exc:
        raise ValueError("created_at must be an ISO-8601 timestamp") from exc
    _read_schema_validate(request)


def _check(
    checks: list[dict[str, str]],
    blockers: list[str],
    check_id: str,
    condition: bool,
    success: str,
    failure: str,
) -> None:
    checks.append(
        {
            "id": check_id,
            "status": "pass" if condition else "fail",
            "detail": success if condition else failure,
        }
    )
    if not condition:
        blockers.append(f"{check_id}: {failure}")


def validate_effect_request(request: dict[str, Any]) -> dict[str, Any]:
    _shape_validate(request)
    checks: list[dict[str, str]] = []
    blockers: list[str] = []
    decisions_needed: list[str] = []
    declared_limits: list[str] = []

    effect = request["effect"]
    operator = request["operator_selection"]
    source = request["source"]
    validation = request["validation"]
    runtime = request["runtime"]
    security = request["security"]
    receipt = request["receipt"]

    kind = effect.get("kind")
    expected_contract = EFFECT_CONTRACTS.get(kind)
    actual_contract = (
        effect.get("source_publication"),
        effect.get("runtime_activation"),
        effect.get("production_bound"),
    )
    _check(
        checks,
        blockers,
        "effect.contract",
        expected_contract is not None and actual_contract == expected_contract,
        f"{kind} has a coherent effect boundary",
        "effect flags do not match the declared effect kind",
    )
    batch_policy = effect.get("batch_policy")
    policy_evidence = effect.get("policy_evidence")
    batch_policy_coherent = (
        kind == "combined_release" and batch_policy == "combined_adopted"
    ) or (
        kind != "combined_release" and batch_policy == "single_effect"
    )
    _check(
        checks,
        blockers,
        "effect.batch_policy",
        batch_policy_coherent and _nonempty_string(policy_evidence),
        "the effect batch matches an explicit owner policy",
        "a combined release requires an adopted combined policy; other requests must contain one effect",
    )

    local_revision = source.get("local_revision")
    _check(
        checks,
        blockers,
        "source.identity",
        _is_revision(local_revision) and _is_revision(source.get("local_tree")),
        "local commit and tree are immutable Git identities",
        "local_revision and local_tree must be exact 40-character Git identities",
    )
    _check(
        checks,
        blockers,
        "source.diff",
        bool(source.get("diff_reviewed"))
        and bool(source.get("scoped_paths"))
        and _nonempty_string(source.get("diff_review_evidence")),
        "the reviewed payload has an explicit path boundary and evidence",
        "the diff must be reviewed with scoped paths and evidence",
    )
    excluded_dirty = source.get("excluded_dirty_paths") or []
    _check(
        checks,
        blockers,
        "source.concurrent_work",
        not excluded_dirty or bool(source.get("excluded_paths_preserved")),
        "concurrent dirty paths are absent or explicitly preserved outside the payload",
        "excluded dirty paths are not proved preserved",
    )

    remote_targets = source.get("remote_targets") or []
    remote_targets_coherent = True
    production_target_selected = False
    for target in remote_targets:
        remote_targets_coherent = remote_targets_coherent and all(
            [
                _nonempty_string(target.get("branch")),
                target.get("role") in {"candidate", "production"},
                _is_revision(target.get("observed_revision")),
                _is_revision(target.get("expected_revision")),
                target.get("observed_revision") == target.get("expected_revision"),
                isinstance(target.get("will_update"), bool),
            ]
        )
        if target.get("role") == "production" and target.get("will_update"):
            production_target_selected = True
    if effect.get("source_publication"):
        remote_targets_coherent = bool(remote_targets) and remote_targets_coherent and any(
            target.get("will_update") for target in remote_targets
        )
    remote_auth_coherent = (
        bool(source.get("authenticated_remote_verified"))
        if remote_targets or effect.get("source_publication")
        else not bool(source.get("authenticated_remote_verified"))
    )
    _check(
        checks,
        blockers,
        "source.remote_refs",
        remote_targets_coherent
        and remote_auth_coherent
        and _nonempty_string(source.get("remote_verification_evidence")),
        "remote refs match their locked identities, or are explicitly not applicable to a local-only runtime effect",
        "remote refs are missing, stale, inconsistently authenticated or incompatible with the effect boundary",
    )
    _check(
        checks,
        blockers,
        "source.ancestry",
        bool(source.get("ancestry_verified"))
        and _nonempty_string(source.get("ancestry_evidence")),
        "the target revision is proven to extend the selected remote bases",
        "fast-forward ancestry is not evidenced",
    )
    if effect.get("production_bound") and effect.get("source_publication"):
        _check(
            checks,
            blockers,
            "source.production_target",
            production_target_selected,
            "a production source target is explicitly included",
            "the production-bound movement does not name a production source target",
        )
    _check(
        checks,
        blockers,
        "source.consumer",
        not effect.get("production_bound")
        or (
            bool(source.get("production_consumer_known"))
            and _nonempty_string(source.get("production_consumer_evidence"))
        ),
        "the production consumer is known or not applicable",
        "a production-bound effect lacks a verified consumer map",
    )

    failed_checks = validation.get("failed_checks") or []
    in_scope_failures = [
        item
        for item in failed_checks
        if item.get("classification") != "preexisting_out_of_scope"
    ]
    validation_coherent = (
        validation.get("status") == "pass"
        or (
            validation.get("status") == "partial"
            and bool(validation.get("passed_checks"))
            and not in_scope_failures
            and bool(failed_checks)
        )
    )
    _check(
        checks,
        blockers,
        "validation.scope",
        validation_coherent,
        "all in-scope checks pass; any declared failure is pre-existing and out of scope",
        "validation has an in-scope or unclassified failure",
    )
    declared_limits.extend(
        f"{item.get('id')}: {item.get('evidence')}" for item in failed_checks
    )

    security_conditions = [
        bool(security.get("credential_locality_preserved")),
        bool(security.get("noninteractive_auth")),
        bool(security.get("secrets_redacted")),
        not bool(security.get("candidate_code_runs_privileged")),
        not bool(security.get("force_push")),
        not bool(security.get("destructive_history")),
        _nonempty_string(security.get("credential_policy_source")),
        _nonempty_string(security.get("credential_evidence")),
    ]
    _check(
        checks,
        blockers,
        "security.boundary",
        all(security_conditions),
        "credential locality, least privilege and non-destructive history are preserved",
        "credential, privilege, secret or history safety is not proved",
    )

    if effect.get("runtime_activation"):
        runtime_present = isinstance(runtime, dict)
        _check(
            checks,
            blockers,
            "runtime.contract",
            runtime_present,
            "runtime activation has an explicit target contract",
            "runtime_activation requires a runtime object",
        )
        if runtime_present:
            current_revision = runtime.get("current_revision")
            target_revision = runtime.get("target_revision")
            rollback_revision = runtime.get("rollback_revision")
            _check(
                checks,
                blockers,
                "runtime.identity",
                _is_revision(current_revision)
                and _is_revision(target_revision)
                and target_revision == local_revision
                and _nonempty_string(runtime.get("identity_evidence")),
                "runtime current and target revisions are exact and target the reviewed source",
                "runtime identities are missing or the target differs from the reviewed source",
            )
            _check(
                checks,
                blockers,
                "runtime.source_first",
                bool(runtime.get("source_first_path"))
                and not bool(runtime.get("runtime_drift"))
                and not bool(runtime.get("direct_runtime_edit")),
                "activation preserves one source-first causal chain",
                "runtime drift or a direct-edit path would break source ownership",
            )
            allowlist = set(runtime.get("service_allowlist") or [])
            restart_set = set(runtime.get("services_to_restart") or [])
            active_set = set(runtime.get("services_currently_active") or [])
            successful_oneshot_set = set(
                runtime.get("services_currently_successful_oneshot") or []
            )
            _check(
                checks,
                blockers,
                "runtime.services",
                bool(allowlist)
                and restart_set.issubset(allowlist)
                and allowlist.issubset(active_set | successful_oneshot_set),
                "restart scope is bounded and every service is active or a successful oneshot",
                "service restart scope exceeds the allowlist or current service state is incomplete",
            )
            _check(
                checks,
                blockers,
                "runtime.rollback",
                _is_revision(rollback_revision)
                and rollback_revision != target_revision
                and bool(runtime.get("rollback_available"))
                and bool(runtime.get("rollback_independent"))
                and _nonempty_string(runtime.get("rollback_evidence")),
                "an independent previous revision and restore path are locked",
                "rollback identity is absent, identical to target or not independently proved",
            )
            terminal_checks = set(runtime.get("terminal_checks") or [])
            _check(
                checks,
                blockers,
                "runtime.terminal_proof",
                REQUIRED_TERMINAL_CHECKS.issubset(terminal_checks)
                and bool(runtime.get("unchanged_surfaces")),
                "terminal identity, health, public behavior and unchanged surfaces are planned",
                "terminal proof or unchanged-surface checks are incomplete",
            )
    else:
        _check(
            checks,
            blockers,
            "runtime.not_applicable",
            runtime is None,
            "no runtime mutation is included",
            "a runtime object is present although runtime activation is outside the effect",
        )

    _check(
        checks,
        blockers,
        "receipt.boundary",
        _nonempty_string(receipt.get("owner")) and _nonempty_string(receipt.get("path")),
        "the terminal receipt has an owner and durable path",
        "receipt owner or path is missing",
    )

    if effect.get("source_publication") and not operator.get("covers_source_publication"):
        decisions_needed.append("select the source publication outcome")
    if effect.get("runtime_activation") and not operator.get("covers_runtime_activation"):
        decisions_needed.append("select the runtime activation outcome")
    if not _nonempty_string(operator.get("outcome")) or not _nonempty_string(operator.get("source")):
        decisions_needed.append("identify the operator-selected outcome and its source")

    technical_status = "coherent" if not blockers else "incoherent"
    if blockers:
        status = "blocked"
        next_action = "resolve the listed technical contradictions with read-only evidence"
    elif decisions_needed:
        status = "needs_operator_decision"
        next_action = "ask one plain-language outcome question covering only the missing effect"
    else:
        status = "ready"
        next_action = "submit the locked effect request to the platform gate and execute only that batch"

    target_branches = [
        target["branch"] for target in remote_targets if target.get("will_update")
    ]
    runtime_summary = None
    if isinstance(runtime, dict):
        runtime_summary = {
            "host": runtime.get("host"),
            "path": runtime.get("path"),
            "current_revision": runtime.get("current_revision"),
            "target_revision": runtime.get("target_revision"),
            "services_to_restart": runtime.get("services_to_restart"),
            "rollback_revision": runtime.get("rollback_revision"),
            "unchanged_surfaces": runtime.get("unchanged_surfaces"),
        }
    canonical = json.dumps(request, ensure_ascii=False, sort_keys=True, separators=(",", ":"))
    request_digest = hashlib.sha256(canonical.encode("utf-8")).hexdigest()
    platform_message = (
        f"Effetto {kind} sul repository {source.get('repository')} alla revisione "
        f"{str(local_revision)[:12]}; branch {', '.join(target_branches) or 'nessuno'}"
    )
    if runtime_summary:
        platform_message += (
            f"; runtime {runtime_summary['host']}:{runtime_summary['path']} da "
            f"{str(runtime_summary['current_revision'])[:12]} a "
            f"{str(runtime_summary['target_revision'])[:12]}; restart "
            f"{', '.join(runtime_summary['services_to_restart'] or []) or 'nessuno'}; rollback "
            f"{str(runtime_summary['rollback_revision'])[:12]}"
        )
    platform_message += ". Le superfici non nominate restano invariate."

    return {
        "schema": DECISION_SCHEMA_ID,
        "request_id": request["request_id"],
        "request_digest": request_digest,
        "status": status,
        "technical_status": technical_status,
        "operator_decision_status": "covered" if not decisions_needed else "missing",
        "checks": checks,
        "blockers": blockers,
        "decisions_needed": decisions_needed,
        "declared_limits": declared_limits,
        "locked_effect": {
            "kind": kind,
            "repository": source.get("repository"),
            "revision": local_revision,
            "target_branches": target_branches,
            "runtime": runtime_summary,
        },
        "platform_gate": {
            "expected": bool(effect.get("production_bound")),
            "message": platform_message,
        },
        "next_legal_action": next_action,
        "side_effect_performed": False,
    }


def _base_case() -> dict[str, Any]:
    previous = "1" * 40
    target = "2" * 40
    return {
        "schema": SCHEMA_ID,
        "request_id": "maios-release-test",
        "created_at": "2026-08-11T09:00:00+02:00",
        "effect": {
            "kind": "combined_release",
            "source_publication": True,
            "runtime_activation": True,
            "production_bound": True,
            "batch_policy": "combined_adopted",
            "policy_evidence": "owner release contract explicitly adopts one combined source/runtime effect",
        },
        "operator_selection": {
            "outcome": "publish online and hand back the exact surface for testing",
            "source": "operator message",
            "covers_source_publication": True,
            "covers_runtime_activation": True,
        },
        "source": {
            "repository": "example/project",
            "branch": "candidate",
            "local_revision": target,
            "local_tree": "3" * 40,
            "diff_reviewed": True,
            "diff_review_evidence": "cached diff and path list",
            "scoped_paths": ["src/app.py", "tests/test_app.py"],
            "excluded_dirty_paths": ["notes/operator.html"],
            "excluded_paths_preserved": True,
            "remote_targets": [
                {
                    "branch": "candidate",
                    "role": "candidate",
                    "observed_revision": previous,
                    "expected_revision": previous,
                    "will_update": True,
                },
                {
                    "branch": "main",
                    "role": "production",
                    "observed_revision": previous,
                    "expected_revision": previous,
                    "will_update": True,
                },
            ],
            "authenticated_remote_verified": True,
            "remote_verification_evidence": "prompt-free authenticated fetch and ref readback",
            "ancestry_verified": True,
            "ancestry_evidence": "merge-base --is-ancestor for every updated ref",
            "production_consumer_known": True,
            "production_consumer_evidence": "mapped production checkout consumes main",
        },
        "validation": {
            "status": "partial",
            "passed_checks": ["focused tests", "syntax", "diff check"],
            "failed_checks": [
                {
                    "id": "workspace-topology",
                    "classification": "preexisting_out_of_scope",
                    "evidence": "known unrelated audit outside the selected owner",
                }
            ],
        },
        "runtime": {
            "host": "production.example",
            "path": "/opt/project",
            "current_revision": previous,
            "target_revision": target,
            "identity_evidence": "clean checkout and exact HEAD readback",
            "source_first_path": True,
            "runtime_drift": False,
            "direct_runtime_edit": False,
            "service_allowlist": ["project-api"],
            "services_to_restart": ["project-api"],
            "services_currently_active": ["project-api"],
            "services_currently_successful_oneshot": [],
            "rollback_revision": previous,
            "rollback_available": True,
            "rollback_independent": True,
            "rollback_evidence": "previous release remains reachable by the fixed restore path",
            "terminal_checks": sorted(REQUIRED_TERMINAL_CHECKS),
            "unchanged_surfaces": ["nginx", "database"],
        },
        "security": {
            "credential_policy_source": "workspace AGENTS.md",
            "credential_locality_preserved": True,
            "noninteractive_auth": True,
            "secrets_redacted": True,
            "candidate_code_runs_privileged": False,
            "force_push": False,
            "destructive_history": False,
            "credential_evidence": "token loaded in process memory under workspace policy",
        },
        "receipt": {
            "owner": "release owner",
            "path": "process/release-receipt.json",
        },
    }


def _local_runtime_case() -> dict[str, Any]:
    candidate = _base_case()
    candidate["request_id"] = "local-runtime-test"
    candidate["effect"] = {
        "kind": "runtime_activation",
        "source_publication": False,
        "runtime_activation": True,
        "production_bound": True,
        "batch_policy": "single_effect",
        "policy_evidence": "one local-source runtime activation with no remote publication",
    }
    candidate["operator_selection"]["covers_source_publication"] = False
    candidate["source"]["remote_targets"] = []
    candidate["source"]["authenticated_remote_verified"] = False
    candidate["source"]["remote_verification_evidence"] = (
        "not applicable: the selected immutable source repository has no remote target"
    )
    return candidate


def self_test() -> None:
    cases: list[tuple[str, dict[str, Any], str, str | None]] = []
    cases.append(("ready", _base_case(), "ready", None))
    cases.append(("local runtime ready", _local_runtime_case(), "ready", None))

    successful_oneshot = _local_runtime_case()
    successful_oneshot["runtime"]["services_currently_active"] = []
    successful_oneshot["runtime"]["services_currently_successful_oneshot"] = ["project-api"]
    cases.append(("successful oneshot runtime ready", successful_oneshot, "ready", None))

    missing_decision = _base_case()
    missing_decision["operator_selection"]["covers_runtime_activation"] = False
    cases.append(("operator decision", missing_decision, "needs_operator_decision", None))

    missing_combined_policy = _base_case()
    missing_combined_policy["effect"]["batch_policy"] = "single_effect"
    cases.append(
        (
            "combined release without adopted policy",
            missing_combined_policy,
            "blocked",
            "effect.batch_policy",
        )
    )

    stale_ref = _base_case()
    stale_ref["source"]["remote_targets"][0]["observed_revision"] = "4" * 40
    cases.append(("stale remote ref", stale_ref, "blocked", "source.remote_refs"))

    wrong_runtime = _base_case()
    wrong_runtime["runtime"]["target_revision"] = "5" * 40
    cases.append(("wrong runtime target", wrong_runtime, "blocked", "runtime.identity"))

    bad_rollback = _base_case()
    bad_rollback["runtime"]["rollback_revision"] = "2" * 40
    cases.append(("bad rollback", bad_rollback, "blocked", "runtime.rollback"))

    extra_service = _base_case()
    extra_service["runtime"]["services_to_restart"].append("nginx")
    cases.append(("service outside allowlist", extra_service, "blocked", "runtime.services"))

    in_scope_failure = _base_case()
    in_scope_failure["validation"]["failed_checks"][0]["classification"] = "in_scope"
    cases.append(("in-scope failure", in_scope_failure, "blocked", "validation.scope"))

    privileged = _base_case()
    privileged["security"]["candidate_code_runs_privileged"] = True
    cases.append(("privileged candidate", privileged, "blocked", "security.boundary"))

    for name, candidate, expected_status, expected_blocker in cases:
        result = validate_effect_request(candidate)
        if result["status"] != expected_status:
            raise AssertionError(
                f"{name}: expected {expected_status}, got {result['status']}"
            )
        if expected_blocker and not any(
            blocker.startswith(expected_blocker) for blocker in result["blockers"]
        ):
            raise AssertionError(f"{name}: missing blocker {expected_blocker}")


def main() -> int:
    parser = argparse.ArgumentParser(description=__doc__)
    parser.add_argument("request", nargs="?", type=Path)
    parser.add_argument("--self-test", action="store_true")
    args = parser.parse_args()

    if args.self_test:
        self_test()
        print(json.dumps({"self_test": "passed", "cases": 11}, sort_keys=True))
        return 0
    if args.request is None:
        parser.error("request is required unless --self-test is used")
    try:
        request = json.loads(args.request.read_text(encoding="utf-8"))
        if not isinstance(request, dict):
            raise ValueError("request root must be an object")
        print(json.dumps(validate_effect_request(request), ensure_ascii=False, indent=2))
    except Exception as exc:  # CLI boundary: always emit a compact machine-readable error.
        print(json.dumps({"status": "invalid", "error": str(exc)}, ensure_ascii=False), file=sys.stderr)
        return 2
    return 0


if __name__ == "__main__":
    raise SystemExit(main())
```

### references/release-context.schema.json

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://d-nd.com/schemas/govern-source-to-runtime/release-context.v0.json",
  "title": "Source-to-runtime release context",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "source_owner_known",
    "release_owner_known",
    "production_consumer_known",
    "remote_verified_authenticated",
    "source_diff_reviewed",
    "validation_passed",
    "push_effect",
    "source_publication_authorized",
    "runtime_activation_authorized",
    "validator_executes_candidate_code_as_privileged",
    "runtime_drift",
    "rollback_proved",
    "live_identity_verified",
    "human_acceptance_verified"
  ],
  "properties": {
    "source_owner_known": {"type": "boolean"},
    "release_owner_known": {"type": "boolean"},
    "production_consumer_known": {"type": "boolean"},
    "remote_verified_authenticated": {"type": "boolean"},
    "source_diff_reviewed": {"type": "boolean"},
    "validation_passed": {"type": "boolean"},
    "push_effect": {
      "enum": ["local_source", "source_remote_only", "production_bound_push"]
    },
    "source_publication_authorized": {"type": "boolean"},
    "runtime_activation_authorized": {"type": "boolean"},
    "validator_executes_candidate_code_as_privileged": {"type": "boolean"},
    "runtime_drift": {"type": "boolean"},
    "rollback_proved": {"type": "boolean"},
    "production_source_matches_candidate": {"type": ["boolean", "null"]},
    "runtime_matches_production_source": {"type": ["boolean", "null"]},
    "live_identity_verified": {"type": "boolean"},
    "human_acceptance_verified": {"type": "boolean"}
  }
}
```

### references/effect-request.schema.json

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://d-nd.com/schemas/govern-source-to-runtime/effect-request.v1.json",
  "title": "Evidence-bound source/runtime effect request",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schema",
    "request_id",
    "created_at",
    "effect",
    "operator_selection",
    "source",
    "validation",
    "runtime",
    "security",
    "receipt"
  ],
  "properties": {
    "schema": {"const": "dnd.effect-request.v1"},
    "request_id": {"type": "string", "minLength": 1},
    "created_at": {"type": "string", "format": "date-time"},
    "effect": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "kind", "source_publication", "runtime_activation", "production_bound",
        "batch_policy", "policy_evidence"
      ],
      "properties": {
        "kind": {"enum": ["source_push", "production_bound_push", "runtime_activation", "combined_release"]},
        "source_publication": {"type": "boolean"},
        "runtime_activation": {"type": "boolean"},
        "production_bound": {"type": "boolean"},
        "batch_policy": {"enum": ["single_effect", "combined_adopted"]},
        "policy_evidence": {"type": "string", "minLength": 1}
      }
    },
    "operator_selection": {
      "type": "object",
      "additionalProperties": false,
      "required": ["outcome", "source", "covers_source_publication", "covers_runtime_activation"],
      "properties": {
        "outcome": {"type": "string", "minLength": 1},
        "source": {"type": "string", "minLength": 1},
        "covers_source_publication": {"type": "boolean"},
        "covers_runtime_activation": {"type": "boolean"}
      }
    },
    "source": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "repository", "branch", "local_revision", "local_tree", "diff_reviewed",
        "diff_review_evidence", "scoped_paths", "excluded_dirty_paths",
        "excluded_paths_preserved", "remote_targets", "authenticated_remote_verified",
        "remote_verification_evidence", "ancestry_verified", "ancestry_evidence",
        "production_consumer_known", "production_consumer_evidence"
      ],
      "properties": {
        "repository": {"type": "string", "minLength": 1},
        "branch": {"type": "string", "minLength": 1},
        "local_revision": {"type": "string", "pattern": "^[0-9a-fA-F]{40}$"},
        "local_tree": {"type": "string", "pattern": "^[0-9a-fA-F]{40}$"},
        "diff_reviewed": {"type": "boolean"},
        "diff_review_evidence": {"type": "string", "minLength": 1},
        "scoped_paths": {"type": "array", "minItems": 1, "items": {"type": "string", "minLength": 1}},
        "excluded_dirty_paths": {"type": "array", "items": {"type": "string", "minLength": 1}},
        "excluded_paths_preserved": {"type": "boolean"},
        "remote_targets": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "required": ["branch", "role", "observed_revision", "expected_revision", "will_update"],
            "properties": {
              "branch": {"type": "string", "minLength": 1},
              "role": {"enum": ["candidate", "production"]},
              "observed_revision": {"type": "string", "pattern": "^[0-9a-fA-F]{40}$"},
              "expected_revision": {"type": "string", "pattern": "^[0-9a-fA-F]{40}$"},
              "will_update": {"type": "boolean"}
            }
          }
        },
        "authenticated_remote_verified": {"type": "boolean"},
        "remote_verification_evidence": {"type": "string", "minLength": 1},
        "ancestry_verified": {"type": "boolean"},
        "ancestry_evidence": {"type": "string", "minLength": 1},
        "production_consumer_known": {"type": "boolean"},
        "production_consumer_evidence": {"type": "string", "minLength": 1}
      }
    },
    "validation": {
      "type": "object",
      "additionalProperties": false,
      "required": ["status", "passed_checks", "failed_checks"],
      "properties": {
        "status": {"enum": ["pass", "partial", "fail"]},
        "passed_checks": {"type": "array", "items": {"type": "string", "minLength": 1}},
        "failed_checks": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "required": ["id", "classification", "evidence"],
            "properties": {
              "id": {"type": "string", "minLength": 1},
              "classification": {"enum": ["preexisting_out_of_scope", "in_scope", "unknown"]},
              "evidence": {"type": "string", "minLength": 1}
            }
          }
        }
      }
    },
    "runtime": {
      "type": ["object", "null"],
      "additionalProperties": false,
      "required": [
        "host", "path", "current_revision", "target_revision", "identity_evidence",
        "source_first_path", "runtime_drift", "direct_runtime_edit", "service_allowlist",
        "services_to_restart", "services_currently_active", "rollback_revision",
        "rollback_available", "rollback_independent", "rollback_evidence",
        "terminal_checks", "unchanged_surfaces"
      ],
      "properties": {
        "host": {"type": "string", "minLength": 1},
        "path": {"type": "string", "minLength": 1},
        "current_revision": {"type": "string", "pattern": "^[0-9a-fA-F]{40}$"},
        "target_revision": {"type": "string", "pattern": "^[0-9a-fA-F]{40}$"},
        "identity_evidence": {"type": "string", "minLength": 1},
        "source_first_path": {"type": "boolean"},
        "runtime_drift": {"type": "boolean"},
        "direct_runtime_edit": {"type": "boolean"},
        "service_allowlist": {"type": "array", "minItems": 1, "items": {"type": "string", "minLength": 1}},
        "services_to_restart": {"type": "array", "items": {"type": "string", "minLength": 1}},
        "services_currently_active": {"type": "array", "items": {"type": "string", "minLength": 1}},
        "services_currently_successful_oneshot": {"type": "array", "items": {"type": "string", "minLength": 1}},
        "rollback_revision": {"type": "string", "pattern": "^[0-9a-fA-F]{40}$"},
        "rollback_available": {"type": "boolean"},
        "rollback_independent": {"type": "boolean"},
        "rollback_evidence": {"type": "string", "minLength": 1},
        "terminal_checks": {"type": "array", "items": {"type": "string", "minLength": 1}},
        "unchanged_surfaces": {"type": "array", "minItems": 1, "items": {"type": "string", "minLength": 1}}
      }
    },
    "security": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "credential_policy_source", "credential_locality_preserved", "noninteractive_auth",
        "secrets_redacted", "candidate_code_runs_privileged", "force_push",
        "destructive_history", "credential_evidence"
      ],
      "properties": {
        "credential_policy_source": {"type": "string", "minLength": 1},
        "credential_locality_preserved": {"type": "boolean"},
        "noninteractive_auth": {"type": "boolean"},
        "secrets_redacted": {"type": "boolean"},
        "candidate_code_runs_privileged": {"type": "boolean"},
        "force_push": {"type": "boolean"},
        "destructive_history": {"type": "boolean"},
        "credential_evidence": {"type": "string", "minLength": 1}
      }
    },
    "receipt": {
      "type": "object",
      "additionalProperties": false,
      "required": ["owner", "path"],
      "properties": {
        "owner": {"type": "string", "minLength": 1},
        "path": {"type": "string", "minLength": 1}
      }
    }
  }
}
```

### examples/release-context.sample.json

```json
{
  "source_owner_known": true,
  "release_owner_known": true,
  "production_consumer_known": true,
  "remote_verified_authenticated": true,
  "source_diff_reviewed": true,
  "validation_passed": true,
  "push_effect": "production_bound_push",
  "source_publication_authorized": true,
  "runtime_activation_authorized": false,
  "validator_executes_candidate_code_as_privileged": false,
  "runtime_drift": false,
  "rollback_proved": true,
  "live_identity_verified": false,
  "human_acceptance_verified": false,
  "production_source_matches_candidate": true,
  "runtime_matches_production_source": false
}
```

### examples/effect-request.sample.json

```json
{
  "schema": "dnd.effect-request.v1",
  "request_id": "maios-release-test",
  "created_at": "2026-08-11T09:00:00+02:00",
  "effect": {
    "kind": "combined_release",
    "source_publication": true,
    "runtime_activation": true,
    "production_bound": true,
    "batch_policy": "combined_adopted",
    "policy_evidence": "owner release contract explicitly adopts one combined source/runtime effect"
  },
  "operator_selection": {
    "outcome": "publish online and hand back the exact surface for testing",
    "source": "operator message",
    "covers_source_publication": true,
    "covers_runtime_activation": true
  },
  "source": {
    "repository": "example/project",
    "branch": "candidate",
    "local_revision": "2222222222222222222222222222222222222222",
    "local_tree": "3333333333333333333333333333333333333333",
    "diff_reviewed": true,
    "diff_review_evidence": "cached diff and path list",
    "scoped_paths": [
      "src/app.py",
      "tests/test_app.py"
    ],
    "excluded_dirty_paths": [
      "notes/operator.html"
    ],
    "excluded_paths_preserved": true,
    "remote_targets": [
      {
        "branch": "candidate",
        "role": "candidate",
        "observed_revision": "1111111111111111111111111111111111111111",
        "expected_revision": "1111111111111111111111111111111111111111",
        "will_update": true
      },
      {
        "branch": "main",
        "role": "production",
        "observed_revision": "1111111111111111111111111111111111111111",
        "expected_revision": "1111111111111111111111111111111111111111",
        "will_update": true
      }
    ],
    "authenticated_remote_verified": true,
    "remote_verification_evidence": "prompt-free authenticated fetch and ref readback",
    "ancestry_verified": true,
    "ancestry_evidence": "merge-base --is-ancestor for every updated ref",
    "production_consumer_known": true,
    "production_consumer_evidence": "mapped production checkout consumes main"
  },
  "validation": {
    "status": "partial",
    "passed_checks": [
      "focused tests",
      "syntax",
      "diff check"
    ],
    "failed_checks": [
      {
        "id": "workspace-topology",
        "classification": "preexisting_out_of_scope",
        "evidence": "known unrelated audit outside the selected owner"
      }
    ]
  },
  "runtime": {
    "host": "production.example",
    "path": "/opt/project",
    "current_revision": "1111111111111111111111111111111111111111",
    "target_revision": "2222222222222222222222222222222222222222",
    "identity_evidence": "clean checkout and exact HEAD readback",
    "source_first_path": true,
    "runtime_drift": false,
    "direct_runtime_edit": false,
    "service_allowlist": [
      "project-api"
    ],
    "services_to_restart": [
      "project-api"
    ],
    "services_currently_active": [
      "project-api"
    ],
    "services_currently_successful_oneshot": [],
    "rollback_revision": "1111111111111111111111111111111111111111",
    "rollback_available": true,
    "rollback_independent": true,
    "rollback_evidence": "previous release remains reachable by the fixed restore path",
    "terminal_checks": [
      "checkout_revision",
      "destination_behavior",
      "public_identity",
      "service_health"
    ],
    "unchanged_surfaces": [
      "nginx",
      "database"
    ]
  },
  "security": {
    "credential_policy_source": "workspace AGENTS.md",
    "credential_locality_preserved": true,
    "noninteractive_auth": true,
    "secrets_redacted": true,
    "candidate_code_runs_privileged": false,
    "force_push": false,
    "destructive_history": false,
    "credential_evidence": "token loaded in process memory under workspace policy"
  },
  "receipt": {
    "owner": "release owner",
    "path": "process/release-receipt.json"
  }
}
```


My assignment, sources, existing work, available means and requested result:
