{
  "schema": "nexuscrm.runtime-record-access-metadata-closure.v1a-m/v1",
  "evidence_revision": "964150890e86fccbea8268621bb76ea5551fb90f",
  "capability": "current record-access Read/Edit/Delete/Locked evaluation",
  "projection_profile": "record-access/v1",
  "current_call_path": [
    {
      "path": "nexuscrm-records/contract_adapter.go",
      "anchor": "func (s *ContractService) BatchRecordAccess",
      "role": "neutral in-process adapter"
    },
    {
      "path": "nexuscrm-records/persistence_bulk_ops.go",
      "anchor": "func (ps *PersistenceService) RetrieveManyRaw",
      "role": "object Read, raw record hydration, and RLS masking"
    },
    {
      "path": "nexuscrm-permissions/record_access.go",
      "anchor": "func (ps *PermissionService) BatchCheckRecordAccess",
      "role": "Read/Edit/Delete/Locked evaluator"
    }
  ],
  "owner_classes": [
    "catalog_revision",
    "security_epoch",
    "runtime_database",
    "trusted_call"
  ],
  "facts": [
    {
      "id": "catalog.object-identity-read-source",
      "owner": "catalog_revision",
      "projection": "record-access/v1",
      "consumer": "object-type resolution and repository table routing",
      "evidence_path": "nexuscrm-persistence/record_repository.go",
      "evidence_anchor": "func (r *RecordRepository) listLiveObjects"
    },
    {
      "id": "catalog.field-runtime-shape",
      "owner": "catalog_revision",
      "projection": "record-access/v1",
      "consumer": "raw row hydration, policy fields, sharing criteria, and formula dependencies",
      "evidence_path": "nexuscrm-persistence/record_repository.go",
      "evidence_anchor": "func (r *RecordRepository) FindMany"
    },
    {
      "id": "catalog.required-read-permission",
      "owner": "catalog_revision",
      "projection": "record-access/v1",
      "consumer": "object Read setup gate",
      "evidence_path": "nexuscrm-permissions/service.go",
      "evidence_anchor": "requiredReadGranted := false"
    },
    {
      "id": "catalog.required-write-permission",
      "owner": "catalog_revision",
      "projection": "record-access/v1",
      "consumer": "object Edit/Delete setup gate",
      "evidence_path": "nexuscrm-permissions/service.go",
      "evidence_anchor": "func (ps *PermissionService) requiredSystemPermissionsForSetupObject"
    },
    {
      "id": "catalog.read-edit-delete-access-policy",
      "owner": "catalog_revision",
      "projection": "record-access/v1",
      "consumer": "derived object Read/Edit/Delete evaluation and inherited operation closure",
      "evidence_path": "nexuscrm-permissions/access_policy.go",
      "evidence_anchor": "func (ps *PermissionService) evaluateAccessPolicyExpr"
    },
    {
      "id": "catalog.row-read-policy",
      "owner": "catalog_revision",
      "projection": "record-access/v1",
      "consumer": "target-record and owner-visibility RLS",
      "evidence_path": "nexuscrm-permissions/record_access.go",
      "evidence_anchor": "func (ps *PermissionService) checkTargetRecordReadAccess"
    },
    {
      "id": "catalog.sharing-model-hierarchy",
      "owner": "catalog_revision",
      "projection": "record-access/v1",
      "consumer": "row visibility classification and hierarchy grant eligibility",
      "evidence_path": "nexuscrm-permissions/record_access.go",
      "evidence_anchor": "rowVis := models.RowVisibilityFor(schema)"
    },
    {
      "id": "catalog.sharing-parent-relationship",
      "owner": "catalog_revision",
      "projection": "record-access/v1",
      "consumer": "ControlledByParent record traversal",
      "evidence_path": "nexuscrm-permissions/record_access.go",
      "evidence_anchor": "func (ps *PermissionService) checkControlledByParentAccessDetailed"
    },
    {
      "id": "catalog.sharing-rule-declarations",
      "owner": "catalog_revision",
      "projection": "record-access/v1",
      "consumer": "criteria and source/target role or group rule evaluation",
      "evidence_path": "nexuscrm-permissions/sharing_rules.go",
      "evidence_anchor": "func (ps *PermissionService) checkSharingRuleAccess"
    },
    {
      "id": "catalog.lock-rule-formula",
      "owner": "catalog_revision",
      "projection": "record-access/v1",
      "consumer": "Locked signal and mutation denial",
      "evidence_path": "nexuscrm-permissions/locked_condition.go",
      "evidence_anchor": "func (ps *PermissionService) evaluateLockRuleForGate"
    },
    {
      "id": "catalog.generic-delete-blocker",
      "owner": "catalog_revision",
      "projection": "record-access/v1",
      "consumer": "generic object Delete suppression",
      "evidence_path": "nexuscrm-permissions/delete_lifecycle_access.go",
      "evidence_anchor": "func schemaBlocksGenericDelete"
    },
    {
      "id": "security.effective-permission-grants",
      "owner": "security_epoch",
      "projection": "excluded",
      "consumer": "object and system permission predicates",
      "evidence_path": "nexuscrm-permissions/service.go",
      "evidence_anchor": "func (ps *PermissionService) effectiveSystemPermissionsForDecision"
    },
    {
      "id": "security.permission-set-grant-projection",
      "owner": "security_epoch",
      "projection": "excluded",
      "consumer": "dynamic SystemPermission virtual field values projected onto raw records before LockRule and policy evaluation",
      "evidence_path": "nexuscrm-records/persistence_bulk_ops.go",
      "evidence_anchor": "func (ps *PersistenceService) projectPermissionGrants"
    },
    {
      "id": "security.role-group-membership",
      "owner": "security_epoch",
      "projection": "excluded",
      "consumer": "hierarchy and sharing-rule principal resolution",
      "evidence_path": "nexuscrm-permissions/sharing_rules.go",
      "evidence_anchor": "func (ps *PermissionService) isUserInRoleOrAbove"
    },
    {
      "id": "runtime.root-record-payload-existence",
      "owner": "runtime_database",
      "projection": "excluded",
      "consumer": "record existence, ownership, policy and formula values",
      "evidence_path": "nexuscrm-records/persistence_bulk_ops.go",
      "evidence_anchor": "rawRecords, err := ps.repo.FindMany"
    },
    {
      "id": "runtime.related-record-payload",
      "owner": "runtime_database",
      "projection": "excluded",
      "consumer": "ControlledByParent and targetRecordRead recursion",
      "evidence_path": "nexuscrm-permissions/record_access.go",
      "evidence_anchor": "parentRecord, err := ps.parentRecordForAccessEvaluation"
    },
    {
      "id": "runtime.record-share-team-state",
      "owner": "runtime_database",
      "projection": "excluded",
      "consumer": "manual share and team row access",
      "evidence_path": "nexuscrm-permissions/record_access.go",
      "evidence_anchor": "ps.checkManualShareAccess"
    },
    {
      "id": "runtime.folder-access-state",
      "owner": "runtime_database",
      "projection": "excluded",
      "consumer": "FolderSharing and FolderContentSharing access decisions",
      "evidence_path": "nexuscrm-permissions/folder_access.go",
      "evidence_anchor": "func (fas *FolderAccessService) CheckAccess"
    },
    {
      "id": "runtime.approval-lock-instances",
      "owner": "runtime_database",
      "projection": "excluded",
      "consumer": "dynamic Locked and mutation denial",
      "evidence_path": "nexuscrm-permissions/approval_lock.go",
      "evidence_anchor": "func (ps *PermissionService) isApprovalLockedForOperation"
    },
    {
      "id": "runtime.object-type-record-probes",
      "owner": "runtime_database",
      "projection": "excluded",
      "consumer": "existence probe against Catalog-projected object/table candidates",
      "evidence_path": "nexuscrm-persistence/record_repository.go",
      "evidence_anchor": "func (r *RecordRepository) FindObjectTypesForIDs"
    },
    {
      "id": "request.trusted-call-identity-scope",
      "owner": "trusted_call",
      "projection": "excluded",
      "consumer": "Org, AppInstallation, workload, user/session, capability and SecurityEpoch binding",
      "evidence_path": "backend/internal/runtimeapi/security_admission.go",
      "evidence_anchor": "type TrustedCall struct"
    }
  ],
  "non_serving_guard": {
    "production_and_command_test_closures_exclude_catalogsnapshot": true,
    "runtime_commands_exclude_record_access_profile_and_v2_schema": true,
    "catalogsnapshot_has_no_serving_selector": true,
    "parity_fixture_may_bind_view_directly": true,
    "p7c_s1_v1b_owns_the_only_future_serving_flip": true
  },
  "parity_fixture": {
    "path": "nexuscrm-records/runtime_metadata_record_access_parity_test.go",
    "anchor": "TestRuntimeMetadataViewRecordAccessParityUsesOneBoundMetadataReadPath",
    "proves": "the current PermissionService returns identical Read/Edit/Delete/Locked outcomes from legacy effective metadata and one bound immutable view while all dynamic facts remain repository-owned"
  },
  "p7c_v1b_switches": [
    {
      "id": "adapter-root-schema",
      "path": "nexuscrm-records/contract_adapter.go",
      "anchor": "schema := s.persistence.metadata.GetSchema",
      "action": "consume the request-bound view object and remove the direct MetadataService read"
    },
    {
      "id": "retrieve-many-shape",
      "path": "nexuscrm-records/persistence_bulk_ops.go",
      "anchor": "func (ps *PersistenceService) RetrieveManyRaw",
      "action": "pass the bound object shape through root hydration and RLS"
    },
    {
      "id": "permission-grant-projection-shape",
      "path": "nexuscrm-records/persistence_bulk_ops.go",
      "anchor": "func (ps *PersistenceService) projectPermissionGrants",
      "action": "derive virtual field shape from the bound view while keeping grant values Security-owned"
    },
    {
      "id": "record-repository-schema-provider",
      "path": "nexuscrm-persistence/record_repository.go",
      "anchor": "func (r *RecordRepository) getSchema",
      "action": "replace the MetadataService/direct-repository fallback with the request-bound shape supplied by Runtime assembly"
    },
    {
      "id": "object-type-candidates",
      "path": "nexuscrm-persistence/record_repository.go",
      "anchor": "func (r *RecordRepository) listLiveObjects",
      "action": "take object/read-table candidates from the bound view and retain only dynamic ID probes"
    },
    {
      "id": "permission-metadata-provider",
      "path": "nexuscrm-permissions/service.go",
      "anchor": "type metadataProvider interface",
      "action": "bind all record-access shape methods to the same request view"
    },
    {
      "id": "sharing-rule-process-cache",
      "path": "nexuscrm-permissions/sharing_rules.go",
      "anchor": "func (ps *PermissionService) getCachedSharingRules",
      "action": "remove the independent TTL metadata cache from the new composition and read rules from the bound view"
    }
  ]
}
