{
  "schema": "MAKNOW_FLR002_SYNTHETIC_CASES_v1",
  "cases": [
    {
      "id": "baseline",
      "architecture_rule": "billing may depend on BillingRepositoryPort; direct concrete persistence access is forbidden",
      "intended_owner": "billing owns billing policy; persistence owns storage implementation",
      "observed_imports": [
        "billing -> billing_ports"
      ],
      "runtime_bindings": [
        "BillingService.repository -> SqlBillingRepository via BillingRepositoryPort"
      ],
      "runtime_trace": [
        "BillingService.charge -> BillingRepositoryPort.save -> SqlBillingRepository.save"
      ],
      "allowed_exception": {
        "present": false,
        "authority": null,
        "scope": null
      },
      "decision_authority": "ADR-17 current",
      "documentation_state": "CURRENT",
      "evidence_complete": true,
      "direct_import_violation": false,
      "runtime_bypass": false,
      "stale_documentation": false,
      "post_repair_green": false,
      "recurrence_sensor_present": true,
      "material_impact": "NONE",
      "containment_applied": "NONE_REQUIRED",
      "repair_applied": "NONE_REQUIRED",
      "sensor_evidence": "STATIC_IMPORT_RULE_AND_RUNTIME_BINDING_ASSERTION_PASS",
      "transfer": false
    },
    {
      "id": "hotfix_import",
      "architecture_rule": "billing may depend on BillingRepositoryPort; direct concrete persistence access is forbidden",
      "intended_owner": "billing owns billing policy; persistence owns storage implementation",
      "observed_imports": [
        "billing -> billing_ports",
        "billing.hotfix -> persistence.sql_repo"
      ],
      "runtime_bindings": [
        "HotfixChargePath.repository -> persistence.sql_repo.SqlBillingRepository"
      ],
      "runtime_trace": [
        "HotfixChargePath.charge -> SqlBillingRepository.save"
      ],
      "allowed_exception": {
        "present": false,
        "authority": null,
        "scope": null
      },
      "decision_authority": "ADR-17 current",
      "documentation_state": "CURRENT",
      "evidence_complete": true,
      "direct_import_violation": true,
      "runtime_bypass": true,
      "stale_documentation": false,
      "post_repair_green": false,
      "recurrence_sensor_present": true,
      "material_impact": "BILLING_BYPASSES_DECLARED_STORAGE_BOUNDARY",
      "containment_applied": "DISABLE_HOTFIX_PATH",
      "repair_applied": "REMOVE_DIRECT_IMPORT_AND_ROUTE_THROUGH_PORT",
      "sensor_evidence": "STATIC_IMPORT_RULE_FAILS_ON_MUTATION_AND_PASSES_AFTER_REPAIR",
      "transfer": false
    },
    {
      "id": "runtime_registration",
      "architecture_rule": "billing may call persistence only through BillingRepositoryPort",
      "intended_owner": "billing owns orchestration; persistence concrete writers remain behind the port",
      "observed_imports": [
        "billing -> billing_ports"
      ],
      "runtime_bindings": [
        "container: BillingService.raw_writer -> persistence.RawLedgerWriter"
      ],
      "runtime_trace": [
        "BillingService.charge -> RawLedgerWriter.append"
      ],
      "allowed_exception": {
        "present": false,
        "authority": null,
        "scope": null
      },
      "decision_authority": "ADR-17 current",
      "documentation_state": "CURRENT",
      "evidence_complete": true,
      "direct_import_violation": false,
      "runtime_bypass": true,
      "stale_documentation": false,
      "post_repair_green": false,
      "recurrence_sensor_present": true,
      "material_impact": "RUNTIME_CALL_PATH_BYPASSES_PORT_DESPITE_CLEAN_IMPORTS",
      "containment_applied": "REBIND_TO_SUPPORTED_PORT_ADAPTER",
      "repair_applied": "REMOVE_RAW_WRITER_REGISTRATION_AND_ENFORCE_PORT_BINDING",
      "sensor_evidence": "RUNTIME_BINDING_ASSERTION_FAILS_ON_FORBIDDEN_REGISTRATION",
      "transfer": false
    },
    {
      "id": "authorized_bridge",
      "architecture_rule": "billing must not use persistence internals except the authorized read-only reconciliation bridge",
      "intended_owner": "billing owns billing policy; persistence owns storage; reconciliation exception is scoped read-only",
      "observed_imports": [
        "billing.reconciliation -> persistence.read_model"
      ],
      "runtime_bindings": [
        "ReconciliationJob.reader -> persistence.read_model.ReadOnlyLedger"
      ],
      "runtime_trace": [
        "ReconciliationJob.compare -> ReadOnlyLedger.snapshot"
      ],
      "allowed_exception": {
        "present": true,
        "authority": "EX-04 approved architecture exception",
        "scope": "read-only reconciliation path only"
      },
      "decision_authority": "ADR-17 + EX-04 current",
      "documentation_state": "CURRENT",
      "evidence_complete": true,
      "direct_import_violation": false,
      "runtime_bypass": false,
      "stale_documentation": false,
      "post_repair_green": false,
      "recurrence_sensor_present": true,
      "material_impact": "EDGE_WITHIN_AUTHORIZED_EXCEPTION_SCOPE",
      "containment_applied": "NONE_REQUIRED",
      "repair_applied": "NONE_REQUIRED",
      "sensor_evidence": "EXCEPTION_SCOPE_CHECK_PASS",
      "transfer": false
    },
    {
      "id": "diagram_lag",
      "architecture_rule": "current decision assigns storage ownership to platform_storage; services must use StoragePort",
      "intended_owner": "platform_storage owns storage after ADR-31",
      "observed_imports": [
        "billing -> storage_port",
        "platform_storage.adapter -> storage_internal"
      ],
      "runtime_bindings": [
        "StoragePort -> platform_storage.SqlAdapter"
      ],
      "runtime_trace": [
        "BillingService -> StoragePort -> platform_storage.SqlAdapter"
      ],
      "allowed_exception": {
        "present": false,
        "authority": null,
        "scope": null
      },
      "decision_authority": "ADR-31 current; old diagram predates ADR-31",
      "documentation_state": "STALE_DIAGRAM_SHOWS_LEGACY_STORE",
      "evidence_complete": true,
      "direct_import_violation": false,
      "runtime_bypass": false,
      "stale_documentation": true,
      "post_repair_green": false,
      "recurrence_sensor_present": true,
      "material_impact": "DOCUMENTATION_DISAGREES_WITH_CURRENT_AUTHORITY;IMPLEMENTATION_MATCHES_CURRENT_DECISION",
      "containment_applied": "NONE_REQUIRED",
      "repair_applied": "UPDATE_ARCHITECTURE_VIEW_TO_ADR-31",
      "sensor_evidence": "ADR_TO_ARCHITECTURE_VIEW_REVIEW_CHECK",
      "transfer": false
    },
    {
      "id": "incomplete_trace",
      "architecture_rule": "billing must not reach persistence internals directly",
      "intended_owner": "billing and persistence boundary declared but current exception list unavailable",
      "observed_imports": [
        "billing -> generated_proxy"
      ],
      "runtime_bindings": [
        "MISSING"
      ],
      "runtime_trace": [
        "PARTIAL: BillingService -> generated_proxy -> UNKNOWN"
      ],
      "allowed_exception": {
        "present": null,
        "authority": "MISSING",
        "scope": "UNKNOWN"
      },
      "decision_authority": "CURRENT_DECISION_RECORD_NOT_AVAILABLE",
      "documentation_state": "CURRENT_DIAGRAM_ONLY",
      "evidence_complete": false,
      "direct_import_violation": false,
      "runtime_bypass": false,
      "stale_documentation": false,
      "post_repair_green": false,
      "recurrence_sensor_present": false,
      "material_impact": "UNKNOWN",
      "containment_applied": "LIMIT_AFFECTED_PATH",
      "repair_applied": "COLLECT_RUNTIME_REGISTRATION_AND_EXCEPTION_AUTHORITY",
      "sensor_evidence": "NOT_RUN",
      "transfer": false
    },
    {
      "id": "green_rerun",
      "architecture_rule": "billing must not import persistence internals directly",
      "intended_owner": "billing uses BillingRepositoryPort; persistence owns concrete storage",
      "observed_imports": [
        "billing -> billing_ports"
      ],
      "runtime_bindings": [
        "BillingService.repository -> BillingRepositoryPort adapter"
      ],
      "runtime_trace": [
        "functional test passes through supported path"
      ],
      "allowed_exception": {
        "present": false,
        "authority": null,
        "scope": null
      },
      "decision_authority": "ADR-17 current",
      "documentation_state": "CURRENT",
      "evidence_complete": true,
      "direct_import_violation": false,
      "runtime_bypass": false,
      "stale_documentation": false,
      "post_repair_green": true,
      "recurrence_sensor_present": false,
      "material_impact": "CURRENT_SYMPTOM_REMOVED_BUT_RECURRENCE_NOT_DETECTABLE",
      "containment_applied": "HOTFIX_PATH_REMOVED",
      "repair_applied": "DIRECT_IMPORT_REMOVED",
      "sensor_evidence": "MISSING_ARCHITECTURE_RECURRENCE_SENSOR",
      "transfer": false
    },
    {
      "id": "capability_transfer",
      "architecture_rule": "capability packages may cross through generated adapters; direct access to storage.internal is forbidden",
      "intended_owner": "checkout capability owns checkout flow; storage capability owns storage internals",
      "observed_imports": [
        "checkout_capability -> generated.storage_adapter",
        "invoice_capability -> storage.internal.sql"
      ],
      "runtime_bindings": [
        "generated.storage_adapter -> storage.public_api",
        "InvoiceService.store -> storage.internal.sql.SqlStore"
      ],
      "runtime_trace": [
        "Checkout -> generated adapter -> storage.public_api",
        "InvoiceService -> SqlStore"
      ],
      "allowed_exception": {
        "present": true,
        "authority": "CAP-POLICY-2",
        "scope": "generated adapters only; does not authorize direct storage.internal access"
      },
      "decision_authority": "CAP-POLICY-2 current",
      "documentation_state": "CURRENT",
      "evidence_complete": true,
      "direct_import_violation": true,
      "runtime_bypass": true,
      "stale_documentation": false,
      "post_repair_green": false,
      "recurrence_sensor_present": true,
      "material_impact": "ONE_ALLOWED_GENERATED_EDGE_AND_ONE_FORBIDDEN_DIRECT_INTERNAL_EDGE",
      "containment_applied": "DISABLE_DIRECT_INVOICE_STORAGE_PATH",
      "repair_applied": "ROUTE_INVOICE_THROUGH_PUBLIC_CAPABILITY_ADAPTER;KEEP_GENERATED_CHECKOUT_ADAPTER",
      "sensor_evidence": "PACKAGE_BOUNDARY_TEST_ALLOWS_GENERATED_ADAPTER_AND_BLOCKS_STORAGE_INTERNAL",
      "transfer": true
    }
  ]
}
