# ISOLATION VERIFICATION REPORT -- Template

**Purpose:** Output artifact for Layer 7 of the Six-Layer Protocol. Every cycle -- build-time AND runtime -- emits this report. Every other Evaluator component MUST treat absence-of-current-PASS-report as an automatic block. Report freshness is itself an invariant (configurable max age).

---

## Report Schema (YAML)

```yaml
isolation_verification_report:
  report_id: "IVR-<ulid>"
  cycle_type: "<build-time | runtime | chaos>"
  generated_at: "<ISO-8601>"
  generated_by: "isolation-verifier@evaluator"
  manifest_version: "<plugin manifest version in force>"
  report_freshness_max_age_seconds: <integer>

  primitive_availability:
    filesystem_event_api: "<inotify | auditd | fsevents | hash-poll>"
    namespace_primitive: "<kernel-namespaces | in-process-prefix>"
    retrieval_sandbox: "<wasi | jif | wrapper>"
    tick_definition: "<invocation-boundary | periodic | hybrid>"
    chaos_authorization: "<side-environment | live-with-override>"
    degradation_notes: |
      <free-text: which primitives are fallback-enforced, per PLUGIN_HOST_FALLBACKS.md>

  build_time_verification:
    manifest_verification_record_id: "<BDMR-ulid | null if runtime-only cycle>"
    path_glob_intersection: "<PASS | FAIL>"
    state_prefix_intersection: "<PASS | FAIL>"
    capability_identifier_intersection: "<PASS | FAIL>"
    library_root_distinctness: "<PASS | FAIL>"
    cross_cutting_artifact_distinctness: "<PASS | FAIL>"
    failures: []   # List of per-axis failures with plugin pair + surface evidence.

  baseline_capture:
    baseline_id: "<BCR-ulid | null if no new capture>"
    per_plugin:
      - plugin_id: "ram"
        file_hash_count: <int>
        namespace_ids_recorded: <bool>
        capability_catalog_size: <int>
        library_merkle_root: "0x<64-hex>"
      - plugin_id: "evaluator"
        file_hash_count: <int>
        namespace_ids_recorded: <bool>
        capability_catalog_size: <int>
        library_merkle_root: "0x<64-hex>"
    partial_baseline_flag: false

  continuous_invariants:
    ticks_evaluated: <int>
    per_invariant:
      I1_path:
        evaluations: <int>
        violations: <int>
        violations_by_classification:
          recoverable: <int>
          blocking: <int>
          doctrinal_breach: <int>
          integrity_breaking: <int>
      I2_state_namespace:
        evaluations: <int>
        violations: <int>
        violations_by_classification: {...}
      I3_retrieval_surface:
        evaluations: <int>
        violations: <int>
        violations_by_classification: {...}
      I4_library_content:
        evaluations: <int>
        violations: <int>
        drift_leaves: []   # Which files changed if I4 tripped.

  violation_records:
    - violation_id: "<VLN-ulid>"
      invariant_id: "<I1 | I2 | I3 | I4>"
      plugin_id: "<plugin>"
      surface: "<path | state-prefix | capability-surface | library-merkle>"
      classification: "<recoverable | blocking | doctrinal-breach | integrity-breaking>"
      event_detail: |
        <full state capture: event, actor, predicate inputs, baseline reference, diff>
      breaker_transition: "<Closed->Open | etc>"
      timestamp: "<ISO-8601>"

  circuit_breaker_state:
    subsystem_breakers_open: []
    global_breaker_open: false
    verifier_self_check_breaker_open: false
    state_transitions_this_cycle: <int>

  chaos_experiment_results:
    run_id: "<CHR-ulid | null if no chaos run this cycle>"
    authorization_mode: "<side-environment | live-with-override | not-run>"
    attempts:
      - class: "<1..7>"
        variant: "<variant name>"
        staged_input: |
          <free-text description of the staged attempt>
        verifier_response: "<trap | silent-success>"
        breaker_observed: "<opened | remained-closed>"
    trap_rate: <float 0.0-1.0>
    silent_success_count: <int>

  lock_down_state:
    per_plugin:
      - plugin_id: "<plugin>"
        locked: <bool>
        locked_at: "<ISO-8601 | null>"
        expansion_attempts_this_cycle: <int>
        expansion_attempts_log: []

  overall_verdict: "<PASS | FAIL>"
  verdict_rationale: |
    <PASS only if: every axis PASS AND no global/self-check breaker open AND chaos trap_rate == 1.0 AND no partial_baseline_flag AND no missing-data.>
    <Otherwise FAIL with explicit missing-axis or violation reference.>

  downstream_consumption:
    downstream_components: ["frame-host", "frame-divergence-gate", "audit-method-engine",
                            "blind-spot-mapper", "independent-scoring-layer",
                            "self-audit-resistance-monitor", "audit-charter-lock",
                            "reopen-authority-enforcer"]
    block_on_stale: true
    block_on_fail: true

  signed_by: "isolation-verifier@evaluator"
  signature: "<cryptographic signature over the report body>"
```

---

## Verdict Rules

**PASS is returned ONLY when all of the following hold:**
1. Every per-axis verdict in `build_time_verification` is `PASS` (for build-time cycles).
2. `continuous_invariants` shows zero violations at classification `doctrinal-breach` or `integrity-breaking`.
3. `circuit_breaker_state.global_breaker_open` is false AND `verifier_self_check_breaker_open` is false.
4. `chaos_experiment_results.trap_rate` is exactly 1.0 AND `silent_success_count` is 0 (for cycles that include a chaos run).
5. `baseline_capture.partial_baseline_flag` is false.
6. No axis is missing data; if data is missing, the verdict is FAIL with a missing-axis flag.

**Any other condition is FAIL.** There is no partial PASS. There is no "PASS with notes."

---

## Freshness Contract

Downstream components compute `(now - report.generated_at) <= report.report_freshness_max_age_seconds`. If the inequality is violated, the report is stale and downstream components MUST block. A stale PASS is not a PASS.

---

## Signing Discipline

The report is signed by the Isolation Verifier's signing identity. Tampering with the report is an integrity-breaking violation caught on the next I4 recompute against the reports directory. Unsigned reports are refused by downstream components.

---

## Example Usage in Downstream Component

```
fn pre_run_check(report: IsolationVerificationReport) -> Result {
  require(report.overall_verdict == "PASS");
  require(!report.stale(now));
  require(report.signed_by == "isolation-verifier@evaluator");
  require(report.signature.valid());
  return Ok;
}
```

Any `require` fail -> downstream component refuses to run AND emits a block-reason log entry referencing the report_id.
