version: 1
feature: workspace-tenant-managed-object-lifecycle-governance-v1
status: implemented_on_standards_and_contract_path_only
standards_document: docs/product/standards/lifecycle-governance.md

dimensions:
  - name: local_record_lifecycle
    purpose: classify whether a local TenantPilot record is active, onboarding, archived, removed, or purged
    authoritative_sources:
      - specs/143-tenant-lifecycle-operability-context-semantics/spec.md
      - specs/091-backupschedule-retention-lifecycle/spec.md
      - apps/platform/app/Models/Tenant.php
    current_repo_real_values:
      - tenant.draft
      - tenant.onboarding
      - tenant.active
      - tenant.archived
      - backup_schedule.active
      - backup_schedule.archived
      - backup_schedule.force_deleted
    reserved_follow_up_values:
      - locally_removed
      - local_purge_scheduled
      - locally_purged
    forbidden_proxies:
      - provider_presence
      - commercial_state
      - retention_expiry

  - name: provider_presence_lifecycle
    purpose: classify whether a managed object is currently observed in a supported provider-backed result set
    authoritative_sources:
      - specs/261-provider-missing-policy-visibility/spec.md
      - apps/platform/app/Models/Policy.php
    current_repo_real_values:
      - present
      - provider_missing
    reserved_follow_up_values:
      - provider_deleted
      - provider_reappeared
    forbidden_proxies:
      - local_delete
      - local_suppression
      - restoreability

  - name: operator_suppression_lifecycle
    purpose: classify whether an operator intentionally hid or restored a local record
    authoritative_sources:
      - specs/261-provider-missing-policy-visibility/spec.md
      - apps/platform/app/Models/Policy.php
    current_repo_real_values:
      - visible
      - ignored
      - restored_to_visibility
    reserved_follow_up_values:
      - scoped_suppression_reason_families
    forbidden_proxies:
      - provider_missing
      - retention
      - commercial_state

  - name: commercial_workspace_lifecycle
    purpose: classify workspace commercial posture independently from tenant or artifact lifecycle
    authoritative_sources:
      - specs/251-commercial-entitlements-billing-state/spec.md
    current_repo_real_values:
      - trial
      - active_paid
      - grace
      - suspended_read_only
    reserved_follow_up_values:
      - closed
    forbidden_proxies:
      - tenant_archive
      - provider_missing
      - purge_due

  - name: retention_compliance_lifecycle
    purpose: classify retention, export-request, expiry, hold, deletion-request, and purge eligibility semantics
    authoritative_sources:
      - apps/platform/app/Models/ReviewPack.php
      - apps/platform/app/Console/Commands/PruneReviewPacksCommand.php
      - apps/platform/config/tenantpilot.php
    current_repo_real_values:
      - review_pack.expired
      - configured_retention_days
    reserved_follow_up_values:
      - retained
      - export_requested
      - deletion_requested
      - deletion_scheduled
      - legal_hold
      - purge_due
      - purged
    forbidden_proxies:
      - workspace_suspension
      - local_archive
      - provider_missing

  - name: restoreability_lifecycle
    purpose: classify whether historical backup or evidence truth remains restorable
    authoritative_sources:
      - specs/261-provider-missing-policy-visibility/spec.md
      - apps/platform/app/Models/BackupSet.php
      - apps/platform/app/Models/RestoreRun.php
    current_repo_real_values:
      - historical_restore_continuity_available
    reserved_follow_up_values:
      - metadata_only
      - blocked_by_dependency
      - not_restorable
      - expired_by_retention
    forbidden_proxies:
      - provider_presence
      - commercial_state
      - local_suppression

transition_governance:
  - dimension: local_record_lifecycle
    transition: archive_or_force_delete
    transition_owner: tenantpilot_local_domain_owner
    execution_path: direct_local_mutation_or_shared_operation_run_when_long_running_cross_resource_or_externally_mediated
    requires_confirmation: always
    requires_audit: true
    requires_operation_run: sometimes
    requires_export_precondition: true
    requires_retention_review: true
  - dimension: provider_presence_lifecycle
    transition: provider_missing_or_reappeared
    transition_owner: provider_observation_sync_process
    execution_path: observation_derived_update
    requires_confirmation: never
    requires_audit: true
    requires_operation_run: never
    requires_export_precondition: false
    requires_retention_review: false
  - dimension: operator_suppression_lifecycle
    transition: suppress_or_restore_visibility
    transition_owner: tenantpilot_local_domain_owner
    execution_path: direct_local_mutation
    requires_confirmation: always
    requires_audit: true
    requires_operation_run: never
    requires_export_precondition: false
    requires_retention_review: false
  - dimension: commercial_workspace_lifecycle
    transition: suspend_or_close_workspace
    transition_owner: platform_workspace_commercial_owner
    execution_path: direct_local_mutation_or_shared_operation_run_for_closure_class_or_multi_artifact_flows
    requires_confirmation: always
    requires_audit: true
    requires_operation_run: sometimes
    requires_export_precondition: true
    requires_retention_review: true
  - dimension: retention_compliance_lifecycle
    transition: mark_export_request_delete_request_hold_or_purge
    transition_owner: compliance_retention_owner
    execution_path: shared_operation_run_for_purge_class_automation_and_long_running_export_coupled_flows
    requires_confirmation: always
    requires_audit: true
    requires_operation_run: always
    requires_export_precondition: true
    requires_retention_review: true
  - dimension: restoreability_lifecycle
    transition: expire_or_reduce_restoreability
    transition_owner: backup_restore_evidence_owner
    execution_path: derived_status_when_passive_or_guarded_mutation_or_shared_operation_run_when_operator_reduces_restoreability
    requires_confirmation: sometimes
    requires_audit: true
    requires_operation_run: sometimes
    requires_export_precondition: true
    requires_retention_review: true

follow_up_slices:
  - Provider-Missing Managed Object Truth v1
  - Workspace & Tenant Closure Lifecycle v1
  - Data Export Before Deletion v1
  - Retention & Purge Governance v1
  - Restoreability Expiry & Evidence Retention v1
